Detailed Description
methods for reoptimization related tasks
Function Documentation
◆ SCIPgetReoptChildIDs()
SCIP_EXPORT SCIP_RETCODE SCIPgetReoptChildIDs | ( | SCIP * | scip, |
SCIP_NODE * | node, | ||
unsigned int * | ids, | ||
int | idssize, | ||
int * | nids | ||
) |
return the ids of child nodes stored in the reoptimization tree
- 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 if
scip
is in one of the following stages:
- Parameters
-
scip SCIP data structure node node of the search tree ids array of ids idssize allocated memory nids number of child nodes
Definition at line 60 of file scip_reopt.c.
References FALSE, Scip::mem, NULL, SCIP_Mem::probmem, Scip::reopt, SCIP_Set::reopt_enable, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPreoptGetChildIDs(), Scip::set, and TRUE.
Referenced by Exec().
◆ SCIPgetReoptLeaveIDs()
SCIP_EXPORT SCIP_RETCODE SCIPgetReoptLeaveIDs | ( | SCIP * | scip, |
SCIP_NODE * | node, | ||
unsigned int * | ids, | ||
int | idssize, | ||
int * | nids | ||
) |
return the ids of all leave nodes store in the reoptimization tree induced by the given node
- 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 if
scip
is in one of the following stages:
- Parameters
-
scip SCIP data structure node node of the search tree ids array of ids idssize size of ids array nids number of child nodes
Definition at line 92 of file scip_reopt.c.
References FALSE, NULL, Scip::reopt, SCIP_Set::reopt_enable, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPreoptGetLeaves(), Scip::set, and TRUE.
Referenced by constructCompression().
◆ SCIPgetNReoptnodes()
SCIP_EXPORT int SCIPgetNReoptnodes | ( | SCIP * | scip, |
SCIP_NODE * | node | ||
) |
returns the number of nodes in the reoptimization tree induced by node
; if node
== NULL, the method returns the number of nodes of the whole reoptimization tree.
returns the number of nodes in the reoptimization tree induced by node
; if node
== NULL the method returns the number of nodes of the whole reoptimization tree.
- Parameters
-
scip SCIP data structure node node of the search tree
Definition at line 117 of file scip_reopt.c.
References NULL, Scip::reopt, SCIP_Set::reopt_enable, SCIPreoptGetNNodes(), and Scip::set.
◆ SCIPgetNReoptLeaves()
SCIP_EXPORT int SCIPgetNReoptLeaves | ( | SCIP * | scip, |
SCIP_NODE * | node | ||
) |
returns the number of leave nodes of the subtree induced by node
; if node
== NULL, the method returns the number of leaf nodes of the whole reoptimization tree.
returns the number of leaf nodes of the subtree induced by node
; if node
== NULL, the method returns the number of leaf nodes of the whole reoptimization tree.
- Parameters
-
scip SCIP data structure node node of the search tree
Definition at line 132 of file scip_reopt.c.
References NULL, Scip::reopt, SCIP_Set::reopt_enable, SCIPreoptGetNLeaves(), and Scip::set.
Referenced by constructCompression().
◆ SCIPgetReoptnode()
SCIP_REOPTNODE* SCIPgetReoptnode | ( | SCIP * | scip, |
unsigned int | id | ||
) |
gets the node of the reoptimization tree corresponding to the unique id
- Parameters
-
scip SCIP data structure id unique id
Definition at line 145 of file scip_reopt.c.
References NULL, Scip::reopt, SCIP_Set::reopt_enable, SCIPreoptGetReoptnode(), and Scip::set.
Referenced by constructCompression(), Exec(), SCIPreoptimizeNode(), and sortIDs().
◆ SCIPaddReoptnodeBndchg()
SCIP_EXPORT SCIP_RETCODE SCIPaddReoptnodeBndchg | ( | SCIP * | scip, |
SCIP_REOPTNODE * | reoptnode, | ||
SCIP_VAR * | var, | ||
SCIP_Real | bound, | ||
SCIP_BOUNDTYPE | boundtype | ||
) |
add a variable bound change to a given reoptnode
- 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 if
scip
is in one of the following stages:
- Parameters
-
scip SCIP data structure reoptnode node of the reoptimization tree var variable pointer bound variable bound to add boundtype bound type of the variable value
Definition at line 167 of file scip_reopt.c.
References FALSE, Scip::mem, NULL, SCIP_Mem::probmem, Scip::reopt, SCIP_Set::reopt_enable, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPreoptnodeAddBndchg(), Scip::set, and TRUE.
Referenced by constructCompression().
◆ SCIPsetReoptCompression()
SCIP_EXPORT SCIP_RETCODE SCIPsetReoptCompression | ( | SCIP * | scip, |
SCIP_REOPTNODE ** | representation, | ||
int | nrepresentatives, | ||
SCIP_Bool * | success | ||
) |
set the representation
as the new search frontier
- 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 if
scip
is in one of the following stages:
- Parameters
-
scip SCIP data structure representation array of representatives nrepresentatives number of representatives success pointer to store the result
Definition at line 195 of file scip_reopt.c.
References FALSE, Scip::mem, NULL, SCIP_Mem::probmem, Scip::reopt, SCIP_Set::reopt_enable, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPreoptApplyCompression(), Scip::set, and TRUE.
Referenced by applyCompression().
◆ SCIPaddReoptnodeCons()
SCIP_EXPORT SCIP_RETCODE SCIPaddReoptnodeCons | ( | SCIP * | scip, |
SCIP_REOPTNODE * | reoptnode, | ||
SCIP_VAR ** | vars, | ||
SCIP_Real * | vals, | ||
SCIP_BOUNDTYPE * | boundtypes, | ||
SCIP_Real | lhs, | ||
SCIP_Real | rhs, | ||
int | nvars, | ||
REOPT_CONSTYPE | constype, | ||
SCIP_Bool | linear | ||
) |
add stored constraint to a reoptimization node
- 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 if
scip
is in one of the following stages:
- Parameters
-
scip SCIP data structure reoptnode node of the reoptimization tree vars array of variables vals array of variable bounds boundtypes array of variable boundtypes lhs lhs of the constraint rhs rhs of the constraint nvars number of variables constype type of the constraint linear the given constraint has a linear representation
Definition at line 223 of file scip_reopt.c.
References FALSE, Scip::mem, NULL, SCIP_Mem::probmem, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPreoptnodeAddCons(), Scip::set, and TRUE.
Referenced by constructCompression().
◆ SCIPgetReoptnodePath()
SCIP_EXPORT void SCIPgetReoptnodePath | ( | SCIP * | scip, |
SCIP_REOPTNODE * | reoptnode, | ||
SCIP_VAR ** | vars, | ||
SCIP_Real * | vals, | ||
SCIP_BOUNDTYPE * | boundtypes, | ||
int | mem, | ||
int * | nvars, | ||
int * | nafterdualvars | ||
) |
return the branching path stored in the reoptree at ID id
- Parameters
-
scip SCIP data structure reoptnode node of the reoptimization tree vars array of variables vals array of variable bounds boundtypes array of bound types mem allocated memory nvars number of variables nafterdualvars number of variables directly after the first based on dual information
Definition at line 251 of file scip_reopt.c.
References NULL, Scip::reopt, SCIP_Set::reopt_enable, SCIPreoptnodeGetPath(), and Scip::set.
Referenced by constructCompression().
◆ SCIPinitRepresentation()
SCIP_EXPORT SCIP_RETCODE SCIPinitRepresentation | ( | SCIP * | scip, |
SCIP_REOPTNODE ** | representatives, | ||
int | nrepresentatives | ||
) |
initialize a set of empty reoptimization nodes
- 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 if
scip
is in one of the following stages:
- Parameters
-
scip SCIP data structure representatives array of representatives nrepresentatives number of representatives
Definition at line 280 of file scip_reopt.c.
References FALSE, NULL, r, SCIP_CALL, SCIP_OKAY, SCIPallocBlockMemory, SCIPcheckStage(), SCIPreoptnodeInit(), Scip::set, and TRUE.
Referenced by constructCompression(), and SCIP_DECL_COMPREXEC().
◆ SCIPresetRepresentation()
SCIP_RETCODE SCIPresetRepresentation | ( | SCIP * | scip, |
SCIP_REOPTNODE ** | representatives, | ||
int | nrepresentatives | ||
) |
reset a set of initialized reoptimization nodes
- 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 if
scip
is in one of the following stages:
- Parameters
-
scip SCIP data structure representatives array of representatives nrepresentatives number of representatives
Definition at line 310 of file scip_reopt.c.
References FALSE, Scip::mem, NULL, SCIP_Mem::probmem, r, Scip::reopt, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPreoptnodeReset(), Scip::set, and TRUE.
Referenced by constructCompression().
◆ SCIPfreeRepresentation()
SCIP_EXPORT SCIP_RETCODE SCIPfreeRepresentation | ( | SCIP * | scip, |
SCIP_REOPTNODE ** | representatives, | ||
int | nrepresentatives | ||
) |
free a set of initialized reoptimization nodes
- 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 if
scip
is in one of the following stages:
- Parameters
-
scip SCIP data structure representatives array of representatives nrepresentatives number of representatives
Definition at line 339 of file scip_reopt.c.
References FALSE, Scip::mem, NULL, SCIP_Mem::probmem, r, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPreoptnodeDelete(), and TRUE.
Referenced by applyCompression(), constructCompression(), and SCIP_DECL_COMPREXEC().
◆ SCIPapplyReopt()
SCIP_EXPORT SCIP_RETCODE SCIPapplyReopt | ( | SCIP * | scip, |
SCIP_REOPTNODE * | reoptnode, | ||
unsigned int | id, | ||
SCIP_Real | estimate, | ||
SCIP_NODE ** | childnodes, | ||
int * | ncreatedchilds, | ||
int * | naddedconss, | ||
int | childnodessize, | ||
SCIP_Bool * | success | ||
) |
reactivate the given reoptnode
and split them into several nodes if necessary
- 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 if
scip
is in one of the following stages:
- Parameters
-
scip SCIP data structure reoptnode node to reactivate id unique id of the reoptimization node estimate estimate of the child nodes that should be created childnodes array to store the created child nodes ncreatedchilds pointer to store number of created child nodes naddedconss pointer to store number of generated constraints childnodessize available size of childnodes array success pointer store the result
Definition at line 373 of file scip_reopt.c.
References Scip::branchcand, Scip::cliquetable, Scip::eventqueue, FALSE, Scip::lp, Scip::mem, NULL, Scip::origprob, SCIP_Mem::probmem, Scip::reopt, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPreoptApply(), Scip::set, Scip::stat, Scip::transprob, Scip::tree, and TRUE.
Referenced by Exec().
◆ SCIPresetReoptnodeDualcons()
SCIP_EXPORT SCIP_RETCODE SCIPresetReoptnodeDualcons | ( | SCIP * | scip, |
SCIP_NODE * | node | ||
) |
remove the stored information about bound changes based in dual information
- 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 if
scip
is in one of the following stages:
- Parameters
-
scip SCIP data structure node node of the search tree
Definition at line 507 of file scip_reopt.c.
References FALSE, Scip::mem, NULL, SCIP_Mem::probmem, Scip::reopt, SCIP_Set::reopt_enable, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPreoptResetDualBndchgs(), Scip::set, and TRUE.
◆ SCIPsplitReoptRoot()
SCIP_EXPORT SCIP_RETCODE SCIPsplitReoptRoot | ( | SCIP * | scip, |
int * | ncreatedchilds, | ||
int * | naddedconss | ||
) |
splits the root into several nodes and moves the child nodes of the root to one of the created nodes
- 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 if
scip
is in one of the following stages:
splits the root into several nodes and moves the child nodes of the root to one of the created nodes
- 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 if
scip
is in one of the following stages:
- Parameters
-
scip SCIP data structure ncreatedchilds pointer to store the number of created nodes naddedconss pointer to store the number added constraints
Definition at line 480 of file scip_reopt.c.
References FALSE, Scip::mem, NULL, SCIP_Mem::probmem, Scip::reopt, SCIP_Set::reopt_enable, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPreoptSplitRoot(), Scip::set, Scip::stat, Scip::tree, and TRUE.
Referenced by Exec().
◆ SCIPreoptimizeNode()
SCIP_EXPORT SCIP_Bool SCIPreoptimizeNode | ( | SCIP * | scip, |
SCIP_NODE * | node | ||
) |
returns if a node should be reoptimized
- Parameters
-
scip SCIP data structure node node of the search tree
Definition at line 415 of file scip_reopt.c.
References FALSE, NULL, Scip::reopt, SCIP_Set::reopt_enable, SCIPgetReoptnode(), SCIPgetRootNode(), SCIPnodeGetReoptID(), SCIPreoptnodeGetNChildren(), and Scip::set.
Referenced by SCIP_DECL_BRANCHEXECEXT(), SCIP_DECL_BRANCHEXECLP(), and SCIP_DECL_BRANCHEXECPS().
◆ SCIPdeleteReoptnode()
SCIP_EXPORT SCIP_RETCODE SCIPdeleteReoptnode | ( | SCIP * | scip, |
SCIP_REOPTNODE ** | reoptnode | ||
) |
deletes the given reoptimization node
- 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 if
scip
is in one of the following stages:
deletes the given reoptimization node
- 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 if
scip
is in one of the following stages:
- Parameters
-
scip SCIP data structure reoptnode node of the reoptimization tree
Definition at line 455 of file scip_reopt.c.
References FALSE, Scip::mem, NULL, SCIP_Mem::probmem, Scip::reopt, SCIP_Set::reopt_enable, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPreoptnodeDelete(), Scip::set, and TRUE.
Referenced by SCIP_DECL_COMPREXIT().
◆ SCIPgetReoptSimilarity()
SCIP_EXPORT SCIP_Real SCIPgetReoptSimilarity | ( | SCIP * | scip, |
int | run1, | ||
int | run2 | ||
) |
return the similarity between two objective functions
- Parameters
-
scip SCIP data structure run1 number of run run2 number of run
Definition at line 398 of file scip_reopt.c.
References SCIP_Stat::nreoptruns, NULL, SCIP_Prob::nvars, Scip::origprob, Scip::reopt, SCIPreoptGetSimilarity(), SCIPreoptGetSimToPrevious(), Scip::set, Scip::stat, and SCIP_Prob::vars.
Referenced by SCIP_DECL_BRANCHEXECLP(), and SCIP_DECL_HEUREXEC().
◆ SCIPgetVarCoefChg()
SCIP_EXPORT void SCIPgetVarCoefChg | ( | SCIP * | scip, |
int | varidx, | ||
SCIP_Bool * | negated, | ||
SCIP_Bool * | entering, | ||
SCIP_Bool * | leaving | ||
) |
check the changes of the variable coefficient in the objective function
- Parameters
-
scip SCIP data structure varidx index of variable negated coefficient changed the sign entering coefficient gets non-zero coefficient leaving coefficient gets zero coefficient