Detailed Description
Definition at line 55 of file objpricer_gcg.h.
#include <objpricer_gcg.h>
Public Member Functions | |
ObjPricerGcg (SCIP *scip, SCIP *origscip, const char *name, const char *desc, int priority, unsigned int delay, SCIP_PRICERDATA *pricerdata) | |
virtual | ~ObjPricerGcg () |
virtual | SCIP_DECL_PRICERFREE (scip_free) |
virtual | SCIP_DECL_PRICERINIT (scip_init) |
virtual | SCIP_DECL_PRICEREXIT (scip_exit) |
virtual | SCIP_DECL_PRICERINITSOL (scip_initsol) |
virtual | SCIP_DECL_PRICEREXITSOL (scip_exitsol) |
virtual | SCIP_DECL_PRICERREDCOST (scip_redcost) |
virtual | SCIP_DECL_PRICERFARKAS (scip_farkas) |
SCIP_PRICERDATA * | getPricerdata () |
SCIP_Real | getConvconsDualsol (PricingType *pricetype, int probnr) |
SCIP_RETCODE | setPricingObjs (PricingType *pricetype, SCIP_Bool stabilize) |
void | updateRedcostColumnPool (PricingType *pricetype) |
SCIP_RETCODE | priceColumnPoolOld (PricingType *pricetype, int *pnfoundvars) |
SCIP_RETCODE | priceNewVariables (PricingType *pricetype, SCIP_RESULT *result, double *lowerbound) |
SCIP_RETCODE | createNewMasterVar (SCIP *scip, PricingType *pricetype, SCIP_SOL *sol, SCIP_VAR **solvars, double *solvals, int nsolvars, unsigned int solisray, int prob, unsigned int force, unsigned int *added, SCIP_VAR **addedvar) |
SCIP_RETCODE | createNewMasterVarFromGcgCol (SCIP *scip, PricingType *pricetype, GCG_COL *gcgcol, SCIP_Bool force, SCIP_Bool *added, SCIP_VAR **addedvar, SCIP_Real score) |
SCIP_RETCODE | computeDualDiff (SCIP_Real **dualvals1, SCIP_Real *dualconv1, SCIP_Real **dualvals2, SCIP_Real *dualconv2, SCIP_Real *dualdiff) |
SCIP_RETCODE | pricingLoop (PricingType *pricetype, SCIP_RESULT *result, int *nfoundvars, SCIP_Real *lowerbound, SCIP_Bool *bestredcostvalid) |
const FarkasPricing * | getFarkasPricing () const |
FarkasPricing * | getFarkasPricingNonConst () |
const ReducedCostPricing * | getReducedCostPricing () const |
ReducedCostPricing * | getReducedCostPricingNonConst () |
SCIP * | getOrigprob () |
int | getMaxColsRound () const |
int | getMaxColsProb () const |
SCIP_RETCODE | addArtificialVars () |
SCIP_RETCODE | addTrivialsols () |
SCIP_RETCODE | createPricingTypes () |
SCIP_RETCODE | createPricingcontroller () |
void | createStabilization () |
SCIP_RETCODE | createColpool () |
SCIP_RETCODE | createPricestore () |
void | updateRedcosts (PricingType *pricetype, GCG_COL **cols, int ncols, int *nimpcols) |
SCIP_RETCODE | addColToPricestore (GCG_COL *col) |
void | getBestCols (GCG_COL **pricingprobcols) |
SCIP_Real | getDualconvsum (GCG_COL **bestcols) |
SCIP_RETCODE | getStabilizedDualObjectiveValue (PricingType *pricetype, SCIP_Real *stabdualval, SCIP_Bool stabilize) |
SCIP_Real | computeRedCostGcgCol (PricingType *pricetype, GCG_Col *gcgcol, SCIP_Real *objvalptr) const |
SCIP_RETCODE | computeColMastercoefs (GCG_COL *gcgcol) |
SCIP_RETCODE | computeColMastercuts (GCG_COL *gcgcol) |
Data Fields | |
SCIP * | origprob |
SCIP_PRICERDATA * | pricerdata |
GCG_COLPOOL * | colpool |
GCG_PRICESTORE * | pricestore |
Static Public Attributes | |
static int | threads |
Constructor & Destructor Documentation
◆ ObjPricerGcg()
ObjPricerGcg::ObjPricerGcg | ( | SCIP * | scip, |
SCIP * | origscip, | ||
const char * | name, | ||
const char * | desc, | ||
int | priority, | ||
unsigned int | delay, | ||
SCIP_PRICERDATA * | pricerdata | ||
) |
default constructor
- Parameters
-
scip SCIP data structure origscip SCIP data structure of original problem name name of variable pricer desc description of variable pricer priority priority of the variable pricer delay should the pricer be delayed until no other pricers or already existing pricerdata pricerdata data structure
Definition at line 3399 of file pricer_gcg.cpp.
References origprob, and pricerdata.
◆ ~ObjPricerGcg()
|
inlinevirtual |
destructor
Definition at line 77 of file objpricer_gcg.h.
Member Function Documentation
◆ SCIP_DECL_PRICERFREE()
|
virtual |
destructor of variable pricer to free user data (called when SCIP is exiting)
◆ SCIP_DECL_PRICERINIT()
|
virtual |
initialization method of variable pricer (called after problem was transformed)
◆ SCIP_DECL_PRICEREXIT()
|
virtual |
deinitialization method of variable pricer (called before transformed problem is freed)
◆ SCIP_DECL_PRICERINITSOL()
|
virtual |
solving process initialization method of variable pricer (called when branch and bound process is about to begin)
◆ SCIP_DECL_PRICEREXITSOL()
|
virtual |
solving process deinitialization method of variable pricer (called before branch and bound process data is freed)
◆ SCIP_DECL_PRICERREDCOST()
|
virtual |
reduced cost pricing method of variable pricer for feasible LPs
◆ SCIP_DECL_PRICERFARKAS()
|
virtual |
farkas pricing method of variable pricer for infeasible LPs
◆ getPricerdata()
|
inline |
Definition at line 94 of file objpricer_gcg.h.
References pricerdata.
Referenced by GCGmasterAddMasterconsToHashmap(), GCGmasterGetDegeneracy(), GCGmasterGetNPricedvars(), GCGmasterGetPricedvars(), GCGmasterGetPricingSimplexIters(), GCGmasterIsBestsolValid(), GCGmasterIsCurrentSolValid(), GCGmasterIsSolValid(), GCGmasterPrintSimplexIters(), GCGmasterTransOrigSolToMasterVars(), GCGpricerExistRays(), GCGpricerGetNPointsProb(), GCGpricerGetNRaysProb(), GCGpricerGetNSolvers(), GCGpricerGetSolvers(), GCGpricerIncludeSolver(), GCGpricerPrintListOfSolvers(), GCGpricerPrintPricingStatistics(), GCGpricerPrintStatistics(), and SCIP_DECL_EVENTEXEC().
◆ getConvconsDualsol()
SCIP_Real ObjPricerGcg::getConvconsDualsol | ( | PricingType * | pricetype, |
int | probnr | ||
) |
for a pricing problem, get the dual solution value or Farkas value of the convexity constraint
- Parameters
-
pricetype Farkas or Reduced cost pricing probnr index of corresponding pricing problem
Definition at line 690 of file pricer_gcg.cpp.
References PricingType::consGetDual(), GCGgetConvCons(), and GCGisPricingprobRelevant().
◆ setPricingObjs()
SCIP_RETCODE ObjPricerGcg::setPricingObjs | ( | PricingType * | pricetype, |
SCIP_Bool | stabilize | ||
) |
computes the pricing problem objectives
computes the pricing problem objectives
- Parameters
-
pricetype Farkas or Reduced cost pricing stabilize do we use stabilization ?
Definition at line 704 of file pricer_gcg.cpp.
References PricingType::consGetDual(), GCGconsGetNVars(), GCGconsGetVals(), GCGconsGetVars(), GCGgetConvCons(), GCGgetMasterConss(), GCGgetNMasterConss(), GCGgetNVarLinkingconss(), GCGgetOrigMasterConss(), GCGgetVarLinkingconss(), GCGgetVarLinkingconssBlock(), GCGisPricingprobRelevant(), GCGlinkingVarGetPricingVars(), GCGmasterVarGetOrigvars(), GCGoriginalVarGetPricingVar(), GCGoriginalVarIsLinking(), GCGpricingVarGetOrigvars(), GCGsepaGetMastercuts(), GCGsepaGetNCuts(), GCGsepaGetOrigcuts(), GCGvarGetBlock(), GCGvarIsOriginal(), GCGvarIsPricing(), PricingType::rowGetDual(), and PricingType::varGetObj().
Referenced by GCGsetPricingObjs().
◆ updateRedcostColumnPool()
void ObjPricerGcg::updateRedcostColumnPool | ( | PricingType * | pricetype | ) |
update reduced cost of columns in column pool
- Parameters
-
pricetype type of pricing: reduced cost or Farkas
◆ priceColumnPoolOld()
SCIP_RETCODE ObjPricerGcg::priceColumnPoolOld | ( | PricingType * | pricetype, |
int * | pnfoundvars | ||
) |
method to price new columns from Column Pool
- Parameters
-
pricetype type of pricing: reduced cost or Farkas pnfoundvars pointer to store number of priced variables
◆ priceNewVariables()
SCIP_RETCODE ObjPricerGcg::priceNewVariables | ( | PricingType * | pricetype, |
SCIP_RESULT * | result, | ||
double * | lowerbound | ||
) |
performs the pricing routine, gets the type of pricing that should be done: farkas or redcost pricing
- Parameters
-
pricetype type of the pricing result result pointer lowerbound lower bound of pricingproblems
Definition at line 3293 of file pricer_gcg.cpp.
References GCG_PRICETYPE_FARKAS, GCG_PRICETYPE_REDCOST, GCGisRootNode(), GCGpricerPrintInfo, GCGsolverUpdate(), PricingType::getCalls(), PricingType::getType(), and PricingType::incCalls().
◆ createNewMasterVar()
SCIP_RETCODE ObjPricerGcg::createNewMasterVar | ( | SCIP * | scip, |
PricingType * | pricetype, | ||
SCIP_SOL * | sol, | ||
SCIP_VAR ** | solvars, | ||
double * | solvals, | ||
int | nsolvars, | ||
unsigned int | solisray, | ||
int | prob, | ||
unsigned int | force, | ||
unsigned int * | added, | ||
SCIP_VAR ** | addedvar | ||
) |
creates a new master variable corresponding to the given solution and problem
- Parameters
-
scip SCIP data structure pricetype type of the pricing sol solution to compute reduced cost for solvars array of variables with non-zero value in the solution of the pricing problem solvals array of values in the solution of the pricing problem for variables in array solvars nsolvars number of variables in array solvars solisray is the solution a ray? prob number of the pricing problem the solution belongs to force should the given variable be added also if it has non-negative reduced cost? added pointer to store whether the variable was successfully added addedvar pointer to store the created variable
Definition at line 2051 of file pricer_gcg.cpp.
References GCG_PRICETYPE_REDCOST, GCGcreateMasterVar(), GCGgetConvCons(), GCGoriginalVarIsLinking(), GCGpricingVarGetOrigvars(), GCGsetRootRedcostCall(), GCGupdateVarStatistics(), GCGvarIsPricing(), and PricingType::getType().
Referenced by GCGmasterTransOrigSolToMasterVars().
◆ createNewMasterVarFromGcgCol()
SCIP_RETCODE ObjPricerGcg::createNewMasterVarFromGcgCol | ( | SCIP * | scip, |
PricingType * | pricetype, | ||
GCG_COL * | gcgcol, | ||
SCIP_Bool | force, | ||
SCIP_Bool * | added, | ||
SCIP_VAR ** | addedvar, | ||
SCIP_Real | score | ||
) |
creates a new master variable corresponding to the given gcg column
- Parameters
-
scip SCIP data structure pricetype type of pricing gcgcol GCG column data structure force should the given variable be added also if it has non-negative reduced cost? added pointer to store whether the variable was successfully added addedvar pointer to store the created variable score score of column (or -1.0 if not specified)
Definition at line 2205 of file pricer_gcg.cpp.
References GCG_PRICETYPE_REDCOST, GCGcolGetNVars(), GCGcolGetProbNr(), GCGcolGetRedcost(), GCGcolGetVals(), GCGcolGetVars(), GCGcolIsRay(), GCGcreateMasterVar(), GCGgetConvCons(), GCGmasterGetOrigprob(), GCGoriginalVarIsLinking(), GCGpricingVarGetOrigvars(), GCGsetRootRedcostCall(), GCGupdateVarStatistics(), GCGvarIsPricing(), and PricingType::getType().
Referenced by GCGcreateNewMasterVarFromGcgCol().
◆ computeDualDiff()
SCIP_RETCODE ObjPricerGcg::computeDualDiff | ( | SCIP_Real ** | dualvals1, |
SCIP_Real * | dualconv1, | ||
SCIP_Real ** | dualvals2, | ||
SCIP_Real * | dualconv2, | ||
SCIP_Real * | dualdiff | ||
) |
- Parameters
-
dualvals1 array of dual values for each pricing problem dualconv1 array of dual solutions for the convexity constraints dualvals2 array of dual values for each pricing problem dualconv2 array of dual solutions for the convexity constraints dualdiff pointer to store difference of duals solutions
Definition at line 2641 of file pricer_gcg.cpp.
Referenced by GCGpricerPrintStatistics().
◆ pricingLoop()
SCIP_RETCODE ObjPricerGcg::pricingLoop | ( | PricingType * | pricetype, |
SCIP_RESULT * | result, | ||
int * | pnfoundvars, | ||
SCIP_Real * | lowerbound, | ||
SCIP_Bool * | bestredcostvalid | ||
) |
the pricing loop: solve the pricing problems
- Parameters
-
pricetype type of pricing result result pointer pnfoundvars pointer to store number of found variables lowerbound pointer to store lowerbound obtained due to lagrange bound bestredcostvalid pointer to store if bestredcost are valid (pp solvedoptimal)
Definition at line 2675 of file pricer_gcg.cpp.
References GCG_PRICETYPE_REDCOST, GCG_PRICINGSTATUS_NOTAPPLICABLE, GCG_PRICINGSTATUS_UNKNOWN, GCGcolpoolPrice(), GCGcolpoolUpdateNode(), GCGcolpoolUpdateRedcost(), GCGconsMasterbranchGetActiveCons(), GCGconsMasterbranchGetBranchrule(), GCGgetNRelPricingprobs(), GCGisBranchruleGeneric(), GCGisPricingprobRelevant(), GCGmasterGetOrigprob(), GCGpricestoreApplyCols(), GCGpricestoreGetNCols(), GCGpricestoreGetNEfficaciousCols(), GCGpricingjobGetPricingprob(), GCGpricingjobGetSolver(), GCGpricingjobIsHeuristic(), GCGpricingprobGetNImpCols(), GCGpricingprobGetProbnr(), GCGsepaBasisAddPricingCut(), GCGsolverGetName(), GCGsolverUpdate(), PricingType::getClockTime(), PricingType::getType(), and SCIPsepaBasisAddPPObjConss().
◆ getFarkasPricing()
|
inline |
Definition at line 172 of file objpricer_gcg.h.
Referenced by GCGpricerPrintStatistics().
◆ getFarkasPricingNonConst()
|
inline |
Definition at line 177 of file objpricer_gcg.h.
Referenced by GCGcomputeRedCostGcgCol(), and GCGcreateNewMasterVarFromGcgCol().
◆ getReducedCostPricing()
|
inline |
Definition at line 182 of file objpricer_gcg.h.
Referenced by GCGpricerPrintStatistics().
◆ getReducedCostPricingNonConst()
|
inline |
Definition at line 187 of file objpricer_gcg.h.
Referenced by GCGcomputeRedCostGcgCol(), GCGcreateNewMasterVarFromGcgCol(), and GCGsetPricingObjs().
◆ getOrigprob()
|
inline |
Definition at line 192 of file objpricer_gcg.h.
References origprob.
Referenced by GCGmasterGetOrigprob(), and GCGmasterPrintSimplexIters().
◆ getMaxColsRound()
int ObjPricerGcg::getMaxColsRound | ( | ) | const |
get the number of columns to be added to the master LP in the current pricing round
Definition at line 367 of file pricer_gcg.cpp.
Referenced by GCGpricerGetMaxColsRound().
◆ getMaxColsProb()
int ObjPricerGcg::getMaxColsProb | ( | ) | const |
get the number of columns per pricing problem to be added to the master LP in the current pricing round
Definition at line 375 of file pricer_gcg.cpp.
Referenced by GCGpricerGetMaxColsProb().
◆ addArtificialVars()
SCIP_RETCODE ObjPricerGcg::addArtificialVars | ( | ) |
add artificial vars
Definition at line 3877 of file pricer_gcg.cpp.
References GCGconsGetLhs(), GCGconsGetRhs(), GCGcreateArtificialVar(), GCGgetConvCons(), GCGgetMasterConss(), GCGgetNMasterConss(), GCGgetNPricingprobs(), GCGisPricingprobRelevant(), origprob, and pricerdata.
◆ addTrivialsols()
SCIP_RETCODE ObjPricerGcg::addTrivialsols | ( | ) |
add trivial sols
◆ createPricingTypes()
SCIP_RETCODE ObjPricerGcg::createPricingTypes | ( | ) |
create the pointers for the pricing types
Definition at line 4052 of file pricer_gcg.cpp.
References ReducedCostPricing::addParameters(), and FarkasPricing::addParameters().
Referenced by SCIPincludePricerGcg().
◆ createPricingcontroller()
SCIP_RETCODE ObjPricerGcg::createPricingcontroller | ( | ) |
create the pricing controller
Definition at line 4066 of file pricer_gcg.cpp.
References gcg::Pricingcontroller::addParameters().
Referenced by SCIPincludePricerGcg().
◆ createStabilization()
void ObjPricerGcg::createStabilization | ( | ) |
create the pointers for the stabilization
Definition at line 4075 of file pricer_gcg.cpp.
References GCGgetNPricingprobs(), GCGgetNRelPricingprobs(), origprob, and pricerdata.
◆ createColpool()
SCIP_RETCODE ObjPricerGcg::createColpool | ( | ) |
create the pointers for the colpool
Definition at line 4086 of file pricer_gcg.cpp.
References colpool, GCGcolpoolCreate(), and pricerdata.
◆ createPricestore()
SCIP_RETCODE ObjPricerGcg::createPricestore | ( | ) |
create the pointers for the pricestore
Definition at line 4097 of file pricer_gcg.cpp.
References GCGpricestoreCreate(), pricerdata, and pricestore.
◆ updateRedcosts()
void ObjPricerGcg::updateRedcosts | ( | PricingType * | pricetype, |
GCG_COL ** | cols, | ||
int | ncols, | ||
int * | nimpcols | ||
) |
for given columns, (re-)compute and update their reduced costs
- Parameters
-
pricetype type of pricing cols columns to compute reduced costs for ncols number of columns nimpcols pointer to store number of improving columns
◆ addColToPricestore()
SCIP_RETCODE ObjPricerGcg::addColToPricestore | ( | GCG_COL * | col | ) |
add a new column to the pricing storage
- Parameters
-
col priced col
Definition at line 1647 of file pricer_gcg.cpp.
References GCGcolUpdateRedcost(), and GCGpricestoreAddCol().
Referenced by GCGpricerAddCol().
◆ getBestCols()
void ObjPricerGcg::getBestCols | ( | GCG_COL ** | pricingprobcols | ) |
for each pricing problem, get the best found column from the pricing storage
- Parameters
-
pricingprobcols array to be filled with best column per pricing problem
Definition at line 1671 of file pricer_gcg.cpp.
References GCGcolGetProbNr(), GCGcolGetRedcost(), GCGpricestoreGetCols(), and GCGpricestoreGetNCols().
◆ getDualconvsum()
SCIP_Real ObjPricerGcg::getDualconvsum | ( | GCG_COL ** | bestcols | ) |
get the sum over the dual values of convexity constraints
- Parameters
-
bestcols best columns found per pricing problem
Definition at line 1699 of file pricer_gcg.cpp.
References GCGcolIsRay(), GCGgetConvCons(), GCGgetNIdenticalBlocks(), and GCGisPricingprobRelevant().
◆ getStabilizedDualObjectiveValue()
SCIP_RETCODE ObjPricerGcg::getStabilizedDualObjectiveValue | ( | PricingType * | pricetype, |
SCIP_Real * | stabdualval, | ||
SCIP_Bool | stabilize | ||
) |
- Parameters
-
pricetype type of pricing stabdualval pointer to store stabilized dual objective value stabilize stabilize?
Definition at line 1717 of file pricer_gcg.cpp.
References PricingType::consGetDual(), GCGconsGetLhs(), GCGconsGetNVars(), GCGconsGetRhs(), GCGconsGetVals(), GCGconsGetVars(), GCGgetMasterConss(), GCGgetNLinkingvars(), GCGgetNMasterConss(), GCGgetNTransvars(), GCGgetNVarLinkingconss(), GCGgetOrigMasterConss(), GCGgetVarLinkingconss(), GCGgetVarLinkingconssBlock(), GCGlinkingVarGetPricingVars(), GCGmasterVarGetOrigvars(), GCGoriginalVarGetMastervars(), GCGoriginalVarGetNMastervars(), GCGoriginalVarIsLinking(), GCGoriginalVarIsTransVar(), GCGsepaGetMastercuts(), GCGsepaGetNCuts(), GCGsepaGetOrigcuts(), GCGvarGetBlock(), GCGvarIsOriginal(), GCGvarIsPricing(), and PricingType::rowGetDual().
◆ computeRedCostGcgCol()
SCIP_Real ObjPricerGcg::computeRedCostGcgCol | ( | PricingType * | pricetype, |
GCG_Col * | gcgcol, | ||
SCIP_Real * | objvalptr | ||
) | const |
- Parameters
-
pricetype type of pricing gcgcol gcg column to compute reduced cost for objvalptr pointer to store the computed objective value
Definition at line 1566 of file pricer_gcg.cpp.
References GCGcolGetNVars(), GCGcolGetProbNr(), GCGcolGetVals(), GCGcolGetVars(), GCGcolIsRay(), GCGcolUpdateRedcost(), and GCGpricingprobGetGenericBranchData().
Referenced by GCGcomputeRedCostGcgCol().
◆ computeColMastercoefs()
SCIP_RETCODE ObjPricerGcg::computeColMastercoefs | ( | GCG_COL * | gcgcol | ) |
compute master coefficients of column
- Parameters
-
gcgcol GCG column data structure
Definition at line 1113 of file pricer_gcg.cpp.
References GCGcolGetInitializedCoefs(), GCGcolGetNMastercoefs(), GCGcolGetNVars(), GCGcolGetPricingProb(), GCGcolGetVals(), GCGcolGetVars(), GCGcolSetInitializedCoefs(), GCGcolSetLinkvars(), GCGcolSetMastercoefs(), GCGgetNMasterConss(), GCGoriginalVarGetCoefs(), GCGoriginalVarGetMasterconss(), GCGoriginalVarGetNCoefs(), GCGoriginalVarIsLinking(), GCGpricingVarGetOrigvars(), GCGvarIsOriginal(), and GCGvarIsPricing().
Referenced by GCGcomputeColMastercoefs().
◆ computeColMastercuts()
SCIP_RETCODE ObjPricerGcg::computeColMastercuts | ( | GCG_COL * | gcgcol | ) |
compute master cut coefficients of column
- Parameters
-
gcgcol GCG column data structure
Definition at line 1330 of file pricer_gcg.cpp.
References GCGcolGetNMastercuts(), GCGcolGetNVars(), GCGcolGetProbNr(), GCGcolGetVals(), GCGcolGetVars(), GCGcolUpdateMastercuts(), GCGoriginalVarGetPricingVar(), GCGsepaGetMastercuts(), GCGsepaGetNCuts(), GCGsepaGetOrigcuts(), GCGvarGetBlock(), and GCGvarIsOriginal().
Referenced by GCGcomputeColMastercoefs().
Field Documentation
◆ origprob
SCIP* ObjPricerGcg::origprob |
the original program
Definition at line 60 of file objpricer_gcg.h.
Referenced by addArtificialVars(), createStabilization(), getOrigprob(), and ObjPricerGcg().
◆ pricerdata
SCIP_PRICERDATA* ObjPricerGcg::pricerdata |
pricerdata data structure
Definition at line 61 of file objpricer_gcg.h.
Referenced by addArtificialVars(), createColpool(), createPricestore(), createStabilization(), GCGsetPricingObjs(), getPricerdata(), and ObjPricerGcg().
◆ colpool
GCG_COLPOOL* ObjPricerGcg::colpool |
◆ pricestore
GCG_PRICESTORE* ObjPricerGcg::pricestore |
◆ threads
|
static |
Definition at line 64 of file objpricer_gcg.h.
Referenced by SCIPincludePricerGcg().