# SCIP

Solving Constraint Integer Programs

Local Subproblem

## Detailed Description

methods to query information about or strengthen the problem at the current local search node

## Functions

SCIP_RETCODE SCIPaddConflict (SCIP *scip, SCIP_NODE *node, SCIP_CONS *cons, SCIP_NODE *validnode, SCIP_CONFTYPE conftype, SCIP_Bool iscutoffinvolved)

SCIP_RETCODE SCIPclearConflictStore (SCIP *scip, SCIP_EVENT *event)

SCIP_RETCODE SCIPaddConsNode (SCIP *scip, SCIP_NODE *node, SCIP_CONS *cons, SCIP_NODE *validnode)

SCIP_RETCODE SCIPaddConsLocal (SCIP *scip, SCIP_CONS *cons, SCIP_NODE *validnode)

SCIP_RETCODE SCIPdelConsNode (SCIP *scip, SCIP_NODE *node, SCIP_CONS *cons)

SCIP_RETCODE SCIPdelConsLocal (SCIP *scip, SCIP_CONS *cons)

SCIP_Real SCIPgetLocalOrigEstimate (SCIP *scip)

SCIP_Real SCIPgetLocalTransEstimate (SCIP *scip)

SCIP_Real SCIPgetLocalDualbound (SCIP *scip)

SCIP_Real SCIPgetLocalLowerbound (SCIP *scip)

SCIP_Real SCIPgetNodeDualbound (SCIP *scip, SCIP_NODE *node)

SCIP_Real SCIPgetNodeLowerbound (SCIP *scip, SCIP_NODE *node)

SCIP_RETCODE SCIPupdateLocalDualbound (SCIP *scip, SCIP_Real newbound)

SCIP_RETCODE SCIPupdateLocalLowerbound (SCIP *scip, SCIP_Real newbound)

SCIP_RETCODE SCIPupdateNodeDualbound (SCIP *scip, SCIP_NODE *node, SCIP_Real newbound)

SCIP_RETCODE SCIPupdateNodeLowerbound (SCIP *scip, SCIP_NODE *node, SCIP_Real newbound)

SCIP_RETCODE SCIPchgChildPrio (SCIP *scip, SCIP_NODE *child, SCIP_Real priority)

## Function Documentation

 SCIP_RETCODE SCIPaddConflict ( SCIP * scip, SCIP_NODE * node, SCIP_CONS * cons, SCIP_NODE * validnode, SCIP_CONFTYPE conftype, SCIP_Bool iscutoffinvolved )

adds a conflict to a given node or globally to the problem if node == NULL.

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
this method can be called in one of the following stages of the SCIP solving process:
Note
this method will release the constraint
Parameters
 scip SCIP data structure node node to add conflict (or NULL if global) cons constraint representing the conflict validnode node at whichaddConf the constraint is valid (or NULL) conftype type of the conflict iscutoffinvolved is a cutoff bound involved in this conflict

Definition at line 3280 of file scip_prob.c.

Referenced by applyCliqueFixings(), and SCIP_DECL_CONFLICTEXEC().

## ◆ SCIPclearConflictStore()

 SCIP_RETCODE SCIPclearConflictStore ( SCIP * scip, SCIP_EVENT * event )

removes all conflicts depending on an old cutoff bound if the improvement of the incumbent is good enough

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
this method can be called in one of the following stages of the SCIP solving process:

tries to remove conflicts depending on an old cutoff bound if the improvement of the new incumbent is good enough

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
this method can be called in one of the following stages of the SCIP solving process:
Parameters
 scip SCIP data structure event event data

Definition at line 3339 of file scip_prob.c.

Referenced by SCIP_DECL_EVENTEXEC().

 SCIP_RETCODE SCIPaddConsNode ( SCIP * scip, SCIP_NODE * node, SCIP_CONS * cons, SCIP_NODE * validnode )

adds constraint to the given node (and all of its subnodes), even if it is a global constraint; It is sometimes desirable to add the constraint to a more local node (i.e., a node of larger depth) even if the constraint is also valid higher in the tree, for example, if one wants to produce a constraint which is only active in a small part of the tree although it is valid in a larger part. In this case, one should pass the more global node where the constraint is valid as "validnode". Note that the same constraint cannot be added twice to the branching tree with different "validnode" parameters. If the constraint is valid at the same node as it is inserted (the usual case), one should pass NULL as "validnode". If the "validnode" is the root node, it is automatically upgraded into a global constraint, but still only added to the given node. If a local constraint is added to the root node, it is added to the global problem instead.

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
this method can be called in one of the following stages of the SCIP solving process:
Parameters
 scip SCIP data structure node node to add constraint to cons constraint to add validnode node at which the constraint is valid, or NULL

Definition at line 3376 of file scip_prob.c.

 SCIP_RETCODE SCIPaddConsLocal ( SCIP * scip, SCIP_CONS * cons, SCIP_NODE * validnode )

adds constraint locally to the current node (and all of its subnodes), even if it is a global constraint; It is sometimes desirable to add the constraint to a more local node (i.e., a node of larger depth) even if the constraint is also valid higher in the tree, for example, if one wants to produce a constraint which is only active in a small part of the tree although it is valid in a larger part.

If the constraint is valid at the same node as it is inserted (the usual case), one should pass NULL as "validnode". If the "validnode" is the root node, it is automatically upgraded into a global constraint, but still only added to the given node. If a local constraint is added to the root node, it is added to the global problem instead.

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
this method can be called in one of the following stages of the SCIP solving process:
Note
The same constraint cannot be added twice to the branching tree with different "validnode" parameters. This is the case due internal data structures and performance issues. In such a case you should try to realize your issue using the method SCIPdisableCons() and SCIPenableCons() and control these via the event system of SCIP.

adds constraint locally to the current node (and all of its subnodes), even if it is a global constraint; It is sometimes desirable to add the constraint to a more local node (i.e., a node of larger depth) even if the constraint is also valid higher in the tree, for example, if one wants to produce a constraint which is only active in a small part of the tree although it is valid in a larger part.

If the constraint is valid at the same node as it is inserted (the usual case), one should pass NULL as "validnode". If the "validnode" is the root node, it is automatically upgraded into a global constraint, but still only added to the given node. If a local constraint is added to the root node, it is added to the global problem instead.

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
this method can be called in one of the following stages of the SCIP solving process:
Note
The same constraint cannot be added twice to the branching tree with different "validnode" parameters. This is the case due to internal data structures and performance issues. In such a case you should try to realize your issue using the method SCIPdisableCons() and SCIPenableCons() and control these via the event system of SCIP.
Parameters
 scip SCIP data structure cons constraint to add validnode node at which the constraint is valid, or NULL

Definition at line 3446 of file scip_prob.c.

## ◆ SCIPdelConsNode()

 SCIP_RETCODE SCIPdelConsNode ( SCIP * scip, SCIP_NODE * node, SCIP_CONS * cons )

disables constraint's separation, enforcing, and propagation capabilities at the given node (and all subnodes); if the method is called at the root node, the constraint is globally deleted from the problem; the constraint deletion is being remembered at the given node, s.t. after leaving the node's subtree, the constraint is automatically enabled again, and after entering the node's subtree, it is automatically disabled; this may improve performance because redundant checks on this constraint are avoided, but it consumes memory; alternatively, use SCIPdisableCons()

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
this method can be called in one of the following stages of the SCIP solving process:
Parameters
 scip SCIP data structure node node to disable constraint in cons constraint to locally delete

Definition at line 3477 of file scip_prob.c.

Referenced by branchCons(), and createNAryBranch().

## ◆ SCIPdelConsLocal()

 SCIP_RETCODE SCIPdelConsLocal ( SCIP * scip, SCIP_CONS * cons )

disables constraint's separation, enforcing, and propagation capabilities at the current node (and all subnodes); if the method is called during problem modification or at the root node, the constraint is globally deleted from the problem; the constraint deletion is being remembered at the current node, s.t. after leaving the current subtree, the constraint is automatically enabled again, and after reentering the current node's subtree, it is automatically disabled again; this may improve performance because redundant checks on this constraint are avoided, but it consumes memory; alternatively, use SCIPdisableCons()

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
this method can be called in one of the following stages of the SCIP solving process:

disables constraint's separation, enforcing, and propagation capabilities at the current node (and all subnodes); if the method is called during problem modification or at the root node, the constraint is globally deleted from the problem; the constraint deletion is being remembered at the current node, s.t. after leaving the current subtree, the constraint is automatically enabled again, and after reentering the current node's subtree, it is automatically disabled again; this may improve performance because redundant checks on this constraint are avoided, but it consumes memory; alternatively, use SCIPdisableCons()

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
this method can be called in one of the following stages of the SCIP solving process:
Note
SCIP stage does not get changed
Parameters
 scip SCIP data structure cons constraint to locally delete

Definition at line 3527 of file scip_prob.c.

## ◆ SCIPgetLocalOrigEstimate()

 SCIP_Real SCIPgetLocalOrigEstimate ( SCIP * scip )

gets estimate of best primal solution w.r.t. original problem contained in current subtree

Returns
estimate of best primal solution w.r.t. original problem contained in current subtree
Precondition
this method can be called in one of the following stages of the SCIP solving process:
Parameters
 scip SCIP data structure

Definition at line 3580 of file scip_prob.c.

Referenced by SCIP_DECL_DISPOUTPUT().

## ◆ SCIPgetLocalTransEstimate()

 SCIP_Real SCIPgetLocalTransEstimate ( SCIP * scip )

gets estimate of best primal solution w.r.t. transformed problem contained in current subtree

Returns
estimate of best primal solution w.r.t. transformed problem contained in current subtree
Precondition
this method can be called in one of the following stages of the SCIP solving process:
Parameters
 scip SCIP data structure

Definition at line 3599 of file scip_prob.c.

## ◆ SCIPgetLocalDualbound()

 SCIP_Real SCIPgetLocalDualbound ( SCIP * scip )

gets dual bound of current node

Returns
dual bound of current node
Precondition
this method can be called in one of the following stages of the SCIP solving process:
Parameters
 scip SCIP data structure

Definition at line 3619 of file scip_prob.c.

Referenced by SCIP_DECL_DISPOUTPUT(), and SCIP_DECL_HEUREXEC().

## ◆ SCIPgetLocalLowerbound()

 SCIP_Real SCIPgetLocalLowerbound ( SCIP * scip )

gets lower bound of current node in transformed problem

Returns
lower bound of current node in transformed problem
Precondition
this method can be called in one of the following stages of the SCIP solving process:
Parameters
 scip SCIP data structure

Definition at line 3638 of file scip_prob.c.

## ◆ SCIPgetNodeDualbound()

 SCIP_Real SCIPgetNodeDualbound ( SCIP * scip, SCIP_NODE * node )

gets dual bound of given node

Returns
dual bound of a given node
Precondition
this method can be called in one of the following stages of the SCIP solving process:
Parameters
 scip SCIP data structure node node to get dual bound for

Definition at line 3658 of file scip_prob.c.

Referenced by applyDomainChanges(), and writeBounds().

## ◆ SCIPgetNodeLowerbound()

 SCIP_Real SCIPgetNodeLowerbound ( SCIP * scip, SCIP_NODE * node )

gets lower bound of given node in transformed problem

Returns
lower bound of given node in transformed problem
Precondition
this method can be called in one of the following stages of the SCIP solving process:
Parameters
 scip SCIP data structure node node to get dual bound for

Definition at line 3675 of file scip_prob.c.

References FALSE, SCIP_CALL_ABORT, SCIPcheckStage(), SCIPnodeGetLowerbound(), and TRUE.

Referenced by execRelpscost(), and subscipdataCopySubscip().

## ◆ SCIPupdateLocalDualbound()

 SCIP_RETCODE SCIPupdateLocalDualbound ( SCIP * scip, SCIP_Real newbound )

if given value is tighter (larger for minimization, smaller for maximization) than the current node's dual bound (in original problem space), sets the current node's dual bound to the new value

Note
the given new bound has to be a dual bound, i.e., it has to be valid for the original problem.
Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
this method can be called in one of the following stages of the SCIP solving process:
Parameters
 scip SCIP data structure newbound new dual bound for the node (if it's tighter than the old one)

Definition at line 3699 of file scip_prob.c.

Referenced by setupAndSolveSubscipRapidlearning(), and setupProblem().

## ◆ SCIPupdateLocalLowerbound()

 SCIP_RETCODE SCIPupdateLocalLowerbound ( SCIP * scip, SCIP_Real newbound )

if given value is larger than the current node's lower bound (in transformed problem), sets the current node's lower bound to the new value

Note
the given new bound has to be a lower bound, i.e., it has to be valid for the transformed problem.
Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
this method can be called in one of the following stages of the SCIP solving process:
Parameters
 scip SCIP data structure newbound new lower bound for the node (if it's larger than the old one)

Definition at line 3749 of file scip_prob.c.

Referenced by solveComponent().

## ◆ SCIPupdateNodeDualbound()

 SCIP_RETCODE SCIPupdateNodeDualbound ( SCIP * scip, SCIP_NODE * node, SCIP_Real newbound )

if given value is tighter (larger for minimization, smaller for maximization) than the node's dual bound, sets the node's dual bound to the new value

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
this method can be called in one of the following stages of the SCIP solving process:
Parameters
 scip SCIP data structure node node to update dual bound for newbound new dual bound for the node (if it's tighter than the old one)

Definition at line 3788 of file scip_prob.c.

## ◆ SCIPupdateNodeLowerbound()

 SCIP_RETCODE SCIPupdateNodeLowerbound ( SCIP * scip, SCIP_NODE * node, SCIP_Real newbound )

if given value is larger than the node's lower bound (in transformed problem), sets the node's lower bound to the new value

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
this method can be called in one of the following stages of the SCIP solving process:
Parameters
 scip SCIP data structure node node to update lower bound for newbound new lower bound for the node (if it's larger than the old one)

Definition at line 3810 of file scip_prob.c.

## ◆ SCIPchgChildPrio()

 SCIP_RETCODE SCIPchgChildPrio ( SCIP * scip, SCIP_NODE * child, SCIP_Real priority )

change the node selection priority of the given child

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
this method can be called in one of the following stages of the SCIP solving process:
Parameters
 scip SCIP data structure child child to update the node selection priority priority node selection priority value

Definition at line 3844 of file scip_prob.c.

Referenced by SCIP_DECL_BRANCHEXECLP().