scip_prob.h
Go to the documentation of this file.
29 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
76 /** creates empty problem and initializes all solving data structures (the objective sense is set to MINIMIZE)
77 * If the problem type requires the use of variable pricers, these pricers should be added to the problem with calls
78 * to SCIPactivatePricer(). These pricers are automatically deactivated, when the problem is freed.
80 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
101 SCIP_DECL_PROBTRANS ((*probtrans)), /**< creates user data of transformed problem by transforming original user data */
103 SCIP_DECL_PROBINITSOL ((*probinitsol)), /**< solving process initialization method of transformed data */
104 SCIP_DECL_PROBEXITSOL ((*probexitsol)), /**< solving process deinitialization method of transformed data */
105 SCIP_DECL_PROBCOPY ((*probcopy)), /**< copies user data if you want to copy it to a subscip, or NULL */
109 /** creates empty problem and initializes all solving data structures (the objective sense is set to MINIMIZE)
110 * all callback methods will be set to NULL and can be set afterwards, if needed, via SCIPsetProbDelorig(),
113 * If the problem type requires the use of variable pricers, these pricers should be added to the problem with calls
114 * to SCIPactivatePricer(). These pricers are automatically deactivated, when the problem is freed.
116 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
140 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
154 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
163 SCIP_DECL_PROBTRANS ((*probtrans)) /**< creates user data of transformed problem by transforming original user data */
168 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
182 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
191 SCIP_DECL_PROBINITSOL ((*probinitsol)) /**< solving process initialization method of transformed data */
196 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
205 SCIP_DECL_PROBEXITSOL ((*probexitsol)) /**< solving process deinitialization method of transformed data */
210 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
219 SCIP_DECL_PROBCOPY ((*probcopy)) /**< copies user data if you want to copy it to a subscip, or NULL */
224 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
252 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
280 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
294 * @note If you want the write all constraints (including the once which are redundant for example), you need to set
308 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
331 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
342 SCIP_Bool permuteconss, /**< should the list of constraints in each constraint handler be permuted? */
374 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
422 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
447 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
454 * @note This method should be only used to change the objective function during two reoptimization runs and is only
457 * @note All variables not given in \p vars array are assumed to have an objective coefficient of zero.
493 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
507 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
519 /** adds offset of objective function to original problem and to all existing solution in original space
521 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
613 /** sets limit on objective function, such that only solutions better than this limit are accepted
615 * @note SCIP will only look for solutions with a strictly better objective value, thus, e.g., prune
617 * However, SCIP will also collect solutions with objective value worse than the objective limit and
619 * @note If SCIP can prove that there exists no solution with a strictly better objective value, the solving status
621 * The only exception is that by chance, SCIP found a solution with the same objective value and thus
624 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
665 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
675 * @note This function should be used to inform SCIP that the objective function is integral, helping to improve the
676 * performance. This is useful when using column generation. If no column generation (pricing) is used, SCIP
677 * automatically detects whether the objective function is integral or can be scaled to be integral. However, in
678 * any case, the user has to make sure that no variable is added during the solving process that destroys this
699 * @note If no pricing is performed, SCIP automatically detects whether the objective function is integral or can be
700 * scaled to be integral, helping to improve performance. This function returns the result. Otherwise
701 * SCIPsetObjIntegral() can be used to inform SCIP. However, in any case, the user has to make sure that no
709 /** returns the Euclidean norm of the objective function vector (available only for transformed problem)
731 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
751 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
765 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
779 SCIP_Bool* deleted /**< pointer to store whether variable was successfully marked to be deleted */
782 /** gets variables of the problem along with the numbers of different variable types; data may become invalid after
785 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
800 * @note Variables in the vars array are ordered: binaries first, then integers, implicit integers and continuous last.
829 * @warning If your are using the methods which add or change bound of variables (e.g., SCIPchgVarType(), SCIPfixVar(),
830 * SCIPaggregateVars(), and SCIPmultiaggregateVar()), it can happen that the internal variable array (which is
831 * accessed via this method) gets resized and/or resorted. This can invalid the data pointer which is returned
834 * @note Variables in the array are ordered: binaries first, then integers, implicit integers and continuous last.
948 * @note In case of the original problem the number of variables is counted. In case of the transformed problem the
1011 /** gets variables of the original problem along with the numbers of different variable types; data may become invalid
1014 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1038 int* nimplvars, /**< pointer to store number of implicit integral vars or NULL if not needed */
1207 /** gets variables of the original or transformed problem along with the numbers of different variable types;
1209 * data may become invalid after calls to SCIPchgVarType(), SCIPfixVar(), SCIPaggregateVars(), and
1212 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1229 SCIP_SOL* sol, /**< primal solution that selects the problem space, NULL for current solution */
1234 int* nimplvars, /**< pointer to store number of implicit integral vars or NULL if not needed */
1262 /** returns TRUE iff all potential variables exist in the problem, and FALSE, if there may be additional variables,
1285 /** adds constraint to the problem; if constraint is only valid locally, it is added to the local subproblem of the
1287 * if a local constraint is added at the root node, it is automatically upgraded into a global constraint
1289 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1308 /** globally removes constraint from all subproblems; removes constraint from the constraint set change data of the
1311 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1429 * @warning If your are using the method SCIPaddCons(), it can happen that the internal constraint array (which is
1430 * accessed via this method) gets resized. This can invalid the pointer which is returned by this method.
1483 /** computes the number of check constraint in the current node (loop over all constraint handler and cumulates the
1511 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1532 /** removes all conflicts depending on an old cutoff bound if the improvement of the incumbent is good enough
1534 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1547 /** adds constraint to the given node (and all of its subnodes), even if it is a global constraint;
1548 * It is sometimes desirable to add the constraint to a more local node (i.e., a node of larger depth) even if
1549 * the constraint is also valid higher in the tree, for example, if one wants to produce a constraint which is
1551 * In this case, one should pass the more global node where the constraint is valid as "validnode".
1552 * Note that the same constraint cannot be added twice to the branching tree with different "validnode" parameters.
1553 * If the constraint is valid at the same node as it is inserted (the usual case), one should pass NULL as "validnode".
1554 * If the "validnode" is the root node, it is automatically upgraded into a global constraint, but still only added to
1555 * the given node. If a local constraint is added to the root node, it is added to the global problem instead.
1557 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1574 /** adds constraint locally to the current node (and all of its subnodes), even if it is a global constraint;
1575 * It is sometimes desirable to add the constraint to a more local node (i.e., a node of larger depth) even if
1576 * the constraint is also valid higher in the tree, for example, if one wants to produce a constraint which is
1579 * If the constraint is valid at the same node as it is inserted (the usual case), one should pass NULL as "validnode".
1580 * If the "validnode" is the root node, it is automatically upgraded into a global constraint, but still only added to
1581 * the given node. If a local constraint is added to the root node, it is added to the global problem instead.
1583 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1592 * @note The same constraint cannot be added twice to the branching tree with different "validnode" parameters. This is
1593 * the case due internal data structures and performance issues. In such a case you should try to realize your
1594 * issue using the method SCIPdisableCons() and SCIPenableCons() and control these via the event system of SCIP.
1603 /** disables constraint's separation, enforcing, and propagation capabilities at the given node (and all subnodes);
1604 * if the method is called at the root node, the constraint is globally deleted from the problem;
1605 * the constraint deletion is being remembered at the given node, s.t. after leaving the node's subtree, the constraint
1606 * is automatically enabled again, and after entering the node's subtree, it is automatically disabled;
1607 * this may improve performance because redundant checks on this constraint are avoided, but it consumes memory;
1610 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1626 /** disables constraint's separation, enforcing, and propagation capabilities at the current node (and all subnodes);
1627 * if the method is called during problem modification or at the root node, the constraint is globally deleted from
1629 * the constraint deletion is being remembered at the current node, s.t. after leaving the current subtree, the
1630 * constraint is automatically enabled again, and after reentering the current node's subtree, it is automatically
1632 * this may improve performance because redundant checks on this constraint are avoided, but it consumes memory;
1635 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1653 * @return estimate of best primal solution w.r.t. original problem contained in current subtree
1663 /** gets estimate of best primal solution w.r.t. transformed problem contained in current subtree
1665 * @return estimate of best primal solution w.r.t. transformed problem contained in current subtree
1725 /** if given value is tighter (larger for minimization, smaller for maximization) than the current node's dual bound (in
1728 * @note the given new bound has to be a dual bound, i.e., it has to be valid for the original problem.
1730 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1745 /** if given value is larger than the current node's lower bound (in transformed problem), sets the current node's
1748 * @note the given new bound has to be a lower bound, i.e., it has to be valid for the transformed problem.
1750 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1764 /** if given value is tighter (larger for minimization, smaller for maximization) than the node's dual bound,
1767 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1780 /** if given value is larger than the node's lower bound (in transformed problem), sets the node's lower bound
1783 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1798 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
SCIP_RETCODE SCIPclearConflictStore(SCIP *scip, SCIP_EVENT *event)
Definition: scip_prob.c:3339
internal methods for branch and bound tree
type definitions for miscellaneous datastructures
Definition: struct_scip.h:58
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:2672
SCIP_RETCODE SCIPaddOrigObjoffset(SCIP *scip, SCIP_Real addval)
Definition: scip_prob.c:1346
SCIP_Real SCIPgetLocalTransEstimate(SCIP *scip)
Definition: scip_prob.c:3599
SCIP_RETCODE SCIPsetProbCopy(SCIP *scip, SCIP_DECL_PROBCOPY((*probcopy)))
Definition: scip_prob.c:349
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:162
SCIP_RETCODE SCIPdelConsNode(SCIP *scip, SCIP_NODE *node, SCIP_CONS *cons)
Definition: scip_prob.c:3477
Definition: struct_var.h:198
SCIP_RETCODE SCIPgetVarsData(SCIP *scip, SCIP_VAR ***vars, int *nvars, int *nbinvars, int *nintvars, int *nimplvars, int *ncontvars)
Definition: scip_prob.c:1918
SCIP_RETCODE SCIPsetProbExitsol(SCIP *scip, SCIP_DECL_PROBEXITSOL((*probexitsol)))
Definition: scip_prob.c:328
SCIP_RETCODE SCIPchgReoptObjective(SCIP *scip, SCIP_OBJSENSE objsense, SCIP_VAR **vars, SCIP_Real *coefs, int nvars)
Definition: scip_prob.c:1175
SCIP_RETCODE SCIPwriteOrigProblem(SCIP *scip, const char *filename, const char *extension, SCIP_Bool genericnames)
Definition: scip_prob.c:652
SCIP_RETCODE SCIPsetProbData(SCIP *scip, SCIP_PROBDATA *probdata)
Definition: scip_prob.c:1070
type definitions for return codes for SCIP methods
SCIP_RETCODE SCIPgetOrigVarsData(SCIP *scip, SCIP_VAR ***vars, int *nvars, int *nbinvars, int *nintvars, int *nimplvars, int *ncontvars)
Definition: scip_prob.c:2409
Definition: struct_tree.h:132
SCIP_RETCODE SCIPcreateProbBasic(SCIP *scip, const char *name)
Definition: scip_prob.c:223
SCIP_RETCODE SCIPchgChildPrio(SCIP *scip, SCIP_NODE *child, SCIP_Real priority)
Definition: scip_prob.c:3844
Definition: struct_sol.h:63
SCIP_RETCODE SCIPdelVar(SCIP *scip, SCIP_VAR *var, SCIP_Bool *deleted)
Definition: scip_prob.c:1842
SCIP_RETCODE SCIPsetObjsense(SCIP *scip, SCIP_OBJSENSE objsense)
Definition: scip_prob.c:1298
Definition: struct_cons.h:37
SCIP_RETCODE SCIPaddConsLocal(SCIP *scip, SCIP_CONS *cons, SCIP_NODE *validnode)
Definition: scip_prob.c:3446
SCIP_RETCODE SCIPreadProb(SCIP *scip, const char *filename, const char *extension)
Definition: scip_prob.c:382
SCIP_RETCODE SCIPdelConsLocal(SCIP *scip, SCIP_CONS *cons)
Definition: scip_prob.c:3527
type definitions for SCIP's main datastructure
SCIP_CONS * SCIPfindOrigCons(SCIP *scip, const char *name)
Definition: scip_prob.c:2950
SCIP_Real SCIPgetNodeDualbound(SCIP *scip, SCIP_NODE *node)
Definition: scip_prob.c:3658
internal miscellaneous methods
Definition: struct_event.h:144
internal methods for global SCIP settings
SCIP main data structure.
type definitions for problem variables
type definitions for conflict analysis
type definitions for managing events
SCIP_RETCODE SCIPaddConsNode(SCIP *scip, SCIP_NODE *node, SCIP_CONS *cons, SCIP_NODE *validnode)
Definition: scip_prob.c:3376
internal methods for problem variables
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:837
SCIP_RETCODE SCIPsetProbTrans(SCIP *scip, SCIP_DECL_PROBTRANS((*probtrans)))
Definition: scip_prob.c:264
SCIP_RETCODE SCIPwriteTransProblem(SCIP *scip, const char *filename, const char *extension, SCIP_Bool genericnames)
Definition: scip_prob.c:699
SCIP_RETCODE SCIPsetObjlimit(SCIP *scip, SCIP_Real objlimit)
Definition: scip_prob.c:1478
SCIP_RETCODE SCIPupdateNodeDualbound(SCIP *scip, SCIP_NODE *node, SCIP_Real newbound)
Definition: scip_prob.c:3788
SCIP_RETCODE SCIPupdateNodeLowerbound(SCIP *scip, SCIP_NODE *node, SCIP_Real newbound)
Definition: scip_prob.c:3810
methods for debugging
type definitions for branch and bound tree
SCIP_RETCODE SCIPupdateLocalDualbound(SCIP *scip, SCIP_Real newbound)
Definition: scip_prob.c:3699
datastructures for problem statistics
type definitions for storing primal CIP solutions
type definitions for storing and manipulating the main problem
SCIP_RETCODE SCIPupdateLocalLowerbound(SCIP *scip, SCIP_Real newbound)
Definition: scip_prob.c:3749
SCIP_RETCODE SCIPaddPricedVar(SCIP *scip, SCIP_VAR *var, SCIP_Real score)
Definition: scip_prob.c:1789
SCIP_RETCODE SCIPsetProbInitsol(SCIP *scip, SCIP_DECL_PROBINITSOL((*probinitsol)))
Definition: scip_prob.c:306
SCIP_RETCODE SCIPsetProbName(SCIP *scip, const char *name)
Definition: scip_prob.c:1151
internal methods for main solving loop and node processing
result codes for SCIP callback methods
internal methods for constraints and constraint handlers
SCIP_Real SCIPgetNodeLowerbound(SCIP *scip, SCIP_NODE *node)
Definition: scip_prob.c:3675
SCIP_RETCODE SCIPsetProbDeltrans(SCIP *scip, SCIP_DECL_PROBDELTRANS((*probdeltrans)))
Definition: scip_prob.c:285
common defines and data types used in all packages of SCIP
SCIP_RETCODE SCIPsetProbDelorig(SCIP *scip, SCIP_DECL_PROBDELORIG((*probdelorig)))
Definition: scip_prob.c:243
SCIP_RETCODE SCIPaddConflict(SCIP *scip, SCIP_NODE *node, SCIP_CONS *cons, SCIP_NODE *validnode, SCIP_CONFTYPE conftype, SCIP_Bool iscutoffinvolved)
Definition: scip_prob.c:3280
Definition: objbenders.h:33
SCIP_RETCODE SCIPaddObjoffset(SCIP *scip, SCIP_Real addval)
Definition: scip_prob.c:1324
type definitions for constraints and constraint handlers