Scippy

GCG

Branch-and-Price & Column Generation for Everyone

Detailed Description

GCG relaxator.

Author
Gerald Gamrath
Martin Bergner
Alexander Gross
Michael Bastubbe

Definition in file relax_gcg.c.

#include <string.h>
#include "scip/scipdefplugins.h"
#include "scip/cons_linear.h"
#include "scip/cons_setppc.h"
#include "scip/scip.h"
#include "scip/misc.h"
#include "scip/clock.h"
#include "relax_gcg.h"
#include "struct_branchgcg.h"
#include "cons_origbranch.h"
#include "cons_masterbranch.h"
#include "pricer_gcg.h"
#include "benders_gcg.h"
#include "masterplugins.h"
#include "bendersplugins.h"
#include "cons_decomp.h"
#include "scip_misc.h"
#include "params_visu.h"
#include "gcg.h"

Go to the source code of this file.

Data Structures

struct  SCIP_RelaxData
 

Macros

#define RELAX_NAME   "gcg"
 
#define RELAX_DESC   "relaxator for gcg project representing the master lp"
 
#define RELAX_PRIORITY   -1
 
#define RELAX_FREQ   1
 
#define RELAX_INCLUDESLP   TRUE
 
#define DEFAULT_DISCRETIZATION   TRUE
 
#define DEFAULT_MIPDISCRETIZATION   TRUE
 
#define DEFAULT_AGGREGATION   TRUE
 
#define DEFAULT_DISPINFOS   FALSE
 
#define DEFAULT_MODE   DEC_DECMODE_DANTZIGWOLFE
 
#define DEFAULT_BLISS   TRUE
 
#define DEFAULT_BLISS_SEARCH_NODE_LIMIT   0
 
#define DEFAULT_BLISS_GENERATOR_LIMIT   0
 
#define DELVARS
 
#define relaxCopyGcg   NULL
 
#define relaxInitGcg   NULL
 

Functions

static SCIP_RETCODE setOriginalVarBlockNr (SCIP *scip, SCIP_RELAXDATA *relaxdata, SCIP_VAR *var, int newblock)
 
static SCIP_RETCODE markConsMaster (SCIP *scip, SCIP_RELAXDATA *relaxdata, SCIP_CONS *cons)
 
static SCIP_RETCODE convertStructToGCG (SCIP *scip, SCIP_RELAXDATA *relaxdata, DEC_DECOMP *decomp)
 
static SCIP_RETCODE ensureSizeMasterConss (SCIP *scip, SCIP_RELAXDATA *relaxdata, int size)
 
static SCIP_RETCODE ensureSizeBranchrules (SCIP *scip, SCIP_RELAXDATA *relaxdata)
 
static SCIP_RETCODE checkSetppcStructure (SCIP *scip, SCIP_RELAXDATA *relaxdata)
 
static SCIP_Bool realArraysAreEqual (SCIP *scip, SCIP_Real *array1, int array1length, SCIP_Real *array2, int array2length)
 
static SCIP_RETCODE checkIdentical (SCIP *scip, SCIP_RELAXDATA *relaxdata, int probnr1, int probnr2, SCIP_HASHMAP *varmap, SCIP_Bool *identical, SCIP *scip1, SCIP *scip2)
 
static SCIP_RETCODE pricingprobsAreIdenticalFromDetectionInfo (SCIP *scip, SCIP_RELAXDATA *relaxdata, SCIP_HASHMAP **hashorig2pricingvar, int probnr1, int probnr2, SCIP_HASHMAP *varmap, SCIP_Bool *identical)
 
static SCIP_RETCODE pricingprobsAreIdentical (SCIP *scip, SCIP_RELAXDATA *relaxdata, int probnr1, int probnr2, SCIP_HASHMAP *varmap, SCIP_Bool *identical)
 
static SCIP_RETCODE checkIdenticalBlocks (SCIP *scip, SCIP_RELAXDATA *relaxdata, SCIP_HASHMAP **hashorig2pricingvar)
 
static SCIP_RETCODE setPricingProblemParameters (SCIP *scip, int clocktype, SCIP_Real infinity, SCIP_Real epsilon, SCIP_Real sumepsilon, SCIP_Real feastol, SCIP_Real lpfeastolfactor, SCIP_Real dualfeastol, SCIP_Bool enableppcuts)
 
static SCIP_RETCODE createPricingVar (SCIP_RELAXDATA *relaxdata, SCIP_VAR *origvar)
 
static SCIP_RETCODE createLinkingPricingVars (SCIP *scip, SCIP_RELAXDATA *relaxdata, SCIP_VAR *origvar)
 
static SCIP_RETCODE createPricingVariables (SCIP *scip, SCIP_RELAXDATA *relaxdata, SCIP_HASHMAP **hashorig2pricingvar)
 
static SCIP_RETCODE displayPricingStatistics (SCIP *scip, SCIP **pricingprobs, int npricingprobs, int *blockrepresentative)
 
static SCIP_RETCODE initRelaxProblemdata (SCIP *scip, SCIP_RELAXDATA *relaxdata)
 
static SCIP_RETCODE createMasterProblem (SCIP *masterscip, const char *name, int clocktype, SCIP_Real infinity, SCIP_Real epsilon, SCIP_Real sumepsilon, SCIP_Real feastol, SCIP_Real lpfeastolfactor, SCIP_Real dualfeastol, DEC_DECMODE mode)
 
static SCIP_RETCODE createPricingProblem (SCIP **pricingscip, const char *name, int clocktype, SCIP_Real infinity, SCIP_Real epsilon, SCIP_Real sumepsilon, SCIP_Real feastol, SCIP_Real lpfeastolfactor, SCIP_Real dualfeastol, SCIP_Bool enableppcuts)
 
static SCIP_RETCODE saveOriginalVarMastercoeffs (SCIP *scip, SCIP_VAR **origvars, int norigvars, int nmasterconss, SCIP_CONS **origmasterconss, SCIP_CONS **masterconss)
 
static SCIP_RETCODE createMasterprobConss (SCIP *scip, SCIP_RELAXDATA *relaxdata)
 
static SCIP_RETCODE createPricingprobConss (SCIP *scip, SCIP_RELAXDATA *relaxdata, SCIP_HASHMAP **hashorig2pricingvar)
 
static SCIP_RETCODE createMaster (SCIP *scip, SCIP_RELAXDATA *relaxdata)
 
static SCIP_RETCODE combineSolutions (SCIP *scip, SCIP_SOL **newsol, SCIP **probs, int nprobs)
 
static SCIP_RETCODE setPricingObjsOriginal (SCIP *scip, SCIP **probs, int nprobs)
 
static SCIP_RETCODE solveBlockProblem (SCIP *scip, SCIP *blockprob, SCIP_RELAXDATA *relaxdata, SCIP_Real timelimit, int blocknum, SCIP_RESULT *result, SCIP_Real *objvalue)
 
static SCIP_RETCODE freeBlockProblem (SCIP *scip, SCIP *blockprob, SCIP_RELAXDATA *relaxdata, int blocknum)
 
static SCIP_RETCODE solveDiagonalBlocks (SCIP *scip, SCIP_RELAXDATA *relaxdata, SCIP_RESULT *result, SCIP_Real *lowerbound)
 
DEC_DECOMPGCGgetStructDecomp (SCIP *scip)
 
static SCIP_RETCODE GCGsetStructDecomp (SCIP *scip, DEC_DECOMP *decomp)
 
static SCIP_RETCODE transformMaster (SCIP *scip, SCIP_RELAX *relax)
 
static SCIP_RETCODE initRelaxator (SCIP *scip, SCIP_RELAX *relax)
 
static void initRelaxdata (SCIP_RELAXDATA *relaxdata)
 
static SCIP_DECL_RELAXFREE (relaxFreeGcg)
 
static SCIP_DECL_RELAXEXIT (relaxExitGcg)
 
static SCIP_RETCODE initializeMasterProblemSolve (SCIP *scip, SCIP_RELAX *relax)
 
static SCIP_DECL_RELAXINITSOL (relaxInitsolGcg)
 
static SCIP_DECL_RELAXEXITSOL (relaxExitsolGcg)
 
static SCIP_RETCODE solveMasterProblem (SCIP *scip, SCIP *masterprob, SCIP_RELAXDATA *relaxdata, SCIP_Longint nodelimit, SCIP_Real *lowerbound, SCIP_RESULT *result)
 
static SCIP_RETCODE relaxExecGcgDantzigWolfe (SCIP *scip, SCIP_RELAX *relax, SCIP_Real *lowerbound, SCIP_RESULT *result)
 
static SCIP_RETCODE solveMasterProblemAndEvaluate (SCIP *scip, SCIP_RELAX *relax, SCIP_Real *lowerbound, SCIP_RESULT *result)
 
static SCIP_RETCODE relaxExecGcgBendersDecomposition (SCIP *scip, SCIP_RELAX *relax, SCIP_Real *lowerbound, SCIP_RESULT *result)
 
static SCIP_RETCODE relaxExecGcgOriginalProblem (SCIP *scip, SCIP_RELAX *relax, SCIP_Real *lowerbound, SCIP_RESULT *result)
 
static SCIP_DECL_RELAXEXEC (relaxExecGcg)
 
SCIP_RETCODE SCIPincludeRelaxGcg (SCIP *scip)
 
SCIP_RETCODE GCGrelaxIncludeBranchrule (SCIP *scip, SCIP_BRANCHRULE *branchrule, GCG_DECL_BRANCHACTIVEMASTER((*branchactivemaster)), GCG_DECL_BRANCHDEACTIVEMASTER((*branchdeactivemaster)), GCG_DECL_BRANCHPROPMASTER((*branchpropmaster)), GCG_DECL_BRANCHMASTERSOLVED((*branchmastersolved)), GCG_DECL_BRANCHDATADELETE((*branchdatadelete)))
 
SCIP_RETCODE GCGrelaxBranchActiveMaster (SCIP *scip, SCIP_BRANCHRULE *branchrule, GCG_BRANCHDATA *branchdata)
 
SCIP_RETCODE GCGrelaxBranchDeactiveMaster (SCIP *scip, SCIP_BRANCHRULE *branchrule, GCG_BRANCHDATA *branchdata)
 
SCIP_RETCODE GCGrelaxBranchPropMaster (SCIP *scip, SCIP_BRANCHRULE *branchrule, GCG_BRANCHDATA *branchdata, SCIP_RESULT *result)
 
SCIP_RETCODE GCGrelaxBranchDataDelete (SCIP *scip, SCIP_BRANCHRULE *branchrule, GCG_BRANCHDATA **branchdata)
 
SCIP_RETCODE GCGrelaxBranchMasterSolved (SCIP *scip, SCIP_BRANCHRULE *branchrule, GCG_BRANCHDATA *branchdata, SCIP_Real newlowerbound)
 
SCIP_RETCODE GCGrelaxTransOrigToMasterCons (SCIP *scip, SCIP_CONS *cons, SCIP_CONS **transcons)
 
SCIP * GCGgetOriginalprob (SCIP *masterprob)
 
SCIP * GCGgetMasterprob (SCIP *scip)
 
SCIP * GCGgetPricingprob (SCIP *scip, int pricingprobnr)
 
int GCGgetNRelPricingprobs (SCIP *scip)
 
int GCGgetNPricingprobs (SCIP *scip)
 
SCIP_Bool GCGisPricingprobRelevant (SCIP *scip, int pricingprobnr)
 
int GCGgetBlockRepresentative (SCIP *scip, int pricingprobnr)
 
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)
 
GCG_PARAMDATAGCGgetParamsVisu (SCIP *scip)
 
SCIP_SOL * GCGrelaxGetCurrentOrigSol (SCIP *scip)
 
SCIP_Bool GCGrelaxIsOrigSolFeasible (SCIP *scip)
 
SCIP_Bool GCGisMasterSetCovering (SCIP *scip)
 
SCIP_Bool GCGisMasterSetPartitioning (SCIP *scip)
 
SCIP_RETCODE GCGrelaxStartProbing (SCIP *scip, SCIP_HEUR *probingheur)
 
SCIP_HEUR * GCGrelaxGetProbingheur (SCIP *scip)
 
SCIP_RETCODE GCGrelaxNewProbingnodeOrig (SCIP *scip)
 
SCIP_RETCODE GCGrelaxNewProbingnodeMaster (SCIP *scip)
 
SCIP_RETCODE GCGrelaxNewProbingnodeMasterCons (SCIP *scip, SCIP_BRANCHRULE *branchrule, GCG_BRANCHDATA *branchdata, SCIP_CONS **origbranchconss, int norigbranchconss, int maxorigbranchconss)
 
SCIP_RETCODE GCGrelaxBacktrackProbing (SCIP *scip, int probingdepth)
 
static SCIP_RETCODE performProbing (SCIP *scip, int maxlpiterations, int maxpricerounds, SCIP_Bool usepricing, SCIP_Longint *nlpiterations, int *npricerounds, SCIP_Real *lpobjvalue, SCIP_Bool *lpsolved, SCIP_Bool *lperror, SCIP_Bool *cutoff)
 
SCIP_RETCODE GCGrelaxPerformProbing (SCIP *scip, int maxlpiterations, SCIP_Longint *nlpiterations, SCIP_Real *lpobjvalue, SCIP_Bool *lpsolved, SCIP_Bool *lperror, SCIP_Bool *cutoff)
 
SCIP_RETCODE GCGrelaxPerformProbingWithPricing (SCIP *scip, int maxpricerounds, SCIP_Longint *nlpiterations, int *npricerounds, SCIP_Real *lpobjvalue, SCIP_Bool *lpsolved, SCIP_Bool *lperror, SCIP_Bool *cutoff)
 
SCIP_RETCODE GCGrelaxEndProbing (SCIP *scip)
 
static SCIP_RETCODE checkAndAddExternalBranchingCandidate (SCIP *scip, SCIP_VAR *var)
 
SCIP_RETCODE GCGrelaxUpdateCurrentSol (SCIP *scip)
 
SCIP_Real GCGgetPricingprobsMemUsed (SCIP *scip)
 
SCIP_Bool GCGrelaxIsInitialized (SCIP *scip)
 
SCIP_Real GCGgetDegeneracy (SCIP *scip)
 
SCIP_CONS ** GCGgetVarLinkingconss (SCIP *scip)
 
int * GCGgetVarLinkingconssBlock (SCIP *scip)
 
int GCGgetNVarLinkingconss (SCIP *scip)
 
int GCGgetNLinkingvars (SCIP *scip)
 
int GCGgetNTransvars (SCIP *scip)
 
SCIP_SOL * GCGgetBendersRelaxationSol (SCIP *scip)
 
DEC_DECMODE GCGgetDecompositionMode (SCIP *scip)
 
DEC_DECMODE GCGgetMasterDecompMode (SCIP *masterprob)
 
SCIP_CLOCK * GCGgetRootNodeTime (SCIP *scip)
 
SCIP_RETCODE GCGtransformProb (SCIP *scip)
 
SCIP_RETCODE GCGpresolve (SCIP *scip)
 
SCIP_RETCODE GCGdetect (SCIP *scip)
 
SCIP_RETCODE GCGsolve (SCIP *scip)
 
SCIP_Real GCGgetDualbound (SCIP *scip)
 
SCIP_Real GCGgetPrimalbound (SCIP *scip)
 
SCIP_Real GCGgetGap (SCIP *scip)
 

Macro Definition Documentation

◆ RELAX_NAME

#define RELAX_NAME   "gcg"

Definition at line 77 of file relax_gcg.c.

◆ RELAX_DESC

#define RELAX_DESC   "relaxator for gcg project representing the master lp"

Definition at line 78 of file relax_gcg.c.

◆ RELAX_PRIORITY

#define RELAX_PRIORITY   -1

Definition at line 79 of file relax_gcg.c.

◆ RELAX_FREQ

#define RELAX_FREQ   1

Definition at line 80 of file relax_gcg.c.

◆ RELAX_INCLUDESLP

#define RELAX_INCLUDESLP   TRUE

Definition at line 81 of file relax_gcg.c.

◆ DEFAULT_DISCRETIZATION

#define DEFAULT_DISCRETIZATION   TRUE

Definition at line 83 of file relax_gcg.c.

◆ DEFAULT_MIPDISCRETIZATION

#define DEFAULT_MIPDISCRETIZATION   TRUE

Definition at line 84 of file relax_gcg.c.

◆ DEFAULT_AGGREGATION

#define DEFAULT_AGGREGATION   TRUE

Definition at line 85 of file relax_gcg.c.

◆ DEFAULT_DISPINFOS

#define DEFAULT_DISPINFOS   FALSE

Definition at line 86 of file relax_gcg.c.

◆ DEFAULT_MODE

#define DEFAULT_MODE   DEC_DECMODE_DANTZIGWOLFE

the decomposition mode that GCG will use. (0: Dantzig-Wolfe (default), 1: Benders' decomposition, 2: solve original problem)

Definition at line 87 of file relax_gcg.c.

◆ DEFAULT_BLISS

#define DEFAULT_BLISS   TRUE

Definition at line 89 of file relax_gcg.c.

◆ DEFAULT_BLISS_SEARCH_NODE_LIMIT

#define DEFAULT_BLISS_SEARCH_NODE_LIMIT   0

Definition at line 90 of file relax_gcg.c.

◆ DEFAULT_BLISS_GENERATOR_LIMIT

#define DEFAULT_BLISS_GENERATOR_LIMIT   0

Definition at line 91 of file relax_gcg.c.

◆ DELVARS

#define DELVARS

Definition at line 92 of file relax_gcg.c.

◆ relaxCopyGcg

#define relaxCopyGcg   NULL

Definition at line 3413 of file relax_gcg.c.

◆ relaxInitGcg

#define relaxInitGcg   NULL

Definition at line 3414 of file relax_gcg.c.

Function Documentation

◆ setOriginalVarBlockNr()

static SCIP_RETCODE setOriginalVarBlockNr ( SCIP *  scip,
SCIP_RELAXDATA *  relaxdata,
SCIP_VAR *  var,
int  newblock 
)
static

sets the number of the block, the given original variable belongs to

Parameters
scipSCIP data structure
relaxdatarelaxator data data structure
varvariable to set the block number for
newblocknumber of the block, the variable belongs to

Definition at line 181 of file relax_gcg.c.

References DEC_DECMODE_BENDERS, GCGgetDecompositionMode(), GCGisLinkingVarInBlock(), GCGoriginalVarAddBlock(), GCGoriginalVarIsLinking(), GCGvarGetBlock(), GCGvarIsOriginal(), and GCGvarSetBlock().

Referenced by convertStructToGCG().

◆ markConsMaster()

static SCIP_RETCODE markConsMaster ( SCIP *  scip,
SCIP_RELAXDATA *  relaxdata,
SCIP_CONS *  cons 
)
static

marks the constraint to be transferred to the master problem

Parameters
scipSCIP data structure
relaxdatarelaxator data data structure
consconstraint that is forced to be in the master

Definition at line 225 of file relax_gcg.c.

Referenced by convertStructToGCG().

◆ convertStructToGCG()

static SCIP_RETCODE convertStructToGCG ( SCIP *  scip,
SCIP_RELAXDATA *  relaxdata,
DEC_DECOMP decomp 
)
static

◆ ensureSizeMasterConss()

static SCIP_RETCODE ensureSizeMasterConss ( SCIP *  scip,
SCIP_RELAXDATA *  relaxdata,
int  size 
)
static

ensures size of masterconss array

Definition at line 438 of file relax_gcg.c.

Referenced by createMasterprobConss(), and GCGrelaxTransOrigToMasterCons().

◆ ensureSizeBranchrules()

static SCIP_RETCODE ensureSizeBranchrules ( SCIP *  scip,
SCIP_RELAXDATA *  relaxdata 
)
static

ensures size of branchrules array: enlarges the array by 1

Definition at line 463 of file relax_gcg.c.

Referenced by GCGrelaxIncludeBranchrule().

◆ checkSetppcStructure()

static SCIP_RETCODE checkSetppcStructure ( SCIP *  scip,
SCIP_RELAXDATA *  relaxdata 
)
static

check whether the master problem has a set partitioning or set covering structure

Parameters
scipSCIP data structure
relaxdatarelaxator data structure

Definition at line 487 of file relax_gcg.c.

References DECdecompGetLinkingconss(), DECdecompGetNLinkingconss(), and GCGgetConsIsSetppc().

Referenced by createMaster().

◆ realArraysAreEqual()

static SCIP_Bool realArraysAreEqual ( SCIP *  scip,
SCIP_Real *  array1,
int  array1length,
SCIP_Real *  array2,
int  array2length 
)
static

checks whether two arrays of SCIP_Real's are identical

Parameters
scipSCIP data structure
array1first array
array1lengthlength of first array
array2second array
array2lengthlength of second array

Definition at line 590 of file relax_gcg.c.

Referenced by checkIdentical().

◆ checkIdentical()

static SCIP_RETCODE checkIdentical ( SCIP *  scip,
SCIP_RELAXDATA *  relaxdata,
int  probnr1,
int  probnr2,
SCIP_HASHMAP *  varmap,
SCIP_Bool *  identical,
SCIP *  scip1,
SCIP *  scip2 
)
static

checks whether two pricingproblems represent identical blocks

Parameters
scipSCIP data structure
relaxdatathe relaxator's data
probnr1number of the first pricingproblem
probnr2number of the second pricingproblem
varmaphashmap mapping the variables of the second pricing problem to those of the first pricing problem
identicalreturn value: are blocks identical
scip1first SCIP data structure to check
scip2second SCIP data structure to check

Definition at line 621 of file relax_gcg.c.

References GCGoriginalVarGetCoefs(), GCGoriginalVarGetMasterconss(), GCGoriginalVarGetNCoefs(), GCGpricingVarGetOrigvars(), GCGvarIsOriginal(), GCGvarIsPricing(), and realArraysAreEqual().

Referenced by pricingprobsAreIdentical().

◆ pricingprobsAreIdenticalFromDetectionInfo()

static SCIP_RETCODE pricingprobsAreIdenticalFromDetectionInfo ( SCIP *  scip,
SCIP_RELAXDATA *  relaxdata,
SCIP_HASHMAP **  hashorig2pricingvar,
int  probnr1,
int  probnr2,
SCIP_HASHMAP *  varmap,
SCIP_Bool *  identical 
)
static
Parameters
scipSCIP data structure
relaxdatathe relaxator's data
hashorig2pricingvarmapping from orig to pricingvar
probnr1number of the first pricingproblem
probnr2number of the second pricingproblem
varmaphashmap mapping the variables of the second pricing problem to those of the first pricing problem
identicalreturn value: are blocks identical

Definition at line 793 of file relax_gcg.c.

References DECdecompGetPartialdecID(), GCGconshdlrDecompArePricingprobsIdenticalForPartialdecid(), and GCGconshdlrDecompCreateVarmapForPartialdecId().

Referenced by checkIdenticalBlocks().

◆ pricingprobsAreIdentical()

static SCIP_RETCODE pricingprobsAreIdentical ( SCIP *  scip,
SCIP_RELAXDATA *  relaxdata,
int  probnr1,
int  probnr2,
SCIP_HASHMAP *  varmap,
SCIP_Bool *  identical 
)
static
Parameters
scipSCIP data structure
relaxdatathe relaxator's data
probnr1number of the first pricingproblem
probnr2number of the second pricingproblem
varmaphashmap mapping the variables of the second pricing problem to those of the first pricing problem
identicalreturn value: are blocks identical

Definition at line 839 of file relax_gcg.c.

References checkIdentical(), and cmpGraphPair().

◆ checkIdenticalBlocks()

static SCIP_RETCODE checkIdenticalBlocks ( SCIP *  scip,
SCIP_RELAXDATA *  relaxdata,
SCIP_HASHMAP **  hashorig2pricingvar 
)
static

checks whether there are identical pricing blocks

Parameters
scipSCIP data structure
relaxdatathe relaxator data data structure
hashorig2pricingvarmapping from orig to pricingvar for each block

Definition at line 896 of file relax_gcg.c.

References DECdecompGetPartialdecID(), GCGconshdlrDecompGetNFormerDetectionConssForID(), GCGoriginalVarGetPricingVar(), GCGoriginalVarIsLinking(), GCGoriginalVarSetPricingVar(), GCGpricingVarAddOrigVar(), GCGpricingVarGetOrigvars(), GCGvarGetBlock(), GCGvarIsOriginal(), GCGvarIsPricing(), and pricingprobsAreIdenticalFromDetectionInfo().

Referenced by createMaster().

◆ setPricingProblemParameters()

static SCIP_RETCODE setPricingProblemParameters ( SCIP *  scip,
int  clocktype,
SCIP_Real  infinity,
SCIP_Real  epsilon,
SCIP_Real  sumepsilon,
SCIP_Real  feastol,
SCIP_Real  lpfeastolfactor,
SCIP_Real  dualfeastol,
SCIP_Bool  enableppcuts 
)
static

sets the pricing problem parameters

Parameters
scipSCIP data structure of the pricing problem
clocktypeclocktype to use in the pricing problem
infinityvalues larger than this are considered infinity in the pricing problem
epsilonabsolute values smaller than this are considered zero in the pricing problem
sumepsilonabsolute values of sums smaller than this are considered zero in the pricing problem
feastolfeasibility tolerance for constraints in the pricing problem
lpfeastolfactorprimal feasibility tolerance factor of LP solver in the pricing problem
dualfeastolfeasibility tolerance for reduced costs in LP solution in the pricing problem
enableppcutsshould ppcuts be stored for sepa_basis

Definition at line 1038 of file relax_gcg.c.

Referenced by createPricingProblem().

◆ createPricingVar()

static SCIP_RETCODE createPricingVar ( SCIP_RELAXDATA *  relaxdata,
SCIP_VAR *  origvar 
)
static

creates a variable in a pricing problem corresponding to the given original variable (belonging to exactly one block)

Parameters
relaxdatarelaxator data data structure
origvarcorresponding variable in the original program

Definition at line 1134 of file relax_gcg.c.

References GCGoriginalVarCreatePricingVar(), GCGoriginalVarSetPricingVar(), GCGvarGetBlock(), and GCGvarIsPricing().

Referenced by createPricingVariables().

◆ createLinkingPricingVars()

static SCIP_RETCODE createLinkingPricingVars ( SCIP *  scip,
SCIP_RELAXDATA *  relaxdata,
SCIP_VAR *  origvar 
)
static

creates a variable in each of the pricing problems linked by given original variable

Parameters
scipSCIP data structure
relaxdatarelaxator data data structure
origvarcorresponding linking variable in the original program

Definition at line 1164 of file relax_gcg.c.

References DEC_DECMODE_BENDERS, GCGlinkingVarCreateMasterCons(), GCGlinkingVarCreatePricingVar(), GCGlinkingVarGetLinkingConss(), GCGlinkingVarGetNBlocks(), GCGlinkingVarGetPricingVars(), GCGlinkingVarSetLinkingCons(), GCGlinkingVarSetPricingVar(), GCGoriginalVarIsLinking(), GCGvarIsOriginal(), and GCGvarIsPricing().

Referenced by createPricingVariables().

◆ createPricingVariables()

static SCIP_RETCODE createPricingVariables ( SCIP *  scip,
SCIP_RELAXDATA *  relaxdata,
SCIP_HASHMAP **  hashorig2pricingvar 
)
static

create pricing problem variables

Parameters
scipSCIP data structure
relaxdatarelaxator data data structure
hashorig2pricingvarhashmap mapping original variables to pricing variables

Definition at line 1275 of file relax_gcg.c.

References createLinkingPricingVars(), createPricingVar(), DECdecompGetNBlocks(), DECdecompGetVartoblock(), GCGlinkingVarGetPricingVars(), GCGoriginalVarGetPricingVar(), GCGoriginalVarIsLinking(), GCGvarGetBlock(), and GCGvarIsPricing().

Referenced by createMaster().

◆ displayPricingStatistics()

static SCIP_RETCODE displayPricingStatistics ( SCIP *  scip,
SCIP **  pricingprobs,
int  npricingprobs,
int *  blockrepresentative 
)
static

displays statistics of the pricing problems

Parameters
scipSCIP data structure
pricingprobsarray of pricing problems
npricingprobsnumber of pricingproblems
blockrepresentativearray of representation information

Definition at line 1386 of file relax_gcg.c.

Referenced by createMaster().

◆ initRelaxProblemdata()

static SCIP_RETCODE initRelaxProblemdata ( SCIP *  scip,
SCIP_RELAXDATA *  relaxdata 
)
static

allocates initial problem specific data

Parameters
scipSCIP data structure
relaxdatarelaxatordata data structure

Definition at line 1425 of file relax_gcg.c.

Referenced by createMaster().

◆ createMasterProblem()

static SCIP_RETCODE createMasterProblem ( SCIP *  masterscip,
const char *  name,
int  clocktype,
SCIP_Real  infinity,
SCIP_Real  epsilon,
SCIP_Real  sumepsilon,
SCIP_Real  feastol,
SCIP_Real  lpfeastolfactor,
SCIP_Real  dualfeastol,
DEC_DECMODE  mode 
)
static

creates the master problem with the specified name

Parameters
masterscipSCIP data structure of master problem
namename of the master problem
clocktypeclocktype to use in the master problem
infinityvalues larger than this are considered infinity in the master problem
epsilonabsolute values smaller than this are considered zero in the master problem
sumepsilonabsolute values of sums smaller than this are considered zero in the master problem
feastolfeasibility tolerance for constraints in the master problem
lpfeastolfactorprimal feasibility tolerance factor of LP solver in the master problem
dualfeastolfeasibility tolerance for reduced costs in LP solution in the master problem
modethe decomposition mode

Definition at line 1459 of file relax_gcg.c.

References DEC_DECMODE_BENDERS, DEC_DECMODE_DANTZIGWOLFE, DEC_DECMODE_ORIGINAL, and GCGgetOriginalprob().

Referenced by createMaster().

◆ createPricingProblem()

static SCIP_RETCODE createPricingProblem ( SCIP **  pricingscip,
const char *  name,
int  clocktype,
SCIP_Real  infinity,
SCIP_Real  epsilon,
SCIP_Real  sumepsilon,
SCIP_Real  feastol,
SCIP_Real  lpfeastolfactor,
SCIP_Real  dualfeastol,
SCIP_Bool  enableppcuts 
)
static

creates the pricing problem with the specified name

Parameters
pricingscipPricing scip data structure
namename of the pricing problem
clocktypeclocktype to use in the pricing problem
infinityvalues larger than this are considered infinity in the pricing problem
epsilonabsolute values smaller than this are considered zero in the pricing problem
sumepsilonabsolute values of sums smaller than this are considered zero in the pricing problem
feastolfeasibility tolerance for constraints in the pricing problem
lpfeastolfactorprimal feasibility tolerance factor of LP solver in the pricing problem
dualfeastolfeasibility tolerance for reduced costs in LP solution in the pricing problem
enableppcutsshould ppcuts be stored for sepa_basis

Definition at line 1536 of file relax_gcg.c.

References setPricingProblemParameters().

Referenced by createMaster().

◆ saveOriginalVarMastercoeffs()

static SCIP_RETCODE saveOriginalVarMastercoeffs ( SCIP *  scip,
SCIP_VAR **  origvars,
int  norigvars,
int  nmasterconss,
SCIP_CONS **  origmasterconss,
SCIP_CONS **  masterconss 
)
static

saves the coefficient of the masterconstraints in the original variable

Parameters
scipSCIP data structure
origvarsoriginal variables array
norigvarssize of original variables array
nmasterconsssize of masterconns array
origmasterconssorig master constraints array
masterconssmaster constraints

Definition at line 1563 of file relax_gcg.c.

References GCGconsGetNVars(), GCGconsGetVals(), GCGconsGetVars(), GCGoriginalVarAddCoef(), GCGoriginalVarGetCoefs(), GCGoriginalVarSetNCoefs(), and GCGvarIsOriginal().

Referenced by createMasterprobConss().

◆ createMasterprobConss()

static SCIP_RETCODE createMasterprobConss ( SCIP *  scip,
SCIP_RELAXDATA *  relaxdata 
)
static

◆ createPricingprobConss()

static SCIP_RETCODE createPricingprobConss ( SCIP *  scip,
SCIP_RELAXDATA *  relaxdata,
SCIP_HASHMAP **  hashorig2pricingvar 
)
static

creates the pricing problem constraints

Parameters
scipSCIP data structure
relaxdatathe relaxator data data structure
hashorig2pricingvarhashmap mapping original to corresponding pricing variables

Definition at line 1753 of file relax_gcg.c.

References DECdecompGetNBlocks(), DECdecompGetNSubscipconss(), DECdecompGetSubscipconss(), GCGconsGetNVars(), GCGconsGetVars(), and GCGvarIsPricing().

Referenced by createMaster().

◆ createMaster()

static SCIP_RETCODE createMaster ( SCIP *  scip,
SCIP_RELAXDATA *  relaxdata 
)
static

creates the master problem and the pricing problems and copies the constraints into them

Parameters
scipSCIP data structure
relaxdatathe relaxator data data structure

Definition at line 1841 of file relax_gcg.c.

References checkIdenticalBlocks(), checkSetppcStructure(), convertStructToGCG(), createMasterprobConss(), createMasterProblem(), createPricingprobConss(), createPricingProblem(), createPricingVariables(), DEC_DECMODE_DANTZIGWOLFE, DEC_DECMODE_ORIGINAL, displayPricingStatistics(), GCGmasterCreateInitialMastervars(), and initRelaxProblemdata().

Referenced by initRelaxator().

◆ combineSolutions()

static SCIP_RETCODE combineSolutions ( SCIP *  scip,
SCIP_SOL **  newsol,
SCIP **  probs,
int  nprobs 
)
static

combines the solutions from all (disjoint) problems to one solution

Parameters
scipSCIP data structure
newsolpointer to store new solution
probsarray of (solved) subproblems
nprobsnumber of subproblems

Definition at line 2015 of file relax_gcg.c.

References GCGoriginalVarGetPricingVar(), and GCGvarGetBlock().

Referenced by solveDiagonalBlocks().

◆ setPricingObjsOriginal()

static SCIP_RETCODE setPricingObjsOriginal ( SCIP *  scip,
SCIP **  probs,
int  nprobs 
)
static

sets the pricing objective function to what is necessary

Parameters
scipSCIP data structure
probsarray of subproblems
nprobsnumber of subproblems

Definition at line 2069 of file relax_gcg.c.

References DEC_DECMODE_BENDERS, GCGgetDecompositionMode(), GCGisPricingprobRelevant(), GCGoriginalVarGetPricingVar(), GCGvarGetBlock(), and GCGvarIsOriginal().

Referenced by solveDiagonalBlocks().

◆ solveBlockProblem()

static SCIP_RETCODE solveBlockProblem ( SCIP *  scip,
SCIP *  blockprob,
SCIP_RELAXDATA *  relaxdata,
SCIP_Real  timelimit,
int  blocknum,
SCIP_RESULT *  result,
SCIP_Real *  objvalue 
)
static

solve a block problem when the decomposition is diagonal

Parameters
scipSCIP data structure
blockprobthe block problem that will be solved
relaxdatarelaxator data structure
timelimitthe original problem timelimit
blocknumthe number of the block, -1 for the original problem
resultresult pointer to indicate success or failure
objvaluethe objective function value

Definition at line 2135 of file relax_gcg.c.

References DEC_DECMODE_BENDERS, DEC_DECMODE_DANTZIGWOLFE, DEC_DECMODE_ORIGINAL, and GCGgetDecompositionMode().

Referenced by solveDiagonalBlocks().

◆ freeBlockProblem()

static SCIP_RETCODE freeBlockProblem ( SCIP *  scip,
SCIP *  blockprob,
SCIP_RELAXDATA *  relaxdata,
int  blocknum 
)
static

frees the block problem

Parameters
scipSCIP data structure
blockprobthe block problem that will be solved
relaxdatarelaxator data structure
blocknumthe number of the block, -1 for the original problem

Definition at line 2266 of file relax_gcg.c.

References DEC_DECMODE_BENDERS, DEC_DECMODE_DANTZIGWOLFE, DEC_DECMODE_ORIGINAL, and GCGgetDecompositionMode().

Referenced by solveDiagonalBlocks().

◆ solveDiagonalBlocks()

static SCIP_RETCODE solveDiagonalBlocks ( SCIP *  scip,
SCIP_RELAXDATA *  relaxdata,
SCIP_RESULT *  result,
SCIP_Real *  lowerbound 
)
static

solves the blocks diagonal and individually

Parameters
scipSCIP data structure
relaxdatarelaxator data structure
resultresult pointer to indicate success or failure
lowerboundlower bound pointer to return the lower bound

Definition at line 2300 of file relax_gcg.c.

References combineSolutions(), DEC_DECMODE_ORIGINAL, freeBlockProblem(), GCGgetDecompositionMode(), GCGtransformMastersolToOrigsol(), setPricingObjsOriginal(), and solveBlockProblem().

Referenced by solveMasterProblem().

◆ GCGgetStructDecomp()

DEC_DECOMP* GCGgetStructDecomp ( SCIP *  scip)

gets the structure information

Definition at line 2397 of file relax_gcg.c.

References RELAX_NAME.

Referenced by GCGprintStatistics(), and writeREFFile().

◆ GCGsetStructDecomp()

static SCIP_RETCODE GCGsetStructDecomp ( SCIP *  scip,
DEC_DECOMP decomp 
)
static

sets the structure information

Parameters
scipSCIP data structure
decompdecomposition data structure

Definition at line 2418 of file relax_gcg.c.

References DECdecompFree(), and RELAX_NAME.

Referenced by initRelaxator().

◆ transformMaster()

static SCIP_RETCODE transformMaster ( SCIP *  scip,
SCIP_RELAX *  relax 
)
static

transforms the master problem

Parameters
scipSCIP data structure
relaxrelaxator data structure

Definition at line 2446 of file relax_gcg.c.

References GCGlinkingVarGetLinkingConss(), GCGlinkingVarSetLinkingCons(), GCGoriginalVarIsLinking(), and GCGvarIsOriginal().

Referenced by initializeMasterProblemSolve().

◆ initRelaxator()

static SCIP_RETCODE initRelaxator ( SCIP *  scip,
SCIP_RELAX *  relax 
)
static

◆ initRelaxdata()

static void initRelaxdata ( SCIP_RELAXDATA *  relaxdata)
static

initializes relaxator data

Parameters
relaxdatarelaxdata data structure

Definition at line 2657 of file relax_gcg.c.

Referenced by SCIP_DECL_RELAXINITSOL(), and SCIPincludeRelaxGcg().

◆ SCIP_DECL_RELAXFREE()

static SCIP_DECL_RELAXFREE ( relaxFreeGcg  )
static

destructor of relaxator to free user data (called when SCIP is exiting)

Definition at line 2708 of file relax_gcg.c.

References DECdecompFree(), and GCGVisuFreeParams().

◆ SCIP_DECL_RELAXEXIT()

static SCIP_DECL_RELAXEXIT ( relaxExitGcg  )
static

deinitialization method of relaxator (called before transformed problem is freed)

Definition at line 2746 of file relax_gcg.c.

References DECdecompFree().

◆ initializeMasterProblemSolve()

static SCIP_RETCODE initializeMasterProblemSolve ( SCIP *  scip,
SCIP_RELAX *  relax 
)
static

initialize the relaxator and master problem for solving the original problem by Dantzig-Wolfe reformulation and Benders' decomposition

Parameters
scipthe SCIP data structure
relaxthe relaxator

Definition at line 2786 of file relax_gcg.c.

References DEC_DECMODE_DANTZIGWOLFE, GCGconsOrigbranchAddRootCons(), and transformMaster().

Referenced by SCIP_DECL_RELAXEXEC().

◆ SCIP_DECL_RELAXINITSOL()

static SCIP_DECL_RELAXINITSOL ( relaxInitsolGcg  )
static

solving process initialization method of relaxator (called when branch and bound process is about to begin)

Definition at line 2830 of file relax_gcg.c.

References DEC_DECMODE_BENDERS, DEC_DECMODE_DANTZIGWOLFE, DEC_DECMODE_ORIGINAL, GCGgetDecompositionMode(), GCGgetMasterDecompMode(), initRelaxator(), and initRelaxdata().

◆ SCIP_DECL_RELAXEXITSOL()

static SCIP_DECL_RELAXEXITSOL ( relaxExitsolGcg  )
static

solving process deinitialization method of relaxator (called before branch and bound process data is freed)

Definition at line 2907 of file relax_gcg.c.

References DECdecompFree(), and GCGfreeOrigVarsData().

◆ solveMasterProblem()

static SCIP_RETCODE solveMasterProblem ( SCIP *  scip,
SCIP *  masterprob,
SCIP_RELAXDATA *  relaxdata,
SCIP_Longint  nodelimit,
SCIP_Real *  lowerbound,
SCIP_RESULT *  result 
)
static

method to solve the master problem that is used by Dantzig-Wolfe and Benders' decomposition

Parameters
scipthe SCIP data structure
masterprobthe master problem SCIP instance
relaxdatathe relaxator data
nodelimitthe number of nodes the will be solved in this master problem
lowerboundthe lowerbound computed by the relaxator for the current node
resultthe result of the relaxation call

Definition at line 2996 of file relax_gcg.c.

References DEC_DECMODE_ORIGINAL, DEC_DECTYPE_DIAGONAL, DECdecompGetType(), GCGgetDecompositionMode(), GCGmasterIsCurrentSolValid(), and solveDiagonalBlocks().

Referenced by relaxExecGcgDantzigWolfe(), and solveMasterProblemAndEvaluate().

◆ relaxExecGcgDantzigWolfe()

static SCIP_RETCODE relaxExecGcgDantzigWolfe ( SCIP *  scip,
SCIP_RELAX *  relax,
SCIP_Real *  lowerbound,
SCIP_RESULT *  result 
)
static

execution method of the relaxator for Dantzig-Wolfe reformulation

Parameters
scipthe SCIP data structure
relaxthe relaxator
lowerboundthe lowerbound computed by the relaxator for the current node
resultthe result of the relaxation call

Definition at line 3126 of file relax_gcg.c.

References DEC_DECMODE_DANTZIGWOLFE, GCGconsOrigbranchGetActiveCons(), GCGconsOrigbranchGetBranchdata(), GCGconsOrigbranchGetBranchrule(), GCGgetDecompositionMode(), GCGmasterIsBestsolValid(), GCGmasterIsCurrentSolValid(), GCGrelaxBranchMasterSolved(), GCGtransformMastersolToOrigsol(), and solveMasterProblem().

Referenced by SCIP_DECL_RELAXEXEC().

◆ solveMasterProblemAndEvaluate()

static SCIP_RETCODE solveMasterProblemAndEvaluate ( SCIP *  scip,
SCIP_RELAX *  relax,
SCIP_Real *  lowerbound,
SCIP_RESULT *  result 
)
static

method to solve the master problem for Benders' decomposition and when solving the original problem directly.

Parameters
scipthe SCIP data structure
relaxthe relaxator
lowerboundthe lowerbound computed by the relaxator for the current node
resultthe result of the relaxation call

Definition at line 3227 of file relax_gcg.c.

References GCGmasterIsBestsolValid(), GCGmasterIsCurrentSolValid(), GCGtransformMastersolToOrigsol(), and solveMasterProblem().

Referenced by relaxExecGcgBendersDecomposition(), and relaxExecGcgOriginalProblem().

◆ relaxExecGcgBendersDecomposition()

static SCIP_RETCODE relaxExecGcgBendersDecomposition ( SCIP *  scip,
SCIP_RELAX *  relax,
SCIP_Real *  lowerbound,
SCIP_RESULT *  result 
)
static

execution method of the relaxator for Benders' decomposition

Parameters
scipthe SCIP data structure
relaxthe relaxator
lowerboundthe lowerbound computed by the relaxator for the current node
resultthe result of the relaxation call

Definition at line 3336 of file relax_gcg.c.

References solveMasterProblemAndEvaluate().

Referenced by SCIP_DECL_RELAXEXEC().

◆ relaxExecGcgOriginalProblem()

static SCIP_RETCODE relaxExecGcgOriginalProblem ( SCIP *  scip,
SCIP_RELAX *  relax,
SCIP_Real *  lowerbound,
SCIP_RESULT *  result 
)
static

execution method of the relaxator when the original problem is solved directly

Parameters
scipthe SCIP data structure
relaxthe relaxator
lowerboundthe lowerbound computed by the relaxator for the current node
resultthe result of the relaxation call

Definition at line 3354 of file relax_gcg.c.

References solveMasterProblemAndEvaluate().

Referenced by SCIP_DECL_RELAXEXEC().

◆ SCIP_DECL_RELAXEXEC()

◆ GCGrelaxIncludeBranchrule()

SCIP_RETCODE GCGrelaxIncludeBranchrule ( SCIP *  scip,
SCIP_BRANCHRULE *  branchrule,
GCG_DECL_BRANCHACTIVEMASTER((*branchactivemaster))  ,
GCG_DECL_BRANCHDEACTIVEMASTER((*branchdeactivemaster))  ,
GCG_DECL_BRANCHPROPMASTER((*branchpropmaster))  ,
GCG_DECL_BRANCHMASTERSOLVED((*branchmastersolved))  ,
GCG_DECL_BRANCHDATADELETE((*branchdatadelete))   
)

includes a branching rule into the relaxator data

Parameters
scipSCIP data structure
branchrulebranching rule for which callback methods are saved

Definition at line 3545 of file relax_gcg.c.

References ensureSizeBranchrules(), and RELAX_NAME.

Referenced by SCIP_DECL_BRANCHINIT().

◆ GCGrelaxBranchActiveMaster()

SCIP_RETCODE GCGrelaxBranchActiveMaster ( SCIP *  scip,
SCIP_BRANCHRULE *  branchrule,
GCG_BRANCHDATA branchdata 
)

perform activation method of the given branchrule for the given branchdata

Parameters
scipSCIP data structure
branchrulebranching rule that did the branching
branchdatadata representing the branching decision

Definition at line 3586 of file relax_gcg.c.

References RELAX_NAME.

Referenced by SCIP_DECL_CONSACTIVE().

◆ GCGrelaxBranchDeactiveMaster()

SCIP_RETCODE GCGrelaxBranchDeactiveMaster ( SCIP *  scip,
SCIP_BRANCHRULE *  branchrule,
GCG_BRANCHDATA branchdata 
)

perform deactivation method of the given branchrule for the given branchdata

Parameters
scipSCIP data structure
branchrulebranching rule that did the branching
branchdatadata representing the branching decision

Definition at line 3624 of file relax_gcg.c.

References RELAX_NAME.

Referenced by SCIP_DECL_CONSDEACTIVE().

◆ GCGrelaxBranchPropMaster()

SCIP_RETCODE GCGrelaxBranchPropMaster ( SCIP *  scip,
SCIP_BRANCHRULE *  branchrule,
GCG_BRANCHDATA branchdata,
SCIP_RESULT *  result 
)

perform propagation method of the given branchrule for the given branchdata

Parameters
scipSCIP data structure
branchrulebranching rule that did the branching
branchdatadata representing the branching decision
resultpointer to store the result of the propagation call

Definition at line 3662 of file relax_gcg.c.

References RELAX_NAME.

Referenced by SCIP_DECL_CONSPROP().

◆ GCGrelaxBranchDataDelete()

SCIP_RETCODE GCGrelaxBranchDataDelete ( SCIP *  scip,
SCIP_BRANCHRULE *  branchrule,
GCG_BRANCHDATA **  branchdata 
)

frees branching data created by the given branchrule

Parameters
scipSCIP data structure
branchrulebranching rule that did the branching
branchdatadata representing the branching decision

Definition at line 3704 of file relax_gcg.c.

References GCGgetMasterprob(), and RELAX_NAME.

Referenced by SCIP_DECL_CONSDELETE().

◆ GCGrelaxBranchMasterSolved()

SCIP_RETCODE GCGrelaxBranchMasterSolved ( SCIP *  scip,
SCIP_BRANCHRULE *  branchrule,
GCG_BRANCHDATA branchdata,
SCIP_Real  newlowerbound 
)

perform method of the given branchrule that is called after the master LP is solved

Parameters
scipSCIP data structure
branchrulebranching rule that did the branching
branchdatadata representing the branching decision
newlowerboundthe new local lowerbound

Definition at line 3749 of file relax_gcg.c.

References RELAX_NAME.

Referenced by relaxExecGcgDantzigWolfe().

◆ GCGrelaxTransOrigToMasterCons()

SCIP_RETCODE GCGrelaxTransOrigToMasterCons ( SCIP *  scip,
SCIP_CONS *  cons,
SCIP_CONS **  transcons 
)

transforms a constraint of the original problem into the master variable space and stores information about the constraints in the variable

Parameters
scipSCIP data structure
consthe constraint that should be transformed
transconspointer to store the transformed constraint

Definition at line 3789 of file relax_gcg.c.

References ensureSizeMasterConss(), GCGconsGetLhs(), GCGconsGetRhs(), GCGmasterAddMasterconsToHashmap(), GCGmasterVarGetNOrigvars(), GCGmasterVarGetOrigvals(), GCGmasterVarGetOrigvars(), GCGoriginalVarAddCoef(), and RELAX_NAME.

Referenced by GCG_DECL_BRANCHACTIVEMASTER().

◆ GCGgetOriginalprob()

SCIP* GCGgetOriginalprob ( SCIP *  masterprob)

returns the original problem for the given master problem

Parameters
masterprobthe SCIP data structure for the master problem

Definition at line 3883 of file relax_gcg.c.

References DEC_DECMODE_BENDERS, DEC_DECMODE_DANTZIGWOLFE, DEC_DECMODE_ORIGINAL, GCGbendersGetOrigprob(), GCGgetDecompositionMode(), and GCGmasterGetOrigprob().

Referenced by createMasterProblem(), GCGmasterCreateInitialMastervars(), GCGmasterTransOrigSolToMasterVars(), and SCIP_DECL_DISPOUTPUT().

◆ GCGgetMasterprob()

SCIP* GCGgetMasterprob ( SCIP *  scip)

returns the master problem

Parameters
scipSCIP data structure

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()

SCIP* GCGgetPricingprob ( SCIP *  scip,
int  pricingprobnr 
)

◆ GCGgetNRelPricingprobs()

int GCGgetNRelPricingprobs ( SCIP *  scip)

returns the number of relevant pricing problems

Parameters
scipSCIP data structure

Definition at line 3959 of file relax_gcg.c.

References RELAX_NAME.

Referenced by gcg::Pricingcontroller::canPricingloopBeAborted(), ObjPricerGcg::createStabilization(), gcg::Pricingcontroller::initSol(), ObjPricerGcg::pricingLoop(), SCIP_DECL_HEUREXEC(), and SCIP_DECL_SEPAEXECLP().

◆ GCGgetNPricingprobs()

◆ GCGisPricingprobRelevant()

SCIP_Bool GCGisPricingprobRelevant ( SCIP *  scip,
int  pricingprobnr 
)

◆ GCGgetBlockRepresentative()

int GCGgetBlockRepresentative ( SCIP *  scip,
int  pricingprobnr 
)

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

Parameters
scipSCIP data structure
pricingprobnrnumber of the pricing problem

Definition at line 4023 of file relax_gcg.c.

References RELAX_NAME.

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

◆ GCGgetNIdenticalBlocks()

int GCGgetNIdenticalBlocks ( SCIP *  scip,
int  pricingprobnr 
)

returns the number of blocks in the original formulation, that are represented by the pricingprob with the given number

Parameters
scipSCIP data structure
pricingprobnrnumber of the pricing problem

Definition at line 4053 of file relax_gcg.c.

References RELAX_NAME.

Referenced by addPPObjConss(), assignUniqueBlockFlags(), gcg::Pricingcontroller::collectResults(), gcg::Stabilization::convGetDual(), createChildNodesGeneric(), GCGcolComputeDualObjPara(), GCGprintDecompStatistics(), GCGsepaBasisAddPricingCut(), getBestMastervar(), ObjPricerGcg::getDualconvsum(), getUniqueBlockFlagForIter(), resetPricingVarBound(), SCIP_DECL_BRANCHEXECPS(), SCIP_DECL_HEUREXEC(), and selectExtremePoints().

◆ GCGgetNMasterConss()

int GCGgetNMasterConss ( SCIP *  scip)

◆ GCGgetMasterConss()

SCIP_CONS** GCGgetMasterConss ( SCIP *  scip)

returns the contraints in the master problem

Parameters
scipSCIP data structure

Definition at line 4098 of file relax_gcg.c.

References RELAX_NAME.

Referenced by ObjPricerGcg::addArtificialVars(), gcg::Stabilization::consGetDual(), GCGcolComputeDualObjPara(), ObjPricerGcg::getStabilizedDualObjectiveValue(), SCIP_DECL_PRICERINITSOL(), and ObjPricerGcg::setPricingObjs().

◆ GCGgetOrigMasterConss()

SCIP_CONS** GCGgetOrigMasterConss ( SCIP *  scip)

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

Parameters
scipSCIP data structure

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 
)

returns the convexity constraint for the given block

Parameters
scipSCIP data structure
blocknrthe number of the block for which we need the convexity constraint

Definition at line 4136 of file relax_gcg.c.

References RELAX_NAME.

Referenced by ObjPricerGcg::addArtificialVars(), gcg::Stabilization::convGetDual(), ObjPricerGcg::createNewMasterVar(), ObjPricerGcg::createNewMasterVarFromGcgCol(), ObjPricerGcg::getConvconsDualsol(), ObjPricerGcg::getDualconvsum(), and ObjPricerGcg::setPricingObjs().

◆ GCGgetParamsVisu()

◆ GCGrelaxGetCurrentOrigSol()

SCIP_SOL* GCGrelaxGetCurrentOrigSol ( SCIP *  scip)

returns the current solution for the original problem

Parameters
scipSCIP data structure

Definition at line 4183 of file relax_gcg.c.

References RELAX_NAME.

Referenced by GCGbranchGenericInitbranch(), SCIP_DECL_BRANCHEXECLP(), SCIP_DECL_HEUREXEC(), and SCIP_DECL_SEPAEXECLP().

◆ GCGrelaxIsOrigSolFeasible()

SCIP_Bool GCGrelaxIsOrigSolFeasible ( SCIP *  scip)

returns whether the current solution is primal feasible in the original problem

Parameters
scipSCIP data structure

Definition at line 4202 of file relax_gcg.c.

References RELAX_NAME.

Referenced by SCIP_DECL_BRANCHEXECEXT(), SCIP_DECL_BRANCHEXECLP(), SCIP_DECL_CONSENFOLP(), SCIP_DECL_HEUREXEC(), and SCIP_DECL_SEPAEXECLP().

◆ GCGisMasterSetCovering()

SCIP_Bool GCGisMasterSetCovering ( SCIP *  scip)

returns whether the master problem is a set covering problem

Parameters
scipSCIP data structure

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

Parameters
scipSCIP data structure

Definition at line 4240 of file relax_gcg.c.

References RELAX_NAME.

Referenced by SCIP_DECL_BRANCHEXECLP(), and SCIP_DECL_BRANCHEXECPS().

◆ GCGrelaxStartProbing()

SCIP_RETCODE GCGrelaxStartProbing ( SCIP *  scip,
SCIP_HEUR *  probingheur 
)

start probing mode on both the original and master problems

Note
This mode is intended for working on the original variables but using the master LP; it currently only supports bound changes on the original variables, but no additional rows
Parameters
scipSCIP data structure
probingheurheuristic that started probing mode, or NULL

Definition at line 4264 of file relax_gcg.c.

References RELAX_NAME.

Referenced by applyProbing(), executeStrongBranching(), and SCIP_DECL_HEUREXEC().

◆ GCGrelaxGetProbingheur()

SCIP_HEUR* GCGrelaxGetProbingheur ( SCIP *  scip)

returns the heuristic that started probing in the master problem, or NULL

Parameters
scipSCIP data structure

Definition at line 4309 of file relax_gcg.c.

References RELAX_NAME.

Referenced by createOriginalProblemSolution(), and GCGtransformMastersolToOrigsol().

◆ GCGrelaxNewProbingnodeOrig()

SCIP_RETCODE GCGrelaxNewProbingnodeOrig ( SCIP *  scip)

add a new probing node the original problem together with an original branching constraint

Note
A corresponding probing node must be added to the master problem right before solving the probing LP
Parameters
scipSCIP data structure

Definition at line 4331 of file relax_gcg.c.

References GCGconsOrigbranchGetActiveCons(), GCGcreateConsOrigbranch(), GCGgetMasterprob(), and RELAX_NAME.

Referenced by applyProbing(), executeStrongBranching(), and SCIP_DECL_HEUREXEC().

◆ GCGrelaxNewProbingnodeMaster()

SCIP_RETCODE GCGrelaxNewProbingnodeMaster ( SCIP *  scip)

add a new probing node the master problem together with a master branching constraint which ensures that bound changes are transferred to master and pricing problems

Note
A corresponding probing node must have been added to the original problem beforehand; furthermore, this method must be called after bound changes to the original problem have been made
Parameters
scipSCIP data structure

Definition at line 4378 of file relax_gcg.c.

References GCGconsMasterbranchGetActiveCons(), GCGcreateConsMasterbranch(), and RELAX_NAME.

Referenced by applyProbing(), executeStrongBranching(), and SCIP_DECL_HEUREXEC().

◆ GCGrelaxNewProbingnodeMasterCons()

SCIP_RETCODE GCGrelaxNewProbingnodeMasterCons ( SCIP *  scip,
SCIP_BRANCHRULE *  branchrule,
GCG_BRANCHDATA branchdata,
SCIP_CONS **  origbranchconss,
int  norigbranchconss,
int  maxorigbranchconss 
)

add a new probing node the master problem together with a master branching constraint which ensures that bound changes are transferred to master and pricing problems as well as additional constraints

Note
A corresponding probing node must have been added to the original problem beforehand; furthermore, this method must be called after bound changes to the original problem have been made
Parameters
scipSCIP data structure
branchrulepointer to the branching rule
branchdatabranching data
origbranchconssoriginal constraints enforcing the branching decision
norigbranchconssnumber of original constraints
maxorigbranchconsscapacity of origbranchconss

Definition at line 4430 of file relax_gcg.c.

References GCGconsMasterbranchGetActiveCons(), GCGcreateConsMasterbranch(), and RELAX_NAME.

Referenced by newProbingNodeRyanfosterMaster().

◆ GCGrelaxBacktrackProbing()

SCIP_RETCODE GCGrelaxBacktrackProbing ( SCIP *  scip,
int  probingdepth 
)

add probing nodes to both the original and master problem; furthermore, add origbranch and masterbranch constraints to transfer branching decisions from the original to the master problem

Parameters
scipSCIP data structure
probingdepthprobing depth of the node in the probing path that should be reactivated

Definition at line 4484 of file relax_gcg.c.

References RELAX_NAME.

Referenced by SCIP_DECL_HEUREXEC().

◆ performProbing()

static SCIP_RETCODE performProbing ( SCIP *  scip,
int  maxlpiterations,
int  maxpricerounds,
SCIP_Bool  usepricing,
SCIP_Longint *  nlpiterations,
int *  npricerounds,
SCIP_Real *  lpobjvalue,
SCIP_Bool *  lpsolved,
SCIP_Bool *  lperror,
SCIP_Bool *  cutoff 
)
static

solve the master probing LP with or without pricing

Parameters
scipSCIP data structure
maxlpiterationsmaximum number of lp iterations allowed
maxpriceroundsmaximum number of pricing rounds allowed
usepricingshould the LP be solved with or without pricing?
nlpiterationspointer to store the number of performed LP iterations (or NULL)
npriceroundspointer to store the number of performed pricing rounds (or NULL)
lpobjvaluepointer to store the lp obj value if lp was solved
lpsolvedpointer to store whether the lp was solved
lperrorpointer to store whether an unresolved LP error occured or the solving process should be stopped (e.g., due to a time limit)
cutoffpointer to store whether the probing direction is infeasible

Definition at line 4518 of file relax_gcg.c.

References GCGrelaxUpdateCurrentSol(), and RELAX_NAME.

Referenced by GCGrelaxPerformProbing(), and GCGrelaxPerformProbingWithPricing().

◆ GCGrelaxPerformProbing()

SCIP_RETCODE GCGrelaxPerformProbing ( SCIP *  scip,
int  maxlpiterations,
SCIP_Longint *  nlpiterations,
SCIP_Real *  lpobjvalue,
SCIP_Bool *  lpsolved,
SCIP_Bool *  lperror,
SCIP_Bool *  cutoff 
)

solve the master probing LP without pricing

Parameters
scipSCIP data structure
maxlpiterationsmaximum number of lp iterations allowed
nlpiterationspointer to store the number of performed LP iterations (or NULL)
lpobjvaluepointer to store the lp obj value if lp was solved
lpsolvedpointer to store whether the lp was solved
lperrorpointer to store whether an unresolved LP error occured or the solving process should be stopped (e.g., due to a time limit)
cutoffpointer to store whether the probing direction is infeasible

Definition at line 4620 of file relax_gcg.c.

References performProbing().

Referenced by executeStrongBranching(), and SCIP_DECL_HEUREXEC().

◆ GCGrelaxPerformProbingWithPricing()

SCIP_RETCODE GCGrelaxPerformProbingWithPricing ( SCIP *  scip,
int  maxpricerounds,
SCIP_Longint *  nlpiterations,
int *  npricerounds,
SCIP_Real *  lpobjvalue,
SCIP_Bool *  lpsolved,
SCIP_Bool *  lperror,
SCIP_Bool *  cutoff 
)

solve the master probing LP with pricing

Parameters
scipSCIP data structure
maxpriceroundsmaximum number of pricing rounds allowed
nlpiterationspointer to store the number of performed LP iterations (or NULL)
npriceroundspointer to store the number of performed pricing rounds (or NULL)
lpobjvaluepointer to store the lp obj value if lp was solved
lpsolvedpointer to store whether the lp was solved
lperrorpointer to store whether an unresolved LP error occured or the solving process should be stopped (e.g., due to a time limit)
cutoffpointer to store whether the probing direction is infeasible

Definition at line 4639 of file relax_gcg.c.

References performProbing().

Referenced by applyProbing(), executeStrongBranching(), and SCIP_DECL_HEUREXEC().

◆ GCGrelaxEndProbing()

SCIP_RETCODE GCGrelaxEndProbing ( SCIP *  scip)

end probing mode in both the original and master problems

Parameters
scipSCIP data structure

Definition at line 4658 of file relax_gcg.c.

References GCGtransformMastersolToOrigsol(), RELAX_INCLUDESLP, and RELAX_NAME.

Referenced by applyProbing(), executeStrongBranching(), and SCIP_DECL_HEUREXEC().

◆ checkAndAddExternalBranchingCandidate()

static SCIP_RETCODE checkAndAddExternalBranchingCandidate ( SCIP *  scip,
SCIP_VAR *  var 
)
static

checks whether a variable shoudl be added as an external branching candidate, if so it is added

Parameters
scipthe SCIP data structure
varthe variable to check whether to add as a branching candidate

Definition at line 4765 of file relax_gcg.c.

Referenced by GCGrelaxUpdateCurrentSol().

◆ GCGrelaxUpdateCurrentSol()

SCIP_RETCODE GCGrelaxUpdateCurrentSol ( SCIP *  scip)

transforms the current solution of the master problem into the original problem's space and saves this solution as currentsol in the relaxator's data

Parameters
scipSCIP data structure

Definition at line 4796 of file relax_gcg.c.

References checkAndAddExternalBranchingCandidate(), DEC_DECMODE_BENDERS, DEC_DECMODE_DANTZIGWOLFE, GCGgetDecompositionMode(), GCGgetMasterprob(), GCGmasterIsSolValid(), GCGmasterVarGetNOrigvars(), GCGmasterVarGetOrigvars(), GCGtransformMastersolToOrigsol(), RELAX_INCLUDESLP, and RELAX_NAME.

Referenced by performProbing(), SCIP_DECL_BENDERSPOSTSOLVE(), SCIP_DECL_EVENTEXEC(), and SCIP_DECL_SEPAEXECLP().

◆ GCGgetPricingprobsMemUsed()

SCIP_Real GCGgetPricingprobsMemUsed ( SCIP *  scip)

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

Parameters
scipSCIP data structure

Definition at line 4925 of file relax_gcg.c.

References RELAX_NAME.

◆ GCGrelaxIsInitialized()

SCIP_Bool GCGrelaxIsInitialized ( SCIP *  scip)

returns whether the relaxator has been initialized

Parameters
scipSCIP data structure

Definition at line 4958 of file relax_gcg.c.

References RELAX_NAME.

Referenced by SCIP_DECL_EVENTEXEC().

◆ GCGgetDegeneracy()

SCIP_Real GCGgetDegeneracy ( SCIP *  scip)

returns the average degeneracy

Parameters
scipSCIP data structure

Definition at line 4978 of file relax_gcg.c.

References GCGmasterGetDegeneracy(), and RELAX_NAME.

Referenced by SCIP_DECL_DISPOUTPUT().

◆ GCGgetVarLinkingconss()

SCIP_CONS** GCGgetVarLinkingconss ( SCIP *  scip)

return linking constraints for variables

Parameters
scipSCIP data structure

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

Parameters
scipSCIP data structure

Definition at line 5024 of file relax_gcg.c.

References RELAX_NAME.

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

◆ GCGgetNVarLinkingconss()

int GCGgetNVarLinkingconss ( SCIP *  scip)

return number of linking constraints for variables

Parameters
scipSCIP data structure

Definition at line 5043 of file relax_gcg.c.

References RELAX_NAME.

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

◆ GCGgetNLinkingvars()

int GCGgetNLinkingvars ( SCIP *  scip)

return number of linking variables

Parameters
scipSCIP data structure

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

Parameters
scipSCIP data structure

Definition at line 5081 of file relax_gcg.c.

References RELAX_NAME.

Referenced by ObjPricerGcg::getStabilizedDualObjectiveValue().

◆ GCGgetBendersRelaxationSol()

SCIP_SOL* GCGgetBendersRelaxationSol ( SCIP *  scip)

returns the relaxation solution from the Benders' decomposition

Parameters
scipSCIP data structure

Definition at line 5100 of file relax_gcg.c.

References RELAX_NAME, and SCIPbendersGetRelaxSol().

Referenced by GCGtransformMastersolToOrigsol().

◆ GCGgetDecompositionMode()

◆ GCGgetMasterDecompMode()

DEC_DECMODE GCGgetMasterDecompMode ( SCIP *  masterprob)

returns the decomposition mode of the master problem. The mode is given by the existence of either the GCG pricer or the GCG Benders' decomposition plugins.

Parameters
masterprobthe master problem SCIP instance

Definition at line 5144 of file relax_gcg.c.

References DEC_DECMODE_BENDERS, DEC_DECMODE_DANTZIGWOLFE, DEC_DECMODE_ORIGINAL, and DEC_DECMODE_UNKNOWN.

Referenced by GCGcreateInitialMasterVar(), GCGmasterIsBestsolValid(), GCGmasterIsCurrentSolValid(), GCGmasterIsSolValid(), and SCIP_DECL_RELAXINITSOL().

◆ GCGgetRootNodeTime()

SCIP_CLOCK* GCGgetRootNodeTime ( SCIP *  scip)

return root node time clock

Parameters
scipSCIP data structure

Definition at line 5181 of file relax_gcg.c.

References RELAX_NAME.

Referenced by GCGwriteSolvingDetails().

◆ GCGtransformProb()

SCIP_RETCODE GCGtransformProb ( SCIP *  scip)

initializes solving data structures and transforms problem for solving with GCG

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if scip is in one of the following stages:
  • SCIP_STAGE_PROBLEM
  • SCIP_STAGE_TRANSFORMED
  • SCIP_STAGE_INITPRESOLVE
  • SCIP_STAGE_PRESOLVING
  • SCIP_STAGE_EXITPRESOLVE
  • SCIP_STAGE_PRESOLVED
  • SCIP_STAGE_INITSOLVE
  • SCIP_STAGE_SOLVING
  • SCIP_STAGE_SOLVED
  • SCIP_STAGE_EXITSOLVE
  • SCIP_STAGE_FREETRANS
  • SCIP_STAGE_FREE
Postcondition
When calling this method in the SCIP_STAGE_PROBLEM stage, the SCIP stage is changed to SCIP_STAGE_TRANSFORMED; otherwise, the stage is not changed

See SCIP_STAGE for a complete list of all possible solving stages.

Parameters
scipSCIP data structure

Definition at line 5199 of file relax_gcg.c.

References SCIPconshdlrDecompRepairConsNames().

Referenced by fromCommandLine(), GCGdetect(), GCGpresolve(), GCGsolve(), and SCIP_DECL_DIALOGEXEC().

◆ GCGpresolve()

SCIP_RETCODE GCGpresolve ( SCIP *  scip)

transforms and presolves the problem suitable for GCG

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if scip is in one of the following stages:
  • SCIP_STAGE_PROBLEM
  • SCIP_STAGE_TRANSFORMED
  • SCIP_STAGE_PRESOLVING
  • SCIP_STAGE_PRESOLVED
Postcondition
After calling this method SCIP reaches one of the following stages:
  • SCIP_STAGE_PRESOLVING if the presolving process was interrupted
  • SCIP_STAGE_PRESOLVED if the presolving process was finished and did not solve the problem
  • SCIP_STAGE_SOLVED if the problem was solved during presolving

See SCIP_STAGE for a complete list of all possible solving stages.

Parameters
scipSCIP data structure

Definition at line 5237 of file relax_gcg.c.

References GCGconshdlrDecompTranslateOrigPartialdecs(), and GCGtransformProb().

Referenced by GCGsolve(), and SCIP_DECL_DIALOGEXEC().

◆ GCGdetect()

SCIP_RETCODE GCGdetect ( SCIP *  scip)

transforms and detects the problem

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if scip is in one of the following stages:
  • SCIP_STAGE_PROBLEM
  • SCIP_STAGE_TRANSFORMED
  • SCIP_STAGE_PRESOLVING
  • SCIP_STAGE_PRESOLVED
Postcondition
When calling this method in the SCIP_STAGE_PROBLEM stage, the SCIP stage is changed to SCIP_STAGE_TRANSFORMED; otherwise, the stage is not changed

See SCIP_STAGE for a complete list of all possible solving stages.

Parameters
scipSCIP data structure

Definition at line 5283 of file relax_gcg.c.

References DECdetectStructure(), GCGdetectionTookPlace(), and GCGtransformProb().

Referenced by SCIP_DECL_DIALOGEXEC().

◆ GCGsolve()

SCIP_RETCODE GCGsolve ( SCIP *  scip)

transforms, resolves, detects, and solves the problem using GCG

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if scip is in one of the following stages:
  • SCIP_STAGE_PROBLEM
  • SCIP_STAGE_TRANSFORMED
  • SCIP_STAGE_PRESOLVING
  • SCIP_STAGE_PRESOLVED
  • SCIP_STAGE_SOLVING
  • SCIP_STAGE_SOLVED
Postcondition
After calling this method SCIP reaches one of the following stages depending on if and when the solution process was interrupted:
  • SCIP_STAGE_PRESOLVING if the solution process was interrupted during presolving
  • SCIP_STAGE_SOLVING if the solution process was interrupted during the tree search
  • SCIP_STAGE_SOLVED if the solving process was not interrupted

See SCIP_STAGE for a complete list of all possible solving stages.

Parameters
scipSCIP data structure

Definition at line 5341 of file relax_gcg.c.

References DECdecompFree(), DECdetectStructure(), DECgetBestDecomp(), GCGconshdlrDecompCheckConsistency(), GCGconshdlrDecompGetNFinishedPartialdecsTransformed(), GCGconshdlrDecompOrigPartialdecExists(), GCGdetectionTookPlace(), GCGpresolve(), and GCGtransformProb().

Referenced by fromCommandLine(), and SCIP_DECL_DIALOGEXEC().

◆ GCGgetDualbound()

SCIP_Real GCGgetDualbound ( SCIP *  scip)

gets GCG's global dual bound

Computes the global dual bound while considering the original problem SCIP instance and the master problem SCIP instance.

Returns
the global dual bound
Parameters
scipSCIP data structure

Definition at line 5445 of file relax_gcg.c.

References GCGgetMasterprob().

Referenced by GCGgetGap(), and SCIP_DECL_DISPOUTPUT().

◆ GCGgetPrimalbound()

SCIP_Real GCGgetPrimalbound ( SCIP *  scip)

gets GCG's global primal bound

Computes the global primal bound while considering the original problem SCIP instance and the master problem SCIP instance.

Returns
the global dual bound
Parameters
scipSCIP data structure

Definition at line 5473 of file relax_gcg.c.

References GCGgetMasterprob(), and GCGmasterIsBestsolValid().

Referenced by GCGgetGap(), and SCIP_DECL_DISPOUTPUT().

◆ GCGgetGap()

SCIP_Real GCGgetGap ( SCIP *  scip)

gets GCG's global gap

Computes the global gap based on the gloal dual bound and the global primal bound.

Returns
the global dual bound
See also
GCGgetDualbound()
GCGgetPrimalbound()
Parameters
scipSCIP data structure

Definition at line 5501 of file relax_gcg.c.

References GCGgetDualbound(), and GCGgetPrimalbound().

Referenced by SCIP_DECL_DISPOUTPUT().