class_pricingcontroller.cpp
Go to the documentation of this file.
33 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
54 #define DEFAULT_HEURPRICINGITERS 1 /**< maximum number of heuristic pricing iterations per pricing call and problem */
55 #define DEFAULT_MAXHEURDEPTH -1 /**< maximum depth at which heuristic pricing should be performed (-1 for infinity) */
63 #define DEFAULT_CHUNKSIZE INT_MAX /**< maximal number of pricing problems to be solved during one pricing loop */
64 #define DEFAULT_EAGERFREQ 10 /**< frequency at which all pricingproblems should be solved (0 to disable) */
123 "order by which the pricing problems should be sorted ('i'ndices, 'd'ual solutions of convexity constraints, 'r'eliability from previous rounds, reliability from the 'l'ast nroundscol rounds)",
127 "number of previous pricing rounds for which the number of improving columns should be counted",
209 assert(SCIPnodeGetDepth(GCGconsMasterbranchGetNode(branchcons)) == 0 || branchrule != NULL || SCIPinProbing(scip_));
255 || (GCGpricingprobGetStatus(pricingprob) == GCG_PRICINGSTATUS_OPTIMAL && GCGpricingprobGetBranchconsIdx(pricingprob) == 0)
261 /** check whether the next generic branching constraint of a pricing problem must be considered */
294 SCIP_CALL_EXC( GCGpricingprobCreate(scip_, &pricingprobs[npricingprobs], GCGgetPricingprob(origprob, i), i, nroundscol) );
300 SCIP_CALL_EXC( GCGpricingjobCreate(scip_, &pricingjobs[npricingjobs], pricingprobs[npricingprobs], solvers[j], npricingprobs / actchunksize) );
353 tmpmaxniters += GCGpricerGetNSolvers(scip_) * ((SCIP_Longint) heurpricingiters + 1) * (GCGpricingprobGetNGenericBranchconss(pricingprobs[i]) + 1);
370 /** setup the priority queue (done once per stabilization round): add all pricing jobs to be performed */
372 SCIP_Real* dualsolconv /**< dual solution values / Farkas coefficients of convexity constraints */
391 sorting, nroundscol, dualsolconv[probnr], GCGpricerGetNPointsProb(scip_, probnr), GCGpricerGetNRaysProb(scip_, probnr)) );
485 * increase at least one of its limits, or solve it exactly if it was solved heuristically before
493 if( heuristic && status != GCG_PRICINGSTATUS_OPTIMAL && status != GCG_PRICINGSTATUS_NOTAPPLICABLE )
497 if( status != GCG_PRICINGSTATUS_SOLVERLIMIT || GCGpricingjobGetNHeurIters(pricingjob) >= heurpricingiters )
540 SCIP_Bool* optimal, /**< pointer to store whether all pricing problems were solved to optimality */
575 bestobjvals[probnr] = SCIPisInfinity(scip_, ABS(lowerbound)) ? lowerbound : nidentblocks * lowerbound;
void collectResults(GCG_COL **bestcols, SCIP_Bool *infeasible, SCIP_Bool *optimal, SCIP_Real *bestobjvals, SCIP_Real *beststabobj, SCIP_Real *bestredcost, SCIP_Bool *bestredcostvalid)
Definition: class_pricingcontroller.cpp:537
SCIP_RETCODE initPricing(PricingType *pricingtype)
Definition: class_pricingcontroller.cpp:333
public methods for working with pricing problems
SCIP_RETCODE addParameters()
Definition: class_pricingcontroller.cpp:110
void evaluatePricingjob(GCG_PRICINGJOB *pricingjob, GCG_PRICINGSTATUS status)
Definition: class_pricingcontroller.cpp:472
SCIP_RETCODE GCGpricingprobAddGenericBranchData(SCIP *scip, GCG_PRICINGPROB *pricingprob, SCIP_CONS *branchcons, SCIP_Real branchdual)
Definition: pricingprob.c:122
GCG interface methods.
GCG_PRICINGPROB * getPricingprob(int probnr)
Definition: class_pricingcontroller.cpp:640
int GCGpricingprobGetBranchconsIdx(GCG_PRICINGPROB *pricingprob)
Definition: pricingprob.c:236
Definition: struct_gcgcol.h:50
GCG_BRANCHDATA * GCGconsMasterbranchGetBranchdata(SCIP_CONS *cons)
Definition: cons_masterbranch.c:2498
void GCGpricingprobUpdate(SCIP *scip, GCG_PRICINGPROB *pricingprob, GCG_PRICINGSTATUS status, SCIP_Real lowerbound, int nimpcols)
Definition: pricingprob.c:174
virtual int getMaxcolsround() const =0
void GCGpricingprobInitPricing(GCG_PRICINGPROB *pricingprob)
Definition: pricingprob.c:95
SCIP_Real GCGpricingprobGetLowerbound(GCG_PRICINGPROB *pricingprob)
Definition: pricingprob.c:279
public methods for working with pricing jobs
Definition: class_conspartition.cpp:43
void GCGpricingprobReset(SCIP *scip, GCG_PRICINGPROB *pricingprob)
Definition: pricingprob.c:160
GCG_SOLVER * GCGpricingjobGetSolver(GCG_PRICINGJOB *pricingjob)
Definition: pricingjob.c:133
SCIP_RETCODE setupPriorityQueue(SCIP_Real *dualsolconv)
Definition: class_pricingcontroller.cpp:371
int GCGpricerGetNPointsProb(SCIP *scip, int probnr)
Definition: pricer_gcg.cpp:4684
SCIP_RETCODE GCGpqueueCreate(SCIP *scip, GCG_PQUEUE **pqueue, int initsize, SCIP_DECL_SORTPTRCOMP((*ptrcomp)))
Definition: gcgpqueue.c:118
void GCGpricingprobNextBranchcons(GCG_PRICINGPROB *pricingprob)
Definition: pricingprob.c:260
SCIP_RETCODE pricingprobNextBranchcons(GCG_PRICINGPROB *pricingprob)
Definition: class_pricingcontroller.cpp:421
SCIP * GCGgetPricingprob(SCIP *scip, int pricingprobnr)
Definition: relax_gcg.c:3939
SCIP_Real getRelmaxsuccessfulprobs() const
Definition: class_pricingtype.h:123
SCIP_RETCODE GCGpricingjobSetup(SCIP *scip, GCG_PRICINGJOB *pricingjob, SCIP_Bool heuristic, int scoring, int nroundscol, SCIP_Real dualsolconv, int npointsprob, int nraysprob)
Definition: pricingjob.c:82
void GCGpricingjobResetHeuristic(GCG_PRICINGJOB *pricingjob)
Definition: pricingjob.c:238
void GCGpricingprobFree(SCIP *scip, GCG_PRICINGPROB **pricingprob)
Definition: pricingprob.c:82
GCG variable pricer.
SCIP_NODE * GCGconsMasterbranchGetNode(SCIP_CONS *cons)
Definition: cons_masterbranch.c:2404
various SCIP helper methods
SCIP_EXPORT int GCGsolverGetPriority(GCG_SOLVER *solver)
Definition: solver.c:418
GCG_PRICINGPROB * GCGpricingjobGetPricingprob(GCG_PRICINGJOB *pricingjob)
Definition: pricingjob.c:126
private methods for working with pricing jobs, to be used by the pricing controller only
SCIP_BRANCHRULE * GCGconsMasterbranchGetBranchrule(SCIP_CONS *cons)
Definition: cons_masterbranch.c:2511
constraint handler for storing the branching decisions at each node of the tree
int GCGpricerGetNRaysProb(SCIP *scip, int probnr)
Definition: pricer_gcg.cpp:4708
Pricingcontroller()
int GCGpricingjobGetNHeurIters(GCG_PRICINGJOB *pricingjob)
Definition: pricingjob.c:259
void GCGpricingjobFree(SCIP *scip, GCG_PRICINGJOB **pricingjob)
Definition: pricingjob.c:72
Definition: struct_pricingprob.h:52
branching rule based on vanderbeck's generic branching scheme
void updatePricingprob(GCG_PRICINGPROB *pricingprob, GCG_PRICINGSTATUS status, SCIP_Real lowerbound, int nimpcols)
Definition: class_pricingcontroller.cpp:461
void GCGpricingjobIncreaseNHeurIters(GCG_PRICINGJOB *pricingjob)
Definition: pricingjob.c:250
int GCGbranchGenericBranchdataGetConsblocknr(GCG_BRANCHDATA *branchdata)
Definition: branch_generic.c:3027
pricing controller managing the pricing strategy
int GCGgetNIdenticalBlocks(SCIP *scip, int pricingprobnr)
Definition: relax_gcg.c:4053
SCIP_EXPORT SCIP_Bool GCGsolverIsExactEnabled(GCG_SOLVER *solver)
Definition: solver.c:438
Definition: struct_pricingjob.h:52
GCG_PRICINGSTATUS GCGpricingprobGetStatus(GCG_PRICINGPROB *pricingprob)
Definition: pricingprob.c:271
virtual ~Pricingcontroller()
Definition: class_pricingcontroller.cpp:106
Definition: class_pricingtype.h:41
SCIP * GCGpricingprobGetPricingscip(GCG_PRICINGPROB *pricingprob)
Definition: pricingprob.c:196
GCG_PRICINGJOB * getNextPricingjob()
Definition: class_pricingcontroller.cpp:405
Definition: struct_solver.h:46
SCIP_CONS * GCGconsMasterbranchGetParentcons(SCIP_CONS *cons)
Definition: cons_masterbranch.c:2419
SCIP_RETCODE GCGpqueueInsert(GCG_PQUEUE *pqueue, void *elem)
Definition: gcgpqueue.c:163
void resetEagerage()
Definition: class_pricingcontroller.cpp:628
int GCGpricingprobGetNGenericBranchconss(GCG_PRICINGPROB *pricingprob)
Definition: pricingprob.c:228
SCIP_CONS * GCGbranchGenericBranchdataGetMastercons(GCG_BRANCHDATA *branchdata)
Definition: branch_generic.c:3036
void GCGpricingprobExitPricing(GCG_PRICINGPROB *pricingprob, int nroundscol)
Definition: pricingprob.c:107
SCIP_Bool GCGisBranchruleGeneric(SCIP_BRANCHRULE *branchrule)
Definition: branch_generic.c:3045
void GCGpricingjobNextSolver(SCIP *scip, GCG_PRICINGJOB *pricingjob)
Definition: pricingjob.c:171
private methods for working with pricing problems, to be used by the pricing controller only
SCIP_CONS * GCGconsMasterbranchGetActiveCons(SCIP *scip)
Definition: cons_masterbranch.c:2628
virtual SCIP_Real consGetDual(SCIP *scip, SCIP_CONS *cons) const =0
const SCIP_EXPORT char * GCGsolverGetName(GCG_SOLVER *solver)
Definition: solver.c:398
SCIP_Bool GCGpricingjobIsHeuristic(GCG_PRICINGJOB *pricingjob)
Definition: pricingjob.c:222
Definition: branch_bpstrong.c:109
SCIP_Bool canPricingloopBeAborted(PricingType *pricingtype, int nfoundcols, int nsuccessfulprobs) const
Definition: class_pricingcontroller.cpp:608
SCIP_RETCODE setPricingjobTimelimit(GCG_PRICINGJOB *pricingjob)
Definition: class_pricingcontroller.cpp:442
SCIP_Bool checkNextChunk()
Definition: class_pricingcontroller.cpp:590
virtual SCIP_Real getRelmaxprobs() const =0
void increaseEagerage()
Definition: class_pricingcontroller.cpp:633
abstraction for SCIP pricing types
void GCGpricingjobSetExact(GCG_PRICINGJOB *pricingjob)
Definition: pricingjob.c:230
SCIP_RETCODE GCGpricingjobCreate(SCIP *scip, GCG_PRICINGJOB **pricingjob, GCG_PRICINGPROB *pricingprob, GCG_SOLVER *solver, int chunk)
Definition: pricingjob.c:51
SCIP_Bool GCGisPricingprobRelevant(SCIP *scip, int pricingprobnr)
Definition: relax_gcg.c:4000
SCIP_Real GCGpricingjobGetChunk(GCG_PRICINGJOB *pricingjob)
Definition: pricingjob.c:206
SCIP_EXPORT SCIP_Bool GCGsolverIsHeurEnabled(GCG_SOLVER *solver)
Definition: solver.c:428
int GCGpricingprobGetProbnr(GCG_PRICINGPROB *pricingprob)
Definition: pricingprob.c:204
SCIP_DECL_SORTPTRCOMP(Pricingcontroller::comparePricingjobs)
Definition: class_pricingcontroller.cpp:142
int GCGpricingprobGetNImpCols(GCG_PRICINGPROB *pricingprob)
Definition: pricingprob.c:287
SCIP_Real GCGpricingjobGetScore(GCG_PRICINGJOB *pricingjob)
Definition: pricingjob.c:214
SCIP_RETCODE GCGpricingprobCreate(SCIP *scip, GCG_PRICINGPROB **pricingprob, SCIP *pricingscip, int probnr, int nroundscol)
Definition: pricingprob.c:51
int getMaxNIters() const
Definition: class_pricingcontroller.cpp:652