pub_gcgvar.h File Reference

Detailed Description

public methods for GCG variables

Author
Martin Bergner
Christian Puchert

Definition in file pub_gcgvar.h.

#include "type_decomp.h"
#include "scip/scip.h"

Go to the source code of this file.

Functions

SCIP_Bool GCGvarIsPricing (SCIP_VAR *var)
 
SCIP_Bool GCGvarIsOriginal (SCIP_VAR *var)
 
SCIP_Bool GCGvarIsMaster (SCIP_VAR *var)
 
SCIP_Bool GCGoriginalVarIsLinking (SCIP_VAR *var)
 
SCIP_Bool GCGoriginalVarIsTransVar (SCIP_VAR *var)
 
SCIP_VAR * GCGpricingVarGetOriginalVar (SCIP_VAR *var)
 
SCIP_RETCODE GCGpricingVarAddOrigVar (SCIP *scip, SCIP_VAR *pricingvar, SCIP_VAR *origvar)
 
SCIP_VAR * GCGoriginalVarGetPricingVar (SCIP_VAR *var)
 
void GCGoriginalVarSetPricingVar (SCIP_VAR *var, SCIP_VAR *pricingvar)
 
SCIP_RETCODE GCGcopyPricingvarDataToMastervar (SCIP *scip, SCIP_VAR *pricingvar, SCIP_VAR *mastervar)
 
SCIP_VAR ** GCGlinkingVarGetPricingVars (SCIP_VAR *var)
 
void GCGlinkingVarSetPricingVar (SCIP_VAR *origvar, int pricingprobnr, SCIP_VAR *var)
 
int GCGoriginalVarGetNMastervars (SCIP_VAR *var)
 
SCIP_VAR ** GCGoriginalVarGetMastervars (SCIP_VAR *var)
 
SCIP_Real * GCGoriginalVarGetMastervals (SCIP_VAR *var)
 
SCIP_Real * GCGoriginalVarGetCoefs (SCIP_VAR *var)
 
SCIP_CONS ** GCGoriginalVarGetMasterconss (SCIP_VAR *var)
 
SCIP_RETCODE GCGoriginalVarAddCoef (SCIP *scip, SCIP_VAR *var, SCIP_Real val, SCIP_CONS *cons)
 
SCIP_RETCODE GCGoriginalVarAddBlock (SCIP *scip, SCIP_VAR *var, int newblock, int nblocks, DEC_DECMODE mode)
 
SCIP_CONS ** GCGlinkingVarGetLinkingConss (SCIP_VAR *var)
 
void GCGlinkingVarSetLinkingCons (SCIP_VAR *var, SCIP_CONS *cons, int index)
 
SCIP_RETCODE GCGlinkingVarGetBlocks (SCIP_VAR *var, int nblocks, int *blocks)
 
int GCGlinkingVarGetNBlocks (SCIP_VAR *var)
 
int GCGoriginalVarGetNCoefs (SCIP_VAR *var)
 
void GCGoriginalVarSetNCoefs (SCIP_VAR *var, int coef)
 
SCIP_Bool GCGmasterVarIsLinking (SCIP_VAR *var)
 
SCIP * GCGmasterVarGetProb (SCIP_VAR *var)
 
SCIP_Bool GCGmasterVarIsRay (SCIP_VAR *var)
 
SCIP_Bool GCGmasterVarIsArtificial (SCIP_VAR *var)
 
int GCGmasterVarGetNOrigvars (SCIP_VAR *var)
 
SCIP_VAR ** GCGmasterVarGetOrigvars (SCIP_VAR *var)
 
SCIP_Real * GCGmasterVarGetOrigvals (SCIP_VAR *var)
 
int GCGpricingVarGetNOrigvars (SCIP_VAR *var)
 
SCIP_VAR ** GCGpricingVarGetOrigvars (SCIP_VAR *var)
 
int GCGvarGetBlock (SCIP_VAR *var)
 
void GCGvarSetBlock (SCIP_VAR *var, int block)
 
SCIP_RETCODE GCGcreateOrigVarsData (SCIP *scip)
 
SCIP_RETCODE GCGfreeOrigVarsData (SCIP *scip)
 
SCIP_RETCODE GCGorigVarCreateData (SCIP *scip, SCIP_VAR *var)
 
SCIP_Bool GCGisLinkingVarInBlock (SCIP_VAR *var, int block)
 
SCIP_Bool GCGisMasterVarInBlock (SCIP_VAR *mastervar, int blocknr)
 
SCIP_RETCODE GCGoriginalVarAddMasterVar (SCIP *scip, SCIP_VAR *origvar, SCIP_VAR *var, SCIP_Real val)
 
SCIP_RETCODE GCGoriginalVarRemoveMasterVar (SCIP *scip, SCIP_VAR *origvar, SCIP_VAR *var)
 
SCIP_RETCODE GCGoriginalVarCreatePricingVar (SCIP *scip, SCIP_VAR *origvar, SCIP_VAR **var)
 
SCIP_RETCODE GCGlinkingVarCreatePricingVar (SCIP *pricingscip, int pricingprobnr, SCIP_VAR *origvar, SCIP_VAR **var)
 
SCIP_RETCODE GCGlinkingVarCreateMasterCons (SCIP *masterscip, int pricingprobnr, SCIP_VAR *origvar, SCIP_CONS **linkcons)
 
SCIP_RETCODE GCGcreateMasterVar (SCIP *scip, SCIP *origscip, SCIP *pricingscip, SCIP_VAR **newvar, const char *varname, SCIP_Real objcoeff, SCIP_VARTYPE vartype, SCIP_Bool solisray, int prob, int nsolvars, SCIP_Real *solvals, SCIP_VAR **solvars, SCIP_Bool auxiliaryvar)
 
SCIP_RETCODE GCGcreateInitialMasterVar (SCIP *scip, SCIP_VAR *var, SCIP_VAR **newvar)
 
SCIP_RETCODE GCGcreateArtificialVar (SCIP *scip, SCIP_VAR **newvar, const char *name, SCIP_Real objcoef)
 
SCIP_RETCODE GCGaddDataAuxiliaryVar (SCIP *scip, SCIP_VAR *auxiliaryvar, int probnumber)
 
void GCGsetCreationNode (SCIP *scip, SCIP_VAR *var, SCIP_Longint creationNode)
 
long long int GCGgetCreationNode (SCIP *scip, SCIP_VAR *var)
 
void GCGsetCreationTime (SCIP *scip, SCIP_VAR *var, SCIP_Real time)
 
SCIP_Real GCGgetCreationTime (SCIP *scip, SCIP_VAR *var)
 
void GCGsetRootRedcostCall (SCIP *scip, SCIP_VAR *var, SCIP_Longint rootredcostcall)
 
SCIP_Longint GCGgetRootRedcostCall (SCIP *scip, SCIP_VAR *var)
 
SCIP_Longint GCGgetIteration (SCIP *scip, SCIP_VAR *var)
 
void GCGsetIteration (SCIP *scip, SCIP_VAR *var, SCIP_Longint iteration)
 
void GCGsetGap (SCIP *scip, SCIP_VAR *var, SCIP_Real gap)
 
SCIP_Real GCGgetGap (SCIP *scip, SCIP_VAR *var)
 
void GCGsetRedcost (SCIP *scip, SCIP_VAR *var, SCIP_Real redcost)
 
SCIP_Real GCGgetRedcost (SCIP *scip, SCIP_VAR *var)
 
void GCGupdateVarStatistics (SCIP *scip, SCIP *origprob, SCIP_VAR *newvar, SCIP_Real redcost)
 
void GCGprintVar (SCIP *scip, FILE *file, SCIP_VAR *var)
 

Function Documentation

SCIP_RETCODE GCGaddDataAuxiliaryVar ( SCIP *  scip,
SCIP_VAR *  auxiliaryvar,
int  probnumber 
)
Parameters
scipSCIP data structure
auxiliaryvarthe auxiliary variable
probnumberthe subproblem number

Definition at line 1440 of file gcgvar.c.

Referenced by SCIP_DECL_BENDERSINITPRE().

SCIP_RETCODE GCGcopyPricingvarDataToMastervar ( SCIP *  scip,
SCIP_VAR *  pricingvar,
SCIP_VAR *  mastervar 
)

copies the pricing variable data to a master problem variable. This is used in the Benders' decomposition mode when subproblems are merged into the master problem.

Parameters
scipmaster SCIP data structure
pricingvarthe pricing problem variable is copied from
mastervarthe master variable that the vardata is copied to

Definition at line 356 of file gcgvar.c.

References GCGpricingVarGetNOrigvars(), GCGpricingVarGetOrigvars(), and GCGvarIsPricing().

Referenced by mergeSubproblemIntoMaster().

SCIP_RETCODE GCGcreateArtificialVar ( SCIP *  scip,
SCIP_VAR **  newvar,
const char *  name,
SCIP_Real  objcoef 
)

creates artificial variable and the vardata

Parameters
scipSCIP data structure
newvarpointer to store new variable
namename of variable, or NULL for automatic name creation
objcoefobjective coefficient of artificial variable

Definition at line 1411 of file gcgvar.c.

Referenced by ObjPricerGcg::addArtificialVars().

SCIP_RETCODE GCGcreateInitialMasterVar ( SCIP *  scip,
SCIP_VAR *  var,
SCIP_VAR **  newvar 
)

creates initial master variables and the vardata

Parameters
scipSCIP data structure
varoriginal variable
newvarpointer to store new variable

Definition at line 1365 of file gcgvar.c.

References DEC_DECMODE_BENDERS, DEC_DECMODE_ORIGINAL, GCGgetMasterDecompMode(), and GCGvarGetBlock().

Referenced by createMasterprobConss(), and GCGmasterCreateInitialMastervars().

SCIP_RETCODE GCGcreateMasterVar ( SCIP *  scip,
SCIP *  origscip,
SCIP *  pricingscip,
SCIP_VAR **  newvar,
const char *  varname,
SCIP_Real  objcoeff,
SCIP_VARTYPE  vartype,
SCIP_Bool  solisray,
int  prob,
int  nsolvars,
SCIP_Real *  solvals,
SCIP_VAR **  solvars,
SCIP_Bool  auxiliaryvar 
)

creates the master var and initializes the vardata

Parameters
scipmaster SCIP data structure
origsciporiginal SCIP data structure
pricingscippricing problem SCIP data structure
newvarpointer to store new master variable
varnamenew variable name
objcoeffnew objective coefficient
vartypenew variable type
solisrayindicates whether new variable is a ray
probnumber of pricing problem that created this variable
nsolvarsnumber of variables in the solution
solvalsvalues of variables in the solution
solvarsvariables with non zero coefficient in the solution
auxiliaryvaris new variable an Benders' auxiliary variables?

Definition at line 1209 of file gcgvar.c.

References GCGoriginalVarAddMasterVar(), GCGpricingVarGetOrigvars(), GCGvarIsOriginal(), and GCGvarIsPricing().

Referenced by ObjPricerGcg::createNewMasterVar(), and ObjPricerGcg::createNewMasterVarFromGcgCol().

SCIP_RETCODE GCGcreateOrigVarsData ( SCIP *  scip)

creates the data for all variables of the original program

Parameters
scipSCIP data structure

Definition at line 244 of file gcgvar.c.

References GCGorigVarCreateData().

Referenced by convertStructToGCG().

SCIP_RETCODE GCGfreeOrigVarsData ( SCIP *  scip)

frees the data for all variables of the original program

Parameters
scipSCIP data structure

Definition at line 268 of file gcgvar.c.

Referenced by SCIP_DECL_RELAXEXITSOL().

long long int GCGgetCreationNode ( SCIP *  scip,
SCIP_VAR *  var 
)

returns the creation node of this var

return creation node of variable

Parameters
scipSCIP data structure
varvariable data structure

Definition at line 1491 of file gcgvar.c.

Referenced by GCGwriteVarCreationDetails().

SCIP_Real GCGgetCreationTime ( SCIP *  scip,
SCIP_VAR *  var 
)

returns the creation time of this var

return stored creation time

Parameters
scipSCIP data structure
varvariable data structure

Definition at line 1521 of file gcgvar.c.

Referenced by GCGwriteVarCreationDetails().

SCIP_Real GCGgetGap ( SCIP *  scip,
SCIP_VAR *  var 
)

return stored gap

Parameters
scipSCIP data structure
varvariable data structure

Definition at line 1611 of file gcgvar.c.

Referenced by GCGwriteVarCreationDetails().

SCIP_Longint GCGgetIteration ( SCIP *  scip,
SCIP_VAR *  var 
)

returns the iteration when the var was created

return stored iteration

Parameters
scipSCIP data structure
varvariable data structure

Definition at line 1581 of file gcgvar.c.

Referenced by GCGwriteVarCreationDetails().

SCIP_Real GCGgetRedcost ( SCIP *  scip,
SCIP_VAR *  var 
)

return stored reduced cost

Parameters
scipSCIP data structure
varvariable data structure

Definition at line 1641 of file gcgvar.c.

Referenced by GCGwriteVarCreationDetails().

SCIP_Longint GCGgetRootRedcostCall ( SCIP *  scip,
SCIP_VAR *  var 
)

return stored pricing reduced cost call

Parameters
scipSCIP data structure
varvariable data structure

Definition at line 1551 of file gcgvar.c.

Referenced by GCGwriteVarCreationDetails().

SCIP_Bool GCGisLinkingVarInBlock ( SCIP_VAR *  var,
int  block 
)

returns TRUE if the linking variable is in the block, FALSE otherwise

Parameters
varvariabel data structure
blockpricing problem number

Definition at line 965 of file gcgvar.c.

References GCGlinkingVarGetPricingVars(), GCGoriginalVarIsLinking(), and GCGvarIsOriginal().

Referenced by applyGlobalBndchgsToPricedMastervars(), applyLocalBndchgsToPricedMastervars(), areVarsInSameBlock(), compareOneExtremePoint(), GCGisMasterVarInBlock(), and setOriginalVarBlockNr().

SCIP_Bool GCGisMasterVarInBlock ( SCIP_VAR *  mastervar,
int  block 
)

determines if the master variable is in the given block

Parameters
mastervarmaster variable
blockblock number to check

Definition at line 984 of file gcgvar.c.

References GCGisLinkingVarInBlock(), GCGmasterVarGetOrigvars(), GCGmasterVarIsArtificial(), GCGoriginalVarIsLinking(), and GCGvarGetBlock().

Referenced by addVarToMasterbranch(), ChooseSeparateMethod(), createChildNodesGeneric(), and GCGbranchGenericInitbranch().

SCIP_RETCODE GCGlinkingVarCreateMasterCons ( SCIP *  masterscip,
int  pricingprobnr,
SCIP_VAR *  origvar,
SCIP_CONS **  linkcons 
)

creates the corresponding constraint in the master problem for the linking variable

Parameters
masterscipmsater problem SCIP data structure
pricingprobnrnumber of the pricing problem
origvaroriginal variable
linkconsconstraint linking pricing variables

Definition at line 1185 of file gcgvar.c.

References GCGoriginalVarIsLinking().

Referenced by createLinkingPricingVars().

SCIP_RETCODE GCGlinkingVarCreatePricingVar ( SCIP *  pricingscip,
int  pricingprobnr,
SCIP_VAR *  origvar,
SCIP_VAR **  var 
)

creates the corresponding pricing variable for the given original variable

Parameters
pricingscippricing problem SCIP data structure
pricingprobnrnumber of the pricing problem
origvaroriginal variable
varpointer to store new pricing variable

Definition at line 1150 of file gcgvar.c.

References GCGoriginalVarIsLinking(), and STARTMAXORIGVARS.

Referenced by createLinkingPricingVars().

SCIP_RETCODE GCGlinkingVarGetBlocks ( SCIP_VAR *  var,
int  nblocks,
int *  blocks 
)

returns the blocks the linking variable is in

Parameters
varSCIP variable structure
nblockssize of array blocks
blocksarray to store the blocks of the linking variable

Definition at line 431 of file gcgvar.c.

References GCGoriginalVarIsLinking().

Referenced by branchExtern(), GCGmasterTransOrigSolToMasterVars(), and SCIP_DECL_BRANCHEXECPS().

SCIP_CONS** GCGlinkingVarGetLinkingConss ( SCIP_VAR *  var)

returns the linking constraints

Parameters
varSCIP variable structure

Definition at line 753 of file gcgvar.c.

References GCGoriginalVarIsLinking(), and GCGvarIsOriginal().

Referenced by createLinkingPricingVars(), GCGmasterCreateInitialMastervars(), initRelaxator(), and ObjPricerGcg::setPricingObjs().

int GCGlinkingVarGetNBlocks ( SCIP_VAR *  var)

returns the number of blocks the linking variable is in

Parameters
varSCIP variable structure

Definition at line 473 of file gcgvar.c.

References GCGoriginalVarIsLinking().

Referenced by branchExtern(), createLinkingPricingVars(), fixVariables(), GCGmasterTransOrigSolToMasterVars(), GCGprintVar(), and SCIP_DECL_BRANCHEXECPS().

void GCGlinkingVarSetLinkingCons ( SCIP_VAR *  var,
SCIP_CONS *  cons,
int  index 
)

sets the linking constraints

Parameters
varvariable data structure
conslinking constraint
indexindex of pricing problem

Definition at line 771 of file gcgvar.c.

References GCGoriginalVarIsLinking(), and GCGvarIsOriginal().

Referenced by createLinkingPricingVars(), and initRelaxator().

void GCGlinkingVarSetPricingVar ( SCIP_VAR *  origvar,
int  pricingprobnr,
SCIP_VAR *  var 
)

sets the pricing var of the corresponding linking variable at the specified position

Parameters
origvaroriginal variable
pricingprobnrnumber of pricing problem
varpricing variable

Definition at line 408 of file gcgvar.c.

References GCGoriginalVarIsLinking(), and GCGvarIsPricing().

Referenced by createLinkingPricingVars().

SCIP* GCGmasterVarGetProb ( SCIP_VAR *  var)

returns scip instance corresponding to master variable

Parameters
varvariable data structure
SCIP_Bool GCGmasterVarIsArtificial ( SCIP_VAR *  var)

returns TRUE or FALSE whether a master variable is an artificial variable

Parameters
varvariable data structure

Definition at line 831 of file gcgvar.c.

References GCGvarIsMaster().

Referenced by GCGbranchGenericInitbranch(), GCGisMasterVarInBlock(), GCGmasterVarIsLinking(), and initializeStartsol().

SCIP_Bool GCGmasterVarIsLinking ( SCIP_VAR *  var)

returns TRUE or FALSE whether a master variable is a direct copy of a linking variable or not

Parameters
varvariable data structure

Definition at line 793 of file gcgvar.c.

References GCGmasterVarGetOrigvars(), GCGmasterVarIsArtificial(), GCGoriginalVarIsLinking(), GCGvarGetBlock(), and GCGvarIsMaster().

Referenced by applyGlobalBndchgsToPricedMastervars(), GCG_DECL_SORTPTRCOMP(), GCGbranchGenericInitbranch(), and SCIP_DECL_EVENTEXEC().

SCIP_Bool GCGmasterVarIsRay ( SCIP_VAR *  var)

returns whether the master variable is a ray

Parameters
varvariable data structure

Definition at line 816 of file gcgvar.c.

References GCGvarIsMaster().

Referenced by GCGtransformMastersolToOrigsol(), getBestMastervar(), initializeStartsol(), SCIP_DECL_HEUREXEC(), and selectExtremePoints().

SCIP_RETCODE GCGoriginalVarAddBlock ( SCIP *  scip,
SCIP_VAR *  var,
int  newblock,
int  nblocks,
DEC_DECMODE  mode 
)

adds variable to a new block, making a linkingvariable out of it, if necessary

Parameters
scipSCIP data structure
varvar that is added to a block
newblockthe new block the variable will be in
nblockstotal number of pricing problems
modethe decomposition mode

Definition at line 692 of file gcgvar.c.

References DEC_DECMODE_BENDERS, GCGgetDecompositionMode(), GCGoriginalVarIsLinking(), GCGvarGetBlock(), and GCGvarIsOriginal().

Referenced by setOriginalVarBlockNr().

SCIP_RETCODE GCGoriginalVarAddCoef ( SCIP *  scip,
SCIP_VAR *  var,
SCIP_Real  val,
SCIP_CONS *  cons 
)

adds a coefficient of the master variable to the coefs array for the resp. constraint

Parameters
scipSCIP data structure
varvariable to add coef
valcoefficent to set
consconstraint the variable is in

Definition at line 646 of file gcgvar.c.

References GCGvarIsOriginal().

Referenced by GCGrelaxTransOrigToMasterCons(), and saveOriginalVarMastercoeffs().

SCIP_RETCODE GCGoriginalVarAddMasterVar ( SCIP *  scip,
SCIP_VAR *  origvar,
SCIP_VAR *  var,
SCIP_Real  val 
)

informs an original variable, that a variable in the master problem was created, that contains a part of the original variable. Saves this information in the original variable's data

informs an original variable, that a variable in the master problem was created, that contains a part of the original variable. Saves this information in the original variable's data

Todo:
this method needs a little love
Parameters
scipSCIP data structure
origvaroriginal variable
varmaster variable
valfraction of the original variable

Definition at line 1021 of file gcgvar.c.

References GCGisOriginal(), and GCGvarIsOriginal().

Referenced by createMasterprobConss(), GCGcreateMasterVar(), and GCGmasterCreateInitialMastervars().

SCIP_RETCODE GCGoriginalVarCreatePricingVar ( SCIP *  scip,
SCIP_VAR *  origvar,
SCIP_VAR **  var 
)

creates the corresponding pricing variable for the given original variable

Parameters
scipSCIP data structure
origvaroriginal variable
varpricing variable

Definition at line 1113 of file gcgvar.c.

References GCGoriginalVarGetPricingVar(), GCGoriginalVarIsLinking(), GCGvarGetBlock(), GCGvarIsOriginal(), and STARTMAXORIGVARS.

Referenced by createPricingVar().

SCIP_Real* GCGoriginalVarGetCoefs ( SCIP_VAR *  var)

returns the fraction of master variables the original variable is contained in

returns the coefficients of master constraints the original variable is contained in

Parameters
varSCIP variable structure

Definition at line 593 of file gcgvar.c.

References GCGvarIsOriginal().

Referenced by checkIdentical(), ObjPricerGcg::computeColMastercoefs(), GCGmasterCreateInitialMastervars(), saveOriginalVarMastercoeffs(), and ObjPricerGcg::setPricingObjs().

SCIP_CONS** GCGoriginalVarGetMasterconss ( SCIP_VAR *  var)

returns the fraction of master variables the original variable is contained in

Parameters
varSCIP variable structure

Definition at line 677 of file gcgvar.c.

References GCGvarIsOriginal().

Referenced by checkIdentical(), ObjPricerGcg::computeColMastercoefs(), GCGmasterCreateInitialMastervars(), and ObjPricerGcg::setPricingObjs().

SCIP_Real* GCGoriginalVarGetMastervals ( SCIP_VAR *  var)

returns the fraction of master variables the original variable is contained in

Parameters
varSCIP variable structure

Definition at line 577 of file gcgvar.c.

References GCGvarIsOriginal().

Referenced by calcPscostDownMaster(), calcPscostUpMaster(), GCGprintVar(), GCGtransformOrigvalsToMastervals(), getMasterDownFrac(), getMasterDownScore(), getMasterUpFrac(), getMasterUpScore(), getNLocksDown(), getNLocksUp(), and SCIP_DECL_EVENTEXEC().

int GCGoriginalVarGetNCoefs ( SCIP_VAR *  var)

returns the number of coefficients of master constraints the original variable is contained in

Parameters
varSCIP variable structure

Definition at line 609 of file gcgvar.c.

References GCGvarIsOriginal().

Referenced by checkIdentical(), ObjPricerGcg::computeColMastercoefs(), GCGmasterCreateInitialMastervars(), SCIP_DECL_BRANCHEXECLP(), and ObjPricerGcg::setPricingObjs().

SCIP_Bool GCGoriginalVarIsLinking ( SCIP_VAR *  var)
SCIP_Bool GCGoriginalVarIsTransVar ( SCIP_VAR *  var)

returns TRUE or FALSE whether variable is a directly transferred variable or not

Parameters
varSCIP variable structure

Definition at line 191 of file gcgvar.c.

References GCGvarIsOriginal().

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

SCIP_RETCODE GCGoriginalVarRemoveMasterVar ( SCIP *  scip,
SCIP_VAR *  origvar,
SCIP_VAR *  var 
)

informs an original variable, that a variable in the master problem was deleted, that contains a part of the original variable. Update the information in the original variable's data

Todo:
this method needs a little love
Parameters
scipSCIP data structure
origvaroriginal variable
varmaster variable

Definition at line 1068 of file gcgvar.c.

References GCGvarIsOriginal().

Referenced by SCIP_DECL_EVENTEXEC().

void GCGoriginalVarSetNCoefs ( SCIP_VAR *  var,
int  ncoefs 
)

sets the number of master variables the original variable is contained in

Parameters
varSCIP variable structure
ncoefsnumber of coefficient to set

Definition at line 625 of file gcgvar.c.

References GCGvarIsOriginal().

Referenced by saveOriginalVarMastercoeffs().

void GCGoriginalVarSetPricingVar ( SCIP_VAR *  var,
SCIP_VAR *  pricingvar 
)

returns the pricing var of an original variable

Parameters
varSCIP variable structure
pricingvarSCIP variable structure

Definition at line 224 of file gcgvar.c.

References GCGoriginalVarIsLinking(), GCGvarIsOriginal(), and GCGvarIsPricing().

Referenced by checkIdenticalBlocks(), and createPricingVar().

SCIP_RETCODE GCGorigVarCreateData ( SCIP *  scip,
SCIP_VAR *  var 
)

creates the data for a variable of the original program

Parameters
scipSCIP data structure
varpointer to variable object

Definition at line 302 of file gcgvar.c.

References STARTMAXMASTERVARS.

Referenced by convertStructToGCG(), and GCGcreateOrigVarsData().

SCIP_RETCODE GCGpricingVarAddOrigVar ( SCIP *  scip,
SCIP_VAR *  pricingvar,
SCIP_VAR *  origvar 
)

adds the original var to the pricing variable

Parameters
scipSCIP variable structure
pricingvarpricing variable
origvaroriginal pricing variable

Definition at line 508 of file gcgvar.c.

References GCGvarIsOriginal(), and GCGvarIsPricing().

Referenced by checkIdenticalBlocks().

int GCGpricingVarGetNOrigvars ( SCIP_VAR *  var)
SCIP_VAR* GCGpricingVarGetOriginalVar ( SCIP_VAR *  var)

returns the original var of a pricing variable

Parameters
varSCIP variable structure

Definition at line 489 of file gcgvar.c.

References GCGvarIsPricing().

Referenced by comp(), GCGtransformOrigvalsToMastervals(), and SCIPconshdlrDecompCreateVarmapForSeeedId().

void GCGprintVar ( SCIP *  scip,
FILE *  file,
SCIP_VAR *  var 
)

prints the given variable: name, type (original, master or pricing) block number, and the list of all variables related to the given variable

Parameters
scipSCIP data structure
fileFile to write information to, or NULL for stdout
varvariable that should be printed

Definition at line 1683 of file gcgvar.c.

References GCGlinkingVarGetNBlocks(), GCGlinkingVarGetPricingVars(), GCGmasterVarGetNOrigvars(), GCGmasterVarGetOrigvals(), GCGmasterVarGetOrigvars(), GCGoriginalVarGetMastervals(), GCGoriginalVarGetMastervars(), GCGoriginalVarGetNMastervars(), GCGoriginalVarIsLinking(), GCGpricingVarGetNOrigvars(), GCGpricingVarGetOrigvars(), GCGvarGetBlock(), GCGvarIsMaster(), GCGvarIsOriginal(), and GCGvarIsPricing().

void GCGsetCreationNode ( SCIP *  scip,
SCIP_VAR *  var,
SCIP_Longint  creationNode 
)

sets the creation node of this var

set creation node of variable

Parameters
scipSCIP data structure
varvariable data structure
creationNodenode in which the variable is created

Definition at line 1475 of file gcgvar.c.

Referenced by GCGupdateVarStatistics().

void GCGsetCreationTime ( SCIP *  scip,
SCIP_VAR *  var,
SCIP_Real  time 
)

sets the creation time of this var

store creation time

Parameters
scipSCIP data structure
varvariable data structure
timetime at which the variable is created

Definition at line 1505 of file gcgvar.c.

Referenced by GCGupdateVarStatistics().

void GCGsetGap ( SCIP *  scip,
SCIP_VAR *  var,
SCIP_Real  gap 
)

store gap

Parameters
scipSCIP data structure
varvariable data structure
gappresent gap when variable is created

Definition at line 1595 of file gcgvar.c.

Referenced by GCGupdateVarStatistics().

void GCGsetIteration ( SCIP *  scip,
SCIP_VAR *  var,
SCIP_Longint  iteration 
)

sets the iteration when the var was created

store iteration

Parameters
scipSCIP data structure
varvariable data structure
iterationiteration at which the variable is created

Definition at line 1565 of file gcgvar.c.

Referenced by GCGupdateVarStatistics().

void GCGsetRedcost ( SCIP *  scip,
SCIP_VAR *  var,
SCIP_Real  redcost 
)

store reduced cost

Parameters
scipSCIP data structure
varvariable data structure
redcostreduced cost of the variable at creation

Definition at line 1625 of file gcgvar.c.

Referenced by GCGupdateVarStatistics().

void GCGsetRootRedcostCall ( SCIP *  scip,
SCIP_VAR *  var,
SCIP_Longint  rootredcostcall 
)

store pricing reduced cost call

Parameters
scipSCIP data structure
varvariable data structure
rootredcostcalliteration at which the variable is created

Definition at line 1535 of file gcgvar.c.

Referenced by ObjPricerGcg::createNewMasterVar(), ObjPricerGcg::createNewMasterVarFromGcgCol(), and GCGupdateVarStatistics().

void GCGupdateVarStatistics ( SCIP *  scip,
SCIP *  origprob,
SCIP_VAR *  newvar,
SCIP_Real  redcost 
)

updates the statistics part of the variable

Parameters
scipmaster SCIP data structure
origproboriginal SCIP data structure
newvarnew variable for statistic update
redcostreduced cost of the variable

Definition at line 1655 of file gcgvar.c.

References GCGisMaster(), GCGisOriginal(), GCGsetCreationNode(), GCGsetCreationTime(), GCGsetGap(), GCGsetIteration(), GCGsetRedcost(), and GCGsetRootRedcostCall().

Referenced by ObjPricerGcg::createNewMasterVar(), and ObjPricerGcg::createNewMasterVarFromGcgCol().

int GCGvarGetBlock ( SCIP_VAR *  var)

returns the block of the variable

Parameters
varSCIP variable structure

Definition at line 936 of file gcgvar.c.

Referenced by addVarToMasterbranch(), applyGlobalBndchgsToPricedMastervars(), applyGlobalBndchgsToPricingprobs(), applyLocalBndchgsToCopiedMastervars(), applyLocalBndchgsToPricedMastervars(), applyLocalBndchgsToPricingprobs(), applyOriginalBranching(), areVarsInSameBlock(), branchExtern(), checkAggregatedLocalBounds(), checkIdenticalBlocks(), combineSolutions(), compareExtremePointsToRelaxSol(), compareOneExtremePoint(), ObjPricerGcg::computeColMastercoefs(), ObjPricerGcg::computeColMastercuts(), countExtremePoints(), createChildNodesRyanfoster(), createGraph(), createPricingVar(), createPricingVariables(), fixVariables(), GCG_DECL_BRANCHACTIVEMASTER(), GCG_DECL_BRANCHPROPMASTER(), GCG_DECL_SORTPTRCOMP(), GCGbranchGenericInitbranch(), GCGcreateInitialMasterVar(), GCGisMasterVarInBlock(), GCGmasterCreateInitialMastervars(), GCGmasterTransOrigSolToMasterVars(), GCGmasterVarIsLinking(), GCGoriginalVarAddBlock(), GCGoriginalVarCreatePricingVar(), GCGprintVar(), GCGtransformMastersolToOrigsol(), GCGtransformOrigvalsToMastervals(), getBestMastervar(), ObjPricerGcg::getStabilizedDualObjectiveValue(), initializeStartsol(), SCIP_DECL_BRANCHEXECLP(), SCIP_DECL_BRANCHEXECPS(), SCIP_DECL_EVENTEXEC(), SCIP_DECL_HEUREXEC(), SCIPreadRef(), searchZeroMastervar(), selectExtremePoints(), selectExtremePointsRandomized(), setOriginalVarBlockNr(), ObjPricerGcg::setPricingObjs(), setPricingObjsOriginal(), setSubproblemObjs(), undoLocalBndchgsToPricingprobs(), and gcg::Stabilization::updateAlpha().

SCIP_Bool GCGvarIsOriginal ( SCIP_VAR *  var)

returns TRUE or FALSE whether variable is a original variable or not

Parameters
varSCIP variable structure

Definition at line 162 of file gcgvar.c.

Referenced by applyGlobalBndchgsToPricedMastervars(), applyLocalBndchgsToCopiedMastervars(), applyLocalBndchgsToPricedMastervars(), applyLocalBndchgsToPricingprobs(), branchExtern(), checkAggregatedLocalBounds(), checkIdentical(), checkIdenticalBlocks(), ObjPricerGcg::computeColMastercoefs(), ObjPricerGcg::computeColMastercuts(), createChildNodesRyanfoster(), createLinkingPricingVars(), fixVariables(), GCG_DECL_BRANCHACTIVEMASTER(), GCGcreateMasterVar(), GCGisLinkingVarInBlock(), GCGlinkingVarGetLinkingConss(), GCGlinkingVarSetLinkingCons(), GCGmasterCreateInitialMastervars(), GCGmasterTransOrigSolToMasterVars(), GCGoriginalVarAddBlock(), GCGoriginalVarAddCoef(), GCGoriginalVarAddMasterVar(), GCGoriginalVarCreatePricingVar(), GCGoriginalVarGetCoefs(), GCGoriginalVarGetMasterconss(), GCGoriginalVarGetMastervals(), GCGoriginalVarGetMastervars(), GCGoriginalVarGetNCoefs(), GCGoriginalVarGetNMastervars(), GCGoriginalVarGetPricingVar(), GCGoriginalVarIsLinking(), GCGoriginalVarIsTransVar(), GCGoriginalVarRemoveMasterVar(), GCGoriginalVarSetNCoefs(), GCGoriginalVarSetPricingVar(), GCGpricingVarAddOrigVar(), GCGprintVar(), GCGtransformOrigvalsToMastervals(), ObjPricerGcg::getStabilizedDualObjectiveValue(), initializeStartsol(), initRelaxator(), saveOriginalVarMastercoeffs(), SCIP_DECL_BRANCHEXECPS(), SCIP_DECL_CONSCHECK(), SCIP_DECL_EVENTEXEC(), SCIP_DECL_HEUREXEC(), SCIP_DECL_SEPAEXECLP(), setOriginalVarBlockNr(), ObjPricerGcg::setPricingObjs(), setPricingObjsOriginal(), undoLocalBndchgsToPricingprobs(), and gcg::Stabilization::updateAlpha().

void GCGvarSetBlock ( SCIP_VAR *  var,
int  block 
)

sets the block of the variable

Parameters
varvariable to set block for
blockblock to set

Definition at line 950 of file gcgvar.c.

Referenced by setOriginalVarBlockNr().