Scippy

SCIP

Solving Constraint Integer Programs

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

◆ SCIPaddConflict()

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
scipSCIP data structure
nodenode to add conflict (or NULL if global)
consconstraint representing the conflict
validnodenode at whichaddConf the constraint is valid (or NULL)
conftypetype of the conflict
iscutoffinvolvedis a cutoff bound involved in this conflict

Definition at line 12866 of file scip.c.

References checkStage(), SCIP_Set::conf_enable, Scip::conflictstore, FALSE, Scip::mem, NULL, SCIP_Mem::probmem, Scip::reopt, SCIP_CALL, SCIP_CONFTYPE_BNDEXCEEDING, SCIP_CONFTYPE_UNKNOWN, SCIP_OKAY, SCIP_Real, SCIPaddCons(), SCIPaddConsNode(), SCIPconflictstoreAddConflict(), SCIPconsMarkConflict(), SCIPgetCutoffbound(), SCIPinfinity(), SCIPreleaseCons(), Scip::set, Scip::stat, Scip::transprob, Scip::tree, and TRUE.

Referenced by 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
scipSCIP data structure
eventevent data

Definition at line 12923 of file scip.c.

References checkStage(), Scip::conflictstore, SCIP_Primal::cutoffbound, FALSE, Scip::mem, NULL, Scip::primal, SCIP_Mem::probmem, Scip::reopt, SCIP_CALL, SCIP_EVENTTYPE_BESTSOLFOUND, SCIP_OKAY, SCIPconflictstoreCleanNewIncumbent(), SCIPeventGetSol(), SCIPeventGetType(), Scip::set, Scip::stat, Scip::transprob, and TRUE.

Referenced by SCIP_DECL_EVENTEXEC().

◆ SCIPaddConsNode()

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
scipSCIP data structure
nodenode to add constraint to
consconstraint to add
validnodenode at which the constraint is valid, or NULL

Definition at line 12960 of file scip.c.

References checkStage(), FALSE, Scip::mem, NULL, SCIP_Mem::probmem, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPconsGetName(), SCIPconsSetLocal(), SCIPerrorMessage, SCIPnodeAddCons(), SCIPnodeGetDepth(), SCIPprobAddCons(), SCIPtreeGetEffectiveRootDepth(), Scip::set, Scip::stat, Scip::transprob, Scip::tree, TRUE, and SCIP_Cons::validdepth.

Referenced by addBranchingComplementaritiesSOS1(), addLocalConss(), addSplitcons(), branchBalancedCardinality(), branchCons(), createNAryBranch(), fixVariableZeroNode(), SCIP_DECL_BRANCHEXECLP(), SCIP_DECL_CONSPROP(), SCIPaddConflict(), SCIPaddConsLocal(), and selectVarMultAggrBranching().

◆ SCIPaddConsLocal()

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
scipSCIP data structure
consconstraint to add
validnodenode at which the constraint is valid, or NULL

Definition at line 13030 of file scip.c.

References checkStage(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPaddConsNode(), SCIPtreeGetCurrentNode(), Scip::tree, and TRUE.

Referenced by addAllConss(), createConflict(), replaceByLinearConstraints(), replaceViolatedByLinearConstraints(), SCIP_DECL_CONSINITLP(), and tightenBounds().

◆ 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
scipSCIP data structure
nodenode to disable constraint in
consconstraint to locally delete

Definition at line 13061 of file scip.c.

References checkStage(), FALSE, Scip::mem, NULL, SCIP_Mem::probmem, Scip::reopt, SCIP_CALL, SCIP_OKAY, SCIP_STAGE_EXITPRESOLVE, SCIP_STAGE_INITPRESOLVE, SCIPconsDelete(), SCIPconsIsAdded(), SCIPnodeDelCons(), SCIPnodeGetDepth(), SCIPtreeGetEffectiveRootDepth(), Scip::set, SCIP_Set::stage, Scip::stat, Scip::transprob, Scip::tree, and TRUE.

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
scipSCIP data structure
consconstraint to locally delete

Definition at line 13111 of file scip.c.

References SCIP_Cons::addconssetchg, checkStage(), FALSE, Scip::mem, NULL, Scip::origprob, SCIP_Mem::probmem, Scip::reopt, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIP_STAGE_EXITPRESOLVE, SCIP_STAGE_INITPRESOLVE, SCIP_STAGE_PRESOLVING, SCIP_STAGE_PROBLEM, SCIP_STAGE_SOLVING, SCIPconsDelete(), SCIPconsIsAdded(), SCIPerrorMessage, SCIPnodeDelCons(), SCIPnodeGetDepth(), SCIPtreeGetCurrentNode(), SCIPtreeGetEffectiveRootDepth(), Scip::set, SCIP_Set::stage, Scip::stat, Scip::transprob, Scip::tree, and TRUE.

Referenced by addAllConss(), analyzeZeroResultant(), checkBounddisjunction(), checkKnapsack(), checkLogicor(), checkVarbound(), consdataFixOperandsOne(), consdataFixResultantZero(), detectRedundantVars(), initPricing(), processBinvarFixings(), processFixings(), processIntegerBoundChg(), propagateBounds(), propagateCons(), propCardinality(), propConsSOS1(), propIndicator(), propSOS2(), replaceByLinearConstraints(), replaceViolatedByLinearConstraints(), and solveIndependentCons().

◆ 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
scipSCIP data structure

Definition at line 13164 of file scip.c.

References checkStage(), FALSE, NULL, Scip::origprob, SCIP_CALL_ABORT, SCIP_INVALID, SCIPnodeGetEstimate(), SCIPprobExternObjval(), SCIPtreeGetCurrentNode(), Scip::set, Scip::transprob, Scip::tree, and TRUE.

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
scipSCIP data structure

Definition at line 13183 of file scip.c.

References checkStage(), FALSE, NULL, SCIP_CALL_ABORT, SCIP_INVALID, SCIPnodeGetEstimate(), SCIPtreeGetCurrentNode(), Scip::tree, and TRUE.

Referenced by branchBalancedCardinality(), branchCons(), branchUnbalancedCardinality(), and SCIP_DECL_BRANCHEXECLP().

◆ 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
scipSCIP data structure

Definition at line 13203 of file scip.c.

References checkStage(), FALSE, NULL, Scip::origprob, SCIP_CALL_ABORT, SCIP_INVALID, SCIPnodeGetLowerbound(), SCIPprobExternObjval(), SCIPtreeGetCurrentNode(), Scip::set, Scip::transprob, Scip::tree, and TRUE.

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
scipSCIP data structure

Definition at line 13222 of file scip.c.

References checkStage(), FALSE, NULL, SCIP_CALL_ABORT, SCIP_INVALID, SCIPnodeGetLowerbound(), SCIPtreeGetCurrentNode(), Scip::tree, and TRUE.

◆ 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
scipSCIP data structure
nodenode to get dual bound for

Definition at line 13242 of file scip.c.

References checkStage(), FALSE, Scip::origprob, SCIP_CALL_ABORT, SCIPnodeGetLowerbound(), SCIPprobExternObjval(), Scip::set, Scip::transprob, and TRUE.

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
scipSCIP data structure
nodenode to get dual bound for

Definition at line 13259 of file scip.c.

References checkStage(), FALSE, SCIP_CALL_ABORT, 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
scipSCIP data structure
newboundnew dual bound for the node (if it's tighter than the old one)

Definition at line 13283 of file scip.c.

References checkStage(), FALSE, Scip::origprob, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIP_STAGE_PRESOLVED, SCIP_STAGE_PRESOLVING, SCIP_STAGE_PROBLEM, SCIP_STAGE_SOLVING, SCIPABORT, SCIPerrorMessage, SCIPprobExternObjval(), SCIPprobInternObjval(), SCIPprobUpdateDualbound(), SCIPtreeGetCurrentNode(), SCIPupdateNodeLowerbound(), Scip::set, SCIP_Set::stage, Scip::transprob, Scip::tree, and TRUE.

◆ 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
scipSCIP data structure
newboundnew lower bound for the node (if it's larger than the old one)

Definition at line 13333 of file scip.c.

References checkStage(), FALSE, Scip::origprob, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIP_STAGE_PRESOLVED, SCIP_STAGE_PRESOLVING, SCIP_STAGE_SOLVING, SCIPABORT, SCIPerrorMessage, SCIPprobExternObjval(), SCIPprobUpdateDualbound(), SCIPtreeGetCurrentNode(), SCIPupdateNodeLowerbound(), Scip::set, SCIP_Set::stage, Scip::transprob, Scip::tree, and TRUE.

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
scipSCIP data structure
nodenode to update dual bound for
newboundnew dual bound for the node (if it's tighter than the old one)

Definition at line 13372 of file scip.c.

References checkStage(), FALSE, Scip::origprob, SCIP_CALL, SCIP_OKAY, SCIPprobInternObjval(), SCIPupdateNodeLowerbound(), Scip::set, Scip::transprob, and TRUE.

◆ 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
scipSCIP data structure
nodenode to update lower bound for
newboundnew lower bound for the node (if it's larger than the old one)

Definition at line 13394 of file scip.c.

References checkStage(), SCIP_Primal::cutoffbound, FALSE, Scip::lp, Scip::mem, Scip::origprob, Scip::primal, SCIP_Mem::probmem, Scip::reopt, SCIP_CALL, SCIP_OKAY, SCIPisGE(), SCIPnodeCutoff(), SCIPnodeUpdateLowerbound(), Scip::set, Scip::stat, Scip::transprob, Scip::tree, and TRUE.

Referenced by branch(), enforceConflictgraph(), execRelpscost(), SCIP_DECL_BRANCHEXECLP(), SCIPcopyConcurrentSolvingStats(), SCIPupdateLocalDualbound(), SCIPupdateLocalLowerbound(), and SCIPupdateNodeDualbound().

◆ 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
scipSCIP data structure
childchild to update the node selection priority
prioritynode selection priority value

Definition at line 13428 of file scip.c.

References checkStage(), FALSE, SCIP_CALL, SCIP_INVALIDDATA, SCIP_NODETYPE_CHILD, SCIP_OKAY, SCIPchildChgNodeselPrio(), SCIPnodeGetType(), Scip::tree, and TRUE.

Referenced by SCIP_DECL_BRANCHEXECLP().