scip_prob.h
Go to the documentation of this file.
29 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
57 /** creates empty problem and initializes all solving data structures (the objective sense is set to MINIMIZE)
58 * If the problem type requires the use of variable pricers, these pricers should be added to the problem with calls
59 * to SCIPactivatePricer(). These pricers are automatically deactivated, when the problem is freed.
61 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
82 SCIP_DECL_PROBTRANS ((*probtrans)), /**< creates user data of transformed problem by transforming original user data */
84 SCIP_DECL_PROBINITSOL ((*probinitsol)), /**< solving process initialization method of transformed data */
85 SCIP_DECL_PROBEXITSOL ((*probexitsol)), /**< solving process deinitialization method of transformed data */
86 SCIP_DECL_PROBCOPY ((*probcopy)), /**< copies user data if you want to copy it to a subscip, or NULL */
90 /** creates empty problem and initializes all solving data structures (the objective sense is set to MINIMIZE)
91 * all callback methods will be set to NULL and can be set afterwards, if needed, via SCIPsetProbDelorig(),
94 * If the problem type requires the use of variable pricers, these pricers should be added to the problem with calls
95 * to SCIPactivatePricer(). These pricers are automatically deactivated, when the problem is freed.
97 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
121 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
135 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
144 SCIP_DECL_PROBTRANS ((*probtrans)) /**< creates user data of transformed problem by transforming original user data */
149 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
163 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
172 SCIP_DECL_PROBINITSOL ((*probinitsol)) /**< solving process initialization method of transformed data */
177 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
186 SCIP_DECL_PROBEXITSOL ((*probexitsol)) /**< solving process deinitialization method of transformed data */
191 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
200 SCIP_DECL_PROBCOPY ((*probcopy)) /**< copies user data if you want to copy it to a subscip, or NULL */
205 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
233 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
261 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
275 * @note If you want the write all constraints (including the once which are redundant for example), you need to set
289 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
312 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
323 SCIP_Bool permuteconss, /**< should the list of constraints in each constraint handler be permuted? */
355 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
403 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
428 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
435 * @note This method should be only used to change the objective function during two reoptimization runs and is only
438 * @note All variables not given in \p vars array are assumed to have an objective coefficient of zero.
474 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
488 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
500 /** adds offset of objective function to original problem and to all existing solution in original space
502 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
594 /** sets limit on objective function, such that only solutions better than this limit are accepted
596 * @note SCIP will only look for solutions with a strictly better objective value, thus, e.g., prune
598 * However, SCIP will also collect solutions with objective value worse than the objective limit and
600 * @note If SCIP can prove that there exists no solution with a strictly better objective value, the solving status
602 * The only exception is that by chance, SCIP found a solution with the same objective value and thus
605 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
646 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
656 * @note This function should be used to inform SCIP that the objective function is integral, helping to improve the
657 * performance. This is useful when using column generation. If no column generation (pricing) is used, SCIP
658 * automatically detects whether the objective function is integral or can be scaled to be integral. However, in
659 * any case, the user has to make sure that no variable is added during the solving process that destroys this
680 * @note If no pricing is performed, SCIP automatically detects whether the objective function is integral or can be
681 * scaled to be integral, helping to improve performance. This function returns the result. Otherwise
682 * SCIPsetObjIntegral() can be used to inform SCIP. However, in any case, the user has to make sure that no
690 /** returns the Euclidean norm of the objective function vector (available only for transformed problem)
712 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
732 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
746 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
760 SCIP_Bool* deleted /**< pointer to store whether variable was successfully marked to be deleted */
763 /** gets variables of the problem along with the numbers of different variable types; data may become invalid after
766 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
781 * @note Variables in the vars array are ordered: binaries first, then integers, implicit integers and continuous last.
810 * @warning If your are using the methods which add or change bound of variables (e.g., SCIPchgVarType(), SCIPfixVar(),
811 * SCIPaggregateVars(), and SCIPmultiaggregateVar()), it can happen that the internal variable array (which is
812 * accessed via this method) gets resized and/or resorted. This can invalid the data pointer which is returned
815 * @note Variables in the array are ordered: binaries first, then integers, implicit integers and continuous last.
929 * @note In case of the original problem the number of variables is counted. In case of the transformed problem the
992 /** gets variables of the original problem along with the numbers of different variable types; data may become invalid
995 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1019 int* nimplvars, /**< pointer to store number of implicit integral vars or NULL if not needed */
1188 /** gets variables of the original or transformed problem along with the numbers of different variable types;
1190 * data may become invalid after calls to SCIPchgVarType(), SCIPfixVar(), SCIPaggregateVars(), and
1193 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1210 SCIP_SOL* sol, /**< primal solution that selects the problem space, NULL for current solution */
1215 int* nimplvars, /**< pointer to store number of implicit integral vars or NULL if not needed */
1243 /** returns TRUE iff all potential variables exist in the problem, and FALSE, if there may be additional variables,
1266 /** adds constraint to the problem; if constraint is only valid locally, it is added to the local subproblem of the
1268 * if a local constraint is added at the root node, it is automatically upgraded into a global constraint
1270 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1289 /** globally removes constraint from all subproblems; removes constraint from the constraint set change data of the
1292 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1410 * @warning If your are using the method SCIPaddCons(), it can happen that the internal constraint array (which is
1411 * accessed via this method) gets resized. This can invalid the pointer which is returned by this method.
1464 /** computes the number of check constraint in the current node (loop over all constraint handler and cumulates the
1492 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1513 /** removes all conflicts depending on an old cutoff bound if the improvement of the incumbent is good enough
1515 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1528 /** adds constraint to the given node (and all of its subnodes), even if it is a global constraint;
1529 * It is sometimes desirable to add the constraint to a more local node (i.e., a node of larger depth) even if
1530 * the constraint is also valid higher in the tree, for example, if one wants to produce a constraint which is
1532 * In this case, one should pass the more global node where the constraint is valid as "validnode".
1533 * Note that the same constraint cannot be added twice to the branching tree with different "validnode" parameters.
1534 * If the constraint is valid at the same node as it is inserted (the usual case), one should pass NULL as "validnode".
1535 * If the "validnode" is the root node, it is automatically upgraded into a global constraint, but still only added to
1536 * the given node. If a local constraint is added to the root node, it is added to the global problem instead.
1538 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1555 /** adds constraint locally to the current node (and all of its subnodes), even if it is a global constraint;
1556 * It is sometimes desirable to add the constraint to a more local node (i.e., a node of larger depth) even if
1557 * the constraint is also valid higher in the tree, for example, if one wants to produce a constraint which is
1560 * If the constraint is valid at the same node as it is inserted (the usual case), one should pass NULL as "validnode".
1561 * If the "validnode" is the root node, it is automatically upgraded into a global constraint, but still only added to
1562 * the given node. If a local constraint is added to the root node, it is added to the global problem instead.
1564 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1573 * @note The same constraint cannot be added twice to the branching tree with different "validnode" parameters. This is
1574 * the case due internal data structures and performance issues. In such a case you should try to realize your
1575 * issue using the method SCIPdisableCons() and SCIPenableCons() and control these via the event system of SCIP.
1584 /** disables constraint's separation, enforcing, and propagation capabilities at the given node (and all subnodes);
1585 * if the method is called at the root node, the constraint is globally deleted from the problem;
1586 * the constraint deletion is being remembered at the given node, s.t. after leaving the node's subtree, the constraint
1587 * is automatically enabled again, and after entering the node's subtree, it is automatically disabled;
1588 * this may improve performance because redundant checks on this constraint are avoided, but it consumes memory;
1591 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1607 /** disables constraint's separation, enforcing, and propagation capabilities at the current node (and all subnodes);
1608 * if the method is called during problem modification or at the root node, the constraint is globally deleted from
1610 * the constraint deletion is being remembered at the current node, s.t. after leaving the current subtree, the
1611 * constraint is automatically enabled again, and after reentering the current node's subtree, it is automatically
1613 * this may improve performance because redundant checks on this constraint are avoided, but it consumes memory;
1616 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1634 * @return estimate of best primal solution w.r.t. original problem contained in current subtree
1644 /** gets estimate of best primal solution w.r.t. transformed problem contained in current subtree
1646 * @return estimate of best primal solution w.r.t. transformed problem contained in current subtree
1706 /** if given value is tighter (larger for minimization, smaller for maximization) than the current node's dual bound (in
1709 * @note the given new bound has to be a dual bound, i.e., it has to be valid for the original problem.
1711 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1726 /** if given value is larger than the current node's lower bound (in transformed problem), sets the current node's
1729 * @note the given new bound has to be a lower bound, i.e., it has to be valid for the transformed problem.
1731 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1745 /** if given value is tighter (larger for minimization, smaller for maximization) than the node's dual bound,
1748 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1761 /** if given value is larger than the node's lower bound (in transformed problem), sets the node's lower bound
1764 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1779 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
SCIP_EXPORT SCIP_RETCODE SCIPwriteTransProblem(SCIP *scip, const char *filename, const char *extension, SCIP_Bool genericnames)
Definition: scip_prob.c:642
SCIP_EXPORT SCIP_CONS * SCIPfindOrigCons(SCIP *scip, const char *name)
Definition: scip_prob.c:2893
type definitions for miscellaneous datastructures
Definition: struct_scip.h:58
SCIP_EXPORT SCIP_Real SCIPgetLocalOrigEstimate(SCIP *scip)
Definition: scip_prob.c:3523
SCIP_EXPORT SCIP_RETCODE SCIPsetObjsense(SCIP *scip, SCIP_OBJSENSE objsense)
Definition: scip_prob.c:1241
SCIP_EXPORT SCIP_Real SCIPgetNodeLowerbound(SCIP *scip, SCIP_NODE *node)
Definition: scip_prob.c:3618
Definition: struct_var.h:198
SCIP_EXPORT SCIP_Real SCIPgetLocalDualbound(SCIP *scip)
Definition: scip_prob.c:3562
SCIP_EXPORT SCIP_RETCODE SCIPdelConsLocal(SCIP *scip, SCIP_CONS *cons)
Definition: scip_prob.c:3470
SCIP_EXPORT SCIP_Real SCIPgetLocalLowerbound(SCIP *scip)
Definition: scip_prob.c:3581
SCIP_EXPORT SCIP_Real SCIPgetOrigObjoffset(SCIP *scip)
Definition: scip_prob.c:1318
SCIP_EXPORT SCIP_RETCODE SCIPupdateLocalLowerbound(SCIP *scip, SCIP_Real newbound)
Definition: scip_prob.c:3692
SCIP_EXPORT SCIP_RETCODE SCIPupdateNodeDualbound(SCIP *scip, SCIP_NODE *node, SCIP_Real newbound)
Definition: scip_prob.c:3731
type definitions for return codes for SCIP methods
SCIP_EXPORT SCIP_Real SCIPgetNodeDualbound(SCIP *scip, SCIP_NODE *node)
Definition: scip_prob.c:3601
Definition: struct_tree.h:132
SCIP_EXPORT SCIP_RETCODE SCIPaddPricedVar(SCIP *scip, SCIP_VAR *var, SCIP_Real score)
Definition: scip_prob.c:1732
SCIP_EXPORT SCIP_RETCODE SCIPdelCons(SCIP *scip, SCIP_CONS *cons)
Definition: scip_prob.c:2838
SCIP_EXPORT SCIP_RETCODE SCIPsetObjlimit(SCIP *scip, SCIP_Real objlimit)
Definition: scip_prob.c:1421
Definition: struct_sol.h:63
SCIP_EXPORT SCIP_RETCODE SCIPaddOrigObjoffset(SCIP *scip, SCIP_Real addval)
Definition: scip_prob.c:1289
SCIP_EXPORT SCIP_Real SCIPgetOrigObjscale(SCIP *scip)
Definition: scip_prob.c:1343
SCIP_EXPORT SCIP_RETCODE SCIPsetProbData(SCIP *scip, SCIP_PROBDATA *probdata)
Definition: scip_prob.c:1013
Definition: struct_cons.h:37
type definitions for SCIP's main datastructure
SCIP_EXPORT SCIP_RETCODE SCIPaddConflict(SCIP *scip, SCIP_NODE *node, SCIP_CONS *cons, SCIP_NODE *validnode, SCIP_CONFTYPE conftype, SCIP_Bool iscutoffinvolved)
Definition: scip_prob.c:3223
SCIP_EXPORT SCIP_RETCODE SCIPreadProb(SCIP *scip, const char *filename, const char *extension)
Definition: scip_prob.c:325
SCIP_EXPORT SCIP_RETCODE SCIPupdateNodeLowerbound(SCIP *scip, SCIP_NODE *node, SCIP_Real newbound)
Definition: scip_prob.c:3753
Definition: struct_event.h:144
type definitions for problem variables
SCIP_EXPORT SCIP_Real SCIPgetTransObjoffset(SCIP *scip)
Definition: scip_prob.c:1366
type definitions for conflict analysis
type definitions for managing events
SCIP_EXPORT SCIP_RETCODE SCIPsetProbDelorig(SCIP *scip, SCIP_DECL_PROBDELORIG((*probdelorig)))
Definition: scip_prob.c:186
SCIP_EXPORT SCIP_RETCODE SCIPaddConsNode(SCIP *scip, SCIP_NODE *node, SCIP_CONS *cons, SCIP_NODE *validnode)
Definition: scip_prob.c:3319
SCIP_EXPORT SCIP_RETCODE SCIPwriteOrigProblem(SCIP *scip, const char *filename, const char *extension, SCIP_Bool genericnames)
Definition: scip_prob.c:595
SCIP_EXPORT SCIP_RETCODE SCIPchgChildPrio(SCIP *scip, SCIP_NODE *child, SCIP_Real priority)
Definition: scip_prob.c:3787
SCIP_EXPORT SCIP_RETCODE SCIPchgReoptObjective(SCIP *scip, SCIP_OBJSENSE objsense, SCIP_VAR **vars, SCIP_Real *coefs, int nvars)
Definition: scip_prob.c:1118
SCIP_EXPORT SCIP_CONS * SCIPfindCons(SCIP *scip, const char *name)
Definition: scip_prob.c:2942
SCIP_EXPORT SCIP_RETCODE SCIPaddObjoffset(SCIP *scip, SCIP_Real addval)
Definition: scip_prob.c:1267
SCIP_EXPORT 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:780
SCIP_EXPORT SCIP_Real SCIPgetTransObjscale(SCIP *scip)
Definition: scip_prob.c:1389
SCIP_EXPORT SCIP_RETCODE SCIPsetProbInitsol(SCIP *scip, SCIP_DECL_PROBINITSOL((*probinitsol)))
Definition: scip_prob.c:249
SCIP_EXPORT SCIP_RETCODE SCIPdelConsNode(SCIP *scip, SCIP_NODE *node, SCIP_CONS *cons)
Definition: scip_prob.c:3420
type definitions for branch and bound tree
SCIP_EXPORT 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:105
SCIP_EXPORT SCIP_RETCODE SCIPaddVar(SCIP *scip, SCIP_VAR *var)
Definition: scip_prob.c:1667
type definitions for storing primal CIP solutions
SCIP_EXPORT SCIP_RETCODE SCIPsetProbTrans(SCIP *scip, SCIP_DECL_PROBTRANS((*probtrans)))
Definition: scip_prob.c:207
SCIP_EXPORT SCIP_VAR * SCIPfindVar(SCIP *scip, const char *name)
Definition: scip_prob.c:2680
type definitions for storing and manipulating the main problem
SCIP_EXPORT SCIP_RETCODE SCIPsetProbExitsol(SCIP *scip, SCIP_DECL_PROBEXITSOL((*probexitsol)))
Definition: scip_prob.c:271
SCIP_EXPORT SCIP_RETCODE SCIPsetProbCopy(SCIP *scip, SCIP_DECL_PROBCOPY((*probcopy)))
Definition: scip_prob.c:292
SCIP_EXPORT SCIP_RETCODE SCIPsetProbName(SCIP *scip, const char *name)
Definition: scip_prob.c:1094
SCIP_EXPORT SCIP_RETCODE SCIPgetVarsData(SCIP *scip, SCIP_VAR ***vars, int *nvars, int *nbinvars, int *nintvars, int *nimplvars, int *ncontvars)
Definition: scip_prob.c:1861
SCIP_EXPORT SCIP_RETCODE SCIPupdateLocalDualbound(SCIP *scip, SCIP_Real newbound)
Definition: scip_prob.c:3642
SCIP_EXPORT SCIP_RETCODE SCIPsetObjIntegral(SCIP *scip)
Definition: scip_prob.c:1518
SCIP_EXPORT SCIP_RETCODE SCIPdelVar(SCIP *scip, SCIP_VAR *var, SCIP_Bool *deleted)
Definition: scip_prob.c:1785
result codes for SCIP callback methods
SCIP_EXPORT SCIP_RETCODE SCIPclearConflictStore(SCIP *scip, SCIP_EVENT *event)
Definition: scip_prob.c:3282
SCIP_EXPORT 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:2615
SCIP_EXPORT SCIP_RETCODE SCIPaddCons(SCIP *scip, SCIP_CONS *cons)
Definition: scip_prob.c:2765
SCIP_EXPORT SCIP_RETCODE SCIPaddConsLocal(SCIP *scip, SCIP_CONS *cons, SCIP_NODE *validnode)
Definition: scip_prob.c:3389
common defines and data types used in all packages of SCIP
SCIP_EXPORT SCIP_Real SCIPgetLocalTransEstimate(SCIP *scip)
Definition: scip_prob.c:3542
Definition: objbenders.h:33
SCIP_EXPORT SCIP_RETCODE SCIPsetProbDeltrans(SCIP *scip, SCIP_DECL_PROBDELTRANS((*probdeltrans)))
Definition: scip_prob.c:228
SCIP_EXPORT SCIP_RETCODE SCIPgetOrigVarsData(SCIP *scip, SCIP_VAR ***vars, int *nvars, int *nbinvars, int *nintvars, int *nimplvars, int *ncontvars)
Definition: scip_prob.c:2352
SCIP_EXPORT SCIP_RETCODE SCIPcreateProbBasic(SCIP *scip, const char *name)
Definition: scip_prob.c:166
type definitions for constraints and constraint handlers