GCG 4.1.1 (dev)

Generic Column Generation

Loading...
Searching...
No Matches
GCG Extended Master Cons Data

Detailed Description

SCIP_RETCODE GCGextendedmasterconsUpdateDualValue (GCG *gcg, GCG_EXTENDEDMASTERCONSDATA *extendedmasterconsdata, SCIP_Real dualvalue)
SCIP_RETCODE GCGpricingmodificationApply (SCIP *pricingscip, GCG_PRICINGMODIFICATION *pricingmodification)
SCIP_RETCODE GCGpricingmodificationUndo (SCIP *pricingscip, GCG_PRICINGMODIFICATION *pricingmodification)
SCIP_RETCODE GCGextendedmasterconsUndoPricingModifications (GCG *gcg, GCG_EXTENDEDMASTERCONSDATA *extendedmasterconsdata)
GCG_EXPORT SCIP_RETCODE GCGpricingmodificationCreate (GCG *gcg, GCG_PRICINGMODIFICATION **pricingmodification, int blocknr, SCIP_VAR *coefvar, SCIP_VAR **additionalvars, int nadditionalvars, SCIP_CONS **additionalconss, int nadditionalconss)
GCG_EXPORT SCIP_RETCODE GCGextendedmasterconsCreateFromCons (GCG *gcg, GCG_EXTENDEDMASTERCONSDATA **extendedmasterconsdata, GCG_EXTENDEDMASTERCONSTYPE type, SCIP_CONS *cons, GCG_PRICINGMODIFICATION **pricingmodifications, int npricingmodifications, GCG_BRANCHCONSDATA *data)
GCG_EXPORT SCIP_RETCODE GCGextendedmasterconsCreateFromRow (GCG *gcg, GCG_EXTENDEDMASTERCONSDATA **extendedmasterconsdata, GCG_EXTENDEDMASTERCONSTYPE type, SCIP_ROW *row, GCG_PRICINGMODIFICATION **pricingmodifications, int npricingmodifications, GCG_MASTERSEPACUT *data)
GCG_EXPORT SCIP_RETCODE GCGextendedmasterconsFree (GCG *gcg, GCG_EXTENDEDMASTERCONSDATA **extendedmasterconsdata)
GCG_EXPORT SCIP_Bool GCGextendedmasterconsIsActive (GCG_EXTENDEDMASTERCONSDATA *extendedmasterconsdata)
GCG_EXPORT SCIP_RETCODE GCGextendedmasterconsAddMasterVar (GCG *gcg, GCG_EXTENDEDMASTERCONSDATA *extendedmasterconsdata, SCIP_VAR *var, SCIP_Real coef)
GCG_EXPORT SCIP_CONS * GCGextendedmasterconsGetCons (GCG_EXTENDEDMASTERCONSDATA *extendedmasterconsdata)
GCG_EXPORT SCIP_ROW * GCGextendedmasterconsGetRow (GCG_EXTENDEDMASTERCONSDATA *extendedmasterconsdata)
GCG_EXPORT SCIP_VAR * GCGpricingmodificationGetCoefVar (GCG_PRICINGMODIFICATION *pricingmodification)
GCG_EXPORT SCIP_VAR ** GCGpricingmodificationGetAdditionalVars (GCG_PRICINGMODIFICATION *pricingmodification)
GCG_EXPORT int GCGpricingmodificationGetNAdditionalVars (GCG_PRICINGMODIFICATION *pricingmodification)
GCG_EXPORT SCIP_CONS ** GCGpricingmodificationGetAdditionalConss (GCG_PRICINGMODIFICATION *pricingmodification)
GCG_EXPORT int GCGpricingmodificationGetNAdditionalConss (GCG_PRICINGMODIFICATION *pricingmodification)
GCG_EXPORT int GCGpricingmodificationGetBlock (GCG_PRICINGMODIFICATION *pricingmodification)
GCG_EXPORT GCG_PRICINGMODIFICATION * GCGextendedmasterconsGetPricingModification (GCG *gcg, GCG_EXTENDEDMASTERCONSDATA *extendedmasterconsdata, int blocknr)
GCG_EXPORT GCG_PRICINGMODIFICATION ** GCGextendedmasterconsGetPricingModifications (GCG_EXTENDEDMASTERCONSDATA *extendedmasterconsdata)
GCG_EXPORT int GCGextendedmasterconsGetNPricingModifications (GCG_EXTENDEDMASTERCONSDATA *extendedmasterconsdata)
GCG_EXPORT SCIP_Bool GCGpricingmodificationIsCoefVar (GCG_PRICINGMODIFICATION *pricingmodification, SCIP_VAR *var)
GCG_EXPORT SCIP_Bool GCGextendedmasterconsIsCoefVar (GCG_EXTENDEDMASTERCONSDATA *extendedmasterconsdata, SCIP_VAR *var)
GCG_EXPORT const char * GCGextendedmasterconsGetName (GCG_EXTENDEDMASTERCONSDATA *extendedmasterconsdata)
GCG_EXPORT SCIP_Real GCGextendedmasterconsGetLhs (GCG *gcg, GCG_EXTENDEDMASTERCONSDATA *extendedmasterconsdata)
GCG_EXPORT SCIP_Real GCGextendedmasterconsGetRhs (GCG *gcg, GCG_EXTENDEDMASTERCONSDATA *extendedmasterconsdata)
GCG_EXPORT SCIP_Real GCGextendedmasterconsGetConstant (GCG *gcg, GCG_EXTENDEDMASTERCONSDATA *extendedmasterconsdata)
GCG_EXPORT int GCGextendedmasterconsGetNNonz (GCG *gcg, GCG_EXTENDEDMASTERCONSDATA *extendedmasterconsdata)
GCG_EXPORT SCIP_COL ** GCGextendedmasterconsGetCols (GCG *gcg, GCG_EXTENDEDMASTERCONSDATA *extendedmasterconsdata)
GCG_EXPORT SCIP_Real * GCGextendedmasterconsGetVals (GCG *gcg, GCG_EXTENDEDMASTERCONSDATA *extendedmasterconsdata)
GCG_EXPORT SCIP_RETCODE GCGextendedmasterconsGetCoeff (GCG *gcg, GCG_EXTENDEDMASTERCONSDATA *extendedmasterconsdata, SCIP_VAR **solvars, SCIP_Real *solvals, int nsolvars, int probnr, GCG_COL *gcgcol, SCIP_Real *coeff)
GCG_EXPORT GCG_EXTENDEDMASTERCONSTYPE GCGextendedmasterconsGetType (GCG_EXTENDEDMASTERCONSDATA *extendedmasterconsdata)

Function Documentation

◆ GCGextendedmasterconsUpdateDualValue()

SCIP_RETCODE GCGextendedmasterconsUpdateDualValue ( GCG * gcg,
GCG_EXTENDEDMASTERCONSDATA * extendedmasterconsdata,
SCIP_Real dualvalue )

update the extended master cons with the new dual value

Parameters
gcgGCG data structure
extendedmasterconsdataextended master cons data
dualvaluedual value

Definition at line 370 of file extendedmasterconsdata.c.

References assert(), GCG_PricingModification::blocknr, GCG_PricingModification::coefvar, GCGextendedmasterconsUpdateDualValue(), GCGgetPricingprob(), GCGvarIsInferredPricing(), i, GCG_ExtendedMasterConsData::npricingmodifications, GCG_ExtendedMasterConsData::pricingmodifications, and SCIP_CALL().

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

◆ GCGpricingmodificationCreate()

GCG_EXPORT SCIP_RETCODE GCGpricingmodificationCreate ( GCG * gcg,
GCG_PRICINGMODIFICATION ** pricingmodification,
int blocknr,
SCIP_VAR * coefvar,
SCIP_VAR ** additionalvars,
int nadditionalvars,
SCIP_CONS ** additionalconss,
int nadditionalconss )

create a pricing modification, taking ownership over additionalvars and additionalcons

Parameters
gcgGCG data structure
pricingmodificationpointer to store the created pricing modification
blocknrblock number of the extended master cons
coefvarvariable in the pricing problem inferred from the extended master cons always has the objective coefficient of the negated dual value of the extended master cons its solution value corresponds to the coefficient of the new mastervariable in the extended master cons
additionalvarsarray of additional variables with no objective coefficient in the pricing programs inferred from the extended master cons
nadditionalvarsnumber of additional variables in the pricing programs
additionalconssarray of additional constraints in the pricing programs inferred from the extended master cons
nadditionalconssnumber of additional constraints in the pricing programs

Definition at line 90 of file extendedmasterconsdata.c.

References assert(), GCGgetMasterprob(), GCGgetNPricingprobs(), GCGinferredPricingVarIsCoefVar(), GCGisMaster(), GCGpricingmodificationCreate(), GCGvarIsInferredPricing(), i, and SCIP_CALL().

Referenced by createBranchingCons(), createMastercutData(), and GCGpricingmodificationCreate().

◆ GCGpricingmodificationApply()

SCIP_RETCODE GCGpricingmodificationApply ( SCIP * pricingscip,
GCG_PRICINGMODIFICATION * pricingmodification )

◆ GCGpricingmodificationUndo()

◆ GCGextendedmasterconsUndoPricingModifications()

SCIP_RETCODE GCGextendedmasterconsUndoPricingModifications ( GCG * gcg,
GCG_EXTENDEDMASTERCONSDATA * extendedmasterconsdata )

◆ GCGextendedmasterconsCreateFromCons()

GCG_EXPORT SCIP_RETCODE GCGextendedmasterconsCreateFromCons ( GCG * gcg,
GCG_EXTENDEDMASTERCONSDATA ** extendedmasterconsdata,
GCG_EXTENDEDMASTERCONSTYPE type,
SCIP_CONS * cons,
GCG_PRICINGMODIFICATION ** pricingmodifications,
int npricingmodifications,
GCG_BRANCHCONSDATA * data )

create an extended master cons, taking ownership over pricingmodifications

Parameters
gcgGCG data structure
extendedmasterconsdatapointer to store the extended master cons data
typetype of the extended master cons
consconstraint in the master problem that represents the extended master cons
pricingmodificationspricing modifications for the extended master cons
npricingmodificationsnumber of pricing modifications for the extended master cons
databranchconsdata that belongs to the cons

Definition at line 144 of file extendedmasterconsdata.c.

References assert(), GCG_PricingModification::blocknr, SCIP_VarData::data, GCGextendedmasterconsCreateFromCons(), GCGgetMasterprob(), GCGgetNPricingprobs(), GCGisMaster(), GCGisPricingprobRelevant(), i, j, GCG_PricingModification::nadditionalvars, SCIP_CALL(), and SCIPfreeBufferArray().

Referenced by GCGbranchCreateExtendedmastercons(), and GCGextendedmasterconsCreateFromCons().

◆ GCGextendedmasterconsCreateFromRow()

GCG_EXPORT SCIP_RETCODE GCGextendedmasterconsCreateFromRow ( GCG * gcg,
GCG_EXTENDEDMASTERCONSDATA ** extendedmasterconsdata,
GCG_EXTENDEDMASTERCONSTYPE type,
SCIP_ROW * row,
GCG_PRICINGMODIFICATION ** pricingmodifications,
int npricingmodifications,
GCG_MASTERSEPACUT * data )

create an extended master cons, taking ownership over pricingmodifications

Parameters
gcgGCG data structure
extendedmasterconsdatapointer to store the extended master cons data
typetype of the extended master cons
rowrow in the master problem that represents the extended master cons cut
pricingmodificationspricing modifications for the extended master cons
npricingmodificationsnumber of pricing modifications for the extended master cons
datamastersepacut that corresponds to the row

Definition at line 209 of file extendedmasterconsdata.c.

References assert(), GCG_PricingModification::blocknr, SCIP_VarData::data, GCGextendedmasterconsCreateFromRow(), GCGgetMasterprob(), GCGgetNPricingprobs(), GCGisMaster(), GCGisPricingprobRelevant(), i, j, GCG_PricingModification::nadditionalvars, SCIP_CALL(), and SCIPfreeBufferArray().

Referenced by GCGextendedmasterconsCreateForSepamastercut(), and GCGextendedmasterconsCreateFromRow().

◆ GCGextendedmasterconsFree()

GCG_EXPORT SCIP_RETCODE GCGextendedmasterconsFree ( GCG * gcg,
GCG_EXTENDEDMASTERCONSDATA ** extendedmasterconsdata )

free an extended master cons

Parameters
gcgGCG data structure
extendedmasterconsdatapointer to the extended master cons data

Definition at line 274 of file extendedmasterconsdata.c.

References assert(), GCG_EXTENDEDMASTERCONSTYPE_BRANCH_CONS, GCG_EXTENDEDMASTERCONSTYPE_SEPA_ROW, GCGextendedmasterconsFree(), GCGgetMasterprob(), GCGisMaster(), GCGpricingmodificationFree(), i, and SCIP_CALL().

Referenced by GCGbranchFreeExtendedmasterconsBranchData(), GCGextendedmasterconsFree(), and GCGreleaseMastersepacut().

◆ GCGextendedmasterconsIsActive()

◆ GCGextendedmasterconsAddMasterVar()

GCG_EXPORT SCIP_RETCODE GCGextendedmasterconsAddMasterVar ( GCG * gcg,
GCG_EXTENDEDMASTERCONSDATA * extendedmasterconsdata,
SCIP_VAR * var,
SCIP_Real coef )

add a new variable along with its coefficient to the extended master cons

Parameters
gcgGCG data structure
extendedmasterconsdataextended master cons data
varvariable to add
coefcoefficient of the variable

Definition at line 338 of file extendedmasterconsdata.c.

References assert(), GCG_ExtendedMasterCons::cons, GCG_ExtendedMasterConsData::cons, GCG_EXTENDEDMASTERCONSTYPE_BRANCH_CONS, GCG_EXTENDEDMASTERCONSTYPE_SEPA_ROW, GCGextendedmasterconsAddMasterVar(), GCGgetMasterprob(), GCGisMaster(), GCG_ExtendedMasterCons::row, SCIP_CALL(), GCG_ExtendedMasterConsData::type, and var.

Referenced by addVarToMasterbranch(), and GCGextendedmasterconsAddMasterVar().

◆ GCGextendedmasterconsGetCons()

◆ GCGextendedmasterconsGetRow()

◆ GCGpricingmodificationGetCoefVar()

GCG_EXPORT SCIP_VAR * GCGpricingmodificationGetCoefVar ( GCG_PRICINGMODIFICATION * pricingmodification)

get the variable that determines the coefficient of a column in the extended master cons

Parameters
pricingmodificationpricing modification

Definition at line 425 of file extendedmasterconsdata.c.

References assert(), GCG_PricingModification::coefvar, and GCGpricingmodificationGetCoefVar().

Referenced by GCGcolUpdateActiveMastersepacuts(), GCGcreateGcgCol(), and GCGpricingmodificationGetCoefVar().

◆ GCGpricingmodificationGetAdditionalVars()

GCG_EXPORT SCIP_VAR ** GCGpricingmodificationGetAdditionalVars ( GCG_PRICINGMODIFICATION * pricingmodification)

get the additional variables that are inferred by the extended master cons

Parameters
pricingmodificationpricing modification

Definition at line 437 of file extendedmasterconsdata.c.

References GCG_PricingModification::additionalvars, assert(), and GCGpricingmodificationGetAdditionalVars().

Referenced by GCGpricingmodificationGetAdditionalVars().

◆ GCGpricingmodificationGetNAdditionalVars()

GCG_EXPORT int GCGpricingmodificationGetNAdditionalVars ( GCG_PRICINGMODIFICATION * pricingmodification)

get the number of additional variables that are inferred by the extended master cons

Parameters
pricingmodificationpricing modification

Definition at line 449 of file extendedmasterconsdata.c.

References assert(), GCGpricingmodificationGetNAdditionalVars(), and GCG_PricingModification::nadditionalvars.

Referenced by GCGpricingmodificationGetNAdditionalVars().

◆ GCGpricingmodificationGetAdditionalConss()

GCG_EXPORT SCIP_CONS ** GCGpricingmodificationGetAdditionalConss ( GCG_PRICINGMODIFICATION * pricingmodification)

get the additional constraints that are inferred by the extended master cons

Parameters
pricingmodificationpricing modification

Definition at line 461 of file extendedmasterconsdata.c.

References GCG_PricingModification::additionalconss, assert(), and GCGpricingmodificationGetAdditionalConss().

Referenced by GCGchvatalGomoryCutGetVariableCoefficient(), and GCGpricingmodificationGetAdditionalConss().

◆ GCGpricingmodificationGetNAdditionalConss()

GCG_EXPORT int GCGpricingmodificationGetNAdditionalConss ( GCG_PRICINGMODIFICATION * pricingmodification)

get the number of additional constraints that are inferred by the extended master cons

Parameters
pricingmodificationpricing modification

Definition at line 473 of file extendedmasterconsdata.c.

References assert(), GCGpricingmodificationGetNAdditionalConss(), and GCG_PricingModification::nadditionalconss.

Referenced by GCGpricingmodificationGetNAdditionalConss().

◆ GCGpricingmodificationGetBlock()

GCG_EXPORT int GCGpricingmodificationGetBlock ( GCG_PRICINGMODIFICATION * pricingmodification)

get the number of the block the modification belongs to

Parameters
pricingmodificationpricing modification

Definition at line 485 of file extendedmasterconsdata.c.

References assert(), GCG_PricingModification::blocknr, and GCGpricingmodificationGetBlock().

Referenced by GCGpricingmodificationGetBlock().

◆ GCGextendedmasterconsGetPricingModification()

GCG_EXPORT GCG_PRICINGMODIFICATION * GCGextendedmasterconsGetPricingModification ( GCG * gcg,
GCG_EXTENDEDMASTERCONSDATA * extendedmasterconsdata,
int blocknr )

◆ GCGextendedmasterconsGetPricingModifications()

GCG_EXPORT GCG_PRICINGMODIFICATION ** GCGextendedmasterconsGetPricingModifications ( GCG_EXTENDEDMASTERCONSDATA * extendedmasterconsdata)

get the pricing modifications for the extended master cons

Parameters
extendedmasterconsdataextended master cons data

Definition at line 519 of file extendedmasterconsdata.c.

References assert(), GCGextendedmasterconsGetPricingModifications(), and GCG_ExtendedMasterConsData::pricingmodifications.

Referenced by GCGextendedmasterconsGetPricingModifications().

◆ GCGextendedmasterconsGetNPricingModifications()

GCG_EXPORT int GCGextendedmasterconsGetNPricingModifications ( GCG_EXTENDEDMASTERCONSDATA * extendedmasterconsdata)

get the number of pricing modifications for the extended master cons

Parameters
extendedmasterconsdataextended master cons data

Definition at line 531 of file extendedmasterconsdata.c.

References assert(), GCGextendedmasterconsGetNPricingModifications(), and GCG_ExtendedMasterConsData::npricingmodifications.

Referenced by GCGextendedmasterconsGetNPricingModifications().

◆ GCGpricingmodificationIsCoefVar()

GCG_EXPORT SCIP_Bool GCGpricingmodificationIsCoefVar ( GCG_PRICINGMODIFICATION * pricingmodification,
SCIP_VAR * var )

check whether a given variable is a coefficient variable of a given pricing modification

Parameters
pricingmodificationpricing modification
varvariable to check

Definition at line 631 of file extendedmasterconsdata.c.

References assert(), GCG_PricingModification::coefvar, GCGpricingmodificationIsCoefVar(), and var.

Referenced by GCGextendedmasterconsIsCoefVar(), and GCGpricingmodificationIsCoefVar().

◆ GCGextendedmasterconsIsCoefVar()

GCG_EXPORT SCIP_Bool GCGextendedmasterconsIsCoefVar ( GCG_EXTENDEDMASTERCONSDATA * extendedmasterconsdata,
SCIP_VAR * var )

check whether a given variable is a coefficient variable of a given extended master cons

Parameters
extendedmasterconsdataextended master cons data
varvariable to check

Definition at line 642 of file extendedmasterconsdata.c.

References assert(), GCGextendedmasterconsIsCoefVar(), GCGpricingmodificationIsCoefVar(), i, GCG_ExtendedMasterConsData::npricingmodifications, GCG_ExtendedMasterConsData::pricingmodifications, and var.

Referenced by GCGextendedmasterconsIsCoefVar().

◆ GCGextendedmasterconsGetName()

◆ GCGextendedmasterconsGetLhs()

◆ GCGextendedmasterconsGetRhs()

◆ GCGextendedmasterconsGetConstant()

GCG_EXPORT SCIP_Real GCGextendedmasterconsGetConstant ( GCG * gcg,
GCG_EXTENDEDMASTERCONSDATA * extendedmasterconsdata )

get the constant of the extended master cons (always returns 0 if extended master cons is a constraint, returns constant of row otherwise)

Parameters
gcgGCG data structure
extendedmasterconsdataextended master cons data

Definition at line 729 of file extendedmasterconsdata.c.

References assert(), GCG_ExtendedMasterConsData::cons, GCG_EXTENDEDMASTERCONSTYPE_BRANCH_CONS, GCG_EXTENDEDMASTERCONSTYPE_SEPA_ROW, GCGextendedmasterconsGetConstant(), GCG_ExtendedMasterCons::row, and GCG_ExtendedMasterConsData::type.

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

◆ GCGextendedmasterconsGetNNonz()

GCG_EXPORT int GCGextendedmasterconsGetNNonz ( GCG * gcg,
GCG_EXTENDEDMASTERCONSDATA * extendedmasterconsdata )

get number of nonzero entries in the extended master cons

Parameters
gcgGCG data structure
extendedmasterconsdataextended master cons data

Definition at line 750 of file extendedmasterconsdata.c.

References assert(), GCG_ExtendedMasterCons::cons, GCG_ExtendedMasterConsData::cons, GCG_EXTENDEDMASTERCONSTYPE_BRANCH_CONS, GCG_EXTENDEDMASTERCONSTYPE_SEPA_ROW, GCGextendedmasterconsGetNNonz(), GCGgetMasterprob(), GCG_ExtendedMasterCons::row, and GCG_ExtendedMasterConsData::type.

Referenced by GCGextendedmasterconsGetNNonz().

◆ GCGextendedmasterconsGetCols()

GCG_EXPORT SCIP_COL ** GCGextendedmasterconsGetCols ( GCG * gcg,
GCG_EXTENDEDMASTERCONSDATA * extendedmasterconsdata )

◆ GCGextendedmasterconsGetVals()

GCG_EXPORT SCIP_Real * GCGextendedmasterconsGetVals ( GCG * gcg,
GCG_EXTENDEDMASTERCONSDATA * extendedmasterconsdata )

◆ GCGextendedmasterconsGetCoeff()

GCG_EXPORT SCIP_RETCODE GCGextendedmasterconsGetCoeff ( GCG * gcg,
GCG_EXTENDEDMASTERCONSDATA * extendedmasterconsdata,
SCIP_VAR ** solvars,
SCIP_Real * solvals,
int nsolvars,
int probnr,
GCG_COL * gcgcol,
SCIP_Real * coeff )

calculate the coefficient of a column solution in the extended master cons

Parameters
gcgGCG data structure
extendedmasterconsdataextended master cons data
solvarsarray of column solution variables
solvalsarray of column solution values
nsolvarsnumber of column solution variables and values
probnrthe pricing problem that the column belongs to
gcgcolgcg column if available (or NULL)
coeffpointer to store the coefficient

Definition at line 819 of file extendedmasterconsdata.c.

References assert(), GCG_EXTENDEDMASTERCONSTYPE_BRANCH_CONS, GCG_EXTENDEDMASTERCONSTYPE_SEPA_ROW, GCGbranchGetExtendedmasterconsCoeff(), GCGextendedmasterconsGetCoeff(), GCGmastersepacutGetExtendedmasterconsCoeff(), SCIP_CALL(), and GCG_ExtendedMasterConsData::type.

Referenced by GCGextendedmasterconsGetCoeff().

◆ GCGextendedmasterconsGetType()