Scippy

GCG

Branch-and-Price & Column Generation for Everyone

gcg.h File Reference

Detailed Description

GCG interface methods.

Author
Martin Bergner

Definition in file gcg.h.

#include "scip/scip.h"
#include "def.h"
#include "type_branchgcg.h"
#include "type_decomp.h"
#include "type_detector.h"
#include "type_solver.h"
#include "pub_gcgvar.h"
#include "pub_decomp.h"
#include "relax_gcg.h"
#include "gcg_general.h"

Go to the source code of this file.

Functions

SCIP_Bool GCGisOriginal (SCIP *scip)
 
SCIP_Bool GCGisMaster (SCIP *scip)
 
SCIP_RETCODE GCGprintStatistics (SCIP *scip, FILE *file)
 
SCIP_RETCODE GCGprintCompleteDetectionStatistics (SCIP *scip, FILE *file)
 
SCIP_RETCODE GCGprintInstanceName (SCIP *scip, FILE *file)
 
SCIP_RETCODE GCGprintMiplibStructureInformation (SCIP *scip, SCIP_DIALOGHDLR *dialoghdlr)
 
SCIP_RETCODE GCGprintBlockcandidateInformation (SCIP *scip, FILE *file)
 
SCIP_RETCODE GCGprintCompleteDetectionTime (SCIP *scip, FILE *file)
 
SCIP_RETCODE GCGprintPartitionInformation (SCIP *scip, FILE *file)
 
SCIP_RETCODE GCGprintDecompInformation (SCIP *scip, FILE *file)
 
SCIP_Real GCGgetPricingprobsMemUsed (SCIP *scip)
 
void GCGprintDegeneracy (SCIP *scip, double degeneracy)
 
SCIP_Real GCGgetDegeneracy (SCIP *scip)
 
SCIP_Real GCGtransformOrigvalsToMastervals (SCIP *scip, SCIP_VAR **origvars, SCIP_Real *origvals, int norigvars, SCIP_VAR **mastervars, SCIP_Real *mastervals, int nmastervars)
 
SCIP_RETCODE GCGtransformMastersolToOrigsol (SCIP *scip, SCIP_SOL *mastersol, SCIP_SOL **origsol)
 
SCIP_Bool GCGisConsGCGCons (SCIP_CONS *cons)
 
SCIP * GCGgetOriginalprob (SCIP *masterprob)
 
SCIP * GCGgetMasterprob (SCIP *scip)
 
SCIP * GCGgetPricingprob (SCIP *scip, int pricingprobnr)
 
int GCGgetNPricingprobs (SCIP *scip)
 
SCIP_Bool GCGisPricingprobRelevant (SCIP *scip, int pricingprobnr)
 
int GCGgetBlockRepresentative (SCIP *scip, int pricingprobnr)
 
int GCGgetNRelPricingprobs (SCIP *scip)
 
int GCGgetNIdenticalBlocks (SCIP *scip, int pricingprobnr)
 
int GCGgetNMasterConss (SCIP *scip)
 
SCIP_CONS ** GCGgetMasterConss (SCIP *scip)
 
SCIP_CONS ** GCGgetOrigMasterConss (SCIP *scip)
 
SCIP_CONS * GCGgetConvCons (SCIP *scip, int blocknr)
 
SCIP_Bool GCGisMasterSetCovering (SCIP *scip)
 
SCIP_Bool GCGisMasterSetPartitioning (SCIP *scip)
 
SCIP_Bool GCGrelaxIsInitialized (SCIP *scip)
 
SCIP_CONS ** GCGgetVarLinkingconss (SCIP *scip)
 
int * GCGgetVarLinkingconssBlock (SCIP *scip)
 
int GCGgetNVarLinkingconss (SCIP *scip)
 
int GCGgetNLinkingvars (SCIP *scip)
 
int GCGgetNTransvars (SCIP *scip)
 
SCIP_VAR * GCGgetAuxiliaryVariable (SCIP *scip, int pricingprobnr)
 
SCIP_SOL * GCGgetBendersRelaxationSol (SCIP *scip)
 

Function Documentation

◆ GCGisOriginal()

SCIP_Bool GCGisOriginal ( SCIP *  scip)

checks whether the scip is the original scip instance

Returns
whether the scip is the original scip instance
Parameters
scipSCIP data structure

Definition at line 665 of file misc.c.

Referenced by GCG_DECL_BRANCHMASTERSOLVED(), GCGbranchOrigUpdateExternBranchcands(), GCGconsMasterbranchReleaseOrigbranchConss(), GCGoriginalVarAddMasterVar(), and GCGupdateVarStatistics().

◆ GCGisMaster()

◆ GCGprintStatistics()

SCIP_RETCODE GCGprintStatistics ( SCIP *  scip,
FILE *  file 
)

◆ GCGprintCompleteDetectionStatistics()

SCIP_RETCODE GCGprintCompleteDetectionStatistics ( SCIP *  scip,
FILE *  file 
)

print out complete detection statistics

Returns
SCIP return code
Parameters
scipSCIP data structure
fileoutput file or NULL for standard output

Definition at line 755 of file misc.c.

References GCGdetectionTookPlace(), GCGprintBlockcandidateInformation(), GCGprintCompleteDetectionTime(), GCGprintDecompInformation(), GCGprintInstanceName(), and GCGprintPartitionInformation().

Referenced by SCIP_DECL_DIALOGEXEC().

◆ GCGprintInstanceName()

SCIP_RETCODE GCGprintInstanceName ( SCIP *  scip,
FILE *  file 
)

print name of current instance to given output

Returns
SCIP return code
Parameters
scipSCIP data structure
fileoutput file or NULL for standard output

Definition at line 738 of file misc.c.

Referenced by GCGprintCompleteDetectionStatistics().

◆ GCGprintMiplibStructureInformation()

SCIP_RETCODE GCGprintMiplibStructureInformation ( SCIP *  scip,
SCIP_DIALOGHDLR *  dialoghdlr 
)
Parameters
scipSCIP data structure
dialoghdlrdialog handler

◆ GCGprintBlockcandidateInformation()

SCIP_RETCODE GCGprintBlockcandidateInformation ( SCIP *  scip,
FILE *  file 
)
Parameters
scipSCIP data structure
fileoutput file or NULL for standard output

Definition at line 2447 of file cons_decomp.cpp.

References getConshdlrdata(), and gcg::DETPROBDATA::printBlockcandidateInformation().

Referenced by GCGprintCompleteDetectionStatistics(), and SCIP_DECL_DIALOGEXEC().

◆ GCGprintCompleteDetectionTime()

SCIP_RETCODE GCGprintCompleteDetectionTime ( SCIP *  scip,
FILE *  file 
)
Parameters
scipSCIP data structure
fileoutput file or NULL for standard output

Definition at line 2468 of file cons_decomp.cpp.

References GCGconshdlrDecompGetCompleteDetectionTime().

Referenced by GCGprintCompleteDetectionStatistics().

◆ GCGprintPartitionInformation()

SCIP_RETCODE GCGprintPartitionInformation ( SCIP *  scip,
FILE *  file 
)
Parameters
scipSCIP data structure
fileoutput file or NULL for standard output

Definition at line 2481 of file cons_decomp.cpp.

References getConshdlrdata(), and gcg::DETPROBDATA::printPartitionInformation().

Referenced by GCGprintCompleteDetectionStatistics().

◆ GCGprintDecompInformation()

◆ GCGgetPricingprobsMemUsed()

SCIP_Real GCGgetPricingprobsMemUsed ( SCIP *  scip)

gets the total memory used after problem creation stage for all pricingproblems

Definition at line 4925 of file relax_gcg.c.

References RELAX_NAME.

◆ GCGprintDegeneracy()

void GCGprintDegeneracy ( SCIP *  scip,
double  degeneracy 
)

prints out the degeneracy of the problem

Parameters
scipSCIP data structure
degeneracydegeneracy to print

◆ GCGgetDegeneracy()

SCIP_Real GCGgetDegeneracy ( SCIP *  scip)

returns the average degeneracy

Definition at line 4978 of file relax_gcg.c.

References GCGmasterGetDegeneracy(), and RELAX_NAME.

Referenced by SCIP_DECL_DISPOUTPUT().

◆ GCGtransformOrigvalsToMastervals()

SCIP_Real GCGtransformOrigvalsToMastervals ( SCIP *  scip,
SCIP_VAR **  origvars,
SCIP_Real *  origvals,
int  norigvars,
SCIP_VAR **  mastervars,
SCIP_Real *  mastervals,
int  nmastervars 
)

transforms given values of the given original variables into values of the given master variables

Returns
the sum of the values of the corresponding master variables that are fixed
Parameters
scipSCIP data structure
origvarsarray with (subset of the) original variables
origvalsarray with values for the given original variables
norigvarsnumber of given original variables
mastervarsarray of (all present) master variables
mastervalsarray to store the values of the master variables
nmastervarsnumber of master variables

Definition at line 545 of file misc.c.

References GCGgetMasterprob(), GCGoriginalVarGetMastervals(), GCGoriginalVarGetMastervars(), GCGoriginalVarGetNMastervars(), GCGoriginalVarGetPricingVar(), GCGpricingVarGetOriginalVar(), GCGvarGetBlock(), GCGvarIsOriginal(), and GCGvarIsPricing().

Referenced by SCIP_DECL_SEPAEXECLP().

◆ GCGtransformMastersolToOrigsol()

SCIP_RETCODE GCGtransformMastersolToOrigsol ( SCIP *  scip,
SCIP_SOL *  mastersol,
SCIP_SOL **  origsol 
)

◆ GCGisConsGCGCons()

SCIP_Bool GCGisConsGCGCons ( SCIP_CONS *  cons)

Checks whether the constraint belongs to GCG or not

Returns
whether the constraint belongs to GCG or not
Parameters
consconstraint to check

Definition at line 787 of file misc.c.

Referenced by assignConstraintsToRepresentatives(), createDecompFromPartialdec(), DECcreateBasicDecomp(), DECcreateDecompFromMasterconss(), DECdecompAddRemainingConss(), DECdecompCheckConsistency(), and fillConstoblock().

◆ GCGgetOriginalprob()

SCIP* GCGgetOriginalprob ( SCIP *  masterprob)

◆ GCGgetMasterprob()

SCIP* GCGgetMasterprob ( SCIP *  scip)

returns the master problem

Definition at line 3920 of file relax_gcg.c.

References RELAX_NAME.

Referenced by addBranchcandsToData(), applyOriginalBranching(), applyProbing(), branchDirectlyOnMastervar(), branchExtern(), branchVar(), calcMasterPscosts(), calcPscostDownMaster(), calcPscostUpMaster(), ChooseSeparateMethod(), compareExtremePointsToRelaxSol(), computeAlpha(), countExtremePoints(), createBranchNodesInOrigprob(), createChildNodesGeneric(), createChildNodesRyanfoster(), createOrigbranchConstraint(), execRelpsprob(), Explore(), fixVariables(), GCG_DECL_BRANCHDATADELETE(), GCG_DECL_BRANCHMASTERSOLVED(), GCG_DECL_DIVINGINITEXEC(), GCGbranchSelectCandidateStrongBranchingOrig(), GCGbranchSelectCandidateStrongBranchingRyanfoster(), GCGgetDualbound(), GCGgetPrimalbound(), GCGincludeDivingHeurOrig(), GCGprintDecompStatistics(), GCGprintStatistics(), GCGrelaxBranchDataDelete(), GCGrelaxNewProbingnodeOrig(), GCGrelaxUpdateCurrentSol(), GCGtransformMastersolToOrigsol(), GCGtransformOrigvalsToMastervals(), getMasterDownFrac(), getMasterDownScore(), getMasterUpFrac(), getMasterUpScore(), getNLocksDown(), getNLocksUp(), getRootRelaxSol(), newProbingNodeRyanfosterMaster(), SCIP_DECL_DIALOGEXEC(), SCIP_DECL_DISPOUTPUT(), SCIP_DECL_EVENTEXEC(), SCIP_DECL_HEUREXEC(), SCIP_DECL_PARAMCHGD(), SCIPincludeEventHdlrOrigdiving(), SCIPprocessGCGShellArguments(), score_function(), selectCandidate(), selectExtremePoints(), selectExtremePointsRandomized(), Separate(), setSeparatorsAggressive(), setSeparatorsDefault(), setSeparatorsFast(), and setSeparatorsOff().

◆ GCGgetPricingprob()

◆ GCGgetNPricingprobs()

◆ GCGisPricingprobRelevant()

SCIP_Bool GCGisPricingprobRelevant ( SCIP *  scip,
int  pricingprobnr 
)

returns TRUE iff the pricingproblem of the given number is relevant, that means is not identical to another and represented by it

returns TRUE iff the pricing problem of the given number is relevant, that means is not identical to another and represented by it

Definition at line 4000 of file relax_gcg.c.

References RELAX_NAME.

Referenced by ObjPricerGcg::addArtificialVars(), addPPObjConss(), GCG_DECL_SOLVEREXITSOL(), GCG_DECL_SOLVERINITSOL(), GCGpricerGetNPointsProb(), GCGpricerGetNRaysProb(), GCGprintDecompStatistics(), ObjPricerGcg::getConvconsDualsol(), ObjPricerGcg::getDualconvsum(), gcg::Pricingcontroller::initSol(), ObjPricerGcg::pricingLoop(), SCIP_DECL_EVENTEXEC(), SCIP_DECL_PRICERINITSOL(), selectExtremePointsRandomized(), ObjPricerGcg::setPricingObjs(), setPricingObjsOriginal(), and gcg::Stabilization::updateStabilityCenter().

◆ GCGgetBlockRepresentative()

int GCGgetBlockRepresentative ( SCIP *  scip,
int  pricingprobnr 
)

for a given block, return the block by which it is represented

Definition at line 4023 of file relax_gcg.c.

References RELAX_NAME.

Referenced by compareExtremePointsToRelaxSol(), countExtremePoints(), fixVariables(), GCGbranchGenericInitbranch(), GCGmasterTransOrigSolToMasterVars(), selectExtremePoints(), and selectExtremePointsRandomized().

◆ GCGgetNRelPricingprobs()

int GCGgetNRelPricingprobs ( SCIP *  scip)

◆ GCGgetNIdenticalBlocks()

int GCGgetNIdenticalBlocks ( SCIP *  scip,
int  pricingprobnr 
)

◆ GCGgetNMasterConss()

◆ GCGgetMasterConss()

SCIP_CONS** GCGgetMasterConss ( SCIP *  scip)

◆ GCGgetOrigMasterConss()

SCIP_CONS** GCGgetOrigMasterConss ( SCIP *  scip)

returns the contraints in the original problem that correspond to the constraints in the master problem

returns the linking constraints in the original problem that correspond to the constraints in the master problem

Definition at line 4117 of file relax_gcg.c.

References RELAX_NAME.

Referenced by createGraph(), ObjPricerGcg::getStabilizedDualObjectiveValue(), ObjPricerGcg::setPricingObjs(), and setuparrays().

◆ GCGgetConvCons()

SCIP_CONS* GCGgetConvCons ( SCIP *  scip,
int  blocknr 
)

◆ GCGisMasterSetCovering()

SCIP_Bool GCGisMasterSetCovering ( SCIP *  scip)

returns whether the master problem is a set covering problem

Definition at line 4221 of file relax_gcg.c.

References RELAX_NAME.

Referenced by SCIP_DECL_BRANCHEXECLP(), SCIP_DECL_BRANCHEXECPS(), and SCIP_DECL_HEUREXEC().

◆ GCGisMasterSetPartitioning()

SCIP_Bool GCGisMasterSetPartitioning ( SCIP *  scip)

returns whether the master problem is a set partitioning problem

Definition at line 4240 of file relax_gcg.c.

References RELAX_NAME.

Referenced by SCIP_DECL_BRANCHEXECLP(), and SCIP_DECL_BRANCHEXECPS().

◆ GCGrelaxIsInitialized()

SCIP_Bool GCGrelaxIsInitialized ( SCIP *  scip)

returns whether the relaxator has been initialized

Definition at line 4958 of file relax_gcg.c.

References RELAX_NAME.

Referenced by SCIP_DECL_EVENTEXEC().

◆ GCGgetVarLinkingconss()

SCIP_CONS** GCGgetVarLinkingconss ( SCIP *  scip)

return linking constraints for variables

Definition at line 5005 of file relax_gcg.c.

References RELAX_NAME.

Referenced by ObjPricerGcg::getStabilizedDualObjectiveValue(), gcg::Stabilization::linkingconsGetDual(), and ObjPricerGcg::setPricingObjs().

◆ GCGgetVarLinkingconssBlock()

int* GCGgetVarLinkingconssBlock ( SCIP *  scip)

return blocks of linking constraints for variables

Definition at line 5024 of file relax_gcg.c.

References RELAX_NAME.

Referenced by ObjPricerGcg::getStabilizedDualObjectiveValue(), and ObjPricerGcg::setPricingObjs().

◆ GCGgetNVarLinkingconss()

int GCGgetNVarLinkingconss ( SCIP *  scip)

◆ GCGgetNLinkingvars()

int GCGgetNLinkingvars ( SCIP *  scip)

return number of linking variables

Definition at line 5062 of file relax_gcg.c.

References RELAX_NAME.

Referenced by ObjPricerGcg::getStabilizedDualObjectiveValue().

◆ GCGgetNTransvars()

int GCGgetNTransvars ( SCIP *  scip)

return number of variables directly transferred to the master problem

Definition at line 5081 of file relax_gcg.c.

References RELAX_NAME.

Referenced by ObjPricerGcg::getStabilizedDualObjectiveValue().

◆ GCGgetAuxiliaryVariable()

SCIP_VAR* GCGgetAuxiliaryVariable ( SCIP *  scip,
int  pricingprobnr 
)

returns the auxiliary variable for the given pricing probblem

Parameters
scipSCIP data structure
pricingprobnrnumber of the pricing problem

◆ GCGgetBendersRelaxationSol()

SCIP_SOL* GCGgetBendersRelaxationSol ( SCIP *  scip)

returns the relaxation solution from the Benders' decomposition

Definition at line 5100 of file relax_gcg.c.

References RELAX_NAME, and SCIPbendersGetRelaxSol().

Referenced by GCGtransformMastersolToOrigsol().