scip_prob.h
Go to the documentation of this file.
38/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
67/** creates empty problem and initializes all solving data structures (the objective sense is set to MINIMIZE)
68 * If the problem type requires the use of variable pricers, these pricers should be added to the problem with calls
69 * to SCIPactivatePricer(). These pricers are automatically deactivated, when the problem is freed.
71 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
92 SCIP_DECL_PROBTRANS ((*probtrans)), /**< creates user data of transformed problem by transforming original user data */
94 SCIP_DECL_PROBINITSOL ((*probinitsol)), /**< solving process initialization method of transformed data */
95 SCIP_DECL_PROBEXITSOL ((*probexitsol)), /**< solving process deinitialization method of transformed data */
96 SCIP_DECL_PROBCOPY ((*probcopy)), /**< copies user data if you want to copy it to a subscip, or NULL */
100/** creates empty problem and initializes all solving data structures (the objective sense is set to MINIMIZE)
101 * all callback methods will be set to NULL and can be set afterwards, if needed, via SCIPsetProbDelorig(),
104 * If the problem type requires the use of variable pricers, these pricers should be added to the problem with calls
105 * to SCIPactivatePricer(). These pricers are automatically deactivated, when the problem is freed.
107 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
131 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
145 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
154 SCIP_DECL_PROBTRANS ((*probtrans)) /**< creates user data of transformed problem by transforming original user data */
159 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
173 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
182 SCIP_DECL_PROBINITSOL ((*probinitsol)) /**< solving process initialization method of transformed data */
187 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
196 SCIP_DECL_PROBEXITSOL ((*probexitsol)) /**< solving process deinitialization method of transformed data */
201 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
210 SCIP_DECL_PROBCOPY ((*probcopy)) /**< copies user data if you want to copy it to a subscip, or NULL */
215 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
243 * @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
295 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
323 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
337 * @note If you want the write all constraints (including the once which are redundant for example), you need to set
351 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
374 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
387 SCIP_Bool permuteconss, /**< should the list of constraints in each constraint handler be permuted? */
390 SCIP_Bool permutebinimplvars, /**< should the list of binary implied integral vars be permuted? */
391 SCIP_Bool permuteintimplvars, /**< should the list of integer implied integral vars be permuted? */
392 SCIP_Bool permutecontimplvars, /**< should the list of continuous implied integral vars be permuted? */
421 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
469 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
494 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
501 * @note This method should be only used to change the objective function during two reoptimization runs and is only
504 * @note All variables not given in \p vars array are assumed to have an objective coefficient of zero.
540 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
554 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
566/** adds offset of objective function to original problem and to all existing solution in original space
568 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
580/** adds offset of objective function to original problem and to all existing solution in original space
582 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
697/** sets limit on objective function, such that only solutions better than this limit are accepted
699 * @note SCIP will only look for solutions with a strictly better objective value, thus, e.g., prune
701 * However, SCIP will also collect solutions with objective value worse than the objective limit and
703 * @note If SCIP can prove that there exists no solution with a strictly better objective value, the solving status
705 * The only exception is that by chance, SCIP found a solution with the same objective value and thus
708 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
749 * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
759 * @note This function should be used to inform SCIP that the objective function is integral, helping to improve the
760 * performance. This is useful when using column generation. If no column generation (pricing) is used, SCIP
761 * automatically detects whether the objective function is integral or can be scaled to be integral. However, in
762 * any case, the user has to make sure that no variable is added during the solving process that destroys this
783 * @note If no pricing is performed, SCIP automatically detects whether the objective function is integral or can be
784 * scaled to be integral, helping to improve performance. This function returns the result. Otherwise
785 * SCIPsetObjIntegral() can be used to inform SCIP. However, in any case, the user has to make sure that no
793/** returns the Euclidean norm of the objective function vector (available only for transformed problem)
815 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
835 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
849 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
852 * @warning The variable is not deleted from the constraints when in SCIP_STAGE_PROBLEM. In this stage, it is the
853 * user's responsibility to ensure the variable has been removed from all constraints or the constraints
863 * @warning The variable is not deleted from the constraints when in SCIP_STAGE_PROBLEM. In this stage, it is the
864 * user's responsibility to ensure the variable has been removed from all constraints or the constraints
871 SCIP_Bool* deleted /**< pointer to store whether marking variable to be deleted was successful */
874/** gets variables of the problem along with the numbers of different variable types; data may become invalid after
877 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
915 * @warning Modifying a variable status (e.g. with SCIPfixVar(), SCIPaggregateVars(), and SCIPmultiaggregateVar())
1007 * @note This function counts binary, integer, and continuous variables which are implied integral.
1114 * @note In case of the original problem the number of variables is counted. In case of the transformed problem the
1177/** gets variables of the original problem along with the numbers of different variable types; data may become invalid
1180 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1320 * @note This function counts binary, integer, and continuous variables which are implied integral.
1460/** gets variables of the original or transformed problem along with the numbers of different variable types;
1462 * data may become invalid after calls to SCIPchgVarType(), SCIPfixVar(), SCIPaggregateVars(), and
1465 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1482 SCIP_SOL* sol, /**< primal solution that selects the problem space, NULL for current solution */
1487 int* nbinimplvars, /**< pointer to store number of binary implied integral vars or NULL if not needed */
1488 int* nintimplvars, /**< pointer to store number of integer implied integral vars or NULL if not needed */
1489 int* ncontimplvars, /**< pointer to store number of continuous implied integral vars or NULL if not needed */
1517/** returns TRUE iff all potential variables exist in the problem, and FALSE, if there may be additional variables,
1540/** adds constraint to the problem; if constraint is only valid locally, it is added to the local subproblem of the
1542 * if a local constraint is added at the root node, it is automatically upgraded into a global constraint
1544 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1564/** adds constraint to the problem and upgrades conflict in the conflict store; if oldcons is valid globally, newcons
1565 * is added to the global problem; otherwise it is added to the local subproblem of the current node
1569 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1592/** globally removes constraint from all subproblems; removes constraint from the constraint set change data of the
1595 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1715 * @warning If your are using the method SCIPaddCons(), it can happen that the internal constraint array (which is
1716 * accessed via this method) gets resized. This can invalid the pointer which is returned by this method.
1769/** computes the number of check constraint in the current node (loop over all constraint handler and cumulates the
1797 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1818/** tries to remove conflicts depending on an old cutoff bound if the improvement of the new incumbent is good enough
1820 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1833/** adds constraint to the given node (and all of its subnodes), even if it is a global constraint;
1834 * It is sometimes desirable to add the constraint to a more local node (i.e., a node of larger depth) even if
1835 * the constraint is also valid higher in the tree, for example, if one wants to produce a constraint which is
1837 * In this case, one should pass the more global node where the constraint is valid as "validnode".
1838 * Note that the same constraint cannot be added twice to the branching tree with different "validnode" parameters.
1839 * If the constraint is valid at the same node as it is inserted (the usual case), one should pass NULL as "validnode".
1840 * If the "validnode" is the root node, it is automatically upgraded into a global constraint, but still only added to
1841 * the given node. If a local constraint is added to the root node, it is added to the global problem instead.
1843 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1860/** adds constraint locally to the current node (and all of its subnodes), even if it is a global constraint;
1861 * It is sometimes desirable to add the constraint to a more local node (i.e., a node of larger depth) even if
1862 * the constraint is also valid higher in the tree, for example, if one wants to produce a constraint which is
1865 * If the constraint is valid at the same node as it is inserted (the usual case), one should pass NULL as "validnode".
1866 * If the "validnode" is the root node, it is automatically upgraded into a global constraint, but still only added to
1867 * the given node. If a local constraint is added to the root node, it is added to the global problem instead.
1869 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1878 * @note The same constraint cannot be added twice to the branching tree with different "validnode" parameters. This is
1879 * the case due to internal data structures and performance issues. In such a case you should try to realize your
1880 * issue using the method SCIPdisableCons() and SCIPenableCons() and control these via the event system of SCIP.
1889/** disables constraint's separation, enforcing, and propagation capabilities at the given node (and all subnodes);
1890 * if the method is called at the root node, the constraint is globally deleted from the problem;
1891 * the constraint deletion is being remembered at the given node, s.t. after leaving the node's subtree, the constraint
1892 * is automatically enabled again, and after entering the node's subtree, it is automatically disabled;
1893 * this may improve performance because redundant checks on this constraint are avoided, but it consumes memory;
1896 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1912/** disables constraint's separation, enforcing, and propagation capabilities at the current node (and all subnodes);
1913 * if the method is called during problem modification or at the root node, the constraint is globally deleted from
1915 * the constraint deletion is being remembered at the current node, s.t. after leaving the current subtree, the
1916 * constraint is automatically enabled again, and after reentering the current node's subtree, it is automatically
1918 * this may improve performance because redundant checks on this constraint are avoided, but it consumes memory;
1921 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1942 * @return estimate of best primal solution w.r.t. original problem contained in current subtree
1952/** gets estimate of best primal solution w.r.t. transformed problem contained in current subtree
1954 * @return estimate of best primal solution w.r.t. transformed problem contained in current subtree
2014/** if given value is tighter (larger for minimization, smaller for maximization) than the current node's dual bound (in
2017 * @note the given new bound has to be a dual bound, i.e., it has to be valid for the original problem.
2019 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2034/** if given value is larger than the current node's lower bound (in transformed problem), sets the current node's
2037 * @note the given new bound has to be a lower bound, i.e., it has to be valid for the transformed problem.
2039 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2053/** if given value is tighter (higher for minimization, lower for maximization) than the node's dual bound, sets the
2058 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2071/** if given value is higher than the node's lower bound (in transformed problem), sets the node's lower bound to the
2076 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2091 * @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 permutebinimplvars, SCIP_Bool permuteintimplvars, SCIP_Bool permutecontimplvars, SCIP_Bool permutecontvars)
Definition: scip_prob.c:922
SCIP_RETCODE SCIPaddConsUpgrade(SCIP *scip, SCIP_CONS *oldcons, SCIP_CONS **newcons)
Definition: scip_prob.c:3368
SCIP_RETCODE SCIPgetOrigVarsData(SCIP *scip, SCIP_VAR ***vars, int *nvars, int *nbinvars, int *nintvars, int *nimplvars, int *ncontvars)
Definition: scip_prob.c:2753
SCIP_RETCODE SCIPaddPricedVar(SCIP *scip, SCIP_VAR *var, SCIP_Real score)
Definition: scip_prob.c:1984
SCIP_RETCODE SCIPgetSolVarsData(SCIP *scip, SCIP_SOL *sol, SCIP_VAR ***vars, int *nvars, int *nbinvars, int *nintvars, int *nbinimplvars, int *nintimplvars, int *ncontimplvars, int *ncontvars)
Definition: scip_prob.c:3114
SCIP_RETCODE SCIPwriteOrigProblem(SCIP *scip, const char *filename, const char *extension, SCIP_Bool genericnames)
Definition: scip_prob.c:742
SCIP_RETCODE SCIPsetProbName(SCIP *scip, const char *name)
Definition: scip_prob.c:1270
SCIP_RETCODE SCIPsetObjlimit(SCIP *scip, SCIP_Real objlimit)
Definition: scip_prob.c:1661
SCIP_RETCODE SCIPsetProbDeltrans(SCIP *scip, SCIP_DECL_PROBDELTRANS((*probdeltrans)))
Definition: scip_prob.c:244
SCIP_RETCODE SCIPgetVarsData(SCIP *scip, SCIP_VAR ***vars, int *nvars, int *nbinvars, int *nintvars, int *nimplvars, int *ncontvars)
Definition: scip_prob.c:2115
SCIP_RETCODE SCIPsetProbExitsol(SCIP *scip, SCIP_DECL_PROBEXITSOL((*probexitsol)))
Definition: scip_prob.c:287
SCIP_RETCODE SCIPsetProbTrans(SCIP *scip, SCIP_DECL_PROBTRANS((*probtrans)))
Definition: scip_prob.c:223
SCIP_RETCODE SCIPsetProbDelorig(SCIP *scip, SCIP_DECL_PROBDELORIG((*probdelorig)))
Definition: scip_prob.c:202
SCIP_RETCODE SCIPaddObjoffset(SCIP *scip, SCIP_Real addval)
Definition: scip_prob.c:1443
SCIP_RETCODE SCIPchgReoptObjective(SCIP *scip, SCIP_OBJSENSE objsense, SCIP_VAR **vars, SCIP_Real *coefs, int nvars)
Definition: scip_prob.c:1294
SCIP_CONS * SCIPfindOrigCons(SCIP *scip, const char *name)
Definition: scip_prob.c:3476
SCIP_RETCODE SCIPprintTransProblem(SCIP *scip, FILE *file, const char *extension, SCIP_Bool genericnames)
Definition: scip_prob.c:696
SCIP_RETCODE SCIPprintOrigProblem(SCIP *scip, FILE *file, const char *extension, SCIP_Bool genericnames)
Definition: scip_prob.c:652
SCIP_RETCODE SCIPsetProbInitsol(SCIP *scip, SCIP_DECL_PROBINITSOL((*probinitsol)))
Definition: scip_prob.c:265
SCIP_RETCODE SCIPdelVar(SCIP *scip, SCIP_VAR *var, SCIP_Bool *deleted)
Definition: scip_prob.c:2041
SCIP_RETCODE SCIPsetObjsense(SCIP *scip, SCIP_OBJSENSE objsense)
Definition: scip_prob.c:1417
SCIP_RETCODE SCIPaddOrigObjoffset(SCIP *scip, SCIP_Real addval)
Definition: scip_prob.c:1486
SCIP_RETCODE SCIPcreateProbBasic(SCIP *scip, const char *name)
Definition: scip_prob.c:182
SCIP_RETCODE SCIPwriteTransProblem(SCIP *scip, const char *filename, const char *extension, SCIP_Bool genericnames)
Definition: scip_prob.c:789
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:119
SCIP_RETCODE SCIPsetProbData(SCIP *scip, SCIP_PROBDATA *probdata)
Definition: scip_prob.c:1189
SCIP_RATIONAL * SCIPgetOrigObjoffsetExact(SCIP *scip)
Definition: scip_prob.c:1556
SCIP_RETCODE SCIPsetProbCopy(SCIP *scip, SCIP_DECL_PROBCOPY((*probcopy)))
Definition: scip_prob.c:308
SCIP_RETCODE SCIPaddOrigObjoffsetExact(SCIP *scip, SCIP_RATIONAL *addval)
Definition: scip_prob.c:1465
SCIP_RETCODE SCIPreadProb(SCIP *scip, const char *filename, const char *extension)
Definition: scip_prob.c:341
SCIP_RETCODE SCIPupdateNodeLowerbound(SCIP *scip, SCIP_NODE *node, SCIP_Real newbound)
Definition: scip_prob.c:4354
SCIP_RETCODE SCIPupdateLocalLowerbound(SCIP *scip, SCIP_Real newbound)
Definition: scip_prob.c:4289
SCIP_Real SCIPgetNodeDualbound(SCIP *scip, SCIP_NODE *node)
Definition: scip_prob.c:4198
SCIP_RETCODE SCIPdelConsNode(SCIP *scip, SCIP_NODE *node, SCIP_CONS *cons)
Definition: scip_prob.c:4017
SCIP_RETCODE SCIPdelConsLocal(SCIP *scip, SCIP_CONS *cons)
Definition: scip_prob.c:4067
SCIP_RETCODE SCIPaddConsNode(SCIP *scip, SCIP_NODE *node, SCIP_CONS *cons, SCIP_NODE *validnode)
Definition: scip_prob.c:3901
SCIP_RETCODE SCIPclearConflictStore(SCIP *scip, SCIP_EVENT *event)
Definition: scip_prob.c:3864
SCIP_RETCODE SCIPupdateLocalDualbound(SCIP *scip, SCIP_Real newbound)
Definition: scip_prob.c:4239
SCIP_RETCODE SCIPaddConflict(SCIP *scip, SCIP_NODE *node, SCIP_CONS **cons, SCIP_NODE *validnode, SCIP_CONFTYPE conftype, SCIP_Bool iscutoffinvolved)
Definition: scip_prob.c:3806
SCIP_RETCODE SCIPchgChildPrio(SCIP *scip, SCIP_NODE *child, SCIP_Real priority)
Definition: scip_prob.c:4388
SCIP_RETCODE SCIPupdateNodeDualbound(SCIP *scip, SCIP_NODE *node, SCIP_Real newbound)
Definition: scip_prob.c:4330
SCIP_RETCODE SCIPaddConsLocal(SCIP *scip, SCIP_CONS *cons, SCIP_NODE *validnode)
Definition: scip_prob.c:3986
SCIP_Real SCIPgetNodeLowerbound(SCIP *scip, SCIP_NODE *node)
Definition: scip_prob.c:4215
SCIP_Real SCIPgetLocalTransEstimate(SCIP *scip)
Definition: scip_prob.c:4139
Definition: multiprecision.hpp:66
Definition: struct_cons.h:47
Definition: struct_event.h:174
Definition: struct_tree.h:142
Definition: struct_rational.h:47
Definition: struct_sol.h:74
Definition: struct_var.h:262
Definition: struct_scip.h:72
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
type definitions for rational numbers
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