scip_prob.h
Go to the documentation of this file.
38/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
66/** creates empty problem and initializes all solving data structures (the objective sense is set to MINIMIZE)
67 * If the problem type requires the use of variable pricers, these pricers should be added to the problem with calls
68 * to SCIPactivatePricer(). These pricers are automatically deactivated, when the problem is freed.
70 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
91 SCIP_DECL_PROBTRANS ((*probtrans)), /**< creates user data of transformed problem by transforming original user data */
93 SCIP_DECL_PROBINITSOL ((*probinitsol)), /**< solving process initialization method of transformed data */
94 SCIP_DECL_PROBEXITSOL ((*probexitsol)), /**< solving process deinitialization method of transformed data */
95 SCIP_DECL_PROBCOPY ((*probcopy)), /**< copies user data if you want to copy it to a subscip, or NULL */
99/** creates empty problem and initializes all solving data structures (the objective sense is set to MINIMIZE)
100 * all callback methods will be set to NULL and can be set afterwards, if needed, via SCIPsetProbDelorig(),
103 * If the problem type requires the use of variable pricers, these pricers should be added to the problem with calls
104 * to SCIPactivatePricer(). These pricers are automatically deactivated, when the problem is freed.
106 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
130 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
144 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
153 SCIP_DECL_PROBTRANS ((*probtrans)) /**< creates user data of transformed problem by transforming original user data */
158 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
172 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
181 SCIP_DECL_PROBINITSOL ((*probinitsol)) /**< solving process initialization method of transformed data */
186 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
195 SCIP_DECL_PROBEXITSOL ((*probexitsol)) /**< solving process deinitialization method of transformed data */
200 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
209 SCIP_DECL_PROBCOPY ((*probcopy)) /**< copies user data if you want to copy it to a subscip, or NULL */
214 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
242 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
270 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
284 * @note If you want the write all constraints (including the once which are redundant for example), you need to set
298 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
321 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
332 SCIP_Bool permuteconss, /**< should the list of constraints in each constraint handler be permuted? */
364 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
412 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
437 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
444 * @note This method should be only used to change the objective function during two reoptimization runs and is only
447 * @note All variables not given in \p vars array are assumed to have an objective coefficient of zero.
483 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
497 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
509/** adds offset of objective function to original problem and to all existing solution in original space
511 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
603/** sets limit on objective function, such that only solutions better than this limit are accepted
605 * @note SCIP will only look for solutions with a strictly better objective value, thus, e.g., prune
607 * However, SCIP will also collect solutions with objective value worse than the objective limit and
609 * @note If SCIP can prove that there exists no solution with a strictly better objective value, the solving status
611 * The only exception is that by chance, SCIP found a solution with the same objective value and thus
614 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
655 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
665 * @note This function should be used to inform SCIP that the objective function is integral, helping to improve the
666 * performance. This is useful when using column generation. If no column generation (pricing) is used, SCIP
667 * automatically detects whether the objective function is integral or can be scaled to be integral. However, in
668 * any case, the user has to make sure that no variable is added during the solving process that destroys this
689 * @note If no pricing is performed, SCIP automatically detects whether the objective function is integral or can be
690 * scaled to be integral, helping to improve performance. This function returns the result. Otherwise
691 * SCIPsetObjIntegral() can be used to inform SCIP. However, in any case, the user has to make sure that no
699/** returns the Euclidean norm of the objective function vector (available only for transformed problem)
721 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
741 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
755 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
769 SCIP_Bool* deleted /**< pointer to store whether variable was successfully marked to be deleted */
772/** gets variables of the problem along with the numbers of different variable types; data may become invalid after
775 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
790 * @note Variables in the vars array are ordered: binaries first, then integers, implicit integers and continuous last.
819 * @warning If your are using the methods which add or change bound of variables (e.g., SCIPchgVarType(), SCIPfixVar(),
820 * SCIPaggregateVars(), and SCIPmultiaggregateVar()), it can happen that the internal variable array (which is
821 * accessed via this method) gets resized and/or resorted. This can invalid the data pointer which is returned
824 * @note Variables in the array are ordered: binaries first, then integers, implicit integers and continuous last.
938 * @note In case of the original problem the number of variables is counted. In case of the transformed problem the
1001/** gets variables of the original problem along with the numbers of different variable types; data may become invalid
1004 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1028 int* nimplvars, /**< pointer to store number of implicit integral vars or NULL if not needed */
1197/** gets variables of the original or transformed problem along with the numbers of different variable types;
1199 * data may become invalid after calls to SCIPchgVarType(), SCIPfixVar(), SCIPaggregateVars(), and
1202 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1219 SCIP_SOL* sol, /**< primal solution that selects the problem space, NULL for current solution */
1224 int* nimplvars, /**< pointer to store number of implicit integral vars or NULL if not needed */
1252/** returns TRUE iff all potential variables exist in the problem, and FALSE, if there may be additional variables,
1275/** adds constraint to the problem; if constraint is only valid locally, it is added to the local subproblem of the
1277 * if a local constraint is added at the root node, it is automatically upgraded into a global constraint
1279 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1298/** globally removes constraint from all subproblems; removes constraint from the constraint set change data of the
1301 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1419 * @warning If your are using the method SCIPaddCons(), it can happen that the internal constraint array (which is
1420 * accessed via this method) gets resized. This can invalid the pointer which is returned by this method.
1473/** computes the number of check constraint in the current node (loop over all constraint handler and cumulates the
1501 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1522/** removes all conflicts depending on an old cutoff bound if the improvement of the incumbent is good enough
1524 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1537/** adds constraint to the given node (and all of its subnodes), even if it is a global constraint;
1538 * It is sometimes desirable to add the constraint to a more local node (i.e., a node of larger depth) even if
1539 * the constraint is also valid higher in the tree, for example, if one wants to produce a constraint which is
1541 * In this case, one should pass the more global node where the constraint is valid as "validnode".
1542 * Note that the same constraint cannot be added twice to the branching tree with different "validnode" parameters.
1543 * If the constraint is valid at the same node as it is inserted (the usual case), one should pass NULL as "validnode".
1544 * If the "validnode" is the root node, it is automatically upgraded into a global constraint, but still only added to
1545 * the given node. If a local constraint is added to the root node, it is added to the global problem instead.
1547 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1564/** adds constraint locally to the current node (and all of its subnodes), even if it is a global constraint;
1565 * It is sometimes desirable to add the constraint to a more local node (i.e., a node of larger depth) even if
1566 * the constraint is also valid higher in the tree, for example, if one wants to produce a constraint which is
1569 * If the constraint is valid at the same node as it is inserted (the usual case), one should pass NULL as "validnode".
1570 * If the "validnode" is the root node, it is automatically upgraded into a global constraint, but still only added to
1571 * the given node. If a local constraint is added to the root node, it is added to the global problem instead.
1573 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1582 * @note The same constraint cannot be added twice to the branching tree with different "validnode" parameters. This is
1583 * the case due internal data structures and performance issues. In such a case you should try to realize your
1584 * issue using the method SCIPdisableCons() and SCIPenableCons() and control these via the event system of SCIP.
1593/** disables constraint's separation, enforcing, and propagation capabilities at the given node (and all subnodes);
1594 * if the method is called at the root node, the constraint is globally deleted from the problem;
1595 * the constraint deletion is being remembered at the given node, s.t. after leaving the node's subtree, the constraint
1596 * is automatically enabled again, and after entering the node's subtree, it is automatically disabled;
1597 * this may improve performance because redundant checks on this constraint are avoided, but it consumes memory;
1600 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1616/** disables constraint's separation, enforcing, and propagation capabilities at the current node (and all subnodes);
1617 * if the method is called during problem modification or at the root node, the constraint is globally deleted from
1619 * the constraint deletion is being remembered at the current node, s.t. after leaving the current subtree, the
1620 * constraint is automatically enabled again, and after reentering the current node's subtree, it is automatically
1622 * this may improve performance because redundant checks on this constraint are avoided, but it consumes memory;
1625 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1643 * @return estimate of best primal solution w.r.t. original problem contained in current subtree
1653/** gets estimate of best primal solution w.r.t. transformed problem contained in current subtree
1655 * @return estimate of best primal solution w.r.t. transformed problem contained in current subtree
1715/** if given value is tighter (larger for minimization, smaller for maximization) than the current node's dual bound (in
1718 * @note the given new bound has to be a dual bound, i.e., it has to be valid for the original problem.
1720 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1735/** if given value is larger than the current node's lower bound (in transformed problem), sets the current node's
1738 * @note the given new bound has to be a lower bound, i.e., it has to be valid for the transformed problem.
1740 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1754/** if given value is tighter (larger for minimization, smaller for maximization) than the node's dual bound,
1757 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1770/** if given value is larger than the node's lower bound (in transformed problem), sets the node's lower bound
1773 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1788 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
common defines and data types used in all packages of SCIP
SCIP_RETCODE SCIPpermuteProb(SCIP *scip, unsigned int randseed, SCIP_Bool permuteconss, SCIP_Bool permutebinvars, SCIP_Bool permuteintvars, SCIP_Bool permuteimplvars, SCIP_Bool permutecontvars)
Definition: scip_prob.c:781
SCIP_RETCODE SCIPgetSolVarsData(SCIP *scip, SCIP_SOL *sol, SCIP_VAR ***vars, int *nvars, int *nbinvars, int *nintvars, int *nimplvars, int *ncontvars)
Definition: scip_prob.c:2620
SCIP_RETCODE SCIPgetOrigVarsData(SCIP *scip, SCIP_VAR ***vars, int *nvars, int *nbinvars, int *nintvars, int *nimplvars, int *ncontvars)
Definition: scip_prob.c:2357
SCIP_RETCODE SCIPaddPricedVar(SCIP *scip, SCIP_VAR *var, SCIP_Real score)
Definition: scip_prob.c:1733
SCIP_RETCODE SCIPwriteOrigProblem(SCIP *scip, const char *filename, const char *extension, SCIP_Bool genericnames)
Definition: scip_prob.c:601
SCIP_RETCODE SCIPsetProbName(SCIP *scip, const char *name)
Definition: scip_prob.c:1095
SCIP_RETCODE SCIPsetObjlimit(SCIP *scip, SCIP_Real objlimit)
Definition: scip_prob.c:1422
SCIP_RETCODE SCIPsetProbDeltrans(SCIP *scip, SCIP_DECL_PROBDELTRANS((*probdeltrans)))
Definition: scip_prob.c:242
SCIP_RETCODE SCIPgetVarsData(SCIP *scip, SCIP_VAR ***vars, int *nvars, int *nbinvars, int *nintvars, int *nimplvars, int *ncontvars)
Definition: scip_prob.c:1866
SCIP_RETCODE SCIPsetProbExitsol(SCIP *scip, SCIP_DECL_PROBEXITSOL((*probexitsol)))
Definition: scip_prob.c:285
SCIP_RETCODE SCIPsetProbTrans(SCIP *scip, SCIP_DECL_PROBTRANS((*probtrans)))
Definition: scip_prob.c:221
SCIP_RETCODE SCIPsetProbDelorig(SCIP *scip, SCIP_DECL_PROBDELORIG((*probdelorig)))
Definition: scip_prob.c:200
SCIP_RETCODE SCIPaddObjoffset(SCIP *scip, SCIP_Real addval)
Definition: scip_prob.c:1268
SCIP_RETCODE SCIPchgReoptObjective(SCIP *scip, SCIP_OBJSENSE objsense, SCIP_VAR **vars, SCIP_Real *coefs, int nvars)
Definition: scip_prob.c:1119
SCIP_CONS * SCIPfindOrigCons(SCIP *scip, const char *name)
Definition: scip_prob.c:2898
SCIP_RETCODE SCIPsetProbInitsol(SCIP *scip, SCIP_DECL_PROBINITSOL((*probinitsol)))
Definition: scip_prob.c:263
SCIP_RETCODE SCIPdelVar(SCIP *scip, SCIP_VAR *var, SCIP_Bool *deleted)
Definition: scip_prob.c:1790
SCIP_RETCODE SCIPsetObjsense(SCIP *scip, SCIP_OBJSENSE objsense)
Definition: scip_prob.c:1242
SCIP_RETCODE SCIPaddOrigObjoffset(SCIP *scip, SCIP_Real addval)
Definition: scip_prob.c:1290
SCIP_RETCODE SCIPcreateProbBasic(SCIP *scip, const char *name)
Definition: scip_prob.c:180
SCIP_RETCODE SCIPwriteTransProblem(SCIP *scip, const char *filename, const char *extension, SCIP_Bool genericnames)
Definition: scip_prob.c:648
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)
Definition: scip_prob.c:117
SCIP_RETCODE SCIPsetProbData(SCIP *scip, SCIP_PROBDATA *probdata)
Definition: scip_prob.c:1014
SCIP_RETCODE SCIPsetProbCopy(SCIP *scip, SCIP_DECL_PROBCOPY((*probcopy)))
Definition: scip_prob.c:306
SCIP_RETCODE SCIPreadProb(SCIP *scip, const char *filename, const char *extension)
Definition: scip_prob.c:339
SCIP_RETCODE SCIPupdateNodeLowerbound(SCIP *scip, SCIP_NODE *node, SCIP_Real newbound)
Definition: scip_prob.c:3757
SCIP_RETCODE SCIPupdateLocalLowerbound(SCIP *scip, SCIP_Real newbound)
Definition: scip_prob.c:3696
SCIP_Real SCIPgetNodeDualbound(SCIP *scip, SCIP_NODE *node)
Definition: scip_prob.c:3605
SCIP_RETCODE SCIPdelConsNode(SCIP *scip, SCIP_NODE *node, SCIP_CONS *cons)
Definition: scip_prob.c:3424
SCIP_RETCODE SCIPdelConsLocal(SCIP *scip, SCIP_CONS *cons)
Definition: scip_prob.c:3474
SCIP_RETCODE SCIPaddConsNode(SCIP *scip, SCIP_NODE *node, SCIP_CONS *cons, SCIP_NODE *validnode)
Definition: scip_prob.c:3323
SCIP_RETCODE SCIPclearConflictStore(SCIP *scip, SCIP_EVENT *event)
Definition: scip_prob.c:3286
SCIP_RETCODE SCIPupdateLocalDualbound(SCIP *scip, SCIP_Real newbound)
Definition: scip_prob.c:3646
SCIP_RETCODE SCIPaddConflict(SCIP *scip, SCIP_NODE *node, SCIP_CONS *cons, SCIP_NODE *validnode, SCIP_CONFTYPE conftype, SCIP_Bool iscutoffinvolved)
Definition: scip_prob.c:3228
SCIP_RETCODE SCIPchgChildPrio(SCIP *scip, SCIP_NODE *child, SCIP_Real priority)
Definition: scip_prob.c:3791
SCIP_RETCODE SCIPupdateNodeDualbound(SCIP *scip, SCIP_NODE *node, SCIP_Real newbound)
Definition: scip_prob.c:3735
SCIP_RETCODE SCIPaddConsLocal(SCIP *scip, SCIP_CONS *cons, SCIP_NODE *validnode)
Definition: scip_prob.c:3393
SCIP_Real SCIPgetNodeLowerbound(SCIP *scip, SCIP_NODE *node)
Definition: scip_prob.c:3622
SCIP_Real SCIPgetLocalTransEstimate(SCIP *scip)
Definition: scip_prob.c:3546
Definition: objbenders.h:44
Definition: struct_cons.h:47
Definition: struct_event.h:162
Definition: struct_tree.h:142
Definition: struct_sol.h:74
Definition: struct_var.h:208
Definition: struct_scip.h:70
type definitions for conflict analysis
type definitions for constraints and constraint handlers
type definitions for managing events
type definitions for miscellaneous datastructures
type definitions for storing and manipulating the main problem
result codes for SCIP callback methods
type definitions for return codes for SCIP methods
type definitions for SCIP's main datastructure
type definitions for storing primal CIP solutions
type definitions for branch and bound tree
type definitions for problem variables