Loading...
Searching...
No Matches
solver_cliquer.c
Go to the documentation of this file.
36/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
56#define SOLVER_DESC "heuristic solver for pricing problems that solves independent set problems with cliquer"
93 int skipchecksnodelimit;/**< maximum number of graph nodes for which additional checks (density threshold / linear cutoff) are skipped */
95 SCIP_Real maxcliqueconsperc; /**< maximum clique constraint percentage the solver should run on */
96 SCIP_Bool* isnotapplicable; /**< array tracking if solver is not applicable in root node (& no cuts) */
98 SCIP_Bool usemultiplicity; /**< boolean for activating usage of var multiplicities for weighting */
129/** Returns whether 2 variables are linked, either simply or in a transitive way in respect to a given linkmatrix matrix.
137 int* vartrace, /**< Array to keep track of which nodes have already been visited during recursion */
138 int* traceindex, /**< Pointer to index to keep track of the number of visited nodes during recursion */
173 if( !varintrace && areVarsLinkedRec(linkmatrix, nextvarindex, vindex2, vartrace, traceindex, linkedvars, nlinkedvars) )
182/** Wrapper function for areVarsLinkedRec, mallocs and cleans up the necessary memory and passes through the result */
217 varslinked = areVarsLinkedRec(linkmatrix, vindex1, vindex2, vartrace, &traceindex, linkedvars, nlinkedvars);
224/** Update transitivity in the linkmatrix matrix between 2 variables that are to be linked and all linked variables */
243 /* Check if the variables are part of a link already, add them elsewise to the linkedvars array */
274 * One might want to check performance implications of establishing cliques from all connected components.
276 * Or the converse: Delete the following loop to save time in this function but potentially increase time
277 * consumption of areVarsLinked() which would need to traverse more nodes (increased transitivity).
315/** Returns the node index of a given variable in the bijection or that of a linked variable, if any. */
408/** Returns a representative variable for a given variable in the linked variable-bijection, if any, else NULL.*/
428/** Returns the index of the representative variable for a given variable in the linked variable-bijection, if any.*/
473 if( !valisset[j] && areVarsLinked(scip, linkmatrix, linkedvars[i], linkedvars[j], linkedvars, nlinkedvars) )
536/** Add a variable to the bijection graph g and indsetvars array. Returns the index of the corresponding node in the graph. */
556 nodeindex = getLinkedNodeIndex(scip, consvar, indsetvars, *indexcount, linkmatrix, linkedvars, nlinkedvars);
585 SCIP_Real* solvals, /**< Array holding the current solution values of all variables of the problem */
641/** Scale the objective coefficients of the variables maximally s.t. they become integral and the sum of values does not exceed INT_MAX */
682/** Set isnotapplicable to true for given problem number if solver is applied at root node and no cuts are applied. */
694/** Returns index in adjacency matrix of coupling digraph (after inserting it if not already contained). */
722/** Update coupling digraph for a given coupling(like) constraint, i.e., the coupling and constraint vars.
724 * Then, directed edges from coupling var to each other var involved in the constraint are inserted. */
743 couplingvarind = assureInCouplingGraph(scip, varsincouplings, nvarsincouplings, var, linkedvars, nlinkedvars,
752 consvarind = assureInCouplingGraph(scip, varsincouplings, nvarsincouplings, consvars[i], linkedvars, nlinkedvars,
759/** Recursive function - should be called through isCouplingRelevant() or other non-recursive methods.
760 * Checks if a variable for a given index in the coupling digraph is relevant for distributing the coefficients. */
775 if( SCIPisLT(scip, getAggrObjCoef(varsincouplings[varind], nlinkedvars, nvarsincouplings, aggrobjcoef), 0) )
784 isCouplingRelevantRec(scip, i, couplingmatrix, varsincouplings, nvarsincouplings, nlinkedvars, aggrobjcoef,
793/** Checks if a variable for a given index in the coupling digraph is relevant for distributing the coefficients.
796 * - in the digraph a node corresponding to a variable with negative obj. coef. is reachable in the digraph. */
808 return isCouplingRelevantRec(scip, varind, couplingmatrix, varsincouplings, nvarsincouplings, nlinkedvars,
828 varind = getNodeIndexCouplDigraph(scip, var, linkmatrix, linkedvars, nlinkedvars, varsincouplings, nvarsincouplings);
831 return isCouplingRelevantRec(scip, varind, couplingmatrix, varsincouplings, nvarsincouplings, nlinkedvars,
835/** Checks in the coupling digraph if a var with a given index has a coupling relevant successor. */
852 isCouplingRelevantRec(scip, i, couplingmatrix, varsincouplings, nvarsincouplings, nlinkedvars, aggrobjcoef,
882 isCouplingRelevantRec(scip, i, couplingmatrix, varsincouplings, nvarsincouplings, nlinkedvars, aggrobjcoef,
891/** Compute entries for varmultiplicities array holding counts of represented variables per digraph node */
909 varmultiplicities[i] = countReachableVars(scip, linkmatrix, varsincouplings[i], linkedvars, nlinkedvars);
918 * Distributes a variable's objective coefficient among its coupled successors using a structured
919 * closed-form approximation, ensuring no feasible assignment overestimates the original objective function.
922 * Given m constraints of the form x_{i,1} + ... + x_{i,n_i} ≤ c_i * y, each constraint i receives:
932 * - Iterate over constraints, identify relevant variables, and accumulate their coefficient shares (`coefshares[j]`).
939 * - **Decorative Coupling Constraints** (x_1 + ... + x_n ≤ c * y, c ≥ n): Each variable gets **1 / n_rel_cons_vars**.
941 * This method ensures the total assigned weight remains ≤ w and that feasible selections of x_ij never exceed w.
944/** Coupling(-like) Variable Objective Distribution Strategy 1: Natural Coefficient Share Distribution. */
958 SCIP_CONS** constraints, /**< Array containing pointers to SCIP constraints of pricing problem */
960 int* couplingcoefindices,/**< Array for coupling coefficient of each constraint (if coupling) */
961 CLIQUER_CONSTYPE* cliquerconstypes /**< Array holding constraint types (specific to this solver) */
976 SCIP_HASHMAP* vartocoefsharemap; /* hash storing relevant var index; image is index for coefshares array */
982 nsuccessors = getNSuccessorsRelevant(scip, actvarind, couplingmatrix, varsincouplings, nvarsincouplings,
992 isCouplingRelevant(scip, i, couplingmatrix, varsincouplings, nvarsincouplings, nlinkedvars, aggrobjcoef) )
1009 isCouplingRelevantVar(scip, SCIPgetVarVarbound(scip, constraints[i]), couplingmatrix, varsincouplings,
1012 couplingindex = getNodeIndexCouplDigraph(scip, SCIPgetVarVarbound(scip, constraints[i]), linkmatrix,
1030 if( isCouplingRelevantVar(scip, lconsvars[j], couplingmatrix, varsincouplings, nvarsincouplings,
1046 if( isCouplingRelevantVar(scip, lconsvars[j], couplingmatrix, varsincouplings, nvarsincouplings,
1067 coeftodistr = getAggrObjCoef(varsincouplings[actvarind], nlinkedvars, nvarsincouplings, aggrobjcoef);
1071 isCouplingRelevant(scip, i, couplingmatrix, varsincouplings, nvarsincouplings, nlinkedvars, aggrobjcoef) )
1087 * This heuristic distributes the objective coefficient of a coupled variable among its relevant successor variables
1088 * by leveraging **maximum independent sets** in the coupling graph. The goal is to ensure a balanced coefficient
1092 * - Construct a **graph representation** where nodes correspond to relevant successor variables.
1094 * - Remove edges based on constraints of type `LINEAR_COUPLING_CLIQUE`, ensuring that only truly independent
1096 * - Compute a **maximum independent set (MIS)** in this reduced graph using the **cliquer** library.
1101 * Attention: If the coupling graph is too large, the cliquer library might not solve the problem in acceptable time.
1105/** Coupling(-like) Variable Objective Distribution Strategy 2: Independent Set-based share distribution. */
1119 SCIP_CONS** constraints, /**< Array containing pointers to SCIP constraints of pricing problem */
1121 int* couplingcoefindices,/**< Array for coupling coefficient of each constraint (if coupling) */
1122 CLIQUER_CONSTYPE* cliquerconstypes /**< Array holding constraint types (specific to this solver) */
1135 SCIP_HASHMAP* vartosuccmap; /* hash storing relevant var index; image is index for corresponding graph node */
1142 nsuccessors = getNSuccessorsRelevant(scip, actvarind, couplingmatrix, varsincouplings, nvarsincouplings,
1163 isCouplingRelevant(scip, i, couplingmatrix, varsincouplings, nvarsincouplings, nlinkedvars, aggrobjcoef) )
1177 SCIPgetVarsLinear(scip, constraints[i])[couplingcoefindices[i]] == varsincouplings[actvarind] )
1186 if( isCouplingRelevantVar(scip, lconsvars[j], couplingmatrix, varsincouplings, nvarsincouplings,
1193 if( isCouplingRelevantVar(scip, lconsvars[k], couplingmatrix, varsincouplings, nvarsincouplings,
1238 coeftodistr = getAggrObjCoef(varsincouplings[actvarind], nlinkedvars, nvarsincouplings, aggrobjcoef);
1242 isCouplingRelevant(scip, i, couplingmatrix, varsincouplings, nvarsincouplings, nlinkedvars, aggrobjcoef) )
1246 actvarcoef + coeftodistr * ((SCIP_Real)(usemultipl ? varmultiplicities[i] : 1.0) / denominator),
1258 * Idea - Distribution Strategy 3: Uniform Coefficient Share Distribution. (Fastest heuristic implemented)
1260 * Uniformly distributes the objective coefficient of a variable among all its relevant coupled successor variables.
1261 * Each successor receives an equal share, ensuring no overestimation of the redistributed objective coefficient.
1264/** Coupling(-like) Variable Objective Distribution Strategy 3: Uniform Coefficient Share Distribution. */
1285 nsuccessors = getNSuccessorsRelevant(scip, actvarind, couplingmatrix, varsincouplings, nvarsincouplings,
1289 coeftodistr = getAggrObjCoef(varsincouplings[actvarind], nlinkedvars, nvarsincouplings, aggrobjcoef);
1293 isCouplingRelevant(scip, i, couplingmatrix, varsincouplings, nvarsincouplings, nlinkedvars, aggrobjcoef) )
1304/** Distributes the objective coefficient of coupling(-like) vars to all other vars occurring in those constraints.
1305 * -> Recursive function: Should be called through non-recursive wrapper function 'distributeObjCoef()'. */
1320 SCIP_CONS** constraints, /**< Array containing pointers to SCIP constraints of pricing problem */
1322 int* couplingcoefindices,/**< Array for coupling coefficient of each constraint (if coupling) */
1323 CLIQUER_CONSTYPE* cliquerconstypes, /**< Array holding constraint types (specific to this solver) */
1331 /* Cycle in digraph detected. Could improve handling, but because very unlikely we just end recursion here.
1333 * (-> i.e. it follows x = y = z; aggegated coef. could be distributed equally among other coupled vars.) */
1345 distributeObjCoefRec(scip, i, isdistributed, couplingmatrix, varsincouplings, nvarsincouplings,
1351 /* If now has positive (aggr.) obj. coeff.: Distribute coeff. of act. var to all successor variables. */
1352 if( SCIPisGT(scip, getAggrObjCoef(varsincouplings[actvarind], nlinkedvars, nvarsincouplings, aggrobjcoef), 0))
1362 objCoefDistrHeurIS(scip, actvarind, couplingmatrix, varsincouplings, nvarsincouplings, varmultiplicities,
1380 * As the cliquer solver can only handle non-negative integer weights, the objective coefficients are (besides
1382 * Thus, after the independent set problem is transformed (heuristically) to a clique problem, the objective
1383 * coefficients of coupling variables worsening the solutions objective value are not properly reflected in the
1387 * The objective coefficient w of a coupling variable y (constraints of form: x_1 + ... + x_n <= c*y) can be distributed
1388 * among all other variables x_1, ..., x_n in the constraint(s) to get an objective that is closer to the actual one.
1391 * We implement this by building and utilizing a digraph to process the distribution hierarchically. I.e., if there
1392 * exist constraints of the form z_1 + z_2 <= z_3 and z_3 + z_4 <= z_5, we first want to distribute the coefficient of
1393 * z_5 to the ones of z_3 and z_4 and only then distribute the (aggregated) objective coefficient of z_3 to the ones of
1396 * Furthermore, we only distribute coefficients that worsen the solution (negative ones after inversion). Also, we only
1397 * distribute to relevant variables, as the others should already be never chosen because there objective coefficient
1401/** Distributes the objective coefficient of coupling(-like) vars to all other vars occurring in those constraints. */
1405 SCIP_CONS** constraints, /**< Array containing pointers to SCIP constraints of pricing problem */
1407 int* couplingcoefindices,/**< Array for coupling coefficient of each constraint (if coupling) */
1408 CLIQUER_CONSTYPE* cliquerconstypes, /**< Array holding constraint types (specific to this solver) */
1430 initVarMultiplicities(scip, linkmatrix, linkedvars, nlinkedvars, couplingmatrix, varsincouplings,
1437 hasSuccessorRel(scip, i, couplingmatrix, varsincouplings, nvarsincouplings, nlinkedvars, aggrobjcoef) )
1439 distributeObjCoefRec(scip, i, isdistributed, couplingmatrix, varsincouplings, nvarsincouplings,
1462 SCIP_CONS** constraints, /**< Array containing pointers to SCIP constraints of pricing problem */
1467 int* couplingcoefindices,/**< Array for coupling coefficient of each constraint (if coupling) */
1471 CLIQUER_CONSTYPE* cliquerconstypes /**< Array holding constraint types (specific to this solver) */
1483 /* Loop for checking and saving the constraint types. This is done to ease the handling of the cases later on. */
1484 /* Also the case of the occurrence of constraints that can not be handled by the solver is covered. */
1485 /* Also, the equality graph is built through updating the linkmatrix every time a "same"-constraint is encountered. */
1496 if( !SCIPisEQ(pricingprob, SCIPgetLhsLinear(pricingprob, constraints[i]), SCIPgetRhsLinear(pricingprob, constraints[i])) )
1499 if( SCIPgetNVarsLinear(pricingprob, constraints[i]) == 2 && SCIPisEQ(pricingprob, SCIPgetRhsLinear(pricingprob, constraints[i]), 1) )
1503 /* Handle other constraints that behave like IS constraints, i.e. cx+dy<=rhs with c+d>rhs, c>0, d>0 */
1504 else if( SCIPgetNVarsLinear(pricingprob, constraints[i]) == 2 && consvals[0] > 0 && consvals[1] > 0 &&
1505 SCIPisLT(pricingprob, SCIPgetRhsLinear(pricingprob, constraints[i]), consvals[0] + consvals[1]) &&
1533 * -> To handle those, they must be identified and marked somehow to check if the coeff. is fixed
1540 if( (couplingcoefindices[i] == -1) && SCIPisEQ(pricingprob, SCIPgetRhsLinear(pricingprob, constraints[i]), 1) )
1545 else if( (couplingcoefindices[i] != -1) && SCIPisEQ(pricingprob, SCIPgetRhsLinear(pricingprob, constraints[i]), 0.0) )
1547 /* Special case: The coupling constraint is purely decorative (coefficient + 1 of coupling var >= #vars)*/
1560 SCIPdebugMessage("Exit: Coupling coefficient unhandled, coef: %g.\n", consvals[couplingcoefindices[i]]);
1585 /* Check for "same"-constraints present in Ryan-Foster-Branching and save the links between the variables. */
1587 if( SCIPisEQ(pricingprob, SCIPgetLhsVarbound(pricingprob, constraints[i]), SCIPgetRhsVarbound(pricingprob, constraints[i])) )
1590 if( (SCIPgetRhsVarbound(pricingprob, constraints[i]) == 0) && (SCIPgetVbdcoefVarbound(pricingprob, constraints[i]) == -1) )
1596 /* Since the vars may not be part of the graph, we have to be able to set their solval later, thus we save the constraint index */
1604 SCIPgetVbdcoefVarbound(pricingprob, constraints[i]), SCIPgetRhsVarbound(pricingprob, constraints[i]));
1623 SCIPgetRhsVarbound(pricingprob, constraints[i]), SCIPgetVbdcoefVarbound(pricingprob, constraints[i]));
1630 * The constraint may also be of the form c + 1 > rhs and c < rhs, i.e. a non-standard IS-constraint.
1635 (SCIPisLT(pricingprob, SCIPgetRhsVarbound(pricingprob, constraints[i]), SCIPgetVbdcoefVarbound(pricingprob, constraints[i]) + 1) &&
1636 SCIPisLT(pricingprob, SCIPgetVbdcoefVarbound(pricingprob, constraints[i]), SCIPgetRhsVarbound(pricingprob, constraints[i]))) )
1644 SCIPgetRhsVarbound(pricingprob, constraints[i]), SCIPgetVbdcoefVarbound(pricingprob, constraints[i]));
1649 else if( SCIPisEQ(pricingprob, SCIPgetLhsVarbound(pricingprob, constraints[i]), SCIPgetRhsVarbound(pricingprob, constraints[i])) )
1652 if( !((SCIPgetRhsVarbound(pricingprob, constraints[i]) == 0) && (SCIPgetVbdcoefVarbound(pricingprob, constraints[i]) == -1)) )
1656 SCIPgetVbdcoefVarbound(pricingprob, constraints[i]), SCIPgetRhsVarbound(pricingprob, constraints[i]));
1664 SCIPgetVbdcoefVarbound(pricingprob, constraints[i]), SCIPgetRhsVarbound(pricingprob, constraints[i]));
1697 * Propagate fixings of variables through constraints until the set of fixed variables is stable.
1698 * @return SCIP bool that is false in case the problem is infeasible, true if propagation was successful.
1703 SCIP_CONS** constraints, /**< Array containing pointers to SCIP constraints of pricing problem */
1711 int* couplingcoefindices,/**< Array for coupling coefficient of each constraint (if coupling) */
1712 int* consvarsfixedcount, /**< Array for counting how many variables are fixed per constraint */
1716 CLIQUER_CONSTYPE* cliquerconstypes /**< Array holding constraint types (specific to this solver) */
1734 prevfixed = -1; /* Need at least one iteration (because it is checked if linked variables appear in IS-constraint, i.e., x = y and x + y <= 1). */
1746 /* Therefore, we count how many variables are fixed per constraint to skip constraints which have only fixed variables. */
1747 /* The constraint is checked if it is consistent with the fixings. Afterwards, the counter is updated. */
1758 if( cliquerconstypes[i] == LINEAR_COUPLING_CLIQUE || cliquerconstypes[i] == LINEAR_COUPLING_DECORATIVE )
1761 updateCouplingDiGraph(pricingprob, lconsvars, nvars, lconsvars[couplingcoefindices[i]], couplingmatrix,
1772 if( solvals[SCIPvarGetProbindex(lconsvars[0])] == 1 && solvals[SCIPvarGetProbindex(lconsvars[1])] == 1 )
1778 else if( solvals[SCIPvarGetProbindex(lconsvars[0])] == 1 && solvals[SCIPvarGetProbindex(lconsvars[1])] == -1 )
1785 else if( solvals[SCIPvarGetProbindex(lconsvars[0])] == -1 && solvals[SCIPvarGetProbindex(lconsvars[1])] == 1 )
1798 setLinkedSolvals(pricingprob, solvals, linkmatrix, linkedvars, nlinkedvars, lconsvars[0], 0.0);
1819 SCIPdebugMessage("Exit: More than one variable with value fixed to 1 in clique constraint.\n");
1824 SCIPdebugMessage("Exit: To many variable values fixed to 1 in coupling constraint with coupling variable value fixed to 1.\n");
1827 else if( (cliquerconstypes[i] == LINEAR_COUPLING_CLIQUE || cliquerconstypes[i] == LINEAR_COUPLING_DECORATIVE) &&
1831 SCIPdebugMessage("Exit: To many variable values fixed to 1 in coupling constraint with coupling variable value fixed to 0.\n");
1838 ((cliquerconstypes[i] == LINEAR_COUPLING_CLIQUE || cliquerconstypes[i] == LINEAR_COUPLING_DECORATIVE) &&
1842 /* Or a coupling constraint that can be handled like a clique constraint with exactly one variable value fixed to 1. */
1843 /* Or a coupling constraint (clique or decorative) that has the coupling variable fixed to 0. */
1858 else if( (cliquerconstypes[i] == LINEAR_COUPLING_CLIQUE || cliquerconstypes[i] == LINEAR_COUPLING_DECORATIVE) &&
1862 /* We have a coupling constraint with one variable (different from the coupling variable!) fixed to 1.
1863 * And the coupling variable is unfixed. Then the coupling variable needs to be fixed to 1 too. */
1867 /* In case of a clique constraint, we can fix all other variables than the (now 2) fixed ones to 0. */
1893 updateCouplingDiGraph(pricingprob, vconsvars, 2, vconsvars[1], couplingmatrix, varsincouplings,
1902 if( solvals[SCIPvarGetProbindex(vconsvars[0])] >= 0 && solvals[SCIPvarGetProbindex(vconsvars[1])] >= 0 &&
1909 else if( solvals[SCIPvarGetProbindex(vconsvars[0])] >= 0 && solvals[SCIPvarGetProbindex(vconsvars[1])] == -1 )
1916 else if( solvals[SCIPvarGetProbindex(vconsvars[0])] == -1 && solvals[SCIPvarGetProbindex(vconsvars[1])] >= 0 )
1938 ((solvals[SCIPvarGetProbindex(vconsvars[0])] == 1 && solvals[SCIPvarGetProbindex(vconsvars[1])] == -1) ||
1939 (solvals[SCIPvarGetProbindex(vconsvars[0])] == -1 && solvals[SCIPvarGetProbindex(vconsvars[1])] == 0)) )
1943 if( solvals[SCIPvarGetProbindex(vconsvars[0])] == 1 && solvals[SCIPvarGetProbindex(vconsvars[1])] == -1 )
1953 ((solvals[SCIPvarGetProbindex(vconsvars[0])] == 1 && solvals[SCIPvarGetProbindex(vconsvars[1])] == -1) ||
1954 (solvals[SCIPvarGetProbindex(vconsvars[0])] == -1 && solvals[SCIPvarGetProbindex(vconsvars[1])] == 1)) )
1958 if( solvals[SCIPvarGetProbindex(vconsvars[0])] == 1 && solvals[SCIPvarGetProbindex(vconsvars[1])] == -1 )
1974 setLinkedSolvals(pricingprob, solvals, linkmatrix, linkedvars, nlinkedvars, vconsvars[0], 0.0);
1986/* Basic idea of the heuristic solver: The biggest independent set in a graph corresponds to the biggest clique
1987 * of the complement graph, for which we use the cliquer library to find it. We therefore transform the variables
1988 * into graph nodes and delete the edge between two nodes if there is an independent set constraint involving both.
1989 * By doing this, they cannot both be part of the maximum clique and thus not be both part of the independent set.
1990 * The correspondence between variables and graph nodes is done by a bijection using the indsetvars array:
1991 * The variable indsetvars[i] is the i-th node of the graph, indexcount keeps track of the next unmapped graph node.
1992 * There is also the possibility that two variables x and y are linked with an equality constraint x-y = 0 due to
1993 * Ryan-Foster-Branching. In this case, all linked variables are mapped to the same node. There are functions
1996 * Since we want to add a column with the best reduced cost, we take the objective coefficient of variables into
1997 * account by giving their graph nodes corresponding weights and searching for a weight-maximal clique.
1999 * If you would like to add the handling of more types of constraints, please note that the current code
2013 SCIP_Bool exactly, /**< should the pricing problem be solved to optimality or heuristically? */
2073 SCIPdebugMessage("Exit: Solver already found to be not applicable to pricing problem %i.\n", probnr);
2128 /* Used to keep track of the number of variables that are involved in coupling constraints (or std varbnd) */
2131 /* Build complementary graph by first creating a complete graph and then deleting edges of IS constraints. */
2132 /* Size is first chosen to be maximal and then later cropped down to the actual number of nodes. */
2161 SCIPdebugMessage( "Number of variables fixed by bound (before propagation): %d (of %d).\n", nfixedvars, npricingprobvars );
2165 consvarsfixedcount[i] = 0; /* Initialize array to count the number of fixed vars per constraint. */
2166 couplingcoefindices[i] = -1; /* Initialize array to save coupling coefficient if constraint is a coupling constraint. */
2172 if( !determineCliquerConsTypes(pricingprob, constraints, linkedvars, vconsvars, markedconsindices, linkmatrix,
2181 /* Cliquer may perform worse than other solvers (e.g. SCIP) on problems containing many clique inequalities:
2182 * -> Thus, we do not apply the solver if the percentage of clique constraints exceeds a limit parameter. */
2194 SCIPdebugMessage("Exit: Clique-constraint percentage limit exceeded, clique-cons perc.: %3.f\n",
2204 !propagateVariablefixings(pricingprob, constraints, linkedvars, vconsvars, couplvars, solvals, couplingmatrix,
2213 SCIPdebugMessage( "Number of variables fixed before building the graph (after propagation): %d (of %d).\n",
2216 /* Check if all variables of the pricing problem are fixed. In this case, it is the only feasible solution. */
2227 SCIPdebugMessage("nlinkedvars = %i , ncouplvars = %i , coefdistrheur = %i\n", nlinkedvars, ncouplvars, solver->objcoefdistr);
2236 /* Before adding nodes to the graph, aggregating the objective coefficients may be necessary if "same"-constraints exist. */
2240 /* If there are coupling or standard varbound constraints, it may be necessary to distribute objective coefficients. */
2242 distributeObjCoef(pricingprob, constraints, nconss, couplingcoefindices, cliquerconstypes, couplingmatrix,
2252 if( !areObjectivesIntegral(pricingprob, linkedvars, nlinkedvars, couplvars, ncouplvars, aggrobjcoef) )
2253 scalingfactor = scaleRelativeToMax(pricingprob, linkedvars, nlinkedvars, couplvars, ncouplvars, aggrobjcoef);
2317 /* All links have to be established first before we can add nodes to the graph, else pairs (a,b) and (c,d) would be mapped to different nodes */
2318 /* if link (b,c) is present but later in the list. We have to run through the constraints again as the linked variables need to be assigned to nodes */
2322 /* Since we know that all marked constraints at this point are same constraints, we can just add them to the graph. */
2324 if( SCIPisLT(pricingprob, getAggrObjCoef(vconsvars[0], nlinkedvars, ncouplvars, aggrobjcoef), 0) )
2326 nodeindex0 = addVarToGraph(pricingprob, g, vconsvars[0], &indexcount, scalingfactor, indsetvars, linkmatrix,
2331 /* Main loop to check the nature of each constraint and manipulate the graph accordingly (add nodes, remove edges). */
2350 (SCIPisLT(pricingprob, getAggrObjCoef(lconsvars[0], nlinkedvars, ncouplvars, aggrobjcoef), 0) ||
2351 SCIPisLT(pricingprob, getAggrObjCoef(lconsvars[1], nlinkedvars, ncouplvars, aggrobjcoef), 0))) ||
2360 if( SCIPisLT(pricingprob, getAggrObjCoef(lconsvars[0], nlinkedvars, ncouplvars, aggrobjcoef), 0) )
2361 nodeindex0 = addVarToGraph(pricingprob, g, lconsvars[0], &indexcount, scalingfactor, indsetvars, linkmatrix,
2365 if( SCIPisLT(pricingprob, getAggrObjCoef(lconsvars[1], nlinkedvars, ncouplvars, aggrobjcoef), 0) )
2366 nodeindex1 = addVarToGraph(pricingprob, g, lconsvars[1], &indexcount, scalingfactor, indsetvars, linkmatrix,
2369 /* If both vairables nodes are added and an edge exists between the two in the graph: delete this edge. */
2378 if( (cliquerconstypes[i] == LINEAR_CLIQUE && consvarsfixedcount[i] == nvars - 1 && consvarsfixedtozerocount[i] == nvars - 1) ||
2386 if( (cliquerconstypes[i] == LINEAR_COUPLING_DECORATIVE && solvals[SCIPvarGetProbindex(lconsvars[couplingcoefindices[i]])] != 1.0) ||
2390 /* If the node is part of the maximum clique, it is safe to set it to one, so we simply add it to the graph */
2391 nodeindex0 = addVarToGraph(pricingprob, g, lconsvars[couplingcoefindices[i]], &indexcount, scalingfactor, indsetvars,
2400 * If (coupling-)clique constraint, try to add all (non-coupling) variables corresponding nodes to the graph
2405 /* Delete the edges between all the variables of the constraint (that are not the coupling variable).
2411 SCIPisLT(pricingprob, getAggrObjCoef(lconsvars[j], nlinkedvars, ncouplvars, aggrobjcoef), 0) &&
2415 nodeindex0 = addVarToGraph(pricingprob, g, lconsvars[j], &indexcount, scalingfactor, indsetvars, linkmatrix,
2422 SCIPisLT(pricingprob, getAggrObjCoef(lconsvars[k], nlinkedvars, ncouplvars, aggrobjcoef), 0) &&
2425 nodeindex1 = addVarToGraph(pricingprob, g, lconsvars[k], &indexcount, scalingfactor, indsetvars, linkmatrix,
2452 /* If x fixed to 0 or y fixed to 1 (and other variable not fixed): constraint relaxed -> continue. */
2454 (solvals[SCIPvarGetProbindex(vconsvars[0])] == 0.0 || solvals[SCIPvarGetProbindex(vconsvars[1])] == 1.0) )
2458 if( SCIPisLT(pricingprob, getAggrObjCoef(vconsvars[0], nlinkedvars, ncouplvars, aggrobjcoef), 0) )
2460 nodeindex0 = addVarToGraph(pricingprob, g, vconsvars[0], &indexcount, scalingfactor, indsetvars, linkmatrix,
2462 nodeindex1 = addVarToGraph(pricingprob, g, vconsvars[1], &indexcount, scalingfactor, indsetvars, linkmatrix,
2464 /* It may be the case, that both the constraints x - y <= 0 and x + y <= 1 are part of the problem */
2470 else if( SCIPisLT(pricingprob, getAggrObjCoef(vconsvars[1], nlinkedvars, ncouplvars, aggrobjcoef), 0) )
2472 nodeindex1 = addVarToGraph(pricingprob, g, vconsvars[1], &indexcount, scalingfactor, indsetvars, linkmatrix,
2475 /* If none of the nodes are relevant, force x to be zero, since the constraint would be violated if x = 1 and y = 0 */
2478 /* This logic might not always be correct. These vairables might be set to 1 in an optimal solution if, e.g.,
2479 * they appear as coupling variables in other constraints. Even if they are both not "relevant".
2481 setLinkedSolvals(pricingprob, solvals, linkmatrix, linkedvars, nlinkedvars, vconsvars[0], 0.0);
2488 /* If x fixed to 0 or y fixed to 0 (and other variable unfixed): constraint relaxed -> continue. */
2492 /* Preprocessing: Constraint is only relevant for pricing if one of the variables has an objective value < 0 */
2493 if( SCIPisLT(pricingprob, getAggrObjCoef(vconsvars[0], nlinkedvars, ncouplvars, aggrobjcoef), 0) ||
2497 if( SCIPisLT(pricingprob, getAggrObjCoef(vconsvars[0], nlinkedvars, ncouplvars, aggrobjcoef), 0) )
2498 nodeindex0 = addVarToGraph(pricingprob, g, vconsvars[0], &indexcount, scalingfactor, indsetvars, linkmatrix,
2502 if( SCIPisLT(pricingprob, getAggrObjCoef(vconsvars[1], nlinkedvars, ncouplvars, aggrobjcoef), 0) )
2503 nodeindex1 = addVarToGraph(pricingprob, g, vconsvars[1], &indexcount, scalingfactor, indsetvars, linkmatrix,
2558 * If (n)odes and (d)ensity have values n > m*d + b (with slope m and intercept b), solver is not applied.
2562 SCIPisGT(pricingprob, indexcount, solver->lincutoffslope * density + solver->lincutoffintercept) )
2564 SCIPdebugMessage("Exit: Linear threshold n <= m*d + b exceeded (i.e.: %i > %.1f * %.2f + %.1f).\n",
2573 /* indexcount now holds the actual number of unique IS variables, thus we truncate the graph */
2579 /* Clean up the graph. If a variable's solval has been set to 0, it should not be part of the max clique */
2580 /* We enforce this by isolating the node and setting its weight to 1 as nodes cannot be deleted */
2585 nodeindex0 = getLinkedNodeIndex(pricingprob, pricingprobvars[i], indsetvars, indexcount, linkmatrix, linkedvars, nlinkedvars);
2617 /* Coupling variables were pre-set to -2.0, if they are part of the maximum clique, we enable them.
2620 * NOTE: As long as coupling variables may have positive cost but have cost of 1 in graph, the solver is of heuristic nature.
2621 * The '-2.0'-marked coupling variables are set to 1, even if they render the solution be of non-negative reduced cost.
2625 (SCIPisLT(pricingprob, getAggrObjCoef(indsetvars[i], nlinkedvars, ncouplvars, aggrobjcoef), 0) ||
2630 setLinkedSolvals(pricingprob, solvals, linkmatrix, linkedvars, nlinkedvars, indsetvars[i], 1.0);
2637 setLinkedSolvals(pricingprob, solvals, linkmatrix, linkedvars, nlinkedvars, indsetvars[i], 0.0);
2647 /* Handle the case of marked inequality constraints of type x - y <= 0 in combination with x + y <= 1 -Constraints */
2651 if( (solvals[SCIPvarGetProbindex(vconsvars[0])] == 1) && (solvals[SCIPvarGetProbindex(vconsvars[1])] == 0) )
2653 setLinkedSolvals(pricingprob, solvals, linkmatrix, linkedvars, nlinkedvars, vconsvars[0], 0.0);
2660 if( solvals[SCIPvarGetProbindex(vconsvars[0])] != solvals[SCIPvarGetProbindex(vconsvars[1])] &&
2663 if( solvals[SCIPvarGetProbindex(vconsvars[0])] == 0 || solvals[SCIPvarGetProbindex(vconsvars[1])] == 0 )
2665 setLinkedSolvals(pricingprob, solvals, linkmatrix, linkedvars, nlinkedvars, vconsvars[0], 0.0);
2669 /* One or both of the vars are unset and the other one, if not -1, is forced to be 1, thus we can set both to 1 */
2670 setLinkedSolvals(pricingprob, solvals, linkmatrix, linkedvars, nlinkedvars, vconsvars[0], 1.0);
2675 /* There may be variables left which are unconstrained. We set these to 1 manually if they have an objective value < 0*/
2680 if( SCIPisLT(pricingprob, getAggrObjCoef(pricingprobvars[i], nlinkedvars, ncouplvars, aggrobjcoef), 0) )
2693 SCIP_CALL( GCGcreateGcgCol(gcg, pricingprob, &col, probnr, pricingprobvars, solvals, npricingprobvars, FALSE, SCIPinfinity(pricingprob)) );
2752/** solving process initialization method of pricing solver (called when branch and bound process is about to begin) */
2774 SCIP_CALL( SCIPallocClearBlockMemoryArray(masterprob, &solverdata->isnotapplicable, npricingprobs) );
2779/** solving process deinitialization method of pricing solver (called before branch and bound process data is freed) */
2846 "maximum number of graph nodes for which additional checks (density threshold / linear cutoff) are skipped",
2847 &solverdata->skipchecksnodelimit, TRUE, DEFAULT_SKIPCHECKSNODELIMIT, 0, INT_MAX, NULL, NULL) );
2858 "distribution of objective coefficients of coupling variables (disabled = 0, natural share = 1, "
2863 "should the usage of multiplicity of linked variables be used to weight distributed coefficients be enabled? "
2868 "should linear cutoff (n > m*d + b) for usage of solver <cliquer>, based on graph (d)ensity and (n)odes, "
2878 &solverdata->lincutoffintercept, TRUE, DEFAULT_INTERCEPT, SCIP_REAL_MIN, SCIP_REAL_MAX, NULL, NULL) );
2880 SCIP_CALL( SCIPincludeExternalCodeInformation(origprob, "Cliquer", "C routines for finding cliques in an arbitrary weighted graph by S. Niskanen and P. Ostergard (https://users.aalto.fi/~pat/cliquer.html)") );
#define INLINE
#define SCIP_REAL_MAX
#define SCIP_Bool
#define SCIP_Real
#define SCIP_CALL_ABORT(x)
#define SCIP_REAL_MIN
#define TRUE
#define FALSE
GCG interface methods.
SCIP_Real SCIPgetVbdcoefVarbound(SCIP *scip, SCIP_CONS *cons)
SCIP_Real SCIPgetRhsLinear(SCIP *scip, SCIP_CONS *cons)
SCIP_VAR ** SCIPgetVarsLinear(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_VAR * SCIPgetVbdvarVarbound(SCIP *scip, SCIP_CONS *cons)
SCIP_VAR * SCIPgetVarVarbound(SCIP *scip, SCIP_CONS *cons)
SCIP_Real SCIPgetLhsVarbound(SCIP *scip, SCIP_CONS *cons)
SCIP_Real SCIPgetRhsVarbound(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE GCGcreateGcgCol(GCG *gcg, SCIP *pricingprob, GCG_COL **gcgcol, int probnr, SCIP_VAR **vars, SCIP_Real *vals, int nvars, SCIP_Bool isray, SCIP_Real redcost)
Definition gcgcol.c:53
SCIP_CONS ** SCIPgetConss(SCIP *scip)
int SCIPgetNVars(SCIP *scip)
int SCIPgetNConss(SCIP *scip)
SCIP_VAR ** SCIPgetVars(SCIP *scip)
int SCIPgetNBinVars(SCIP *scip)
void SCIPhashmapFree(SCIP_HASHMAP **hashmap)
int SCIPhashmapGetImageInt(SCIP_HASHMAP *hashmap, void *origin)
SCIP_RETCODE SCIPhashmapCreate(SCIP_HASHMAP **hashmap, BMS_BLKMEM *blkmem, int mapsize)
SCIP_RETCODE SCIPhashmapSetImageInt(SCIP_HASHMAP *hashmap, void *origin, int image)
GCG_EXPORT GCG_SOLVERDATA * GCGsolverGetData(GCG_SOLVER *solver)
Definition solver.c:400
GCG_EXPORT void GCGsolverSetData(GCG_SOLVER *solver, GCG_SOLVERDATA *solverdata)
Definition solver.c:410
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 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 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)
const char * SCIPconshdlrGetName(SCIP_CONSHDLR *conshdlr)
SCIP_RETCODE SCIPgetConsNVars(SCIP *scip, SCIP_CONS *cons, int *nvars, SCIP_Bool *success)
SCIP_CONSHDLR * SCIPconsGetHdlr(SCIP_CONS *cons)
SCIP_RETCODE SCIPincludeExternalCodeInformation(SCIP *scip, const char *name, const char *description)
#define SCIPallocCleanBufferArray(scip, ptr, num)
#define SCIPfreeBlockMemoryArray(scip, ptr, num)
BMS_BLKMEM * SCIPblkmem(SCIP *scip)
#define SCIPallocClearBlockMemoryArray(scip, ptr, num)
#define SCIPallocClearBufferArray(scip, ptr, num)
#define SCIPallocBufferArray(scip, ptr, num)
#define SCIPallocMemory(scip, ptr)
int SCIPgetNCutsApplied(SCIP *scip)
SCIP_Real SCIPinfinity(SCIP *scip)
SCIP_Bool SCIPisGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisInfinity(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_Bool SCIPisLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
int SCIPgetDepth(SCIP *scip)
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
SCIP_Real SCIPvarGetObj(SCIP_VAR *var)
int SCIPvarGetProbindex(SCIP_VAR *var)
SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
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
Definition class_conspartition.cpp:44
INLINE Rational & abs(Rational &r)
INLINE SCIP_Longint denominator(Rational &r)
SCIP_RETCODE GCGpricerIncludeSolver(GCG *gcg, const char *name, const char *desc, int priority, SCIP_Bool heurenabled, SCIP_Bool exactenabled, GCG_DECL_SOLVERUPDATE((*solverupdate)), GCG_DECL_SOLVERSOLVE((*solversolve)), GCG_DECL_SOLVERSOLVEHEUR((*solversolveheur)), GCG_DECL_SOLVERFREE((*solverfree)), GCG_DECL_SOLVERINIT((*solverinit)), GCG_DECL_SOLVEREXIT((*solverexit)), GCG_DECL_SOLVERINITSOL((*solverinitsol)), GCG_DECL_SOLVEREXITSOL((*solverexitsol)), GCG_SOLVERDATA *solverdata)
Definition pricer_gcg.cpp:5750
GCG variable pricer.
public methods for working with gcg columns
public methods for GCG variables
GCG relaxator.
various SCIP helper methods
static INLINE void objCoefDistrHeurUniform(SCIP *scip, int actvarind, int **couplingmatrix, SCIP_VAR **varsincouplings, int nvarsincouplings, int *varmultiplicities, SCIP_Bool usemultipl, SCIP_VAR **linkedvars, int nlinkedvars, int **linkmatrix, SCIP_Real *aggrobjcoef)
Definition solver_cliquer.c:1266
static INLINE int countReachableVars(SCIP *scip, int **linkmatrix, SCIP_VAR *var, SCIP_VAR **linkedvars, int nlinkedvars)
Definition solver_cliquer.c:357
static void setLinkedSolvals(SCIP *scip, SCIP_Real *solvals, int **linkmatrix, SCIP_VAR **linkedvars, int nlinkedvars, SCIP_VAR *var, SCIP_Real val)
Definition solver_cliquer.c:583
static SCIP_RETCODE solveCliquer(SCIP_Bool exactly, GCG *gcg, SCIP *pricingprob, GCG_SOLVERDATA *solver, int probnr, SCIP_Real *lowerbound, GCG_PRICINGSTATUS *status)
Definition solver_cliquer.c:2012
static void aggregateObjCoef(SCIP *scip, int **linkmatrix, SCIP_VAR **linkedvars, int nlinkedvars, SCIP_Real *aggrobjcoef)
Definition solver_cliquer.c:448
static INLINE int getNodeIndexCouplDigraph(SCIP *scip, SCIP_VAR *var, int **linkmatrix, SCIP_VAR **linkedvars, int nlinkedvars, SCIP_VAR **varsincouplings, int nvarsincouplings)
Definition solver_cliquer.c:430
static INLINE SCIP_Real getAggrObjCoef(SCIP_VAR *var, int nlinkedvars, int nvarsincouplings, SCIP_Real *aggrobjcoef)
Definition solver_cliquer.c:495
static INLINE int getNSuccessorsRelevant(SCIP *scip, int varind, int **couplingmatrix, SCIP_VAR **varsincouplings, int nvarsincouplings, int nlinkedvars, SCIP_Real *aggrobjcoef, int *varmultiplicities, SCIP_Bool usemultiplicities)
Definition solver_cliquer.c:863
static void distributeObjCoefRec(SCIP *scip, int actvarind, SCIP_Bool *isdistributed, int **couplingmatrix, SCIP_VAR **varsincouplings, int nvarsincouplings, int *varmultiplicities, SCIP_Bool usemultipl, SCIP_VAR **linkedvars, int nlinkedvars, int **linkmatrix, SCIP_Real *aggrobjcoef, SCIP_CONS **constraints, int nconss, int *couplingcoefindices, CLIQUER_CONSTYPE *cliquerconstypes, int selecteddistrheur)
Definition solver_cliquer.c:1307
static void setProblemNotApplicable(GCG *gcg, int probnr, SCIP_Bool *isnotapplicable)
Definition solver_cliquer.c:684
static SCIP_Bool isCouplingRelevantRec(SCIP *scip, int varind, int **couplingmatrix, SCIP_VAR **varsincouplings, int nvarsincouplings, int nlinkedvars, SCIP_Real *aggrobjcoef, int maxdepth)
Definition solver_cliquer.c:762
static INLINE SCIP_Bool hasSuccessorRel(SCIP *scip, int varind, int **couplingmatrix, SCIP_VAR **varsincouplings, int nvarsincouplings, int nlinkedvars, SCIP_Real *aggrobjcoef)
Definition solver_cliquer.c:837
static INLINE int assureInCouplingGraph(SCIP *scip, SCIP_VAR **varsincouplings, int *nvarsincouplings, SCIP_VAR *var, SCIP_VAR **linkedvars, int nlinkedvars, int **linkmatrix)
Definition solver_cliquer.c:696
static SCIP_Bool areVarsLinkedRec(int **linkmatrix, int vindex1, int vindex2, int *vartrace, int *traceindex, SCIP_VAR **linkedvars, int nlinkedvars)
Definition solver_cliquer.c:133
static int addVarToGraph(SCIP *scip, graph_t *g, SCIP_VAR *consvar, int *indexcount, SCIP_Real scalingfactor, SCIP_VAR **indsetvars, int **linkmatrix, SCIP_VAR **linkedvars, int nlinkedvars, int nvarsincouplings, SCIP_Real *aggrobjcoef)
Definition solver_cliquer.c:538
static SCIP_Bool propagateVariablefixings(SCIP *pricingprob, SCIP_CONS **constraints, SCIP_VAR **linkedvars, SCIP_VAR **vconsvars, SCIP_VAR **varsincouplings, SCIP_Real *solvals, int **couplingmatrix, int **linkmatrix, int *nvarsincouplings, int *couplingcoefindices, int *consvarsfixedcount, int nlinkedvars, int nconss, int *nfixedvars, CLIQUER_CONSTYPE *cliquerconstypes)
Definition solver_cliquer.c:1701
static INLINE void initVarMultiplicities(SCIP *scip, int **linkmatrix, SCIP_VAR **linkedvars, int nlinkedvars, int **couplingmatrix, SCIP_VAR **varsincouplings, int nvarsincouplings, int *varmultiplicities)
Definition solver_cliquer.c:893
static int getLinkedNodeIndex(SCIP *scip, SCIP_VAR *var, SCIP_VAR **indsetvars, int indexcount, int **linkmatrix, SCIP_VAR **linkedvars, int nlinkedvars)
Definition solver_cliquer.c:317
static INLINE int getNodeIndex(SCIP_VAR *var, SCIP_VAR **vararray, int indexcount)
Definition solver_cliquer.c:299
static void distributeObjCoef(SCIP *scip, SCIP_CONS **constraints, int nconss, int *couplingcoefindices, CLIQUER_CONSTYPE *cliquerconstypes, int **couplingmatrix, SCIP_VAR **varsincouplings, int nvarsincouplings, SCIP_VAR **linkedvars, int nlinkedvars, int **linkmatrix, SCIP_Real *aggrobjcoef, int selecteddistrheur, SCIP_Bool usemultipl)
Definition solver_cliquer.c:1403
static INLINE SCIP_Bool isCouplingRelevantVar(SCIP *scip, SCIP_VAR *var, int **couplingmatrix, SCIP_VAR **varsincouplings, int nvarsincouplings, int **linkmatrix, SCIP_VAR **linkedvars, int nlinkedvars, SCIP_Real *aggrobjcoef)
Definition solver_cliquer.c:814
static INLINE void objCoefDistrHeurIS(SCIP *scip, int actvarind, int **couplingmatrix, SCIP_VAR **varsincouplings, int nvarsincouplings, int *varmultiplicities, SCIP_Bool usemultipl, SCIP_VAR **linkedvars, int nlinkedvars, int **linkmatrix, SCIP_Real *aggrobjcoef, SCIP_CONS **constraints, int nconss, int *couplingcoefindices, CLIQUER_CONSTYPE *cliquerconstypes)
Definition solver_cliquer.c:1107
static SCIP_Bool areObjectivesIntegral(SCIP *scip, SCIP_VAR **linkedvars, int nlinkedvars, SCIP_VAR **varsincouplings, int nvarsincouplings, SCIP_Real *aggrobjcoef)
Definition solver_cliquer.c:613
static INLINE void updateCouplingDiGraph(SCIP *scip, SCIP_VAR **consvars, int nconsvars, SCIP_VAR *var, int **couplingmatrix, SCIP_VAR **varsincouplings, int *nvarsincouplings, SCIP_VAR **linkedvars, int nlinkedvars, int **linkmatrix)
Definition solver_cliquer.c:726
static INLINE void objCoefDistrHeurNatural(SCIP *scip, int actvarind, int **couplingmatrix, SCIP_VAR **varsincouplings, int nvarsincouplings, int *varmultiplicities, SCIP_Bool usemultipl, SCIP_VAR **linkedvars, int nlinkedvars, int **linkmatrix, SCIP_Real *aggrobjcoef, SCIP_CONS **constraints, int nconss, int *couplingcoefindices, CLIQUER_CONSTYPE *cliquerconstypes)
Definition solver_cliquer.c:946
static INLINE void setAggrObjCoef(SCIP *scip, SCIP_VAR *var, SCIP_Real value, SCIP_VAR **linkedvars, int nlinkedvars, int **linkmatrix, SCIP_Real *aggrobjcoef)
Definition solver_cliquer.c:509
static void updateVarLinks(SCIP *scip, int **linkmatrix, SCIP_VAR *var1, SCIP_VAR *var2, SCIP_VAR **linkedvars, int *nlinkedvars)
Definition solver_cliquer.c:226
static INLINE SCIP_Bool isVarLinked(SCIP_VAR **linkedvars, int nlinkedvars, SCIP_VAR *var)
Definition solver_cliquer.c:111
SCIP_RETCODE GCGincludeSolverCliquer(GCG *gcg)
Definition solver_cliquer.c:2824
static INLINE SCIP_VAR * getLinkedNodeVar(SCIP *scip, SCIP_VAR *var, int **linkmatrix, SCIP_VAR **linkedvars, int nlinkedvars)
Definition solver_cliquer.c:410
static SCIP_Bool determineCliquerConsTypes(SCIP *pricingprob, SCIP_CONS **constraints, SCIP_VAR **linkedvars, SCIP_VAR **vconsvars, int *markedconsindices, int **linkmatrix, int *couplingcoefindices, int *nlinkedvars, int nconss, int *markedcount, CLIQUER_CONSTYPE *cliquerconstypes)
Definition solver_cliquer.c:1460
static INLINE SCIP_Bool isCouplingRelevant(SCIP *scip, int varind, int **couplingmatrix, SCIP_VAR **varsincouplings, int nvarsincouplings, int nlinkedvars, SCIP_Real *aggrobjcoef)
Definition solver_cliquer.c:798
static SCIP_Bool areVarsLinked(SCIP *scip, int **linkmatrix, SCIP_VAR *var1, SCIP_VAR *var2, SCIP_VAR **linkedvars, int nlinkedvars)
Definition solver_cliquer.c:184
static SCIP_Real scaleRelativeToMax(SCIP *scip, SCIP_VAR **linkedvars, int nlinkedvars, SCIP_VAR **varsincouplings, int nvarsincouplings, SCIP_Real *aggrobjcoef)
Definition solver_cliquer.c:643
heuristic solver for pricing problems that solves independent set problems with cliquer
Definition solver_cliquer.c:91
struct SCIP_Cons SCIP_CONS
struct SCIP_Conshdlr SCIP_CONSHDLR
struct SCIP_HashMap SCIP_HASHMAP
enum SCIP_Retcode SCIP_RETCODE
struct Scip SCIP
struct SCIP_Var SCIP_VAR