ObjPricerGcg Class Reference

Detailed Description

Definition at line 51 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 FarkasPricinggetFarkasPricing () const
FarkasPricinggetFarkasPricingNonConst ()
const ReducedCostPricinggetReducedCostPricing () const
ReducedCostPricinggetReducedCostPricingNonConst ()
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)

Public Attributes

SCIP * origprob
SCIP_PRICERDATA * pricerdata

Static Public Attributes

static int threads

Constructor & Destructor Documentation

ObjPricerGcg::ObjPricerGcg ( SCIP *  scip,
SCIP *  origscip,
const char *  name,
const char *  desc,
int  priority,
unsigned int  delay,
SCIP_PRICERDATA *  pricerdata 

default constructor

scipSCIP data structure
origscipSCIP data structure of original problem
namename of variable pricer
descdescription of variable pricer
prioritypriority of the variable pricer
delayshould the pricer be delayed until no other pricers or already existing
pricerdatapricerdata data structure

Definition at line 3383 of file pricer_gcg.cpp.

References origprob, pricerdata, and SCIP_DECL_PRICERFREE().

Referenced by priceNewVariables(), and SCIPincludePricerGcg().

virtual ObjPricerGcg::~ObjPricerGcg ( )

Member Function Documentation

SCIP_RETCODE ObjPricerGcg::addColToPricestore ( GCG_COL col)

add a new column to the pricing storage

colpriced col

Definition at line 1639 of file pricer_gcg.cpp.

References GCGcolUpdateRedcost(), GCGpricestoreAddCol(), and getBestCols().

Referenced by computeRedCostGcgCol(), GCGpricerAddCol(), and getOrigprob().

SCIP_RETCODE ObjPricerGcg::addTrivialsols ( )

add trivial sols

Referenced by getOrigprob().

SCIP_RETCODE ObjPricerGcg::computeDualDiff ( SCIP_Real **  dualvals1,
SCIP_Real *  dualconv1,
SCIP_Real **  dualvals2,
SCIP_Real *  dualconv2,
SCIP_Real *  dualdiff 
dualvals1array of dual values for each pricing problem
dualconv1array of dual solutions for the convexity constraints
dualvals2array of dual values for each pricing problem
dualconv2array of dual solutions for the convexity constraints
dualdiffpointer to store difference of duals solutions

Definition at line 2629 of file pricer_gcg.cpp.

References pricingLoop().

Referenced by createNewMasterVarFromGcgCol(), GCGpricerPrintStatistics(), and getPricerdata().

SCIP_Real ObjPricerGcg::computeRedCostGcgCol ( PricingType pricetype,
GCG_Col *  gcgcol,
SCIP_Real *  objvalptr 
) const
pricetypetype of pricing
gcgcolgcg column to compute reduced cost for
objvalptrpointer to store the computed objective value

Definition at line 1558 of file pricer_gcg.cpp.

References addColToPricestore(), GCGcolGetNVars(), GCGcolGetProbNr(), GCGcolGetVals(), GCGcolGetVars(), GCGcolIsRay(), GCGcolUpdateRedcost(), GCGpricingprobGetGenericBranchData(), and updateRedcosts().

Referenced by computeColMastercuts(), GCGcomputeRedCostGcgCol(), and getOrigprob().

SCIP_RETCODE ObjPricerGcg::createColpool ( )

create the pointers for the colpool

Definition at line 4032 of file pricer_gcg.cpp.

References colpool, createPricestore(), GCGcolpoolCreate(), and pricerdata.

Referenced by createStabilization(), getOrigprob(), and SCIP_DECL_PRICERINITSOL().

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

scipSCIP data structure
pricetypetype of the pricing
solsolution to compute reduced cost for
solvarsarray of variables with non-zero value in the solution of the pricing problem
solvalsarray of values in the solution of the pricing problem for variables in array solvars
nsolvarsnumber of variables in array solvars
solisrayis the solution a ray?
probnumber of the pricing problem the solution belongs to
forceshould the given variable be added also if it has non-negative reduced cost?
addedpointer to store whether the variable was successfully added
addedvarpointer to store the created variable

Definition at line 2039 of file pricer_gcg.cpp.

References createNewMasterVarFromGcgCol(), GCG_PRICETYPE_REDCOST, GCGcreateMasterVar(), GCGgetConvCons(), GCGoriginalVarIsLinking(), GCGpricingVarGetOrigvars(), GCGsetRootRedcostCall(), GCGupdateVarStatistics(), GCGvarIsPricing(), and PricingType::getType().

Referenced by GCGmasterTransOrigSolToMasterVars(), getPricerdata(), and getStabilizedDualObjectiveValue().

SCIP_RETCODE ObjPricerGcg::createNewMasterVarFromGcgCol ( SCIP *  scip,
PricingType pricetype,
GCG_COL gcgcol,
SCIP_Bool  force,
SCIP_Bool *  added,
SCIP_VAR **  addedvar,
SCIP_Real  score 
SCIP_RETCODE ObjPricerGcg::createPricestore ( )

create the pointers for the pricestore

Definition at line 4043 of file pricer_gcg.cpp.

References GCGpricestoreCreate(), pricerdata, pricestore, and SCIPincludePricerGcg().

Referenced by createColpool(), getOrigprob(), and SCIP_DECL_PRICERINITSOL().

SCIP_RETCODE ObjPricerGcg::createPricingcontroller ( )

create the pricing controller

Definition at line 4012 of file pricer_gcg.cpp.

References gcg::Pricingcontroller::addParameters(), and createStabilization().

Referenced by createPricingTypes(), getOrigprob(), and SCIPincludePricerGcg().

SCIP_RETCODE ObjPricerGcg::createPricingTypes ( )

create the pointers for the pricing types

Definition at line 3998 of file pricer_gcg.cpp.

References FarkasPricing::addParameters(), and createPricingcontroller().

Referenced by getOrigprob(), SCIP_DECL_PRICERFARKAS(), and SCIPincludePricerGcg().

void ObjPricerGcg::createStabilization ( )

create the pointers for the stabilization

Definition at line 4021 of file pricer_gcg.cpp.

References createColpool(), GCGgetNPricingprobs(), GCGgetNRelPricingprobs(), origprob, and pricerdata.

Referenced by createPricingcontroller(), getOrigprob(), and SCIP_DECL_PRICERINITSOL().

void ObjPricerGcg::getBestCols ( GCG_COL **  pricingprobcols)

for each pricing problem, get the best found column from the pricing storage

pricingprobcolsarray to be filled with best column per pricing problem

Definition at line 1663 of file pricer_gcg.cpp.

References GCGcolGetProbNr(), GCGcolGetRedcost(), GCGpricestoreGetCols(), GCGpricestoreGetNCols(), and getDualconvsum().

Referenced by addColToPricestore(), and getOrigprob().

SCIP_Real ObjPricerGcg::getConvconsDualsol ( PricingType pricetype,
int  probnr 

for a pricing problem, get the dual solution value or Farkas value of the convexity constraint

pricetypeFarkas or Reduced cost pricing
probnrindex of corresponding pricing problem

Definition at line 687 of file pricer_gcg.cpp.

References PricingType::consGetDual(), GCGgetConvCons(), GCGisPricingprobRelevant(), and setPricingObjs().

Referenced by getMaxColsProb(), and getPricerdata().

SCIP_Real ObjPricerGcg::getDualconvsum ( GCG_COL **  bestcols)

get the sum over the dual values of convexity constraints

bestcolsbest columns found per pricing problem

Definition at line 1691 of file pricer_gcg.cpp.

References GCGcolIsRay(), GCGgetConvCons(), GCGgetNIdenticalBlocks(), GCGisPricingprobRelevant(), and getStabilizedDualObjectiveValue().

Referenced by getBestCols(), and getOrigprob().

const FarkasPricing* ObjPricerGcg::getFarkasPricing ( ) const

Definition at line 168 of file objpricer_gcg.h.

Referenced by GCGpricerPrintStatistics().

FarkasPricing* ObjPricerGcg::getFarkasPricingNonConst ( )

Definition at line 173 of file objpricer_gcg.h.

Referenced by GCGcomputeRedCostGcgCol(), and GCGcreateNewMasterVarFromGcgCol().

int ObjPricerGcg::getMaxColsProb ( ) const
int ObjPricerGcg::getMaxColsRound ( ) const

get the number of columns to be added to the master LP in the current pricing round

Definition at line 361 of file pricer_gcg.cpp.

References getMaxColsProb().

Referenced by GCGpricerGetMaxColsRound(), getOrigprob(), and SCIP_DECL_EVENTEXEC().

const ReducedCostPricing* ObjPricerGcg::getReducedCostPricing ( ) const

Definition at line 178 of file objpricer_gcg.h.

Referenced by GCGpricerPrintStatistics().

ReducedCostPricing* ObjPricerGcg::getReducedCostPricingNonConst ( )
SCIP_RETCODE ObjPricerGcg::priceColumnPoolOld ( PricingType pricetype,
int *  pnfoundvars 

method to price new columns from Column Pool

pricetypetype of pricing: reduced cost or Farkas
pnfoundvarspointer to store number of priced variables

Referenced by getPricerdata().

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

pricetypetype of the pricing
resultresult pointer
lowerboundlower bound of pricingproblems

Definition at line 3277 of file pricer_gcg.cpp.

References GCG_PRICETYPE_FARKAS, GCG_PRICETYPE_REDCOST, GCGisRootNode(), GCGpricerPrintInfo, GCGsolverUpdate(), PricingType::getCalls(), PricingType::getType(), PricingType::incCalls(), and ObjPricerGcg().

Referenced by GCGcomputeRedCostGcgCol(), getPricerdata(), SCIP_DECL_PRICERFARKAS(), and SCIP_DECL_PRICERREDCOST().

SCIP_RETCODE ObjPricerGcg::pricingLoop ( PricingType pricetype,
SCIP_RESULT *  result,
int *  pnfoundvars,
SCIP_Real *  lowerbound,
SCIP_Bool *  bestredcostvalid 

the pricing loop: solve the pricing problems

set parameters for adding pool cuts to separation basis

perhaps solve remaining pricing problems, if only few left?
solve all pricing problems all k iterations?

add pool cuts to sepa basis

pricetypetype of pricing
resultresult pointer
pnfoundvarspointer to store number of found variables
lowerboundpointer to store lowerbound obtained due to lagrange bound
bestredcostvalidpointer to store if bestredcost are valid (pp solvedoptimal)

Definition at line 2663 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(), GCGsetPricingObjs(), GCGsolverGetName(), GCGsolverUpdate(), PricingType::getClockTime(), PricingType::getType(), and SCIPsepaBasisAddPPObjConss().

Referenced by computeDualDiff(), and getPricerdata().

virtual ObjPricerGcg::SCIP_DECL_PRICEREXIT ( scip_exit  )

deinitialization method of variable pricer (called before transformed problem is freed)

Referenced by SCIP_DECL_PRICERINIT(), and ~ObjPricerGcg().

virtual ObjPricerGcg::SCIP_DECL_PRICEREXITSOL ( scip_exitsol  )

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

Referenced by SCIP_DECL_PRICERINITSOL(), and ~ObjPricerGcg().

virtual ObjPricerGcg::SCIP_DECL_PRICERFARKAS ( scip_farkas  )

farkas pricing method of variable pricer for infeasible LPs

Referenced by addArtificialVars(), and ~ObjPricerGcg().

virtual ObjPricerGcg::SCIP_DECL_PRICERFREE ( scip_free  )

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

Referenced by ObjPricerGcg(), and ~ObjPricerGcg().

virtual ObjPricerGcg::SCIP_DECL_PRICERINIT ( scip_init  )

initialization method of variable pricer (called after problem was transformed)

Referenced by SCIP_DECL_PRICERFREE(), and ~ObjPricerGcg().

virtual ObjPricerGcg::SCIP_DECL_PRICERINITSOL ( scip_initsol  )

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

Referenced by SCIP_DECL_PRICEREXIT(), and ~ObjPricerGcg().

virtual ObjPricerGcg::SCIP_DECL_PRICERREDCOST ( scip_redcost  )

reduced cost pricing method of variable pricer for feasible LPs

Referenced by SCIP_DECL_PRICEREXITSOL(), and ~ObjPricerGcg().

void ObjPricerGcg::updateRedcostColumnPool ( PricingType pricetype)

update reduced cost of columns in column pool

pricetypetype of pricing: reduced cost or Farkas

Referenced by getPricerdata().

void ObjPricerGcg::updateRedcosts ( PricingType pricetype,
GCG_COL **  cols,
int  ncols,
int *  nimpcols 

for given columns, (re-)compute and update their reduced costs

pricetypetype of pricing
colscolumns to compute reduced costs for
ncolsnumber of columns
nimpcolspointer to store number of improving columns

Referenced by computeRedCostGcgCol(), and getOrigprob().

Member Data Documentation

GCG_COLPOOL* ObjPricerGcg::colpool
GCG_PRICESTORE* ObjPricerGcg::pricestore
int ObjPricerGcg::threads

Definition at line 60 of file objpricer_gcg.h.

Referenced by SCIPincludePricerGcg().