heur_ipcolgen.c
Go to the documentation of this file.
34/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
48#define HEUR_DESC "A destroy and repair heuristic for the master problem that uses a modified pricing problem"
54#define HEUR_TIMING SCIP_HEURTIMING_DURINGLPLOOP | SCIP_HEURTIMING_DURINGPRICINGLOOP | SCIP_HEURTIMING_AFTERNODE
58#define DEFAULT_MINFIXINGRATE 0.2 /**< minimum percentage of integer variables that have to be fixed */
59#define DEFAULT_MINIMPROVE 0.01 /**< factor by which restricted master should at least improve the incumbent */
62#define DEFAULT_NODESQUOT 0.5 /**< repair problem nodes in relation to nodes of the original problem */
63#define DEFAULT_LPLIMFAC 2.0 /* factor by which the limit on the number of LP depends on the node limit */
64#define DEFAULT_USELPROWS FALSE /**< should repair problem be created out of the rows in the LP rows,
66#define DEFAULT_COPYCUTS TRUE /**< if DEFAULT_USELPROWS is FALSE, then should all active cuts from the cutpool
68#define DEFAULT_SOLVEAUXPROB TRUE /**< should an auxiliary problem be solved to find improving solutions */
69#define DEFAULT_DUALWEIGHT 0.25 /**< the default value for the dual weight in the pricing objective */
70#define DEFAULT_INITDYNAMICPEN 0.1 /**< the default value for the initial dynamic penalty for the pricing objective */
72#define DEFAULT_WAITNEWSOL TRUE /**< should the heuristic wait until a new solution is found before executing */
73#define DEFAULT_MININITIALGAP 0.5 /**< the minimum optimality gap necessary prior to the first call of the heuristic.
77#define DEFAULT_NOIMPROVEITER 3 /**< the number of weighted pricing iterations without primal improvement.
79#define DEFAULT_RINSFIXING FALSE /**< should a RINS style fixing be used for the repair master problem */
92#define PRICINGCB_DESC "pre- and post-pricing methods for adding relaxation and dual weights to the pricing problem objective"
107};
125 SCIP_Real nodelimit; /**< the nodelimit employed in the current sub-SCIP for the repair problem,
127 SCIP_Real lplimfac; /**< factor by which the limit on the number of LP depends on the node limit */
129 SCIP_Real initdynamicpen; /**< the initial value for the dynamic penalty for the pricing objective */
130 SCIP_Bool uselprows; /**< should the repair problem be created out of the rows in the LP rows? */
133 SCIP_Bool waitnewsol; /**< should the heuristic wait until a new solution is found before executing */
134 SCIP_Bool solveauxproblem; /**< should the repair problem be solved to find improving solutions */
135 SCIP_Real mininitialgap; /**< the minimum initial gap required before the first call of the heuristic */
144 SCIP_Bool firstexec; /**< flag to indicate whether the first execution of the heuristic has been performed */
145 SCIP_Longint prevpricingiter; /**< the number of pricing iterations performed before this node */
150 SCIP_Longint prevnnodes; /**< the number of nodes processed in the previous call to the heuristic */
161 IPC_PENALTYTYPE* penaltytypes; /**< the type of penalty, this is used for the penalty adjustment */
175 * we interrupt the solution process each time the LP is solved. This is used to interrupt the solving process of the
205 * The start solution is created by greedily adding the most recently generated columns. Once a column is added for
212 SCIP_Bool* success /**< pointer to store whether creating the starting solution was successful */
247 /* if the block number is negative, then the variable is a master-only variable. Thus, it can be ignored. */
255 /* adding the variable to the solution by setting the value to the variables upper bound. If the upper bound is
324 SCIPdebugMsg(scip, "Fixing <%s> to zero (%g)\n", SCIPvarGetName(mastervars[varidx]), mastersolval);
343 SCIPdebugMessage(" -> %d out of %d (%.2f percent) blocks fixed.\n", fixingcounter, nblocks, fixingrate * 100.0);
422 if( SCIPisInfinity(scip, -SCIPgetLhsLinear(scip, cons)) && SCIPisEQ(scip, SCIPgetRhsLinear(scip, cons), 1.0) )
425 if( SCIPisInfinity(scip, SCIPgetRhsLinear(scip, cons)) && SCIPisEQ(scip, SCIPgetLhsLinear(scip, cons), 1.0) )
428 if( SCIPisEQ(scip, SCIPgetLhsLinear(scip, cons), 1.0) && SCIPisEQ(scip, SCIPgetRhsLinear(scip, cons), 1.0) )
435/** using the current solution, compute the dynamic penalties to apply to the column generation pricing problem */
442 int** penaltiesids, /**< the dynamic penalties constraint ids, or NULL if the penalties are not computed */
444 int* npenalties, /**< the number of dynamic penalties, or NULL if the penalties are not computed */
445 int* penaltiessize, /**< the number of elements in the dynamic penalties array, or NULL if the penalties are not computed */
463 /* setting the dynamic penalties per constraint. The penalties can only be applied to set covering or set packing
473 /* if the constraint is of type SET COVERING or SET PACKING, then we add penalties to the pricing objective.
476 if( constype == CONSTYPE_SETPACK || constype == CONSTYPE_SETCOVER || constype == CONSTYPE_SETPART )
498 /* if the solution should be repaired, then any set packing or set partitioning constraint with an activity
501 if( repairsol && (constype == CONSTYPE_SETPACK || constype == CONSTYPE_SETPART) && SCIPisSumGT(scip, sum, 1.0) )
518 /* for set packing, if the constraint is satisfied, then we must penalise any non-zeros in that constraint.
519 * for set covering, if the constraint is violated, then we must reward any non-zeros in that constraint
533 SCIP_CALL( addPenalty(scip, DEFAULT_BIGM, i, PENALTYTYPE_BIGM, penalties, penaltiesids, penaltytypes,
541 SCIP_CALL( addPenalty(scip, conspenalty, i, PENALTYTYPE_SETPACK, penalties, penaltiesids, penaltytypes,
546 SCIP_CALL( addPenalty(scip, -1.0*conspenalty, i, PENALTYTYPE_SETCOVER, penalties, penaltiesids, penaltytypes,
551 SCIP_CALL( addPenalty(scip, conspenalty, i, PENALTYTYPE_SETPACK, penalties, penaltiesids, penaltytypes,
553 SCIP_CALL( addPenalty(scip, -1.0*conspenalty, i, PENALTYTYPE_SETCOVER, penalties, penaltiesids, penaltytypes,
592 /* getting the master variables. It is assumed that the variables at the end of the array correspond to the newly
600 /* if no columns have been added to the master problem, then no penalty update will be performed */
613 /* scanning all of the constraints that have been previously identified and computing their activity with respect to
650 SCIPdebugMsg(scip, "adjusting penalties -- constraint <%s> activity: %g\n", SCIPconsGetName(cons), sum);
652 /* if the activity is positive, this means that the new variable is covering the constraints. As such, the penalties
685 SCIPdebugMsg(scip, "new penalty for constraint <%s>: %g\n", SCIPconsGetName(cons), heurdata->penalties[i]);
692 if( SCIPisGT(scip, heurdata->penalties[i], 1e+5) || SCIPisGT(scip, -heurdata->penalties[i], 1e+5) )
712 * This method is called immediately before the pricing is performed in the GCG pricer. At this point, it is possible
713 * to modify the solving data is used within the pricing for new variables. Any data that is modified should be
756 /* setting the weight and dynamic penalties for the dual values and the master constraints, respectively */
758 GCGsetPricingObjRelaxWeight(gcg, heurdata->penalties, heurdata->penaltiesids, heurdata->npenalties);
764 SCIPdebugMsg(scip, "penalty[%d](%d): %g\n", i, heurdata->penaltiesids[i], heurdata->penalties[i]);
776 * This method is called immediately after the pricing is performed in the GCG pricer. This method should be used to
825/** pricing in new variables with a weighted objective function for the original master scip instance. The new variables
826 * will not form part of any stored solution, so they will not be fixed when setting up the repair problem
872 SCIP_CALL( SCIPgetIntParam(origprob, "pricing/masterpricer/maxcolsroundredcostroot", &maxcolsroundredcostroot) );
873 SCIP_CALL( SCIPgetIntParam(origprob, "pricing/masterpricer/maxcolsroundredcost", &maxcolsroundredcost) );
874 SCIP_CALL( SCIPgetIntParam(origprob, "pricing/masterpricer/maxroundsredcost", &maxroundsredcost) );
875 SCIP_CALL( SCIPgetIntParam(origprob, "pricing/masterpricer/heurpricingiters", &heurpricingiters) );
894 SCIP_CALL( GCGrelaxPerformProbingWithPricing(gcg, npricingiter, NULL, NULL, &lpobjval, &lpsolved, &lperror, &cutoff) );
902 SCIP_CALL( SCIPsetIntParam(origprob, "pricing/masterpricer/maxcolsroundredcostroot", maxcolsroundredcostroot) );
903 SCIP_CALL( SCIPsetIntParam(origprob, "pricing/masterpricer/maxcolsroundredcost", maxcolsroundredcost) );
904 SCIP_CALL( SCIPsetIntParam(origprob, "pricing/masterpricer/maxroundsredcost", maxroundsredcost) );
905 SCIP_CALL( SCIPsetIntParam(origprob, "pricing/masterpricer/heurpricingiters", heurpricingiters) );
918/** destroys and repairs the current best solution. This is the main loop of the ipcolgen heuristic. */
955 SCIP_CALL( createPartialSolution(scip, partialsol, heurdata->randnumgen, heurdata->minfixingrate,
963 &heurdata->penaltiesids, &heurdata->penaltytypes, &heurdata->npenalties, &heurdata->penaltiessize, FALSE) );
975 /* pricing in new columns that will be used to find new solutions when solving the repair problem */
1034 SCIP_CALL( SCIPcreateProb((*repairprob), probname, NULL, NULL, NULL, NULL, NULL, NULL, NULL) );
1045 SCIP_CALL( SCIPcopy(scip, (*repairprob), varmapfw, NULL, "repairprob", TRUE, FALSE, FALSE, TRUE, &valid) ); /** @todo check for thread safeness */
1098 /* if the variable takes the same value in the primal solution and the relaxation, then it is fixed */
1107 /* if variable takes a non-zero value in the master solution, then it is fixed to that value */
1157 SCIP_CALL( SCIPcreateConsLinear(repairprob, &cons, SCIProwGetName(rows[i]), nnonz, consvars, vals, lhs, rhs,
1170/** creates a new solution for the original problem by translating the solution of the repair problem */
1206 SCIP_CALL( SCIPgetSolVals(repairprob, repairprobsol, nmastervars, repairprobvars, repairprobvals) );
1212 /* add solution to the master problem, GCG will translate it and add it to the original problem*/
1221 SCIPdebugMessage("WARNING: original solution feasible, but no solution has been added to master problem.\n");
1265 SCIP_CALL( SCIPincludeEventhdlrBasic(repairprob, &eventhdlr, EVENTHDLR_NAME, EVENTHDLR_DESC, eventExecIpcolgen, NULL) );
1322 cutoff = (1-heurdata->minimprove)*SCIPgetUpperbound(origprob) + heurdata->minimprove*SCIPgetLowerbound(origprob);
1336 /* Errors in the LP solver should not kill the overall solving process, if the LP is just needed for a heuristic.
1337 * Hence in optimized mode, the return code is caught and a warning is printed, only in debug mode, SCIP will stop.
1343 SCIPwarningMessage(scip, "Error while presolving subMIP in IPColGen; IPColGen terminated with code <%d>\n",retstat);
1349 SCIPdebugMessage("presolved the IPColGen repair problem: %d vars, %d cons\n", SCIPgetNVars(repairprob), SCIPgetNConss(repairprob));
1351 SCIPdebugMessage("solving the IPColGen repair problem: maxnodes=%"SCIP_LONGINT_FORMAT"\n", nnodes);
1354 SCIP_CALL( SCIPcatchEvent(repairprob, SCIP_EVENTTYPE_LPSOLVED, eventhdlr, (SCIP_EVENTDATA*) heurdata, NULL) );
1360 SCIPwarningMessage(scip, "Error while solving subMIP in IPColGen; IPColGen terminated with code <%d>\n",retstat);
1367 SCIP_CALL( SCIPdropEvent(repairprob, SCIP_EVENTTYPE_LPSOLVED, eventhdlr, (SCIP_EVENTDATA*) heurdata, -1) );
1377 * due to numerics, it might happen that not all solutions are feasible -> try all solutions until one was accepted
1395 * Prior to the first call of the ipcolgen heuristic, the average LP objective value is computed to identify the point
1420 /* if the previously called node is different to the current node, then the number of pricing iterations must be
1447 if( heurdata->waitnewsol && SCIPgetBestSol(scip) != NULL && SCIPgetBestSol(scip) == heurdata->lastsol
1452 if( SCIPgetDepth(scip) > 0 && (SCIPgetNNodes(scip) - heurdata->prevnnodes) < heurdata->nwaitnodes )
1455 /* we require at least n blocks of pricing iterations to be performed before the first execution of the heuristic */
1466 if( SCIPpricerGetNCalls(SCIPfindPricer(scip, "gcg")) - heurdata->prevpricingiter > nblocks*0.1 )
1472 /* collecting the previous LP objective values after we have reached the pricer calls threshold */
1485 /* if enough previous LP objectives have been collected, then average difference is computed and used to assess the
1495 if( !SCIPisZero(scip, heurdata->prevlpobjs[i]) && !SCIPisInfinity(scip, heurdata->prevlpobjs[i]) )
1506 SCIPdebugMsg(scip, "Average objective: %g Current Objective: %g Relative Difference: %g\n", avgobj,
1509 /* if the average objective and the current object are equal, this could indicate that the column generation has
1515 /* the threshold for starting the heuristic is if the average difference in the lp objectives is 0.01% of the LP
1645/** solving process initialization method of primal heuristic (called when branch and bound process is about to begin) */
1649/** solving process deinitialization method of primal heuristic (called before branch and bound process data is freed) */
1701 /* checking whether the current call is a recursive call to the heuristic. If this heuristic is called from the
1726 nnodes = (SCIP_Longint)(nnodes * (SCIPheurGetNSolsFound(heur)+1.0)/(SCIPheurGetNCalls(heur) + 1.0));
1727 nnodes -= (SCIP_Longint)(100.0 * SCIPheurGetNCalls(heur)); /* count the setup costs for the sub-MIP as 100 nodes */
1756 /* creating the partial solution for setting the dynamic penalties and fixings in the repair problem */
1800 SCIP_CALL( destroyAndRepairSolution(gcg, heurdata, heurdata->partialsol, GCGgetNPricingprobs(gcg), &terminate) );
1824 SCIP_CALL( setupRepairProblem(scip, repairprob, repairprobvars, heurdata->partialsol, heurdata->uselprows,
1826 SCIPdebugMessage("IPColGen repair problem: %d vars, %d cons, success=%u\n", SCIPgetNVars(repairprob),
1862 * NOTE: this is probably not very efficient and it may be possible to free the solution only when the incumbent is
1870 /* if a new solution is found, then the number of waiting nodes is reset. Otherwise, it is increased */
1913 SCIP_CALL( SCIPincludeHeur(scip, HEUR_NAME, HEUR_DESC, HEUR_DISPCHAR, HEUR_PRIORITY, HEUR_FREQ, HEUR_FREQOFS,
1921 NULL, NULL, NULL, NULL, NULL, pricingcbPrepricingIpcolgen, pricingcbPostpricingIpcolgen, NULL) );
1941 "contingent of repair problem nodes in relation to the number of nodes of the original problem",
1957 "if uselprows == FALSE, should all active cuts from cutpool be copied to constraints in repair problem?",
#define SCIP_MAXSTRLEN
#define SCIP_Longint
#define SCIP_REAL_MAX
#define SCIP_Bool
#define MIN(x, y)
#define SCIP_Real
#define MAX(x, y)
#define SCIP_LONGINT_FORMAT
#define REALABS(x)
#define SCIP_LONGINT_MAX
#define SCIP_CALL(x)
#define TRUE
#define FALSE
#define nnodes
GCG interface methods.
SCIP_Real SCIPgetRhsLinear(SCIP *scip, SCIP_CONS *cons)
SCIP_Real SCIPgetLhsLinear(SCIP *scip, SCIP_CONS *cons)
int SCIPgetNVarsLinear(SCIP *scip, SCIP_CONS *cons)
SCIP_Real * SCIPgetValsLinear(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPcreateConsLinear(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Real *vals, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
SCIP_RETCODE SCIPcopyVars(SCIP *sourcescip, SCIP *targetscip, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, SCIP_VAR **fixedvars, SCIP_Real *fixedvals, int nfixedvars, SCIP_Bool global)
SCIP_RETCODE SCIPcopy(SCIP *sourcescip, SCIP *targetscip, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, const char *suffix, SCIP_Bool global, SCIP_Bool enablepricing, SCIP_Bool threadsafe, SCIP_Bool passmessagehdlr, SCIP_Bool *valid)
SCIP_RETCODE SCIPcopyCuts(SCIP *sourcescip, SCIP *targetscip, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, SCIP_Bool global, int *ncutsadded)
SCIP_RETCODE SCIPcopyLimits(SCIP *sourcescip, SCIP *targetscip)
void GCGsetPricingObjDualWeight(GCG *gcg, SCIP_Real dualweight)
Definition: pricer_gcg.cpp:4350
void GCGsetPricingObjRelaxWeight(GCG *gcg, SCIP_Real *weights, int *weightids, int nweights)
Definition: pricer_gcg.cpp:4367
GCG_PRICINGCB * GCGpricerFindPricingcb(GCG *gcg, const char *name)
Definition: pricer_gcg.cpp:4568
SCIP_RETCODE GCGpricerIncludePricingcb(GCG *gcg, const char *name, const char *desc, int priority, GCG_DECL_PRICINGCBFREE((*pricingcbfree)), GCG_DECL_PRICINGCBINIT((*pricingcbinit)), GCG_DECL_PRICINGCBEXIT((*pricingcbexit)), GCG_DECL_PRICINGCBINITSOL((*pricingcbinitsol)), GCG_DECL_PRICINGCBEXITSOL((*pricingcbexitsol)), GCG_DECL_PRICINGCBPREPRICING((*pricingcbprepricing)), GCG_DECL_PRICINGCBPOSTPRICING((*pricingcbpostpricing)), GCG_PRICINGCBDATA *pricingcbdata)
Definition: pricer_gcg.cpp:4478
SCIP_Bool SCIPisStopped(SCIP *scip)
SCIP_RETCODE SCIPfree(SCIP **scip)
SCIP_RETCODE SCIPcreate(SCIP **scip)
const char * SCIPgetProbName(SCIP *scip)
SCIP_RETCODE SCIPsetObjlimit(SCIP *scip, SCIP_Real objlimit)
SCIP_RETCODE SCIPgetVarsData(SCIP *scip, SCIP_VAR ***vars, int *nvars, int *nbinvars, int *nintvars, int *nimplvars, int *ncontvars)
int SCIPgetNVars(SCIP *scip)
SCIP_RETCODE SCIPaddCons(SCIP *scip, SCIP_CONS *cons)
int SCIPgetNConss(SCIP *scip)
SCIP_VAR ** SCIPgetVars(SCIP *scip)
int SCIPgetNOrigVars(SCIP *scip)
SCIP_RETCODE SCIPcreateProb(SCIP *scip, const char *name, SCIP_DECL_PROBDELORIG((*probdelorig)), SCIP_DECL_PROBTRANS((*probtrans)), SCIP_DECL_PROBDELTRANS((*probdeltrans)), SCIP_DECL_PROBINITSOL((*probinitsol)), SCIP_DECL_PROBEXITSOL((*probexitsol)), SCIP_DECL_PROBCOPY((*probcopy)), SCIP_PROBDATA *probdata)
void SCIPhashmapFree(SCIP_HASHMAP **hashmap)
void * SCIPhashmapGetImage(SCIP_HASHMAP *hashmap, void *origin)
SCIP_RETCODE SCIPhashmapCreate(SCIP_HASHMAP **hashmap, BMS_BLKMEM *blkmem, int mapsize)
SCIP_RETCODE GCGconsGetVars(SCIP *scip, SCIP_CONS *cons, SCIP_VAR **vars, int nvars)
Definition: scip_misc.c:487
#define SCIPdebugMsg
void SCIPwarningMessage(SCIP *scip, const char *formatstr,...)
SCIP_RETCODE SCIPgetBoolParam(SCIP *scip, const char *name, SCIP_Bool *value)
SCIP_RETCODE SCIPaddLongintParam(SCIP *scip, const char *name, const char *desc, SCIP_Longint *valueptr, SCIP_Bool isadvanced, SCIP_Longint defaultvalue, SCIP_Longint minvalue, SCIP_Longint maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
SCIP_Bool SCIPisParamFixed(SCIP *scip, const char *name)
SCIP_RETCODE SCIPaddIntParam(SCIP *scip, const char *name, const char *desc, int *valueptr, SCIP_Bool isadvanced, int defaultvalue, int minvalue, int maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
SCIP_RETCODE SCIPsetLongintParam(SCIP *scip, const char *name, SCIP_Longint value)
SCIP_RETCODE SCIPaddRealParam(SCIP *scip, const char *name, const char *desc, SCIP_Real *valueptr, SCIP_Bool isadvanced, SCIP_Real defaultvalue, SCIP_Real minvalue, SCIP_Real maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
SCIP_RETCODE SCIPsetIntParam(SCIP *scip, const char *name, int value)
SCIP_RETCODE SCIPsetSubscipsOff(SCIP *scip, SCIP_Bool quiet)
SCIP_RETCODE SCIPgetRealParam(SCIP *scip, const char *name, SCIP_Real *value)
SCIP_RETCODE SCIPsetPresolving(SCIP *scip, SCIP_PARAMSETTING paramsetting, SCIP_Bool quiet)
SCIP_RETCODE SCIPsetCharParam(SCIP *scip, const char *name, char value)
SCIP_RETCODE SCIPaddBoolParam(SCIP *scip, const char *name, const char *desc, SCIP_Bool *valueptr, SCIP_Bool isadvanced, SCIP_Bool defaultvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
SCIP_RETCODE SCIPgetIntParam(SCIP *scip, const char *name, int *value)
SCIP_RETCODE SCIPsetBoolParam(SCIP *scip, const char *name, SCIP_Bool value)
SCIP_RETCODE SCIPsetSeparating(SCIP *scip, SCIP_PARAMSETTING paramsetting, SCIP_Bool quiet)
SCIP_RETCODE SCIPgetCharParam(SCIP *scip, const char *name, char *value)
void GCGpricingcbSetExclusive(GCG_PRICINGCB *pricingcb, SCIP_Bool exclusive)
Definition: pricingcb.c:581
void GCGpricingcbSetEnabled(GCG_PRICINGCB *pricingcb, SCIP_Bool enabled)
Definition: pricingcb.c:570
SCIP_BRANCHRULE * SCIPfindBranchrule(SCIP *scip, const char *name)
SCIP_VAR * SCIPcolGetVar(SCIP_COL *col)
const char * SCIPconsGetName(SCIP_CONS *cons)
SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)
SCIP_RETCODE SCIPincludeEventhdlrBasic(SCIP *scip, SCIP_EVENTHDLR **eventhdlrptr, const char *name, const char *desc, SCIP_DECL_EVENTEXEC((*eventexec)), SCIP_EVENTHDLRDATA *eventhdlrdata)
const char * SCIPeventhdlrGetName(SCIP_EVENTHDLR *eventhdlr)
SCIP_EVENTTYPE SCIPeventGetType(SCIP_EVENT *event)
SCIP_RETCODE SCIPcatchEvent(SCIP *scip, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int *filterpos)
SCIP_RETCODE SCIPdropEvent(SCIP *scip, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int filterpos)
SCIP_HEURDATA * SCIPheurGetData(SCIP_HEUR *heur)
SCIP_Longint SCIPheurGetNSolsFound(SCIP_HEUR *heur)
SCIP_RETCODE SCIPincludeHeur(SCIP *scip, const char *name, const char *desc, char dispchar, int priority, int freq, int freqofs, int maxdepth, SCIP_HEURTIMING timingmask, SCIP_Bool usessubscip, SCIP_DECL_HEURCOPY((*heurcopy)), SCIP_DECL_HEURFREE((*heurfree)), SCIP_DECL_HEURINIT((*heurinit)), SCIP_DECL_HEUREXIT((*heurexit)), SCIP_DECL_HEURINITSOL((*heurinitsol)), SCIP_DECL_HEUREXITSOL((*heurexitsol)), SCIP_DECL_HEUREXEC((*heurexec)), SCIP_HEURDATA *heurdata)
SCIP_Longint SCIPheurGetNCalls(SCIP_HEUR *heur)
SCIP_HEUR * SCIPfindHeur(SCIP *scip, const char *name)
int SCIPheurGetMaxdepth(SCIP_HEUR *heur)
void SCIPheurSetData(SCIP_HEUR *heur, SCIP_HEURDATA *heurdata)
SCIP_Bool SCIPhasCurrentNodeLP(SCIP *scip)
SCIP_RETCODE SCIPgetLPRowsData(SCIP *scip, SCIP_ROW ***rows, int *nrows)
SCIP_Real SCIPgetLPObjval(SCIP *scip)
#define SCIPfreeBlockMemoryArray(scip, ptr, num)
SCIP_Longint SCIPgetMemUsed(SCIP *scip)
BMS_BLKMEM * SCIPblkmem(SCIP *scip)
#define SCIPallocClearBufferArray(scip, ptr, num)
int SCIPcalcMemGrowSize(SCIP *scip, int num)
#define SCIPallocBufferArray(scip, ptr, num)
#define SCIPallocMemory(scip, ptr)
#define SCIPfreeBufferArray(scip, ptr)
#define SCIPfreeMemory(scip, ptr)
#define SCIPallocBlockMemoryArray(scip, ptr, num)
#define SCIPreallocBlockMemoryArray(scip, ptr, oldnum, newnum)
SCIP_NODESEL * SCIPfindNodesel(SCIP *scip, const char *name)
SCIP_PRICER * SCIPfindPricer(SCIP *scip, const char *name)
int SCIPpricerGetNCalls(SCIP_PRICER *pricer)
SCIP_Real SCIProwGetLhs(SCIP_ROW *row)
int SCIProwGetNNonz(SCIP_ROW *row)
SCIP_COL ** SCIProwGetCols(SCIP_ROW *row)
SCIP_Real SCIProwGetRhs(SCIP_ROW *row)
SCIP_Bool SCIProwIsLocal(SCIP_ROW *row)
const char * SCIProwGetName(SCIP_ROW *row)
SCIP_Real SCIProwGetConstant(SCIP_ROW *row)
SCIP_Real * SCIProwGetVals(SCIP_ROW *row)
SCIP_SOL * SCIPgetBestSol(SCIP *scip)
SCIP_RETCODE SCIPcreateSol(SCIP *scip, SCIP_SOL **sol, SCIP_HEUR *heur)
SCIP_RETCODE SCIPcreateSolCopy(SCIP *scip, SCIP_SOL **sol, SCIP_SOL *sourcesol)
SCIP_RETCODE SCIPfreeSol(SCIP *scip, SCIP_SOL **sol)
SCIP_RETCODE SCIPprintSol(SCIP *scip, SCIP_SOL *sol, FILE *file, SCIP_Bool printzeros)
int SCIPgetNSols(SCIP *scip)
SCIP_RETCODE SCIPunlinkSol(SCIP *scip, SCIP_SOL *sol)
SCIP_RETCODE SCIPgetSolVals(SCIP *scip, SCIP_SOL *sol, int nvars, SCIP_VAR **vars, SCIP_Real *vals)
SCIP_RETCODE SCIPsetSolVals(SCIP *scip, SCIP_SOL *sol, int nvars, SCIP_VAR **vars, SCIP_Real *vals)
SCIP_SOL ** SCIPgetSols(SCIP *scip)
SCIP_RETCODE SCIPtrySolFree(SCIP *scip, SCIP_SOL **sol, SCIP_Bool printreason, SCIP_Bool completely, SCIP_Bool checkbounds, SCIP_Bool checkintegrality, SCIP_Bool checklprows, SCIP_Bool *stored)
SCIP_RETCODE SCIPsetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var, SCIP_Real val)
SCIP_Real SCIPgetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var)
SCIP_RETCODE SCIPpresolve(SCIP *scip)
SCIP_RETCODE SCIPinterruptSolve(SCIP *scip)
SCIP_RETCODE SCIPsolve(SCIP *scip)
SCIP_Real SCIPgetPrimalbound(SCIP *scip)
SCIP_Real SCIPgetUpperbound(SCIP *scip)
SCIP_Real SCIPgetGap(SCIP *scip)
SCIP_Longint SCIPgetNNodes(SCIP *scip)
SCIP_Real SCIPgetDualbound(SCIP *scip)
SCIP_RETCODE SCIPprintStatistics(SCIP *scip, FILE *file)
SCIP_Real SCIPgetLowerbound(SCIP *scip)
SCIP_Longint SCIPgetNLPs(SCIP *scip)
SCIP_Real SCIPgetSolvingTime(SCIP *scip)
SCIP_Bool SCIPisFeasGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPinfinity(SCIP *scip)
SCIP_Bool SCIPisGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisFeasEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisFeasZero(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisSumGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisZero(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPsumepsilon(SCIP *scip)
SCIP_Bool SCIPisLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisSumGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
int SCIPgetDepth(SCIP *scip)
SCIP_NODE * SCIPgetCurrentNode(SCIP *scip)
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
int SCIPvarGetProbindex(SCIP_VAR *var)
const char * SCIPvarGetName(SCIP_VAR *var)
SCIP_RETCODE SCIPchgVarLbGlobal(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
SCIP_RETCODE SCIPchgVarUbGlobal(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
void SCIPfreeRandom(SCIP *scip, SCIP_RANDNUMGEN **randnumgen)
SCIP_RETCODE SCIPcreateRandom(SCIP *scip, SCIP_RANDNUMGEN **randnumgen, unsigned int initialseed, SCIP_Bool useglobalseed)
int SCIPrandomGetInt(SCIP_RANDNUMGEN *randnumgen, int minrandval, int maxrandval)
int SCIPsnprintf(char *t, int len, const char *s,...)
static SCIP_RETCODE destroyAndRepairSolution(GCG *gcg, SCIP_HEURDATA *heurdata, SCIP_SOL *partialsol, int npricingprobs, SCIP_Bool *terminate)
Definition: heur_ipcolgen.c:920
static SCIP_RETCODE adjustDynamicPenalties(GCG *gcg, SCIP_HEURDATA *heurdata)
Definition: heur_ipcolgen.c:568
static SCIP_RETCODE setupRepairProblem(SCIP *scip, SCIP *repairprob, SCIP_VAR **repairprobvars, SCIP_SOL *sol, SCIP_Bool uselprows, SCIP_Bool rinsfixing)
Definition: heur_ipcolgen.c:1067
static SCIP_RETCODE createStartSolution(GCG *gcg, SCIP_SOL *startsol, SCIP_Bool *success)
Definition: heur_ipcolgen.c:209
SCIP_RETCODE SCIPincludeHeurIPcolgen(GCG *gcg)
Definition: heur_ipcolgen.c:1899
static SCIP_RETCODE computeDynamicPenalties(GCG *gcg, SCIP_SOL *sol, SCIP_Real initdynamicpen, SCIP_Real **penalties, int **penaltiesids, IPC_PENALTYTYPE **penaltytypes, int *npenalties, int *penaltiessize, SCIP_Bool repairsol)
Definition: heur_ipcolgen.c:437
static GCG_DECL_PRICINGCBPOSTPRICING(pricingcbPostpricingIpcolgen)
Definition: heur_ipcolgen.c:780
static SCIP_RETCODE solveRepairProblem(GCG *gcg, SCIP *repairprob, SCIP_HEUR *heur, SCIP_HEURDATA *heurdata, SCIP_VAR **repairprobvars, SCIP_Longint nnodes, SCIP_RESULT *result)
Definition: heur_ipcolgen.c:1232
static SCIP_RETCODE performWeightedPricing(GCG *gcg, SCIP_HEURDATA *heurdata, int nblocks)
Definition: heur_ipcolgen.c:829
static GCG_DECL_PRICINGCBPREPRICING(pricingcbPrepricingIpcolgen)
Definition: heur_ipcolgen.c:717
static SCIP_RETCODE executeHeuristic(GCG *gcg, SCIP_HEURDATA *heurdata, SCIP_Bool *execute)
Definition: heur_ipcolgen.c:1399
static SCIP_HEURCONSTYPE getConstraintType(SCIP *scip, SCIP_CONS *cons)
Definition: heur_ipcolgen.c:390
static SCIP_RETCODE createPartialSolution(SCIP *scip, SCIP_SOL *partialsol, SCIP_RANDNUMGEN *randnumgen, SCIP_Real minfixingrate, int nblocks, int *nfixedvars, SCIP_Bool *success)
Definition: heur_ipcolgen.c:280
static SCIP_RETCODE createNewSol(GCG *gcg, SCIP *repairprob, SCIP_VAR **repairprobvars, SCIP_HEUR *heur, SCIP_SOL *repairprobsol, SCIP_Bool *success)
Definition: heur_ipcolgen.c:1172
static SCIP_RETCODE addPenalty(SCIP *scip, SCIP_Real addpenalty, int addpenaltyid, IPC_PENALTYTYPE addpenaltytype, SCIP_Real **penalties, int **penaltiesids, IPC_PENALTYTYPE **penaltytypes, int *npenalties, int *penaltiessize)
Definition: heur_ipcolgen.c:352
static SCIP_RETCODE createRepairProblem(SCIP *scip, SCIP **repairprob, SCIP_HEURDATA *heurdata, SCIP_VAR **repairprobvars)
Definition: heur_ipcolgen.c:998
LNS heuristic that generates columns that are more likely to be in integer feasible solutions.
#define NULL
Definition: class_conspartition.cpp:44
GCG variable pricer.
#define SCIPerrorMessage
#define SCIPdebug(x)
#define SCIPdebugMessage
SCIP_RETCODE GCGrelaxStartProbing(GCG *gcg, SCIP_HEUR *probingheur)
Definition: relax_gcg.c:4390
SCIP_RETCODE GCGrelaxPerformProbingWithPricing(GCG *gcg, int maxpricerounds, SCIP_Longint *nlpiterations, int *npricerounds, SCIP_Real *lpobjvalue, SCIP_Bool *lpsolved, SCIP_Bool *lperror, SCIP_Bool *cutoff)
Definition: relax_gcg.c:4775
various SCIP helper methods
SCIP_RETCODE SCIPincludeDefaultPlugins(SCIP *scip)
Definition: struct_gcg.h:55
Definition: heur_gcgdins.c:77
struct SCIP_EventData SCIP_EVENTDATA
#define SCIP_EVENTTYPE_LPSOLVED
SCIP_VERBLEVEL_NONE
SCIP_VERBLEVEL_FULL
SCIP_PARAMSETTING_OFF
SCIP_PARAMSETTING_FAST
SCIP_DIDNOTRUN
SCIP_DELAYED
SCIP_DIDNOTFIND
SCIP_FOUNDSOL
SCIP_SUCCESS
enum SCIP_Result SCIP_RESULT
SCIP_PLUGINNOTFOUND
SCIP_OKAY
enum SCIP_Retcode SCIP_RETCODE