Loading...
Searching...
No Matches
relax_gcg.c
Go to the documentation of this file.
44/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
96#define DEFAULT_MODE GCG_DECMODE_DANTZIGWOLFE /**< the decomposition mode that GCG will use. (0: Dantzig-Wolfe (default),
120 int* blockrepresentative;/**< number of the pricing problem, that represents the i-th problem */
125 int nvarlinkconss; /**< number of constraints that ensure that copies of linking variables have the same value */
126 SCIP_Real pricingprobsmemused; /**< sum of memory used after problem creation stage of all pricing problems */
130 SCIP_CONS** origmasterconss; /**< array of constraints in the original problem that belong to the
140 SCIP_Bool origsolfeasible; /**< is the current lp solution primal feasible in the original space? */
141 SCIP_Longint lastmasterlpiters; /**< number of lp iterations when currentorigsol was updated the last time */
142 SCIP_Longint lastmasternode; /**< number of current node when currentorigsol was updated the last time */
143 SCIP_SOL* lastmastersol; /**< last feasible master solution that was added to the original problem */
145 int nmarkedmasterconss; /**< number of elements in array of conss that are marked to be in the master */
147 SCIP_Longint lastsolvednodenr; /**< node number of the node that was solved at the last call of the relaxator */
152 GCG_BRANCHRULE** activebranchrules; /**< branching rules that created extended master conss (cache) */
153 GCG_BRANCHDATA** activebranchdata; /**< data represeting the branching decisions of the active nodes (cache) */
154 GCG_EXTENDEDMASTERCONSDATA** activebranchextendedmasterconss; /**< array of extended master conss that are active in the current node (cache) */
155 int nactivebranchextendedmasterconss; /**< number of extended master conss that are active in the current node */
159 SCIP_Bool discretization; /**< TRUE: use discretization approach; FALSE: use convexification approach */
160 SCIP_Bool mipdiscretization; /**< TRUE: use discretization approach in MIPs; FALSE: use convexification approach in MIPs*/
161 SCIP_Bool aggregation; /**< should identical blocks be aggregated (only for discretization approach)? */
165 GCG_DECMODE mode; /**< the decomposition mode for GCG. 0: Dantzig-Wolfe (default), 1: Benders' decomposition, 2: automatic */
167 SCIP_Bool usesymmetrylib; /**< should symmetry detection lib be used to check for identical blocks? */
170 int aggregationnconsslimit; /**< if this limit on the number of constraints of a block is exceeded the aggregation information for this block is not calculated */
171 int aggregationnvarslimit; /**< if this limit on the number of variables of a block is exceeded the aggregation information for this block is not calculated */
241 SCIP_CALL( SCIPallocBlockMemoryArray(origprob, &(relaxdata->activebranchextendedmasterconss), 1) );
245 if( relaxdata->nactivebranchextendedmasterconss == relaxdata->maxactivebranchextendedmasterconss )
249 SCIP_CALL( SCIPreallocBlockMemoryArray(origprob, &(relaxdata->activebranchrules), relaxdata->maxactivebranchextendedmasterconss, newsize) );
250 SCIP_CALL( SCIPreallocBlockMemoryArray(origprob, &(relaxdata->activebranchdata), relaxdata->maxactivebranchextendedmasterconss, newsize) );
251 SCIP_CALL( SCIPreallocBlockMemoryArray(origprob, &(relaxdata->activebranchextendedmasterconss), relaxdata->maxactivebranchextendedmasterconss, newsize) );
254 assert(relaxdata->nactivebranchextendedmasterconss < relaxdata->maxactivebranchextendedmasterconss);
261 relaxdata->activebranchextendedmasterconss[relaxdata->nactivebranchextendedmasterconss] = extendedmasterconsdata;
307 assert(newblock >= 0 || (GCGgetDecompositionMode(relaxdata->gcg) == GCG_DECMODE_BENDERS && newblock == -2));
309 assert(SCIPvarIsOriginal(var) || SCIPvarGetStatus(var) == SCIP_VARSTATUS_LOOSE || SCIPvarGetStatus(var) == SCIP_VARSTATUS_COLUMN);
328 SCIP_CALL( GCGoriginalVarAddBlock(gcg, var, newblock, relaxdata->npricingprobs, relaxdata->mode) );
360 SCIP_CALL( SCIPallocBlockMemoryArray(scip, &(relaxdata->markedmasterconss), relaxdata->maxmarkedmasterconss) );
379/** converts the structure to the GCG format by setting the appropriate blocks and master constraints */
435 SCIPdebugMessage("Copying structure with %d blocks, %d linking vars and %d linking constraints.\n", nblocks, nlinkingvars, nlinkingconss);
441 /* SCIPdebugMessage("\tProcessing linking constraint %s.\n", SCIPconsGetName(linkingconss[i])); */
461 /* SCIPdebugMessage("\tProcessing block %d (%d conss, %d vars).\n", i, nsubscipconss[i], nsubscipvars[i]); */
478 SCIPdebugMessage("\t\tOriginal var %s (%p) in block %d\n", SCIPvarGetName(subscipvars[i][j]), (void*) subscipvars[i][j], i);
486 SCIPdebugMessage("\t\tTransformed var %s (%p) in block %d\n", SCIPvarGetName(relevantvar), (void*) relevantvar, i);
499 SCIPdebugMessage("\tDetecting constraint blocks of linking var %s\n", SCIPvarGetName(linkingvars[i]));
541 /* if the linking variable is only in one block, then it would not have been flagged as a linking variable. In
573 SCIP_CALL( SCIPreallocBlockMemoryArray(scip, &(relaxdata->masterconss), relaxdata->maxmasterconss, newsize) );
574 SCIP_CALL( SCIPreallocBlockMemoryArray(scip, &(relaxdata->origmasterconss), relaxdata->maxmasterconss, newsize) );
596 SCIP_CALL( SCIPallocMemoryArray(GCGgetOrigprob(gcg), &(relaxdata->branchrules), 1) ); /*lint !e506*/
600 SCIP_CALL( SCIPreallocMemoryArray(GCGgetOrigprob(gcg), &(relaxdata->branchrules), (size_t)relaxdata->nbranchrules+1) );
619 SCIP_CALL( SCIPallocMemoryArray(GCGgetOrigprob(gcg), &(relaxdata->separators), 1) ); /*lint !e506*/
623 SCIP_CALL( SCIPreallocMemoryArray(GCGgetOrigprob(gcg), &(relaxdata->separators), (size_t)relaxdata->nseparators+1) );
722 SCIPverbMessage(scip, SCIP_VERBLEVEL_NORMAL, NULL, "Master problem is a set covering problem.\n");
727 SCIPverbMessage(scip, SCIP_VERBLEVEL_NORMAL, NULL, "Master problem is a set partitioning problem.\n");
771 assert( SCIPgetNConss(scip) == GCGconshdlrDecompGetNFormerDetectionConssForID(gcg, GCGdecompGetPartialdecID(relaxdata->decomp)) );
772 SCIPdebugMessage( "nconss: %d; ndetectionconss: %d -> using partialdec information for identity test \n", SCIPgetNConss(scip), GCGconshdlrDecompGetNFormerDetectionConssForID(gcg, GCGdecompGetPartialdecID(relaxdata->decomp) ) );
774 GCGconshdlrDecompGetPartialdecFromID(gcg, GCGdecompGetPartialdecID(relaxdata->decomp), &partialdec);
818 SCIPdebugMessage("Var <%s> is mapped to <%s> (<%s>).\n", SCIPvarGetName(origvar), SCIPvarGetName(repvar),
849 SCIPverbMessage(scip, SCIP_VERBLEVEL_NORMAL, NULL, "Matrix has %d blocks, using %d%s pricing problem%s.\n",
850 relaxdata->npricingprobs, nrelevant, (relaxdata->npricingprobs == nrelevant ? "" : " aggregated"), (nrelevant == 1 ? "" : "s"));
869 SCIP_Real infinity, /**< values larger than this are considered infinity in the pricing problem */
870 SCIP_Real epsilon, /**< absolute values smaller than this are considered zero in the pricing problem */
871 SCIP_Real sumepsilon, /**< absolute values of sums smaller than this are considered zero in the pricing problem */
873 SCIP_Real lpfeastolfactor, /**< primal feasibility tolerance factor of LP solver in the pricing problem */
874 SCIP_Real dualfeastol, /**< feasibility tolerance for reduced costs in LP solution in the pricing problem */
961/** creates a variable in a pricing problem corresponding to the given original variable (belonging to exactly one block) */
977 SCIP_CALL( GCGoriginalVarCreatePricingVar(relaxdata->pricingprobs[pricingprobnr], origvar, &var) );
1061 SCIP_CALL( SCIPreallocBlockMemoryArray(scip, &relaxdata->varlinkconss, relaxdata->nvarlinkconss, (size_t)relaxdata->nvarlinkconss+1) );
1062 SCIP_CALL( SCIPreallocBlockMemoryArray(scip, &relaxdata->varlinkconsblock, relaxdata->nvarlinkconss, (size_t)relaxdata->nvarlinkconss+1) );
1110 SCIP_HASHMAP** hashorig2pricingvar /**< hashmap mapping original variables to pricing variables */
1150 tempblock = (int) (size_t) SCIPhashmapGetImage(GCGdecompGetVartoblock(relaxdata->decomp), probvar)-1; /*lint !e507*/
1157 SCIPverbMessage(scip, SCIP_VERBLEVEL_HIGH, NULL, " changed block number to %d \n", tempblock );
1163 SCIPdebugMessage("Creating map for (%p, %p) var %s:", (void*)(vars[v]), (void*)(probvar), SCIPvarGetName(probvar));
1185 assert(GCGvarIsPricing((SCIP_VAR*) SCIPhashmapGetImage(hashorig2pricingvar[blocknr], probvar)));
1264 SCIPverbMessage(scip, SCIP_VERBLEVEL_NORMAL, NULL, "pricing problem %d: %d conss, %d vars (%d bins, %d ints, %d impls and %d cont)\n", i,
1293 SCIP_CALL( SCIPallocBlockMemoryArray(scip, &(relaxdata->masterconss), relaxdata->maxmasterconss) );
1294 SCIP_CALL( SCIPallocBlockMemoryArray(scip, &(relaxdata->origmasterconss), relaxdata->maxmasterconss) );
1299 SCIP_CALL( SCIPreallocBlockMemoryArray(scip, &(relaxdata->pricingprobs), relaxdata->maxpricingprobs, relaxdata->npricingprobs) );
1300 SCIP_CALL( SCIPreallocBlockMemoryArray(scip, &(relaxdata->blockrepresentative), relaxdata->maxpricingprobs, relaxdata->npricingprobs) );
1301 SCIP_CALL( SCIPreallocBlockMemoryArray(scip, &(relaxdata->nblocksidentical), relaxdata->maxpricingprobs, relaxdata->npricingprobs) );
1304 SCIP_CALL( SCIPreallocBlockMemoryArray(scip, &(relaxdata->convconss), relaxdata->maxpricingprobs, relaxdata->npricingprobs) );
1324 SCIP_Real infinity, /**< values larger than this are considered infinity in the master problem */
1325 SCIP_Real epsilon, /**< absolute values smaller than this are considered zero in the master problem */
1326 SCIP_Real sumepsilon, /**< absolute values of sums smaller than this are considered zero in the master problem */
1328 SCIP_Real lpfeastolfactor, /**< primal feasibility tolerance factor of LP solver in the master problem */
1329 SCIP_Real dualfeastol, /**< feasibility tolerance for reduced costs in LP solution in the master problem */
1350 /* disable aggregation and multiaggregation of variables, as this might lead to issues with copied original variables */
1357 /* the following settings are for decomposition, so if the original problem is solved directly, then these settings
1371 /* for Benders' decomposition, some additional parameter settings are required for the master problem. */
1405 SCIP_Real infinity, /**< values larger than this are considered infinity in the pricing problem */
1406 SCIP_Real epsilon, /**< absolute values smaller than this are considered zero in the pricing problem */
1407 SCIP_Real sumepsilon, /**< absolute values of sums smaller than this are considered zero in the pricing problem */
1409 SCIP_Real lpfeastolfactor, /**< primal feasibility tolerance factor of LP solver in the pricing problem */
1410 SCIP_Real dualfeastol, /**< feasibility tolerance for reduced costs in LP solution in the pricing problem */
1422 SCIP_CALL( GCGsetPricingProblemParameters(GCGdecompGetType(relaxdata->decomp), *pricingscip, clocktype, infinity, epsilon, sumepsilon, feastol, lpfeastolfactor, dualfeastol, enableppcuts) );
1527 /* in the Benders' decomposition mode, all variables from the linking constraints need to be added to the master
1528 * problem. Additionally, if the original problem is solved directly, then we must ensure that all variables are
1531 if( GCGgetDecompositionMode(gcg) == GCG_DECMODE_BENDERS || GCGgetDecompositionMode(gcg) == GCG_DECMODE_ORIGINAL )
1547 /* if the variable is a linking variable or is directly transferred to the master problem, then it is not
1548 * added to the constraint. This is because the linking variables and the transferred variables are added
1551 while( i < nconsvars && (GCGoriginalVarIsLinking(consvars[i]) || GCGoriginalVarIsTransVar(consvars[i])) )
1566 /* if the original has already has a copy in the master problem, then this is used. Otherwise, the master
1597 SCIP_CALL( SCIPcreateConsLinear(GCGgetMasterprob(relaxdata->gcg), &mastercons, name, nconsvars, consvars, consvals,
1611 if( GCGgetDecompositionMode(gcg) == GCG_DECMODE_BENDERS || GCGgetDecompositionMode(gcg) == GCG_DECMODE_ORIGINAL )
1629 SCIP_CALL( saveOriginalVarMastercoeffs(gcg, SCIPgetVars(scip), SCIPgetNVars(scip), relaxdata->nmasterconss, relaxdata->origmasterconss, relaxdata->masterconss) );
1639 SCIP_HASHMAP** hashorig2pricingvar /**< hashmap mapping original to corresponding pricing variables */
1661 SCIP_CALL( SCIPhashmapCreate(&hashorig2pricingconstmp, SCIPblkmem(scip), SCIPgetNConss(scip)) ); /*lint !e613*/
1668 SCIPdebugMessage("copying %s to pricing problem %d\n", SCIPconsGetName(subscipconss[b][c]), b);
1679 SCIP_CALL( SCIPgetConsCopy(scip, relaxdata->pricingprobs[b], subscipconss[b][c], &newcons, SCIPconsGetHdlr(subscipconss[b][c]),
1705 if( SCIPisFeasEQ( scip, SCIPvarGetLbGlobal(curvars[i]), SCIPvarGetUbGlobal(curvars[i]) ) && SCIPisFeasEQ( scip, SCIPvarGetUbGlobal(curvars[i]), 0. ) )
1708 assert(GCGvarIsPricing(curvars[i]) || ( SCIPvarIsNegated(curvars[i]) && GCGvarIsPricing(SCIPvarGetNegatedVar(curvars[i]) ) ) );
1766 SCIP_CALL( SCIPsetIntParam(gcg->bendersmasterprob, "display/verblevel", (int)SCIP_VERBLEVEL_NONE) );
1768 SCIPsetMessagehdlrQuiet(gcg->bendersmasterprob, SCIPmessagehdlrIsQuiet(SCIPgetMessagehdlr(origprob)) );
1776 /* setting the total node limit to 1 for the original SCIP instance. This is because Benders' decomposition solves
1777 * the MIP within the relaxator of the root node. So no branching in the original problem is required.
1785 SCIP_CALL( SCIPsetIntParam(GCGgetMasterprob(relaxdata->gcg), "constraints/components/maxprerounds", 0) );
1803 /* get clocktype of the original SCIP instance in order to use the same clocktype in master and pricing problems */
1806 /* get numerical tolerances of the original SCIP instance in order to use the same numerical tolerances in master and pricing problems */
1826 SCIP_CALL( createPricingProblem(relaxdata, &(relaxdata->pricingprobs[i]), name, clocktype, infinity, epsilon, sumepsilon,
1828 SCIP_CALL( SCIPhashmapCreate(&(hashorig2pricingvar[i]), SCIPblkmem(origprob), SCIPgetNVars(origprob)) ); /*lint !e613*/
1831 SCIP_CALL( SCIPsetCharParam(relaxdata->pricingprobs[i], "estimation/restarts/restartpolicy", 'n') );
1837 * If the master problem is solved directly, then we can still call methods creating the pricing problems. These
1838 * methods check the number of pricing problems and number of blocks. As such, if the original problem is solved
1861 SCIP_CALL( SCIPcreateConsLinear(GCGgetMasterprob(relaxdata->gcg), &(relaxdata->convconss[i]), name, 0, NULL, NULL,
1871 SCIP_CALL( displayPricingStatistics(gcg, relaxdata->pricingprobs, relaxdata->npricingprobs, relaxdata->blockrepresentative) );
1872 SCIP_CALL( SCIPwriteOrigProblem(GCGgetMasterprob(relaxdata->gcg), "masterprob.lp", "lp", FALSE) );
1944 SCIP_CALL( SCIPincSolVal(scip, *newsol, vars[v], SCIPgetSolVal(probs[block], SCIPgetBestSol(probs[block]), pricingvar)) );
1971 /* if the Benders' decomposition is used, then the transformed problem of the subproblems must be freed.
1972 * This is because the within the create subproblem stage, if the subproblem is an LP, then the SCIP instance is put
1979 /* if the problem is not in SCIP_STAGE_PROBLEM, then the transformed problem must be freed. The subproblem
2067 blocktimelimit = (timelimit - SCIPgetSolvingTime(scip)) * 1.02 + SCIPgetSolvingTime(blockprob);
2097 if( GCGgetDecompositionMode(gcg) == GCG_DECMODE_DANTZIGWOLFE || GCGgetDecompositionMode(gcg) == GCG_DECMODE_ORIGINAL )
2108 SCIP_CALL( GCGsolverKnapsackSolveKnapsack(TRUE, blockprob, &solval, &status, &solvars, &solvals, &nsolvars) );
2155 /* since the diagonal blocks are being solved, this indicates that the subproblems are independent. As such, we
2162 SCIP_CALL( SCIPsolveBendersSubproblem(GCGgetMasterprob(gcg), benders, NULL, blocknum, &infeasible,
2210 if( GCGgetDecompositionMode(gcg) == GCG_DECMODE_DANTZIGWOLFE || GCGgetDecompositionMode(gcg) == GCG_DECMODE_ORIGINAL )
2261 SCIPverbMessage(scip, SCIP_VERBLEVEL_NORMAL, NULL, "Block diagonal structure detected, solving blocks individually.\n");
2262 SCIPverbMessage(scip, SCIP_VERBLEVEL_NORMAL, NULL, "There is an objective function offset of %f.\n", SCIPgetTransObjoffset(scip));
2265 /* if the original problem is solved directly, then we call solveBlockProblem with the master problem */
2268 SCIP_CALL( solveBlockProblem(gcg, GCGgetMasterprob(gcg), relaxdata, timelimit, -1, &solveresult, &objvalue) );
2281 SCIP_CALL( solveBlockProblem(gcg, relaxdata->pricingprobs[i], relaxdata, timelimit, i, &solveresult, &objvalue) );
2295 SCIP_CALL( GCGtransformMastersolToOrigsol(gcg, SCIPgetBestSol(GCGgetMasterprob(gcg)), &newsol, TRUE, NULL) );
2299 SCIP_CALL( combineSolutions(gcg, &newsol, relaxdata->pricingprobs, relaxdata->npricingprobs) );
2302 /* update lower bound pointer and add solution such that this node will be cut off automatically */
2401 SCIP_CALL( SCIPduplicateBufferArray(scip, &oldconss, relaxdata->masterconss, relaxdata->nmasterconss) );
2419 SCIP_CALL( SCIPtransformCons(masterprob, relaxdata->convconss[i], &(relaxdata->convconss[i])) );
2483 /* when the original problem should be solved directly, then a decomposition must be made with zero blocks */
2510 SCIPwarningMessage(scip, "No complete decomposition available. Creating basic decomposition.\n");
2520 SCIPverbMessage(scip, SCIP_VERBLEVEL_HIGH, NULL, "Chosen structure has %d blocks", GCGdecompGetNBlocks(relaxdata->decomp));
2521 /* every master-only variable internally also counts as linking, but should not be reported as linking variable */
2522 if ( GCGdecompGetNLinkingvars(relaxdata->decomp) - GCGdecompGetNMastervars(relaxdata->decomp) > 0)
2524 SCIPverbMessage(scip, SCIP_VERBLEVEL_HIGH, NULL, ", %d linking variables", GCGdecompGetNLinkingvars(relaxdata->decomp) - GCGdecompGetNMastervars(relaxdata->decomp));
2529 SCIPverbMessage(scip, SCIP_VERBLEVEL_HIGH, NULL, ", %d master-only (static) variables", GCGdecompGetNMastervars(relaxdata->decomp));
2536 SCIPverbMessage(scip, SCIP_VERBLEVEL_HIGH, NULL, " and %d linking constraints.\n", GCGdecompGetNLinkingconss(relaxdata->decomp));
2537 SCIPverbMessage(scip, SCIP_VERBLEVEL_HIGH, NULL, "This decomposition has a maxwhite score of %f.\n", GCGdecompGetMaxwhiteScore(relaxdata->decomp));
2555 SCIPverbMessage(scip, SCIP_VERBLEVEL_NORMAL, NULL, "Warning: Discretization with continuous variables is only an experimental feature.\n");
2560 SCIPverbMessage(scip, SCIP_VERBLEVEL_NORMAL, NULL, "Warning: Discretization with continuous variables is disabled by parameter relaxing/gcg/mipdiscretization.\n");
2567 if( relaxdata->mode == GCG_DECMODE_DANTZIGWOLFE && SCIPgetVerbLevel(scip) >= SCIP_VERBLEVEL_NORMAL )
2575 SCIPverbMessage(scip, SCIP_VERBLEVEL_NORMAL, NULL, "Using up to %d (of %d) thread(s) to solve the pricing problems.\n", nthreads, ompmaxthreads);
2582 SCIP_CALL( SCIPactivateBenders(GCGgetMasterprob(gcg), SCIPfindBenders(GCGgetMasterprob(gcg), "gcg"),
2591 SCIP_CALL( SCIPsetObjlimit(GCGgetMasterprob(relaxdata->gcg), (int) SCIPgetObjsense(scip) * SCIPgetObjlimit(scip)) );
2790 SCIPfreeBlockMemoryArrayNull(scip, &(relaxdata->blockrepresentative), relaxdata->maxpricingprobs);
2791 SCIPfreeBlockMemoryArrayNull(scip, &(relaxdata->nblocksidentical), relaxdata->maxpricingprobs);
2870/** initialize the relaxator and master problem for solving the original problem by Dantzig-Wolfe reformulation and
2908/** solving process initialization method of relaxator (called when branch and bound process is about to begin) */
2945 /* alternative verbosity levels are used for the Benders' decomposition and original mode compared to the Dantzig-Wolfe
2948 if( GCGgetDecompositionMode(relaxdata->gcg) == GCG_DECMODE_BENDERS || GCGgetDecompositionMode(relaxdata->gcg) == GCG_DECMODE_ORIGINAL )
2950 /* first getting the verbosity level for the original problem before setting it to none. While the verbosity level
2960 /* setting the total node limit to 1 for the original SCIP instance. This is because Benders' decomposition solves
2961 * the MIP within the relaxator of the root node. So no branching in the original problem is required.
2966 /* fixing the GCG mode parameter. This ensure that the user does not change this during the solution process. If the
2971 /* Informing the user of the decomposition technique that is being used to solve the original problem */
2975 SCIPverbMessage(scip, SCIP_VERBLEVEL_MINIMAL, NULL, "A Dantzig-Wolfe reformulation is applied to solve the original problem.\n");
2979 SCIPverbMessage(scip, SCIP_VERBLEVEL_MINIMAL, NULL, "A Benders' decomposition is applied to solve the original problem.\n");
2983 SCIPverbMessage(scip, SCIP_VERBLEVEL_MINIMAL, NULL, "No reformulation will be performed. Solving the original model.\n");
2993/** solving process deinitialization method of relaxator (called before branch and bound process data is freed) */
3006 SCIPfreeBlockMemoryArrayNull(scip, &(relaxdata->markedmasterconss), relaxdata->maxmarkedmasterconss);
3064 SCIPfreeBlockMemoryArrayNull(scip, &(relaxdata->activebranchrules), relaxdata->maxactivebranchextendedmasterconss);
3065 SCIPfreeBlockMemoryArrayNull(scip, &(relaxdata->activebranchdata), relaxdata->maxactivebranchextendedmasterconss);
3066 SCIPfreeBlockMemoryArrayNull(scip, &(relaxdata->activebranchextendedmasterconss), relaxdata->maxactivebranchextendedmasterconss);
3098 mastertimelimit = (origtimelimit - SCIPgetSolvingTime(scip)) + 0.5 + SCIPgetSolvingTime(masterprob);
3114/** method to solve the master problem that is used by Dantzig-Wolfe and Benders' decomposition */
3157 /* if we have a blockdetection, see whether the node is block diagonal. Additionally, the solveDiagonalBlocks can
3160 if( GCGdecompGetType(relaxdata->decomp) == GCG_DECTYPE_DIAGONAL || relaxdata->mode == GCG_DECMODE_ORIGINAL )
3182 SCIPverbMessage(scip, SCIP_VERBLEVEL_HIGH, NULL, "time for master problem was too short, extending time.\n");
3188 if( SCIPgetCurrentNode(masterprob) == NULL || !GCGmasterIsCurrentSolValid(gcg) || !SCIPisGT(scip, SCIPgetLocalDualbound(masterprob), SCIPgetLocalLowerbound(scip)) )
3208 assert(SCIPgetStatus(masterprob) == SCIP_STATUS_TIMELIMIT || SCIPgetBestSol(masterprob) != NULL || SCIPgetStatus(masterprob) == SCIP_STATUS_INFEASIBLE || SCIPgetStatus(masterprob) == SCIP_STATUS_UNKNOWN);
3214 else if( SCIPgetStatus(masterprob) == SCIP_STATUS_INFEASIBLE || SCIPgetStatus(masterprob) == SCIP_STATUS_TIMELIMIT || !GCGmasterIsCurrentSolValid(gcg) )
3283 SCIPdebugMessage("Solving node %"SCIP_LONGINT_FORMAT"'s relaxation.\n", SCIPnodeGetNumber(SCIPgetCurrentNode(scip)));
3307 SCIP_CALL( SCIPtrySol(scip, relaxdata->currentorigsol, FALSE, FALSE, TRUE, TRUE, TRUE, &stored) );
3310 /* if a new primal solution was found in the master problem, transfer it to the original problem */
3311 if( SCIPgetBestSol(GCGgetMasterprob(gcg)) != NULL && relaxdata->lastmastersol != SCIPgetBestSol(GCGgetMasterprob(gcg)) && GCGmasterIsCurrentSolValid(gcg) )
3317 SCIP_CALL( GCGtransformMastersolToOrigsol(gcg, relaxdata->lastmastersol, &newsol, TRUE, NULL) );
3330 /** @bug The solution doesn't have to be accepted, numerics might bite us, so the transformation might fail.
3351 SCIPdebugMessage(" root node time clock stopped at %6.2fs.\n", SCIPgetClockTime(scip, relaxdata->rootnodetime));
3366/** method to solve the master problem for Benders' decomposition and when solving the original problem directly. */
3395 SCIPdebugMessage("Solving node %"SCIP_LONGINT_FORMAT"'s relaxation.\n", SCIPnodeGetNumber(SCIPgetCurrentNode(scip)));
3397 /* prior to performing the decomposition the original problem verbosity is changed to NONE. This avoids output from
3398 * the original problem before the decomposition output. Once the decomposition has been performed, then the
3405 /* getting the node limit from the original problem. This is because the master problem is solved to optimality in
3413 /* if the master problem has been detected as infeasible, then the result must be set to SCIP_CUTOFF. */
3417 /* if the master problem has been solved to optimality, the we cutoff the root node. This informs that original
3425 /* if there is no primal solution for the original problem, then the master solution is transferred */
3426 if( SCIPgetBestSol(GCGgetMasterprob(gcg)) != NULL && relaxdata->lastmastersol != SCIPgetBestSol(GCGgetMasterprob(relaxdata->gcg)) )
3433 SCIP_CALL( GCGtransformMastersolToOrigsol(gcg, SCIPgetBestSol(GCGgetMasterprob(gcg)), &newsol, TRUE, NULL) );
3444 /** @bug The solution doesn't have to be accepted, numerics might bite us, so the transformation might fail.
3455 && (SCIPgetStage(masterprob) == SCIP_STAGE_SOLVED || SCIPgetStage(masterprob) == SCIP_STAGE_SOLVING) )
3460 /* if the time, memory or node limit is hit in the Original or Benders mode, then we need to interrupt the solve.
3461 * This is required because the original problem is not solved in either of these modes, so it is not certain that
3464 if( SCIPgetStatus(masterprob) == SCIP_STATUS_TIMELIMIT || SCIPgetStatus(masterprob) == SCIP_STATUS_NODELIMIT
3470 /* if the result pointer is DIDNOTRUN, this implies that the master problem was interrupted during solving. Since
3540 /* selecting the solving algorithm based upon the decomposition mode selected by the user, or whether the original
3546 SCIPverbMessage(scip, SCIP_VERBLEVEL_NORMAL, NULL, "There are no pricing problems in the decomposition. The original problem will be solved directly.\n");
3560 SCIPverbMessage(scip, SCIP_VERBLEVEL_DIALOG, NULL, "Sorry, the automatic selection is not currently available\n");
3592 SCIP_CALL( SCIPincludeExternalCodeInformation(origprob, name, "multi-platform shared-memory parallel programming library (openmp.org)") );
3600 SCIP_CALL( SCIPincludeExternalCodeInformation(origprob, name, "A Tool for Computing Automorphism Groups of Graphs by T. Junttila and P. Kaski (http://www.tcs.hut.fi/Software/bliss/)") );
3608 SCIP_CALL( SCIPincludeExternalCodeInformation(origprob, name, "Tool for Computing Automorphism Groups of Graphs by B.D. McKay and A. Piperno (https://pallini.di.uniroma1.it/)") );
3617 SCIP_CALL( SCIPincludeRelax(origprob, RELAX_NAME, RELAX_DESC, RELAX_PRIORITY, RELAX_FREQ, relaxCopyGcg, relaxFreeGcg, relaxInitGcg,
3630 /* initialize the scip data structure for the master problem. The master problem is initialized as the Dantzig-Wolfe
3631 * master problem. The alternate master problem is initialized as the Benders' decomposition master problem.
3658 /* initializing the alternate master problem. The alternate master problem is initially the Benders' decomposition
3666 SCIP_CALL( SCIPsetIntParam(gcg->bendersmasterprob, "display/verblevel", (int)SCIP_VERBLEVEL_NONE) );
3674 "should discretization (TRUE) or convexification (FALSE) approach be used in mixed-integer programs?",
3680 "Limits the number of constraints of a block (aggregation information for block is not calculated when exceeded)",
3681 &(relaxdata->aggregationnconsslimit), FALSE, DEFAULT_AGGREGATIONNCONSSLIMIT, 0, INT_MAX, NULL, NULL) );
3683 "Limits the number of variables of a block (aggregation information for block is not calculated when exceeded)",
3684 &(relaxdata->aggregationnvarslimit), FALSE, DEFAULT_AGGREGATIONNVARSLIMIT, 0, INT_MAX, NULL, NULL) );
3691 &(relaxdata->searchnodelimit), TRUE, (int)DEFAULT_BLISS_SEARCH_NODE_LIMIT, 0, INT_MAX, NULL, NULL) );
3694 &(relaxdata->generatorlimit), TRUE, (int)DEFAULT_BLISS_GENERATOR_LIMIT, 0, INT_MAX, NULL, NULL) );
3724 int maxdepth, /**< maximal depth level, up to which this branching rule should be used (or -1) */
3725 SCIP_Real maxbounddist, /**< maximal relative distance from current node's dual bound to primal bound
3730 GCG_DECL_BRANCHDEACTIVEMASTER((*branchdeactivemaster)),/**< deactivation method for branchrule */
3733 GCG_DECL_BRANCHDATADELETE((*branchdatadelete)),/**< branchdata deletion method for branchrule */
3735 GCG_DECL_BRANCHGETEXTENDEDMASTERCONS ((*branchgetextendedmastercons)), /**< extended master cons getter of branching rule */
3736 GCG_DECL_BRANCHGETEXTENDEDMASTERCONSCOEFF((*branchgetextendedmasterconscoeff)) /**< column coefficient calculation method for extended master conss */
3769 relaxdata->branchrules[pos]->branchgetextendedmasterconscoeff = branchgetextendedmasterconscoeff;
3884/** notifies the branching rule that a new mastervariable was created while this node was active */
3933 GCG_BRANCHRULE*** branchrules, /**< branching rules that created extended master conss (can be NULL) */
3934 GCG_BRANCHDATA*** branchdata, /**< data represeting the branching decisions of the active nodes (can be NULL) */
3935 GCG_EXTENDEDMASTERCONSDATA*** extendedmasterconsdata, /**< array of extended master conss generated by branching in all currently active nodes */
4015 SCIP_CALL( SCIPcreateConsLinear(GCGgetMasterprob(relaxdata->gcg), &mastercons, name, 0, NULL, NULL,
4064 SCIP_CALL( GCGmasterAddMasterconsToHashmap(gcg, relaxdata->masterconss[relaxdata->nmasterconss],
4130/** returns TRUE iff the pricing problem of the given number is relevant, that means is not identical to
4244/** returns the linking constraints in the original problem that correspond to the constraints in the master problem */
4457 * @note A corresponding probing node must be added to the master problem right before solving the probing LP
4506 * furthermore, this method must be called after bound changes to the original problem have been made
4556 * which ensures that bound changes are transferred to master and pricing problems as well as additional
4560 * furthermore, this method must be called after bound changes to the original problem have been made
4606 SCIP_CALL( GCGcreateConsMasterbranch(relaxdata->gcg, &probingcons, "mprobingcons", probingnode,
4607 GCGconsMasterbranchGetActiveCons(gcg), branchrule, branchdata, origbranchconss, norigbranchconss, maxorigbranchconss) );
4659 SCIP_Longint* nlpiterations, /**< pointer to store the number of performed LP iterations (or NULL) */
4716 SCIP_CALL( SCIPsolveProbingLPWithPricing(masterprob, FALSE, TRUE, maxpricerounds, lperror, NULL) );
4737 *cutoff = *cutoff || (lpsolstat == SCIP_LPSOLSTAT_OBJLIMIT || lpsolstat == SCIP_LPSOLSTAT_INFEASIBLE);
4759 SCIP_Longint* nlpiterations, /**< pointer to store the number of performed LP iterations (or NULL) */
4778 SCIP_Longint* nlpiterations, /**< pointer to store the number of performed LP iterations (or NULL) */
4834 /* if a new primal solution was found in the master problem, transfer it to the original problem
4837 if( SCIPgetBestSol(masterprob) != NULL && relaxdata->lastmastersol != SCIPgetBestSol(masterprob) )
4844 SCIP_CALL( GCGtransformMastersolToOrigsol(gcg, relaxdata->lastmastersol, &newsol, TRUE, NULL) );
4890 assert(SCIPisFeasEQ(scip, SCIPgetRelaxSolObj(scip), SCIPgetSolTransObj(scip, relaxdata->currentorigsol)));
4903/** checks whether a variable should be added as an external branching candidate, if so it is added */
4916 if( SCIPvarGetType(var) <= SCIP_VARTYPE_INTEGER && !SCIPisFeasIntegral(scip, SCIPgetRelaxSolVal(scip, var)) )
4920 SCIPdebugMessage("lblocal = %g, ublocal = %g\n", SCIPvarGetLbLocal(var), SCIPvarGetUbLocal(var));
4921 SCIPdebugMessage("var = %s, vartype = %d, val = %g\n", SCIPvarGetName(var), SCIPvarGetType(var),
4935/* frees current currentorigsol, sets origsolfeasible to FALSE and clears external branching candidates */
4999 if( SCIPgetStage(masterprob) == SCIP_STAGE_SOLVED || SCIPgetLPSolstat(masterprob) == SCIP_LPSOLSTAT_OPTIMAL )
5004 currentnode = SCIPgetCurrentNode(masterprob) == NULL ? -1 : SCIPnodeGetNumber(SCIPgetCurrentNode(masterprob));
5012 if( relaxdata->lastmasternode == currentnode && relaxdata->lastmasterlpiters >= SCIPgetNLPIterations(masterprob) )
5041 if( !SCIPisInfinity(scip, SCIPgetSolOrigObj(masterprob, mastersol)) && GCGmasterIsSolValid(gcg, mastersol) )
5048 SCIP_CALL( GCGtransformMastersolToOrigsol(gcg, mastersol, &(relaxdata->currentorigsol), FALSE, &violatesvarbnds) );
5053 assert(SCIPisEQ(scip, SCIPgetRelaxSolObj(scip), SCIPgetSolTransObj(scip, relaxdata->currentorigsol)));
5056 SCIP_CALL( SCIPtrySol(scip, relaxdata->currentorigsol, FALSE, FALSE, TRUE, TRUE, TRUE, &stored) );
5058 SCIP_CALL( SCIPcheckSol(scip, relaxdata->currentorigsol, FALSE, FALSE, TRUE, TRUE, TRUE, &stored) );
5060 SCIPdebugMessage("updated current original LP solution, %s feasible in the original problem!\n",
5066 /* in the case of Benders decomposition, only the master variables can be added as branching candidates */
5443 SCIPverbMessage(origprob, SCIP_VERBLEVEL_DIALOG, NULL, "The detection for the original problem took place already.\n");
5455 SCIPverbMessage(origprob, SCIP_VERBLEVEL_DIALOG, NULL, "The detection for the presolved problem took place already.\n");
5512 SCIPverbMessage(origprob, SCIP_VERBLEVEL_HIGH, NULL, "there is an original decomposition and problem is not presolved yet -> disable presolving and start optimizing (rerun with presolve command before detect command for detecting in presolved problem) \n");
5524 if( !GCGdetectionTookPlace(gcg, TRUE) && !GCGdetectionTookPlace(gcg, FALSE) && GCGconshdlrDecompGetNFinishedPartialdecsTransformed(gcg) == 0 )
5531 assert(bestdecomp == NULL && (GCGdetectionTookPlace(gcg, TRUE) || GCGdetectionTookPlace(gcg, FALSE)));
5533 SCIPverbMessage(origprob, SCIP_VERBLEVEL_HIGH, NULL, "No decomposition exists or could be detected. Solution process started with original problem...\n");
5536 else if( !GCGdetectionTookPlace(gcg, TRUE) && !GCGdetectionTookPlace(gcg, FALSE) && GCGconshdlrDecompGetNFinishedPartialdecsTransformed(gcg) > 0 )
5544 SCIPverbMessage(origprob, SCIP_VERBLEVEL_HIGH, NULL, "Preexisting decomposition found. Solution process started...\n");
5548 SCIPverbMessage(origprob, SCIP_VERBLEVEL_HIGH, NULL, "No decomposition exists or could be detected. Solution process started with original problem...\n");
5721 SCIP_CALL( SCIPgetLongintParam(scip, "limits/stallnodes", &relaxdata->stashedstallnodelimit) );
5764 SCIP_CALL( setMasterLimits(gcg, masterprob, relaxdata->stashedtimelimit, relaxdata->stashedgaplimit) );
5815 SCIP_Real maxbounddist, /**< maximal relative distance from current node's dual bound to primal bound compared
5820 SCIP_DECL_SEPAEXECSOL ((*sepaexecsol)), /**< arbitrary primal solution separation method of separator */
5822 GCG_DECL_SEPAGETCOLCOEFFICIENT((*sepagetcolcoef)),/**< method for computing the column coefficient for a cut */
5823 GCG_DECL_SEPAMASTERCUTDELETE((*sepamastercutdelete))/**< callback to delete the mastersepacutdata */
5843 SCIP_CALL( SCIPincludeSepaBasic(GCGgetMasterprob(gcg), sepa, name, desc, priority, freq, maxbounddist, usessubscip,
automorphism recognition of SCIPs
GCG Benders' decomposition.
SCIP_RETCODE GCGincludeBendersPlugins(GCG *gcg)
Definition bendersplugins.c:45
SCIP plugins for the master problem running in Benders' decomposition mode.
SCIP_VAR ** b
SCIP_Bool GCGconshdlrDecompPartialdecAggregationInformationCalculated(PARTIALDECOMP_C *partialdecomp)
returns whether aggregation information has been calculated for a partialdec
Definition cons_decomp.cpp:4137
int GCGconshdlrDecompPartialdecGetReprBlockForEqClass(PARTIALDECOMP_C *partialdecomp, int eqclass)
gets the representative block of a equivalence class of partialdec
Definition cons_decomp.cpp:4168
SCIP_Bool GCGconshdlrDecompCheckConsistency(GCG *gcg)
check whether partialdecs are consistent
Definition cons_decomp.cpp:3443
const int * GCGconshdlrDecompPartialdecGetBlocksForEqClass(PARTIALDECOMP_C *partialdecomp, int eqclass)
gets the blocks of a equivalence class of partialdec
Definition cons_decomp.cpp:4179
SCIP_RETCODE GCGconshdlrDecompTranslateOrigPartialdecs(GCG *gcg)
translates unpresolved partialdec to a complete presolved one
Definition cons_decomp.cpp:4680
int GCGconshdlrDecompPartialdecGetNEquivalenceClasses(PARTIALDECOMP_C *partialdecomp)
gets number of equivalence classes of partialdec
Definition cons_decomp.cpp:4158
const int * GCGconshdlrDecompPartialdecGetRepVarMap(PARTIALDECOMP_C *partialdecomp, int eqclass, int eqclassblock)
Returns a vector that maps probvar indices of a block contained in an equivalence class to the probva...
Definition cons_decomp.cpp:4201
int GCGconshdlrDecompPartialdecGetNVarsForBlock(PARTIALDECOMP_C *partialdecomp, int block)
gets the number of variables of a block
Definition cons_decomp.cpp:4280
SCIP_VAR * GCGconshdlrDecompPartialdecGetOrigVarForBlock(PARTIALDECOMP_C *partialdecomp, int block, int blockvarindex)
returns the original variable for a block and index
Definition cons_decomp.cpp:4268
SCIP_RETCODE GCGconshdlrDecompSelectPartialdec(PARTIALDECOMP_C *partialdecomp, SCIP_Bool select)
selects/unselects a partialdecomp
Definition cons_decomp.cpp:4584
SCIP_RETCODE GCGconshdlrDecompAddBasicPartialdec(GCG *gcg, SCIP_Bool presolved, PARTIALDECOMP_C **partialdecomp)
creates and adds a basic partialdecomp (all cons/vars are assigned to master)
Definition cons_decomp.cpp:3019
SCIP_Bool GCGdetectionTookPlace(GCG *gcg, SCIP_Bool original)
Definition cons_decomp.cpp:4722
int GCGconshdlrDecompPartialdecGetNBlocks(PARTIALDECOMP_C *partialdecomp)
gets block number of partialdec
Definition cons_decomp.cpp:4029
SCIP_RETCODE GCGdetectStructure(GCG *gcg, SCIP_RESULT *result)
interface method to detect the structure including presolving
Definition cons_decomp.cpp:2093
int GCGconshdlrDecompGetNFormerDetectionConssForID(GCG *gcg, int id)
gets number of active constraints during the detection of the decomp with given id
Definition cons_decomp.cpp:4117
int GCGconshdlrDecompPartialdecGetNBlocksForEqClass(PARTIALDECOMP_C *partialdecomp, int eqclass)
gets the number of blocks of a equivalence class of partialdec
Definition cons_decomp.cpp:4190
SCIP_RETCODE SCIPconshdlrDecompRepairConsNames(GCG *gcg)
Definition cons_decomp.cpp:4734
unsigned int GCGconshdlrDecompGetNFinishedPartialdecsTransformed(GCG *gcg)
Gets the number of finished partialdecs available for the transformed problem.
Definition cons_decomp.cpp:4305
GCG_DECOMP * GCGgetBestDecomp(GCG *gcg, SCIP_Bool printwarnings)
Gets the best known decomposition.
Definition cons_decomp.cpp:2413
SCIP_Bool GCGconshdlrDecompOrigPartialdecExists(GCG *gcg)
returns whether or not an original decompositions exists in the data structures
Definition cons_decomp.cpp:4505
void GCGconshdlrDecompPartialdecCalcAggregationInformation(PARTIALDECOMP_C *partialdecomp, SCIP_Bool ignoreDetectionLimits)
calculates aggregation information for a partialdec
Definition cons_decomp.cpp:4147
PARTIALDECOMP * GCGconshdlrDecompGetPartialdecFromID(GCG *gcg, int partialdecid)
local method to find a partialdec for a given id or NULL if no partialdec with such id is found
Definition cons_decomp.cpp:281
constraint handler for structure detection
SCIP_RETCODE GCGconsIntegralorigAddBranchrule(GCG *gcg, SCIP_BRANCHRULE *branchrule)
Definition cons_integralorig.c:69
constraint handler for the integrality constraint
SCIP_CONS * GCGconsMasterbranchGetActiveCons(GCG *gcg)
Definition cons_masterbranch.c:3056
SCIP_RETCODE GCGcreateConsMasterbranch(GCG *gcg, SCIP_CONS **cons, const char *name, SCIP_NODE *node, SCIP_CONS *parentcons, GCG_BRANCHRULE *branchrule, GCG_BRANCHDATA *branchdata, SCIP_CONS **origbranchconss, int norigbranchconss, int maxorigbranchconss)
Definition cons_masterbranch.c:2670
constraint handler for storing the branching decisions at each node of the tree
SCIP_CONS * GCGconsOrigbranchGetActiveCons(GCG *gcg)
Definition cons_origbranch.c:532
GCG_BRANCHRULE * GCGconsOrigbranchGetBranchrule(SCIP_CONS *cons)
Definition cons_origbranch.c:605
SCIP_RETCODE GCGconsOrigbranchAddRootCons(GCG *gcg)
Definition cons_origbranch.c:717
GCG_BRANCHDATA * GCGconsOrigbranchGetBranchdata(SCIP_CONS *cons)
Definition cons_origbranch.c:592
SCIP_RETCODE GCGcreateConsOrigbranch(GCG *gcg, SCIP_CONS **cons, const char *name, SCIP_NODE *node, SCIP_CONS *parentcons, GCG_BRANCHRULE *branchrule, GCG_BRANCHDATA *branchdata)
Definition cons_origbranch.c:453
constraint handler for storing the branching decisions at each node of the tree
SCIP_VAR ** GCGdecompGetLinkingvars(GCG_DECOMP *decomp)
Definition decomp.c:1056
SCIP_RETCODE GCGcreateBasicDecomp(GCG *gcg, GCG_DECOMP **decomp, SCIP_Bool solveorigprob)
Definition decomp.c:2418
SCIP_RETCODE GCGdecompCheckConsistency(GCG *gcg, GCG_DECOMP *decdecomp)
Definition decomp.c:2297
SCIP_CONS *** GCGdecompGetSubscipconss(GCG_DECOMP *decomp)
Definition decomp.c:924
SCIP_RETCODE GCGdecompAddRemainingConss(GCG *gcg, GCG_DECOMP *decdecomp)
Definition decomp.c:2206
SCIP_CONS ** GCGdecompGetLinkingconss(GCG_DECOMP *decomp)
Definition decomp.c:985
SCIP_HASHMAP * GCGdecompGetVartoblock(GCG_DECOMP *decomp)
Definition decomp.c:1221
SCIP_Real GCGdecompGetMaxwhiteScore(GCG_DECOMP *decomp)
Definition decomp.c:713
SCIP_VAR *** GCGdecompGetSubscipvars(GCG_DECOMP *decomp)
Definition decomp.c:837
SCIP_RETCODE GCGpermuteDecomp(GCG *gcg, GCG_DECOMP *decomp, SCIP_RANDNUMGEN *randnumgen)
Definition decomp.c:4384
#define SCIP_MAXSTRLEN
#define SCIP_Longint
#define SCIP_Bool
#define MIN(x, y)
#define SCIP_Real
#define MAX(x, y)
#define SCIP_LONGINT_FORMAT
#define REALABS(x)
#define TRUE
#define FALSE
#define infinity
GCG interface methods.
SCIP_RETCODE GCGoriginalVarAddMasterVar(GCG *gcg, SCIP_VAR *origvar, SCIP_VAR *var, SCIP_Real val)
Definition gcgvar.c:1206
void GCGoriginalVarSetNCoefs(SCIP_VAR *var, int ncoefs)
Definition gcgvar.c:737
SCIP_VAR ** GCGlinkingVarGetPricingVars(SCIP_VAR *var)
Definition gcgvar.c:488
SCIP_RETCODE GCGorigVarCreateData(GCG *gcg, SCIP_VAR *var)
Definition gcgvar.c:382
SCIP_VAR ** GCGoriginalVarGetMastervars(SCIP_VAR *var)
Definition gcgvar.c:666
SCIP_RETCODE GCGcreateInitialMasterVar(GCG *gcg, SCIP_VAR *var, SCIP_VAR **newvar)
Definition gcgvar.c:1586
void GCGoriginalVarSetPricingVar(SCIP_VAR *var, SCIP_VAR *pricingvar)
Definition gcgvar.c:300
SCIP_VAR * GCGoriginalVarGetPricingVar(SCIP_VAR *var)
Definition gcgvar.c:281
SCIP_CONS ** GCGlinkingVarGetLinkingConss(SCIP_VAR *var)
Definition gcgvar.c:872
SCIP_RETCODE GCGpricingVarAddOrigVar(SCIP *pricingprob, SCIP_VAR *pricingvar, SCIP_VAR *origvar)
Definition gcgvar.c:610
SCIP_RETCODE GCGoriginalVarCreatePricingVar(SCIP *pricingprob, SCIP_VAR *origvar, SCIP_VAR **var)
Definition gcgvar.c:1302
SCIP_RETCODE GCGoriginalVarAddCoef(GCG *gcg, SCIP_VAR *var, SCIP_Real val, SCIP_CONS *cons)
Definition gcgvar.c:758
SCIP_Bool GCGisLinkingVarInBlock(SCIP_VAR *var, int block)
Definition gcgvar.c:1149
void GCGlinkingVarSetPricingVar(SCIP_VAR *origvar, int pricingprobnr, SCIP_VAR *var)
Definition gcgvar.c:506
SCIP_RETCODE GCGlinkingVarCreatePricingVar(SCIP *pricingscip, int pricingprobnr, SCIP_VAR *origvar, SCIP_VAR **var)
Definition gcgvar.c:1339
SCIP_RETCODE GCGoriginalVarAddBlock(GCG *gcg, SCIP_VAR *var, int newblock, int nblocks, GCG_DECMODE mode)
Definition gcgvar.c:808
SCIP_RETCODE GCGlinkingVarCreateMasterCons(GCG *gcg, int pricingprobnr, SCIP_VAR *origvar, SCIP_CONS **linkcons)
Definition gcgvar.c:1374
void GCGlinkingVarSetLinkingCons(SCIP_VAR *var, SCIP_CONS *cons, int index)
Definition gcgvar.c:891
SCIP_SOL * GCGbendersGetRelaxSol(SCIP_BENDERS *benders)
Definition benders_gcg.c:783
SCIP_VAR ** SCIPgetVarsLinear(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPaddCoefLinear(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real val)
int SCIPgetNVarsLinear(SCIP *scip, SCIP_CONS *cons)
SCIP_Real * SCIPgetValsLinear(SCIP *scip, SCIP_CONS *cons)
enum SCIP_SetppcType SCIP_SETPPCTYPE
SCIP_SETPPCTYPE SCIPgetTypeSetppc(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_SETPPCTYPE_PARTITIONING
SCIP_SETPPCTYPE_COVERING
SCIP_SETPPCTYPE_PACKING
SCIP_RETCODE SCIPgetConsCopy(SCIP *sourcescip, SCIP *targetscip, SCIP_CONS *sourcecons, SCIP_CONS **targetcons, SCIP_CONSHDLR *sourceconshdlr, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, const char *name, 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_Bool global, SCIP_Bool *valid)
SCIP_RETCODE GCGmasterAddMasterconsToHashmap(GCG *gcg, SCIP_CONS *cons, int pos)
Definition pricer_gcg.cpp:5681
SCIP_Bool GCGmasterIsCurrentSolValid(GCG *gcg)
Definition pricer_gcg.cpp:6596
SCIP_Bool GCGmasterIsSolValid(GCG *gcg, SCIP_SOL *mastersol)
Definition pricer_gcg.cpp:6681
SCIP_RETCODE GCGmasterCreateInitialMastervars(GCG *gcg)
Definition pricer_gcg.cpp:6484
GCG_EXPORT SCIP_Bool GCGisMasterSetPartitioning(GCG *gcg)
Definition relax_gcg.c:4366
SCIP_RETCODE GCGtransformMastersolToOrigsol(GCG *gcg, SCIP_SOL *mastersol, SCIP_SOL **origsol, SCIP_Bool ignorelocalvarbnds, SCIP_Bool *violatesvarbnds)
Definition misc.c:135
GCG_EXPORT SCIP * GCGgetPricingprob(GCG *gcg, int pricingprobnr)
Definition relax_gcg.c:4075
GCG_EXPORT SCIP_CONS ** GCGgetOrigMasterConss(GCG *gcg)
Definition relax_gcg.c:4245
GCG_EXPORT SCIP_CONS * GCGgetConvCons(GCG *gcg, int blocknr)
Definition relax_gcg.c:4262
GCG_EXPORT SCIP_CONS ** GCGgetVarLinkingconss(GCG *gcg)
Definition relax_gcg.c:5188
GCG_EXPORT SCIP_Bool GCGrelaxIsInitialized(GCG *gcg)
Definition relax_gcg.c:5145
GCG_EXPORT SCIP_Real GCGgetPricingprobsMemUsed(GCG *gcg)
Definition relax_gcg.c:5114
GCG_EXPORT SCIP_Bool GCGisMasterSetCovering(GCG *gcg)
Definition relax_gcg.c:4347
GCG_EXPORT int GCGgetNIdenticalBlocks(GCG *gcg, int pricingprobnr)
Definition relax_gcg.c:4185
GCG_EXPORT SCIP_SOL * GCGgetBendersRelaxationSol(GCG *gcg)
Definition relax_gcg.c:5273
GCG_EXPORT int GCGgetBlockRepresentative(GCG *gcg, int pricingprobnr)
Definition relax_gcg.c:4155
GCG_EXPORT GCG_DECMODE GCGgetDecompositionMode(GCG *gcg)
Definition relax_gcg.c:5294
GCG_EXPORT int * GCGgetVarLinkingconssBlock(GCG *gcg)
Definition relax_gcg.c:5205
GCG_EXPORT SCIP_Bool GCGisPricingprobRelevant(GCG *gcg, int pricingprobnr)
Definition relax_gcg.c:4132
SCIP_Bool SCIPisTransformed(SCIP *scip)
SCIP_Bool SCIPisStopped(SCIP *scip)
SCIP_RETCODE SCIPfree(SCIP **scip)
SCIP_RETCODE SCIPcreate(SCIP **scip)
SCIP_STATUS SCIPgetStatus(SCIP *scip)
SCIP_STAGE SCIPgetStage(SCIP *scip)
SCIP_RETCODE SCIPaddVar(SCIP *scip, SCIP_VAR *var)
SCIP_RETCODE SCIPsetObjIntegral(SCIP *scip)
const char * SCIPgetProbName(SCIP *scip)
int SCIPgetNContVars(SCIP *scip)
SCIP_RETCODE SCIPwriteOrigProblem(SCIP *scip, const char *filename, const char *extension, SCIP_Bool genericnames)
SCIP_RETCODE SCIPsetObjlimit(SCIP *scip, SCIP_Real objlimit)
SCIP_Real SCIPgetTransObjoffset(SCIP *scip)
SCIP_RETCODE SCIPgetVarsData(SCIP *scip, SCIP_VAR ***vars, int *nvars, int *nbinvars, int *nintvars, int *nimplvars, int *ncontvars)
SCIP_Real SCIPgetObjlimit(SCIP *scip)
int SCIPgetNVars(SCIP *scip)
SCIP_RETCODE SCIPaddCons(SCIP *scip, SCIP_CONS *cons)
int SCIPgetNConss(SCIP *scip)
SCIP_RETCODE SCIPfreeProb(SCIP *scip)
SCIP_VAR ** SCIPgetVars(SCIP *scip)
SCIP_RETCODE SCIPprintOrigProblem(SCIP *scip, FILE *file, const char *extension, SCIP_Bool genericnames)
SCIP_OBJSENSE SCIPgetObjsense(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)
SCIP_Bool SCIPisObjIntegral(SCIP *scip)
void SCIPhashmapFree(SCIP_HASHMAP **hashmap)
void * SCIPhashmapGetImage(SCIP_HASHMAP *hashmap, void *origin)
SCIP_RETCODE SCIPhashmapInsert(SCIP_HASHMAP *hashmap, void *origin, void *image)
SCIP_RETCODE SCIPhashmapCreate(SCIP_HASHMAP **hashmap, BMS_BLKMEM *blkmem, int mapsize)
SCIP_Bool SCIPhashmapExists(SCIP_HASHMAP *hashmap, void *origin)
SCIP_RETCODE SCIPaddConsNode(SCIP *scip, SCIP_NODE *node, SCIP_CONS *cons, SCIP_NODE *validnode)
SCIP_Real SCIPgetLocalLowerbound(SCIP *scip)
SCIP_Real SCIPgetLocalDualbound(SCIP *scip)
SCIP_Bool GCGgetConsIsSetppc(SCIP *scip, SCIP_CONS *cons, SCIP_SETPPCTYPE *setppctype)
Definition scip_misc.c:760
SCIP_RETCODE GCGconsGetVars(SCIP *scip, SCIP_CONS *cons, SCIP_VAR **vars, int nvars)
Definition scip_misc.c:487
SCIP_RETCODE GCGconsGetVals(SCIP *scip, SCIP_CONS *cons, SCIP_Real *vals, int nvals)
Definition scip_misc.c:618
SCIP_RETCODE SCIPsetMessagehdlr(SCIP *scip, SCIP_MESSAGEHDLR *messagehdlr)
void SCIPverbMessage(SCIP *scip, SCIP_VERBLEVEL msgverblevel, FILE *file, const char *formatstr,...)
SCIP_VERBLEVEL SCIPgetVerbLevel(SCIP *scip)
SCIP_MESSAGEHDLR * SCIPgetMessagehdlr(SCIP *scip)
void SCIPsetMessagehdlrQuiet(SCIP *scip, SCIP_Bool quiet)
void SCIPwarningMessage(SCIP *scip, const char *formatstr,...)
SCIP_RETCODE SCIPgetBoolParam(SCIP *scip, const char *name, SCIP_Bool *value)
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 SCIPsetIntParam(SCIP *scip, const char *name, int value)
SCIP_RETCODE SCIPgetRealParam(SCIP *scip, const char *name, SCIP_Real *value)
SCIP_RETCODE SCIPresetParam(SCIP *scip, const char *name)
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 SCIPgetLongintParam(SCIP *scip, const char *name, SCIP_Longint *value)
SCIP_RETCODE SCIPgetIntParam(SCIP *scip, const char *name, int *value)
SCIP_RETCODE SCIPsetBoolParam(SCIP *scip, const char *name, SCIP_Bool value)
SCIP_RETCODE SCIPfixParam(SCIP *scip, const char *name)
SCIP_RETCODE SCIPsetRealParam(SCIP *scip, const char *name, SCIP_Real value)
SCIP_RETCODE SCIPsetSeparating(SCIP *scip, SCIP_PARAMSETTING paramsetting, SCIP_Bool quiet)
SCIP_BENDERS * SCIPfindBenders(SCIP *scip, const char *name)
SCIP_RETCODE SCIPactivateBenders(SCIP *scip, SCIP_BENDERS *benders, int nsubproblems)
SCIP_RETCODE SCIPfreeBendersSubproblem(SCIP *scip, SCIP_BENDERS *benders, int probnumber)
SCIP_RETCODE SCIPsolveBendersSubproblem(SCIP *scip, SCIP_BENDERS *benders, SCIP_SOL *sol, int probnumber, SCIP_Bool *infeasible, SCIP_Bool solvecip, SCIP_Real *objective)
void SCIPbendersSetSubproblemIsIndependent(SCIP_BENDERS *benders, int probnumber, SCIP_Bool isindep)
SCIP_RETCODE SCIPincludeBranchruleBasic(SCIP *scip, SCIP_BRANCHRULE **branchruleptr, const char *name, const char *desc, int priority, int maxdepth, SCIP_Real maxbounddist, SCIP_BRANCHRULEDATA *branchruledata)
SCIP_RETCODE SCIPaddExternBranchCand(SCIP *scip, SCIP_VAR *var, SCIP_Real score, SCIP_Real solval)
void SCIPclearExternBranchCands(SCIP *scip)
const char * SCIPconshdlrGetName(SCIP_CONSHDLR *conshdlr)
SCIP_CONSHDLR * SCIPconsGetHdlr(SCIP_CONS *cons)
SCIP_RETCODE SCIPtransformConss(SCIP *scip, int nconss, SCIP_CONS **conss, SCIP_CONS **transconss)
SCIP_Bool SCIPconsIsDeleted(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsActive(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsLocal(SCIP_CONS *cons)
const char * SCIPconsGetName(SCIP_CONS *cons)
SCIP_RETCODE SCIPgetTransformedCons(SCIP *scip, SCIP_CONS *cons, SCIP_CONS **transcons)
SCIP_Bool SCIPconsIsStickingAtNode(SCIP_CONS *cons)
SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)
SCIP_RETCODE SCIPtransformCons(SCIP *scip, SCIP_CONS *cons, SCIP_CONS **transcons)
SCIP_RETCODE SCIPcaptureCons(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPincludeExternalCodeInformation(SCIP *scip, const char *name, const char *description)
SCIP_RETCODE SCIPflushLP(SCIP *scip)
SCIP_RETCODE SCIPconstructLP(SCIP *scip, SCIP_Bool *cutoff)
SCIP_Bool SCIPisLPConstructed(SCIP *scip)
SCIP_LPSOLSTAT SCIPgetLPSolstat(SCIP *scip)
SCIP_Real SCIPgetLPObjval(SCIP *scip)
#define SCIPreallocMemoryArray(scip, ptr, newnum)
SCIP_Longint SCIPgetMemUsed(SCIP *scip)
BMS_BLKMEM * SCIPblkmem(SCIP *scip)
#define SCIPallocMemoryArray(scip, ptr, num)
#define SCIPallocClearBufferArray(scip, ptr, num)
int SCIPcalcMemGrowSize(SCIP *scip, int num)
#define SCIPallocBufferArray(scip, ptr, num)
#define SCIPallocMemory(scip, ptr)
#define SCIPfreeMemoryArray(scip, ptr)
#define SCIPduplicateBufferArray(scip, ptr, source, num)
#define SCIPallocBlockMemoryArray(scip, ptr, num)
#define SCIPreallocBlockMemoryArray(scip, ptr, oldnum, newnum)
#define SCIPfreeBlockMemory(scip, ptr)
#define SCIPfreeBlockMemoryArrayNull(scip, ptr, num)
#define SCIPfreeBufferArrayNull(scip, ptr)
#define SCIPallocBlockMemory(scip, ptr)
SCIP_Longint SCIPnodeGetNumber(SCIP_NODE *node)
SCIP_PRICER * SCIPfindPricer(SCIP *scip, const char *name)
SCIP_RETCODE SCIPactivatePricer(SCIP *scip, SCIP_PRICER *pricer)
int SCIPgetProbingDepth(SCIP *scip)
SCIP_RETCODE SCIPpropagateProbing(SCIP *scip, int maxproprounds, SCIP_Bool *cutoff, SCIP_Longint *ndomredsfound)
SCIP_RETCODE SCIPbacktrackProbing(SCIP *scip, int probingdepth)
SCIP_Bool SCIPinProbing(SCIP *scip)
SCIP_RETCODE SCIPstartProbing(SCIP *scip)
SCIP_RETCODE SCIPnewProbingNode(SCIP *scip)
SCIP_RETCODE SCIPsolveProbingLP(SCIP *scip, int itlim, SCIP_Bool *lperror, SCIP_Bool *cutoff)
SCIP_RETCODE SCIPendProbing(SCIP *scip)
SCIP_RETCODE SCIPsolveProbingLPWithPricing(SCIP *scip, SCIP_Bool pretendroot, SCIP_Bool displayinfo, int maxpricerounds, SCIP_Bool *lperror, SCIP_Bool *cutoff)
SCIP_RETCODE SCIPincludeRelax(SCIP *scip, const char *name, const char *desc, int priority, int freq, SCIP_DECL_RELAXCOPY((*relaxcopy)), SCIP_DECL_RELAXFREE((*relaxfree)), SCIP_DECL_RELAXINIT((*relaxinit)), SCIP_DECL_RELAXEXIT((*relaxexit)), SCIP_DECL_RELAXINITSOL((*relaxinitsol)), SCIP_DECL_RELAXEXITSOL((*relaxexitsol)), SCIP_DECL_RELAXEXEC((*relaxexec)), SCIP_RELAXDATA *relaxdata)
SCIP_RELAX * SCIPfindRelax(SCIP *scip, const char *name)
SCIP_RELAXDATA * SCIPrelaxGetData(SCIP_RELAX *relax)
SCIP_RETCODE SCIPincludeSepaBasic(SCIP *scip, SCIP_SEPA **sepa, const char *name, const char *desc, int priority, int freq, SCIP_Real maxbounddist, SCIP_Bool usessubscip, SCIP_Bool delay, SCIP_DECL_SEPAEXECLP((*sepaexeclp)), SCIP_DECL_SEPAEXECSOL((*sepaexecsol)), SCIP_SEPADATA *sepadata)
SCIP_RETCODE SCIPcheckSolOrig(SCIP *scip, SCIP_SOL *sol, SCIP_Bool *feasible, SCIP_Bool printreason, SCIP_Bool completely)
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 SCIPaddSolFree(SCIP *scip, SCIP_SOL **sol, SCIP_Bool *stored)
SCIP_RETCODE SCIPprintSol(SCIP *scip, SCIP_SOL *sol, FILE *file, SCIP_Bool printzeros)
SCIP_RETCODE SCIPincSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var, SCIP_Real incval)
SCIP_RETCODE SCIPsetSolVals(SCIP *scip, SCIP_SOL *sol, int nvars, SCIP_VAR **vars, SCIP_Real *vals)
SCIP_RETCODE SCIPtrySol(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 SCIPcheckSol(SCIP *scip, SCIP_SOL *sol, SCIP_Bool printreason, SCIP_Bool completely, SCIP_Bool checkbounds, SCIP_Bool checkintegrality, SCIP_Bool checklprows, SCIP_Bool *feasible)
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_Real SCIPgetSolOrigObj(SCIP *scip, SCIP_SOL *sol)
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_Real SCIPgetSolTransObj(SCIP *scip, SCIP_SOL *sol)
SCIP_Real SCIPretransformObj(SCIP *scip, SCIP_Real obj)
SCIP_RETCODE SCIPtransformProb(SCIP *scip)
SCIP_RETCODE SCIPpresolve(SCIP *scip)
SCIP_RETCODE SCIPfreeTransform(SCIP *scip)
SCIP_RETCODE SCIPinterruptSolve(SCIP *scip)
SCIP_RETCODE SCIPsolve(SCIP *scip)
SCIP_Real SCIPgetPrimalbound(SCIP *scip)
SCIP_Longint SCIPgetNNodes(SCIP *scip)
SCIP_Real SCIPgetDualbound(SCIP *scip)
int SCIPgetNActiveConss(SCIP *scip)
int SCIPgetNPriceRounds(SCIP *scip)
SCIP_Longint SCIPgetNLPIterations(SCIP *scip)
SCIP_RETCODE SCIPcreateClock(SCIP *scip, SCIP_CLOCK **clck)
SCIP_RETCODE SCIPstopClock(SCIP *scip, SCIP_CLOCK *clck)
SCIP_Real SCIPgetSolvingTime(SCIP *scip)
SCIP_RETCODE SCIPfreeClock(SCIP *scip, SCIP_CLOCK **clck)
SCIP_Real SCIPgetClockTime(SCIP *scip, SCIP_CLOCK *clck)
SCIP_RETCODE SCIPstartClock(SCIP *scip, SCIP_CLOCK *clck)
SCIP_Real SCIPinfinity(SCIP *scip)
SCIP_Bool SCIPisFeasEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisFeasZero(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPfloor(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasIntegral(SCIP *scip, SCIP_Real val)
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_NODE * SCIPgetCurrentNode(SCIP *scip)
SCIP_NODE * SCIPgetRootNode(SCIP *scip)
SCIP_Real SCIPgetRelaxSolObj(SCIP *scip)
SCIP_VAR * SCIPvarGetNegatedVar(SCIP_VAR *var)
SCIP_VARSTATUS SCIPvarGetStatus(SCIP_VAR *var)
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
SCIP_Bool SCIPvarIsTransformed(SCIP_VAR *var)
SCIP_Real SCIPvarGetObj(SCIP_VAR *var)
SCIP_VAR * SCIPvarGetProbvar(SCIP_VAR *var)
SCIP_VARTYPE SCIPvarGetType(SCIP_VAR *var)
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
int SCIPvarGetIndex(SCIP_VAR *var)
int SCIPvarGetProbindex(SCIP_VAR *var)
const char * SCIPvarGetName(SCIP_VAR *var)
SCIP_RETCODE SCIPreleaseVar(SCIP *scip, SCIP_VAR **var)
SCIP_Real SCIPgetRelaxSolVal(SCIP *scip, SCIP_VAR *var)
SCIP_VARDATA * SCIPvarGetData(SCIP_VAR *var)
SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
SCIP_Bool SCIPvarIsNegated(SCIP_VAR *var)
SCIP_Bool SCIPvarIsOriginal(SCIP_VAR *var)
SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
SCIP_RETCODE SCIPchgVarObj(SCIP *scip, SCIP_VAR *var, SCIP_Real newobj)
SCIP_RETCODE SCIPgetTransformedVar(SCIP *scip, SCIP_VAR *var, SCIP_VAR **transvar)
SCIP_Bool SCIPallowStrongDualReds(SCIP *scip)
SCIP_RETCODE SCIPsetRelaxSolValsSol(SCIP *scip, SCIP_RELAX *relax, SCIP_SOL *sol, SCIP_Bool includeslp)
void SCIPfreeRandom(SCIP *scip, SCIP_RANDNUMGEN **randnumgen)
SCIP_RETCODE SCIPcreateRandom(SCIP *scip, SCIP_RANDNUMGEN **randnumgen, unsigned int initialseed, SCIP_Bool useglobalseed)
void SCIPsortRealInt(SCIP_Real *realarray, int *intarray, int len)
int SCIPsnprintf(char *t, int len, const char *s,...)
SCIPfreeMemory(GCGgetOrigprob(gcg), &divingdata)
static assert(heur !=NULL)
SCIP_CALL(SCIPgetExternBranchCands(origprob, &lpcands, &lpcandssol, NULL, &nlpcands, NULL, NULL, NULL, NULL))
SCIPdebugMessage("feasibility pump finished [%d iterations done].\n", nloops)
SCIPfreeBufferArray(scip, &cycles)
#define NULL
SCIP plugins for generic column generation.
SCIP_Bool SCIPmessagehdlrIsQuiet(SCIP_MESSAGEHDLR *messagehdlr)
Definition class_conspartition.cpp:44
SCIP_RETCODE GCGcreateParamsVisu(GCG *gcg, GCG_PARAMDATA **paramdata)
Definition params_visu.c:720
void GCGVisuFreeParams(GCG *gcg, GCG_PARAMDATA *paramdata)
Definition params_visu.c:696
GCG variable pricer.
helper functions for automorphism detection
#define SCIPerrorMessage
#define SCIPdebugPrintf
static SCIP_RETCODE solveBlockProblem(GCG *gcg, SCIP *blockprob, SCIP_RELAXDATA *relaxdata, SCIP_Real timelimit, int blocknum, SCIP_RESULT *result, SCIP_Real *objvalue)
Definition relax_gcg.c:2019
SCIP_RETCODE GCGrelaxBranchActiveMaster(GCG *gcg, GCG_BRANCHRULE *branchrule, GCG_BRANCHDATA *branchdata)
Definition relax_gcg.c:3781
SCIP_RETCODE GCGrelaxBranchGetAllActiveExtendedMasterConss(GCG *gcg, GCG_BRANCHRULE ***branchrules, GCG_BRANCHDATA ***branchdata, GCG_EXTENDEDMASTERCONSDATA ***extendedmasterconsdata, int *nextendedmasterconss)
Definition relax_gcg.c:3931
static SCIP_RETCODE initRelaxProblemdata(GCG *gcg, SCIP_RELAXDATA *relaxdata)
Definition relax_gcg.c:1277
SCIP_RETCODE GCGrelaxNewProbingnodeMaster(GCG *gcg)
Definition relax_gcg.c:4508
static SCIP_RETCODE solveMasterProblemAndEvaluate(GCG *gcg, SCIP_RELAX *relax, SCIP_Real *lowerbound, SCIP_RESULT *result)
Definition relax_gcg.c:3368
static SCIP_RETCODE ensureSizeBranchrules(GCG *gcg, SCIP_RELAXDATA *relaxdata)
Definition relax_gcg.c:585
static SCIP_RETCODE createPricingProblem(SCIP_RELAXDATA *relaxdata, SCIP **pricingscip, const char *name, int clocktype, SCIP_Real infinity, SCIP_Real epsilon, SCIP_Real sumepsilon, SCIP_Real feastol, SCIP_Real lpfeastolfactor, SCIP_Real dualfeastol, SCIP_Bool enableppcuts)
Definition relax_gcg.c:1400
static SCIP_RETCODE relaxExecGcgBendersDecomposition(GCG *gcg, SCIP_RELAX *relax, SCIP_Real *lowerbound, SCIP_RESULT *result)
Definition relax_gcg.c:3482
SCIP_RETCODE GCGrelaxBranchPropMaster(GCG *gcg, GCG_BRANCHRULE *branchrule, GCG_BRANCHDATA *branchdata, SCIP_RESULT *result)
Definition relax_gcg.c:3837
static SCIP_RETCODE convertStructToGCG(GCG *gcg, SCIP_RELAXDATA *relaxdata, GCG_DECOMP *decomp)
Definition relax_gcg.c:381
static SCIP_RETCODE createPricingprobConss(GCG *gcg, SCIP_RELAXDATA *relaxdata, SCIP_HASHMAP **hashorig2pricingvar)
Definition relax_gcg.c:1636
static SCIP_RETCODE dropActiveBranchExtendedmastercons(GCG *gcg, SCIP_RELAXDATA *relaxdata, GCG_BRANCHRULE *branchrule, GCG_BRANCHDATA *branchdata)
Definition relax_gcg.c:269
SCIP_RETCODE GCGrelaxBranchMasterSolved(GCG *gcg, GCG_BRANCHRULE *branchrule, GCG_BRANCHDATA *branchdata, SCIP_Real newlowerbound)
Definition relax_gcg.c:3961
SCIP_RETCODE GCGrelaxBranchNewCol(GCG *gcg, GCG_BRANCHRULE *branchrule, GCG_BRANCHDATA *branchdata, SCIP_VAR *mastervar)
Definition relax_gcg.c:3885
static SCIP_RETCODE createMasterProblem(GCG *gcg, const char *name, int clocktype, SCIP_Real infinity, SCIP_Real epsilon, SCIP_Real sumepsilon, SCIP_Real feastol, SCIP_Real lpfeastolfactor, SCIP_Real dualfeastol, GCG_DECMODE mode)
Definition relax_gcg.c:1320
static SCIP_RETCODE relaxExecGcgDantzigWolfe(GCG *gcg, SCIP_RELAX *relax, SCIP_Real *lowerbound, SCIP_RESULT *result)
Definition relax_gcg.c:3253
SCIP_RETCODE GCGrelaxNewProbingnodeMasterCons(GCG *gcg, GCG_BRANCHRULE *branchrule, GCG_BRANCHDATA *branchdata, SCIP_CONS **origbranchconss, int norigbranchconss, int maxorigbranchconss)
Definition relax_gcg.c:4562
SCIP_RETCODE GCGrelaxPerformProbing(GCG *gcg, int maxlpiterations, SCIP_Longint *nlpiterations, SCIP_Real *lpobjvalue, SCIP_Bool *lpsolved, SCIP_Bool *lperror, SCIP_Bool *cutoff)
Definition relax_gcg.c:4756
SCIP_RETCODE GCGrelaxIncludeBranchrule(GCG *gcg, SCIP_BRANCHRULE **branchrule, GCG_BRANCHRULE **gcgbranchrule, const char *name, const char *desc, int priority, int maxdepth, SCIP_Real maxbounddist, SCIP_BRANCHRULEDATA *branchruledata, GCG_DECL_BRANCHACTIVEMASTER((*branchactivemaster)), GCG_DECL_BRANCHDEACTIVEMASTER((*branchdeactivemaster)), GCG_DECL_BRANCHPROPMASTER((*branchpropmaster)), GCG_DECL_BRANCHMASTERSOLVED((*branchmastersolved)), GCG_DECL_BRANCHDATADELETE((*branchdatadelete)), GCG_DECL_BRANCHNEWCOL((*branchnewcol)), GCG_DECL_BRANCHGETEXTENDEDMASTERCONS((*branchgetextendedmastercons)),)
Definition relax_gcg.c:3717
SCIP_RETCODE GCGrelaxIncludeSepa(GCG *gcg, SCIP_SEPA **sepa, GCG_SEPA **gcgsepa, const char *name, const char *desc, int priority, int freq, SCIP_Real maxbounddist, SCIP_Bool usessubscip, SCIP_Bool delay, SCIP_DECL_SEPAEXECLP((*sepaexeclp)), SCIP_DECL_SEPAEXECSOL((*sepaexecsol)), SCIP_SEPADATA *sepadata, GCG_DECL_SEPAGETCOLCOEFFICIENT((*sepagetcolcoef)),)
Definition relax_gcg.c:5807
static SCIP_RETCODE freeCurrentOrigSol(GCG *gcg, SCIP_RELAXDATA *relaxdata)
Definition relax_gcg.c:4937
SCIP_RETCODE GCGrelaxStartProbing(GCG *gcg, SCIP_HEUR *probingheur)
Definition relax_gcg.c:4390
static SCIP_RETCODE createMaster(GCG *gcg, SCIP_RELAXDATA *relaxdata)
Definition relax_gcg.c:1726
static SCIP_RETCODE checkIdenticalBlocks(GCG *gcg, SCIP_RELAXDATA *relaxdata, SCIP_HASHMAP **hashorig2pricingvar)
Definition relax_gcg.c:735
static SCIP_RETCODE createMasterprobConss(GCG *gcg, SCIP_RELAXDATA *relaxdata)
Definition relax_gcg.c:1498
SCIP_RETCODE GCGsetPricingProblemParameters(GCG_DECTYPE dectype, SCIP *pricingprob, int clocktype, SCIP_Real infinity, SCIP_Real epsilon, SCIP_Real sumepsilon, SCIP_Real feastol, SCIP_Real lpfeastolfactor, SCIP_Real dualfeastol, SCIP_Bool enableppcuts)
Definition relax_gcg.c:865
static SCIP_RETCODE transformMaster(GCG *gcg, SCIP_RELAX *relax)
Definition relax_gcg.c:2378
static SCIP_RETCODE initRelaxdata(GCG *gcg, SCIP_RELAXDATA *relaxdata)
Definition relax_gcg.c:2631
static SCIP_RETCODE createLinkingPricingVars(GCG *gcg, SCIP_RELAXDATA *relaxdata, SCIP_VAR *origvar)
Definition relax_gcg.c:993
static SCIP_RETCODE solveDiagonalBlocks(GCG *gcg, SCIP_RELAXDATA *relaxdata, SCIP_RESULT *result, SCIP_Real *lowerbound)
Definition relax_gcg.c:2232
static SCIP_RETCODE checkSetppcStructure(GCG *gcg, SCIP_RELAXDATA *relaxdata)
Definition relax_gcg.c:631
SCIP_RETCODE GCGrelaxBranchDataDelete(GCG *gcg, GCG_BRANCHRULE *branchrule, GCG_BRANCHDATA **branchdata, SCIP_Bool origbranch, SCIP_Bool force)
Definition relax_gcg.c:3858
SCIP_RETCODE GCGrelaxTransOrigToMasterCons(GCG *gcg, SCIP_CONS *cons, SCIP_CONS **transcons)
Definition relax_gcg.c:3982
static SCIP_RETCODE setMasterLimits(GCG *gcg, SCIP *masterprob, SCIP_Real origtimelimit, SCIP_Real origgaplimit)
Definition relax_gcg.c:3079
SCIP_RETCODE GCGrelaxNewProbingnodeOrig(GCG *gcg)
Definition relax_gcg.c:4459
static SCIP_RETCODE createPricingVariables(GCG *gcg, SCIP_RELAXDATA *relaxdata, SCIP_HASHMAP **hashorig2pricingvar)
Definition relax_gcg.c:1107
static SCIP_RETCODE performProbing(GCG *gcg, int maxlpiterations, int maxpricerounds, SCIP_Bool usepricing, SCIP_Longint *nlpiterations, int *npricerounds, SCIP_Real *lpobjvalue, SCIP_Bool *lpsolved, SCIP_Bool *lperror, SCIP_Bool *cutoff)
Definition relax_gcg.c:4654
SCIP_RETCODE GCGinitializeMasterProblemSolve(GCG *gcg)
Definition relax_gcg.c:5686
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
static SCIP_RETCODE ensureSizeMasterConss(GCG *gcg, SCIP_RELAXDATA *relaxdata, int size)
Definition relax_gcg.c:557
static SCIP_RETCODE relaxExecGcgOriginalProblem(GCG *gcg, SCIP_RELAX *relax, SCIP_Real *lowerbound, SCIP_RESULT *result)
Definition relax_gcg.c:3500
static SCIP_RETCODE saveOriginalVarMastercoeffs(GCG *gcg, SCIP_VAR **origvars, int norigvars, int nmasterconss, SCIP_CONS **origmasterconss, SCIP_CONS **masterconss)
Definition relax_gcg.c:1441
static SCIP_RETCODE checkAndAddExternalBranchingCandidate(GCG *gcg, SCIP_VAR *var)
Definition relax_gcg.c:4905
static SCIP_RETCODE freeBlockProblem(GCG *gcg, SCIP *blockprob, SCIP_RELAXDATA *relaxdata, int blocknum)
Definition relax_gcg.c:2198
static SCIP_RETCODE createPricingVar(SCIP_RELAXDATA *relaxdata, SCIP_VAR *origvar)
Definition relax_gcg.c:963
static SCIP_RETCODE setOriginalVarBlockNr(GCG *gcg, SCIP_RELAXDATA *relaxdata, SCIP_VAR *var, int newblock)
Definition relax_gcg.c:296
static SCIP_RETCODE initRelaxator(GCG *gcg, SCIP_RELAX *relax)
Definition relax_gcg.c:2466
SCIP_RETCODE GCGrelaxBacktrackProbing(GCG *gcg, int probingdepth)
Definition relax_gcg.c:4618
static SCIP_RETCODE GCGsetStructDecomp(GCG *gcg, GCG_DECOMP *decomp)
Definition relax_gcg.c:2351
static SCIP_RETCODE setPricingObjsOriginal(GCG *gcg, SCIP **probs, int nprobs)
Definition relax_gcg.c:1951
static SCIP_RETCODE initializeMasterProblemSolve(GCG *gcg, SCIP_RELAX *relax)
Definition relax_gcg.c:2874
static SCIP_RETCODE solveMasterProblem(GCG *gcg, SCIP *masterprob, SCIP_RELAXDATA *relaxdata, SCIP_Longint nodelimit, SCIP_Real *lowerbound, SCIP_RESULT *result)
Definition relax_gcg.c:3116
static SCIP_RETCODE displayPricingStatistics(GCG *gcg, SCIP **pricingprobs, int npricingprobs, int *blockrepresentative)
Definition relax_gcg.c:1234
static SCIP_RETCODE markConsMaster(GCG *gcg, SCIP_RELAXDATA *relaxdata, SCIP_CONS *cons)
Definition relax_gcg.c:340
static SCIP_RETCODE combineSolutions(GCG *gcg, SCIP_SOL **newsol, SCIP **probs, int nprobs)
Definition relax_gcg.c:1894
static SCIP_RETCODE ensureSizeSeparators(GCG *gcg, SCIP_RELAXDATA *relaxdata)
Definition relax_gcg.c:608
SCIP_RETCODE GCGrelaxBranchGetExtendedMasterCons(GCG *gcg, GCG_BRANCHRULE *branchrule, GCG_BRANCHDATA *branchdata, GCG_EXTENDEDMASTERCONSDATA **extendedmasterconsdata)
Definition relax_gcg.c:3905
static SCIP_RETCODE addActiveBranchExtendedmastercons(GCG *gcg, SCIP_RELAXDATA *relaxdata, GCG_BRANCHRULE *branchrule, GCG_BRANCHDATA *branchdata)
Definition relax_gcg.c:214
SCIP_RETCODE GCGrelaxBranchDeactiveMaster(GCG *gcg, GCG_BRANCHRULE *branchrule, GCG_BRANCHDATA *branchdata)
Definition relax_gcg.c:3809
GCG relaxator.
various SCIP helper methods
SCIP_RETCODE SCIPincludeDefaultPlugins(SCIP *scip)
GCG_EXPORT SCIP_RETCODE GCGsolverKnapsackSolveKnapsack(SCIP_Bool exactly, SCIP *pricingprob, SCIP_Real *solval, GCG_PRICINGSTATUS *status, SCIP_VAR ***solvars, SCIP_Real **solvals, int *nsolvars)
Definition solver_knapsack.c:107
knapsack solver for pricing problems
Definition relax_gcg.c:113
GCG_EXTENDEDMASTERCONSDATA ** activebranchextendedmasterconss
Definition relax_gcg.c:154
int maxactivebranchextendedmasterconss
Definition relax_gcg.c:156
int nactivebranchextendedmasterconss
Definition relax_gcg.c:155
data structures for branching rules
gcg data structure
data structures for storing OpenMP locks
data structures for separators for master
struct SCIP_Benders SCIP_BENDERS
struct SCIP_Branchrule SCIP_BRANCHRULE
struct SCIP_BranchruleData SCIP_BRANCHRULEDATA
#define GCG_DECL_BRANCHGETEXTENDEDMASTERCONSCOEFF(x)
Definition type_branchgcg.h:151
#define GCG_DECL_BRANCHGETEXTENDEDMASTERCONS(x)
Definition type_branchgcg.h:136
struct SCIP_Clock SCIP_CLOCK
struct SCIP_Cons SCIP_CONS
struct GCG_ExtendedMasterConsData GCG_EXTENDEDMASTERCONSDATA
Definition type_extendedmasterconsdata.h:57
struct SCIP_Heur SCIP_HEUR
type definitions for locks data structure
enum SCIP_LPSolStat SCIP_LPSOLSTAT
SCIP_LPSOLSTAT_OPTIMAL
SCIP_LPSOLSTAT_INFEASIBLE
SCIP_LPSOLSTAT_OBJLIMIT
SCIP_VERBLEVEL_DIALOG
SCIP_VERBLEVEL_NONE
SCIP_VERBLEVEL_MINIMAL
SCIP_VERBLEVEL_HIGH
SCIP_VERBLEVEL_NORMAL
struct SCIP_HashMap SCIP_HASHMAP
struct SCIP_RandNumGen SCIP_RANDNUMGEN
SCIP_PARAMSETTING_OFF
SCIP_OBJSENSE_MAXIMIZE
struct SCIP_Relax SCIP_RELAX
struct SCIP_RelaxData SCIP_RELAXDATA
SCIP_DIDNOTRUN
SCIP_CUTOFF
SCIP_DIDNOTFIND
SCIP_SUCCESS
enum SCIP_Result SCIP_RESULT
SCIP_INVALIDCALL
SCIP_ERROR
enum SCIP_Retcode SCIP_RETCODE
struct Scip SCIP
struct SCIP_SepaData SCIP_SEPADATA
#define SCIP_DECL_SEPAEXECSOL(x)
#define SCIP_DECL_SEPAEXECLP(x)
struct SCIP_Sepa SCIP_SEPA
SCIP_STAGE_PROBLEM
SCIP_STAGE_INITPRESOLVE
SCIP_STAGE_SOLVED
SCIP_STAGE_PRESOLVING
SCIP_STAGE_TRANSFORMED
SCIP_STAGE_INITSOLVE
SCIP_STAGE_EXITPRESOLVE
SCIP_STAGE_EXITSOLVE
SCIP_STAGE_INIT
SCIP_STAGE_FREE
SCIP_STAGE_FREETRANS
SCIP_STAGE_SOLVING
SCIP_STAGE_TRANSFORMING
SCIP_STAGE_PRESOLVED
struct SCIP_Sol SCIP_SOL
SCIP_STATUS_OPTIMAL
SCIP_STATUS_BESTSOLLIMIT
SCIP_STATUS_SOLLIMIT
SCIP_STATUS_UNBOUNDED
SCIP_STATUS_UNKNOWN
SCIP_STATUS_GAPLIMIT
SCIP_STATUS_INFORUNBD
SCIP_STATUS_STALLNODELIMIT
SCIP_STATUS_TIMELIMIT
SCIP_STATUS_INFEASIBLE
SCIP_STATUS_NODELIMIT
SCIP_STATUS_MEMLIMIT
enum SCIP_Status SCIP_STATUS
struct SCIP_Node SCIP_NODE
struct SCIP_Var SCIP_VAR
SCIP_VARTYPE_INTEGER
SCIP_VARSTATUS_COLUMN
SCIP_VARSTATUS_LOOSE