Detailed Description
methods to copy problems between a source and a target SCIP
Functions  
SCIP_EXPORT SCIP_RETCODE  SCIPcopyPlugins (SCIP *sourcescip, SCIP *targetscip, SCIP_Bool copyreaders, SCIP_Bool copypricers, SCIP_Bool copyconshdlrs, SCIP_Bool copyconflicthdlrs, SCIP_Bool copypresolvers, SCIP_Bool copyrelaxators, SCIP_Bool copyseparators, SCIP_Bool copypropagators, SCIP_Bool copyheuristics, SCIP_Bool copyeventhdlrs, SCIP_Bool copynodeselectors, SCIP_Bool copybranchrules, SCIP_Bool copydisplays, SCIP_Bool copydialogs, SCIP_Bool copytables, SCIP_Bool copynlpis, SCIP_Bool passmessagehdlr, SCIP_Bool *valid) 
SCIP_EXPORT SCIP_RETCODE  SCIPcopyBenders (SCIP *sourcescip, SCIP *targetscip, SCIP_HASHMAP *varmap, SCIP_Bool threadsafe, SCIP_Bool *valid) 
SCIP_EXPORT SCIP_RETCODE  SCIPcopyProb (SCIP *sourcescip, SCIP *targetscip, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, SCIP_Bool global, const char *name) 
SCIP_EXPORT SCIP_RETCODE  SCIPcopyOrigProb (SCIP *sourcescip, SCIP *targetscip, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, const char *name) 
SCIP_EXPORT SCIP_RETCODE  SCIPenableConsCompression (SCIP *scip) 
SCIP_EXPORT SCIP_Bool  SCIPisConsCompressionEnabled (SCIP *scip) 
SCIP_EXPORT SCIP_RETCODE  SCIPgetVarCopy (SCIP *sourcescip, SCIP *targetscip, SCIP_VAR *sourcevar, SCIP_VAR **targetvar, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, SCIP_Bool global, SCIP_Bool *success) 
SCIP_EXPORT SCIP_RETCODE  SCIPcopyVars (SCIP *sourcescip, SCIP *targetscip, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, SCIP_VAR **fixedvars, SCIP_Real *fixedvals, int nfixedvars, SCIP_Bool global) 
SCIP_EXPORT SCIP_RETCODE  SCIPcopyOrigVars (SCIP *sourcescip, SCIP *targetscip, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, SCIP_VAR **fixedvars, SCIP_Real *fixedvals, int nfixedvars) 
SCIP_EXPORT SCIP_RETCODE  SCIPmergeVariableStatistics (SCIP *sourcescip, SCIP *targetscip, SCIP_VAR **sourcevars, SCIP_VAR **targetvars, int nvars) 
SCIP_EXPORT SCIP_RETCODE  SCIPtranslateSubSol (SCIP *scip, SCIP *subscip, SCIP_SOL *subsol, SCIP_HEUR *heur, SCIP_VAR **subvars, SCIP_SOL **newsol) 
SCIP_EXPORT SCIP_RETCODE  SCIPtranslateSubSols (SCIP *scip, SCIP *subscip, SCIP_HEUR *heur, SCIP_VAR **subvars, SCIP_Bool *success, int *solindex) 
SCIP_EXPORT SCIP_RETCODE  SCIPgetConsCopy (SCIP *sourcescip, SCIP *targetscip, SCIP_CONS *sourcecons, SCIP_CONS **targetcons, SCIP_CONSHDLR *sourceconshdlr, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, const char *name, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode, SCIP_Bool global, SCIP_Bool *valid) 
SCIP_EXPORT SCIP_RETCODE  SCIPcopyConss (SCIP *sourcescip, SCIP *targetscip, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, SCIP_Bool global, SCIP_Bool enablepricing, SCIP_Bool *valid) 
SCIP_EXPORT SCIP_RETCODE  SCIPcopyOrigConss (SCIP *sourcescip, SCIP *targetscip, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, SCIP_Bool enablepricing, SCIP_Bool *valid) 
SCIP_EXPORT SCIP_RETCODE  SCIPconvertCutsToConss (SCIP *scip, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, SCIP_Bool global, int *ncutsadded) 
SCIP_EXPORT SCIP_RETCODE  SCIPcopyCuts (SCIP *sourcescip, SCIP *targetscip, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, SCIP_Bool global, int *ncutsadded) 
SCIP_EXPORT SCIP_RETCODE  SCIPcopyConflicts (SCIP *sourcescip, SCIP *targetscip, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, SCIP_Bool global, SCIP_Bool enablepricing, SCIP_Bool *valid) 
SCIP_EXPORT SCIP_RETCODE  SCIPcopyImplicationsCliques (SCIP *sourcescip, SCIP *targetscip, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, SCIP_Bool global, SCIP_Bool *infeasible, int *nbdchgs, int *ncopied) 
SCIP_EXPORT SCIP_RETCODE  SCIPcopyParamSettings (SCIP *sourcescip, SCIP *targetscip) 
SCIP_EXPORT int  SCIPgetSubscipDepth (SCIP *scip) 
SCIP_EXPORT void  SCIPsetSubscipDepth (SCIP *scip, int newdepth) 
SCIP_EXPORT SCIP_RETCODE  SCIPcopy (SCIP *sourcescip, SCIP *targetscip, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, const char *suffix, SCIP_Bool global, SCIP_Bool enablepricing, SCIP_Bool threadsafe, SCIP_Bool passmessagehdlr, SCIP_Bool *valid) 
SCIP_EXPORT SCIP_RETCODE  SCIPcopyConsCompression (SCIP *sourcescip, SCIP *targetscip, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, const char *suffix, SCIP_VAR **fixedvars, SCIP_Real *fixedvals, int nfixedvars, SCIP_Bool global, SCIP_Bool enablepricing, SCIP_Bool threadsafe, SCIP_Bool passmessagehdlr, SCIP_Bool *valid) 
SCIP_EXPORT SCIP_RETCODE  SCIPcopyOrig (SCIP *sourcescip, SCIP *targetscip, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, const char *suffix, SCIP_Bool enablepricing, SCIP_Bool threadsafe, SCIP_Bool passmessagehdlr, SCIP_Bool *valid) 
SCIP_EXPORT SCIP_RETCODE  SCIPcopyOrigConsCompression (SCIP *sourcescip, SCIP *targetscip, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, const char *suffix, SCIP_VAR **fixedvars, SCIP_Real *fixedvals, int nfixedvars, SCIP_Bool enablepricing, SCIP_Bool threadsafe, SCIP_Bool passmessagehdlr, SCIP_Bool *valid) 
SCIP_EXPORT SCIP_RETCODE  SCIPcheckCopyLimits (SCIP *sourcescip, SCIP_Bool *success) 
SCIP_EXPORT SCIP_RETCODE  SCIPcopyLimits (SCIP *sourcescip, SCIP *targetscip) 
SCIP_EXPORT SCIP_RETCODE  SCIPsetCommonSubscipParams (SCIP *sourcescip, SCIP *subscip, SCIP_Longint nsubnodes, SCIP_Longint nstallnodes, int bestsollimit) 
Function Documentation
◆ SCIPcopyPlugins()
SCIP_EXPORT SCIP_RETCODE SCIPcopyPlugins  (  SCIP *  sourcescip, 
SCIP *  targetscip,  
SCIP_Bool  copyreaders,  
SCIP_Bool  copypricers,  
SCIP_Bool  copyconshdlrs,  
SCIP_Bool  copyconflicthdlrs,  
SCIP_Bool  copypresolvers,  
SCIP_Bool  copyrelaxators,  
SCIP_Bool  copyseparators,  
SCIP_Bool  copypropagators,  
SCIP_Bool  copyheuristics,  
SCIP_Bool  copyeventhdlrs,  
SCIP_Bool  copynodeselectors,  
SCIP_Bool  copybranchrules,  
SCIP_Bool  copydisplays,  
SCIP_Bool  copydialogs,  
SCIP_Bool  copytables,  
SCIP_Bool  copynlpis,  
SCIP_Bool  passmessagehdlr,  
SCIP_Bool *  valid  
) 
copies plugins from sourcescip to targetscip; in case that a constraint handler which does not need constraints cannot be copied, valid will return FALSE. All plugins can declare that, if their copy process failed, the copied SCIP instance might not represent the same problem semantics as the original. Note that in this case dual reductions might be invalid.
 Note
 In a multi thread case, you need to lock the copying procedure from outside with a mutex. Also, 'passmessagehdlr' should be set to FALSE.
 Do not change the source SCIP environment during the copying process.
 This method does not copy Benders' plugins. To this end, the method SCIPcopyBenders() must be called separately.
 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 sourcescip is in one of the following stages:
 This method can be called if targetscip is in one of the following stages:
 Postcondition
 After calling this method targetscip reaches one of the following stages depending on if and when the solution process was interrupted:
 Note
 sourcescip stage does not get changed
See SCIP_STAGE for a complete list of all possible solving stages.
copies plugins from sourcescip to targetscip; in case that a constraint handler which does not need constraints cannot be copied, valid will return FALSE. All plugins can declare that, if their copy process failed, the copied SCIP instance might not represent the same problem semantics as the original. Note that in this case dual reductions might be invalid.
 Note
 In a multi thread case, you need to lock the copying procedure from outside with a mutex. Also, 'passmessagehdlr' should be set to FALSE.
 Do not change the source SCIP environment during the copying process
 This method does not copy Benders' plugins. To this end, the method SCIPcopyBenders() must be called separately.
 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 sourcescip is in one of the following stages:
 This method can be called if targetscip is in one of the following stages:
 Postcondition
 After calling this method targetscip reaches one of the following stages depending on if and when the solution process was interrupted:
 Note
 sourcescip stage does not get changed
See SCIP_STAGE for a complete list of all possible solving stages.
 Parameters

sourcescip source SCIP data structure targetscip target SCIP data structure copyreaders should the file readers be copied copypricers should the variable pricers be copied copyconshdlrs should the constraint handlers be copied copyconflicthdlrs should the conflict handlers be copied copypresolvers should the presolvers be copied copyrelaxators should the relaxation handlers be copied copyseparators should the separators be copied copypropagators should the propagators be copied copyheuristics should the heuristics be copied copyeventhdlrs should the event handlers be copied copynodeselectors should the node selectors be copied copybranchrules should the branchrules be copied copydisplays should the display columns be copied copydialogs should the dialogs be copied copytables should the statistics tables be copied copynlpis should the NLPIs be copied passmessagehdlr should the message handler be passed valid pointer to store whether plugins, in particular all constraint handlers which do not need constraints were validly copied
Definition at line 265 of file scip_copy.c.
References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPgetMessagehdlr(), SCIPsetCopyPlugins(), SCIPsetMessagehdlr(), Scip::set, and TRUE.
Referenced by createSubscip(), createSubSCIP(), doCopy(), SCIPbendersApplyDecomposition(), and setupSubscipLpface().
◆ SCIPcopyBenders()
SCIP_EXPORT SCIP_RETCODE SCIPcopyBenders  (  SCIP *  sourcescip, 
SCIP *  targetscip,  
SCIP_HASHMAP *  varmap,  
SCIP_Bool  threadsafe,  
SCIP_Bool *  valid  
) 
copies all Benders' decomposition plugins
 Note
 In a multi thread case, you need to lock the copying procedure from outside with a mutex.
 the 'threadsafe' parameter must be set to TRUE if you are absolutely certain that the source and target SCIP instances will be solved in parallel. The usual case is to set this to FALSE, since thread safety typically incurs a performance cost.
 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 sourcescip is in one of the following stages:
 This method can be called if targetscip is in one of the following stages:
 Postcondition
 After calling this method targetscip reaches one of the following stages depending on if and when the solution process was interrupted:
 Note
 sourcescip stage does not get changed
See SCIP_STAGE for a complete list of all possible solving stages.
copies all Benders' decomposition plugins
 Note
 In a multi thread case, you need to lock the copying procedure from outside with a mutex.
 the 'threadsafe' parameter should only be set to TRUE if you are absolutely certain that the source and target SCIP instances will be solved in parallel. The usual case is to set this to FALSE, since thread safety typically incurs a performance cost.
 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 sourcescip is in one of the following stages:
 This method can be called if targetscip is in one of the following stages:
 Postcondition
 After calling this method targetscip reaches one of the following stages depending on if and when the solution process was interrupted:
 Note
 sourcescip stage does not get changed
See SCIP_STAGE for a complete list of all possible solving stages.
 Parameters

sourcescip source SCIP data structure targetscip target SCIP data structure varmap a hashmap to store the mapping of source variables corresponding target variables; if NULL the transfer of cuts is not possible threadsafe FALSE, if data can be safely shared between the source and target SCIP, otherwise TRUE. This is usually set to FALSE valid pointer to store whether all plugins were validly copied
Definition at line 345 of file scip_copy.c.
References SCIP_Set::benders, FALSE, SCIP_Set::nbenders, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPbendersCopyInclude(), SCIPcheckStage(), Scip::set, and TRUE.
Referenced by doCopy().
◆ SCIPcopyProb()
SCIP_EXPORT SCIP_RETCODE SCIPcopyProb  (  SCIP *  sourcescip, 
SCIP *  targetscip,  
SCIP_HASHMAP *  varmap,  
SCIP_HASHMAP *  consmap,  
SCIP_Bool  global,  
const char *  name  
) 
create a problem by copying the problem data of the source SCIP
 Note
 In a multi thread case, you need to lock the copying procedure from outside with a mutex.
 Do not change the source SCIP environment during the copying process
 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 sourcescip is in one of the following stages:
 This method can be called if targetscip is in one of the following stages:
 Postcondition
 After calling this method targetscip reaches one of the following stages depending on if and when the solution process was interrupted:
 Note
 sourcescip stage does not get changed
See SCIP_STAGE for a complete list of all possible solving stages.
 Parameters

sourcescip source SCIP data structure targetscip target SCIP data structure varmap a hashmap to store the mapping of source variables corresponding target variables, or NULL consmap a hashmap to store the mapping of source constraints to the corresponding target constraints, or NULL global create a global or a local copy? name problem name of target
Definition at line 513 of file scip_copy.c.
References copyProb(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), and TRUE.
Referenced by copyToSubscip(), and doCopy().
◆ SCIPcopyOrigProb()
SCIP_EXPORT SCIP_RETCODE SCIPcopyOrigProb  (  SCIP *  sourcescip, 
SCIP *  targetscip,  
SCIP_HASHMAP *  varmap,  
SCIP_HASHMAP *  consmap,  
const char *  name  
) 
create a problem by copying the original problem data of the source SCIP
 Note
 In a multi thread case, you need to lock the copying procedure from outside with a mutex.
 Do not change the source SCIP environment during the copying process
 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 sourcescip is in one of the following stages:
 This method can be called if targetscip is in one of the following stages:
 Postcondition
 After calling this method targetscip reaches one of the following stages depending on if and when the solution process was interrupted:
 Note
 sourcescip stage does not get changed
See SCIP_STAGE for a complete list of all possible solving stages.
 Parameters

sourcescip source SCIP data structure targetscip target SCIP data structure varmap a hashmap to store the mapping of source variables corresponding target variables, or NULL consmap a hashmap to store the mapping of source constraints to the corresponding target constraints, or NULL name problem name of target
Definition at line 566 of file scip_copy.c.
References copyProb(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPaddOrigObjoffset(), SCIPcheckStage(), SCIPgetObjsense(), SCIPgetOrigObjoffset(), SCIPsetObjsense(), and TRUE.
Referenced by doCopy().
◆ SCIPenableConsCompression()
SCIP_EXPORT SCIP_RETCODE SCIPenableConsCompression  (  SCIP *  scip  ) 
enables constraint compression.
If constraint compression is enabled, fixed variables will be treated as constants by all constraints that are copied after calling this method.
 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:
See SCIP_STAGE for a complete list of all possible solving stages.
 Parameters

scip source SCIP data structure
Definition at line 607 of file scip_copy.c.
References FALSE, NULL, Scip::origprob, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPprobEnableConsCompression(), and TRUE.
Referenced by doCopy().
◆ SCIPisConsCompressionEnabled()
SCIP_EXPORT SCIP_Bool SCIPisConsCompressionEnabled  (  SCIP *  scip  ) 
is constraint compression enabled?
If constraint compression is enabled, fixed variables can be treated as constants by all constraints that are copied after calling this method.
 Returns
 TRUE if problem constraint compression is enabled, otherwise FALSE
 Precondition
 This method can be called if scip is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
 Parameters

scip source SCIP data structure
Definition at line 646 of file scip_copy.c.
References FALSE, NULL, Scip::origprob, SCIP_CALL_ABORT, SCIP_STAGE_PROBLEM, SCIPcheckStage(), SCIPgetStage(), SCIPprobIsConsCompressionEnabled(), and TRUE.
Referenced by consdataCreate(), and copyConsPseudoboolean().
◆ SCIPgetVarCopy()
SCIP_EXPORT SCIP_RETCODE SCIPgetVarCopy  (  SCIP *  sourcescip, 
SCIP *  targetscip,  
SCIP_VAR *  sourcevar,  
SCIP_VAR **  targetvar,  
SCIP_HASHMAP *  varmap,  
SCIP_HASHMAP *  consmap,  
SCIP_Bool  global,  
SCIP_Bool *  success  
) 
returns copy of the source variable; if there already is a copy of the source variable in the variable hash map, it is just returned as target variable; otherwise, if the variables it not marked as relaxationonly, a new variable will be created and added to the target SCIP; this created variable is added to the variable hash map and returned as target variable; relaxationonly variables are not copied and FALSE is returned in *success
 Note
 In a multi thread case, you need to lock the copying procedure from outside with a mutex.
 Do not change the source SCIP environment during the copying process
 if a new variable was created, this variable will be added to the targetSCIP, but it is not captured
 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 sourcescip is in one of the following stages:
 This method can be called if targetscip is in one of the following stages:
 Note
 targetscip stage does not get changed
 sourcescip stage does not get changed
See SCIP_STAGE for a complete list of all possible solving stages.
 Parameters

sourcescip source SCIP data structure targetscip target SCIP data structure sourcevar source variable targetvar pointer to store the target variable varmap a hashmap to store the mapping of source variables to the corresponding target variables, or NULL consmap a hashmap to store the mapping of source constraints to the corresponding target constraints, or NULL global should global or local bounds be used? success pointer to store whether the copying was successful or not
Definition at line 697 of file scip_copy.c.
References FALSE, Scip::mem, NULL, SCIP_Mem::probmem, SCIP_Var::scip, SCIP_Bool, SCIP_CALL, SCIP_ERROR, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIP_STAGE_PROBLEM, SCIP_VARSTATUS_AGGREGATED, SCIP_VARSTATUS_COLUMN, SCIP_VARSTATUS_FIXED, SCIP_VARSTATUS_LOOSE, SCIP_VARSTATUS_MULTAGGR, SCIP_VARSTATUS_NEGATED, SCIP_VARSTATUS_ORIGINAL, SCIPABORT, SCIPaddCoefLinear(), SCIPaddCons(), SCIPaddVar(), SCIPallocBufferArray, SCIPblkmem(), SCIPcheckStage(), SCIPcreateConsLinear(), SCIPerrorMessage, SCIPflattenVarAggregationGraph(), SCIPfreeBufferArray, SCIPgetNConss(), SCIPgetNegatedVar(), SCIPgetNVars(), SCIPgetStage(), SCIPgetVarCopy(), SCIPhashmapCreate(), SCIPhashmapFree(), SCIPhashmapGetImage(), SCIPreleaseCons(), SCIPreleaseVar(), SCIPsnprintf(), SCIPvarCopy(), SCIPvarGetAggrConstant(), SCIPvarGetAggrScalar(), SCIPvarGetAggrVar(), SCIPvarGetMultaggrConstant(), SCIPvarGetMultaggrNVars(), SCIPvarGetMultaggrScalars(), SCIPvarGetMultaggrVars(), SCIPvarGetName(), SCIPvarGetNegationVar(), SCIPvarGetStatus(), SCIPvarIsRelaxationOnly(), Scip::set, Scip::stat, and TRUE.
Referenced by copyConsPseudoboolean(), copyCuts(), copyToSubscip(), copyVars(), tsp::ProbDataTSP::scip_copy(), SCIP_DECL_CONSCOPY(), SCIP_DECL_PROBCOPY(), SCIPcopyConsLinear(), SCIPcopyImplicationsCliques(), and SCIPgetVarCopy().
◆ SCIPcopyVars()
SCIP_EXPORT SCIP_RETCODE SCIPcopyVars  (  SCIP *  sourcescip, 
SCIP *  targetscip,  
SCIP_HASHMAP *  varmap,  
SCIP_HASHMAP *  consmap,  
SCIP_VAR **  fixedvars,  
SCIP_Real *  fixedvals,  
int  nfixedvars,  
SCIP_Bool  global  
) 
Copies all active (thus unfixed) variables from sourceSCIP, except those that are marked as relaxation only, and adds these variable to the targetSCIP.
The mapping between these variables are stored in the variable hashmap.
The targetSCIP has to be in problem creation stage.
 Note
 the variables are added to the targetSCIP but not captured
 In a multi thread case, you need to lock the copying procedure from outside with a mutex.
 Do not change the source SCIP environment during the copying process
 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 sourcescip is in one of the following stages:
 This method can be called if targetscip is in one of the following stages:
 Note
 sourcescip stage does not get changed
 targetscip stage does not get changed
See SCIP_STAGE for a complete list of all possible solving stages.
 Parameters

sourcescip source SCIP data structure targetscip target SCIP data structure varmap a hashmap to store the mapping of source variables to the corresponding target variables, or NULL consmap a hashmap to store the mapping of source constraints to the corresponding target constraints, or NULL fixedvars source variables whose copies should be fixed in the target SCIP environment, or NULL fixedvals array of fixing values for target SCIP variables, or NULL nfixedvars number of source variables whose copies should be fixed in the target SCIP environment, or NULL global should global or local bounds be used?
Definition at line 1164 of file scip_copy.c.
References copyVars(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), and TRUE.
Referenced by createSubSCIP(), SCIPcopyLargeNeighborhoodSearch(), and setupSubscipLpface().
◆ SCIPcopyOrigVars()
SCIP_EXPORT SCIP_RETCODE SCIPcopyOrigVars  (  SCIP *  sourcescip, 
SCIP *  targetscip,  
SCIP_HASHMAP *  varmap,  
SCIP_HASHMAP *  consmap,  
SCIP_VAR **  fixedvars,  
SCIP_Real *  fixedvals,  
int  nfixedvars  
) 
copies all original variables from sourceSCIP and adds these variable to the targetSCIP; the mapping between these variables are stored in the variable hashmap, targetSCIP has to be in problem creation stage, fixed and aggregated variables do not get copied
 Note
 the variables are added to the targetSCIP but not captured
 In a multi thread case, you need to lock the copying procedure from outside with a mutex.
 Do not change the source SCIP environment during the copying process
 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 sourcescip is in one of the following stages:
 This method can be called if targetscip is in one of the following stages:
 Note
 sourcescip stage does not get changed
 targetscip stage does not get changed
See SCIP_STAGE for a complete list of all possible solving stages.
 Parameters

sourcescip source SCIP data structure targetscip target SCIP data structure varmap a hashmap to store the mapping of source variables to the corresponding target variables, or NULL consmap a hashmap to store the mapping of source constraints to the corresponding target constraints, or NULL fixedvars source variables whose copies should be fixed in the target SCIP environment, or NULL fixedvals array of fixing values for target SCIP variables, or NULL nfixedvars number of source variables whose copies should be fixed in the target SCIP environment, or NULL
Definition at line 1221 of file scip_copy.c.
References copyVars(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), and TRUE.
◆ SCIPmergeVariableStatistics()
SCIP_EXPORT SCIP_RETCODE SCIPmergeVariableStatistics  (  SCIP *  sourcescip, 
SCIP *  targetscip,  
SCIP_VAR **  sourcevars,  
SCIP_VAR **  targetvars,  
int  nvars  
) 
merges the histories of variables from a source SCIP into a target SCIP. The two data structures should point to different SCIP instances.
 Note
 the notion of source and target is inverted here;
sourcescip
usually denotes a copied SCIP instance, whereastargetscip
denotes the original instance
 Parameters

sourcescip source SCIP data structure targetscip target SCIP data structure sourcevars source variables for history merge, NULL entries are ignored targetvars target variables for history merge, NULL entries are ignored nvars number of variables in both variable arrays
Definition at line 1251 of file scip_copy.c.
References SCIP_Set::history_allowmerge, NULL, SCIP_OKAY, SCIP_STAGE_SOLVING, SCIP_VARSTATUS_COLUMN, SCIP_VARSTATUS_ORIGINAL, SCIPgetOrigObjoffset(), SCIPgetOrigObjscale(), SCIPgetStage(), SCIPsetIsEQ(), SCIPvarGetStatus(), SCIPvarGetTransVar(), SCIPvarMergeHistories(), Scip::set, and Scip::stat.
Referenced by setupAndSolveSubscip(), setupAndSolveSubscipCrossover(), setupAndSolveSubscipMutation(), solveSubproblem(), and wrapperRins().
◆ SCIPtranslateSubSol()
SCIP_EXPORT SCIP_RETCODE SCIPtranslateSubSol  (  SCIP *  scip, 
SCIP *  subscip,  
SCIP_SOL *  subsol,  
SCIP_HEUR *  heur,  
SCIP_VAR **  subvars,  
SCIP_SOL **  newsol  
) 
translates a solution from a subscip to the main scip
Variables that are relaxationonly in the master SCIP are set to 0 or the bound closest to 0. Such variables are represented as NULL entry in the subvars
array.
 Note
 This method allocates a new solution of the main
scip
that needs to be freed by the user.
 Parameters

scip SCIP data structure of the original problem subscip SCIP data structure of the subproblem subsol solution of the subproblem heur heuristic that found the solution subvars the variables from the subproblem in the same order as the main scip
newsol buffer to store pointer to created solution in main SCIP
Definition at line 1356 of file scip_copy.c.
References NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPcreateSol(), SCIPfreeBufferArray, SCIPgetVarsData(), SCIPsetSolVals(), and translateSubSol().
Referenced by createNewSol(), setupAndSolve(), setupAndSolveSubscip(), setupAndSolveSubscipRapidlearning(), solveSubproblem(), and transferSolution().
◆ SCIPtranslateSubSols()
SCIP_EXPORT SCIP_RETCODE SCIPtranslateSubSols  (  SCIP *  scip, 
SCIP *  subscip,  
SCIP_HEUR *  heur,  
SCIP_VAR **  subvars,  
SCIP_Bool *  success,  
int *  solindex  
) 
checks the solutions from the subscip and adds the first one that is found feasible to the master SCIP
Variables that are relaxationonly in the master SCIP are set to 0 or the bound closest to 0. Such variables are represented as NULL entry in the subvars
array.
 Parameters

scip the SCIP data structure subscip SCIP data structure of the subproblem heur heuristic that found the solution subvars the variables from the subproblem in the same order as the main scip
success pointer to store, whether new solution was found solindex pointer to store solution index of stored solution, or NULL if not of interest
Definition at line 1396 of file scip_copy.c.
References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPaddSolFree(), SCIPallocBufferArray, SCIPcheckSol(), SCIPcreateSol(), SCIPdebugMsg, SCIPfreeBufferArray, SCIPfreeSol(), SCIPgetNSols(), SCIPgetSolOrigObj(), SCIPgetSols(), SCIPgetVarsData(), SCIPisInfinity(), SCIPsetSolVals(), SCIPsolGetIndex(), translateSubSol(), and TRUE.
Referenced by createNewSols(), SCIP_DECL_HEUREXEC(), setupAndSolveSubscip(), setupAndSolveSubscipCrossover(), setupAndSolveSubscipLocalbranching(), setupAndSolveSubscipMutation(), setupAndSolveSubscipOneopt(), setupAndSolveSubscipTrustregion(), solveSubscipLpface(), wrapperDins(), and wrapperRins().
◆ SCIPgetConsCopy()
SCIP_EXPORT SCIP_RETCODE SCIPgetConsCopy  (  SCIP *  sourcescip, 
SCIP *  targetscip,  
SCIP_CONS *  sourcecons,  
SCIP_CONS **  targetcons,  
SCIP_CONSHDLR *  sourceconshdlr,  
SCIP_HASHMAP *  varmap,  
SCIP_HASHMAP *  consmap,  
const char *  name,  
SCIP_Bool  initial,  
SCIP_Bool  separate,  
SCIP_Bool  enforce,  
SCIP_Bool  check,  
SCIP_Bool  propagate,  
SCIP_Bool  local,  
SCIP_Bool  modifiable,  
SCIP_Bool  dynamic,  
SCIP_Bool  removable,  
SCIP_Bool  stickingatnode,  
SCIP_Bool  global,  
SCIP_Bool *  valid  
) 
returns copy of the source constraint; if there already is a copy of the source constraint in the constraint hash map, it is just returned as target constraint; elsewise a new constraint will be created; this created constraint is added to the constraint hash map and returned as target constraint; the variable map is used to map the variables of the source SCIP to the variables of the target SCIP
 Warning
 If a constraint is marked to be checked for feasibility but not to be enforced, a LP or pseudo solution may be declared feasible even if it violates this particular constraint. This constellation should only be used, if no LP or pseudo solution can violate the constraint – e.g. if a local constraint is redundant due to the variable's local bounds.
 Note
 The constraint is not added to the target SCIP. You can check whether a constraint is added by calling SCIPconsIsAdded(). (If you mix SCIPgetConsCopy() with SCIPcopyConss() you should pay attention to what you add explicitly and what is already added.)
 The constraint is always captured, either during the creation of the copy or after finding the copy of the constraint in the constraint hash map
 In a multi thread case, you need to lock the copying procedure from outside with a mutex.
 Do not change the source SCIP environment during the copying process
 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 sourcescip is in one of the following stages:
 This method can be called if targetscip is in one of the following stages:
 Note
 sourcescip stage does not get changed
 targetscip stage does not get changed
See SCIP_STAGE for a complete list of all possible solving stages.
 Parameters

sourcescip source SCIP data structure targetscip target SCIP data structure sourcecons source constraint of the source SCIP targetcons pointer to store the created target constraint sourceconshdlr source constraint handler for this constraint varmap a SCIP_HASHMAP mapping variables of the source SCIP to the corresponding variables of the target SCIP, or NULL consmap a hashmap to store the mapping of source constraints to the corresponding target constraints, or NULL name name of constraint, or NULL if the name of the source constraint should be used initial should the LP relaxation of constraint be in the initial LP? separate should the constraint be separated during LP processing? enforce should the constraint be enforced during node processing? check should the constraint be checked for feasibility? propagate should the constraint be propagated during node processing? local is constraint only valid locally? modifiable is constraint modifiable (subject to column generation)? dynamic is constraint subject to aging? removable should the relaxation be removed from the LP due to aging or cleanup? stickingatnode should the constraint always be kept at the node where it was added, even if it may be moved to a more global node? global create a global or a local copy? valid pointer to store whether the copying was valid or not
Definition at line 1534 of file scip_copy.c.
References FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPblkmem(), SCIPcaptureCons(), SCIPcheckStage(), SCIPconsCopy(), SCIPgetNConss(), SCIPgetNVars(), SCIPhashmapCreate(), SCIPhashmapFree(), SCIPhashmapGetImage(), SCIPhashmapInsert(), Scip::set, and TRUE.
Referenced by addConstraintToBendersSubproblem(), addScenarioConsToProb(), copyConsPseudoboolean(), copyToSubscip(), SCIP_DECL_CONSCOPY(), SCIP_DECL_PROBCOPY(), SCIPbendersMergeSubproblemIntoMaster(), SCIPcopyConflicts(), SCIPcopyConss(), SCIPcopyOrigConss(), and setupAndSolveSubscipRapidlearning().
◆ SCIPcopyConss()
SCIP_EXPORT SCIP_RETCODE SCIPcopyConss  (  SCIP *  sourcescip, 
SCIP *  targetscip,  
SCIP_HASHMAP *  varmap,  
SCIP_HASHMAP *  consmap,  
SCIP_Bool  global,  
SCIP_Bool  enablepricing,  
SCIP_Bool *  valid  
) 
copies constraints from the sourceSCIP and adds these to the targetSCIP; for mapping the variables between the source and the target SCIP a hash map can be given; if the variable hash map is NULL or necessary variable mapping is missing, the required variables are created in the targetSCIP and added to the hash map, if not NULL; all variables which are created are added to the targetSCIP but not (user) captured; if the constraint hash map is not NULL the mapping between the constraints of the source and targetSCIP is stored
*valid is set to TRUE iff all constraints that are marked as checked or enforced were copied successfully. If other constraints could not be copied, *valid can still be set to TRUE.
 Note
 the constraints are added to the targetSCIP but are not (user) captured in the target SCIP. (If you mix SCIPgetConsCopy() with SCIPcopyConss() you should pay attention to what you add explicitly and what is already added.) You can check whether a constraint is added by calling SCIPconsIsAdded().
 In a multi thread case, you need to lock the copying procedure from outside with a mutex.
 Do not change the source SCIP environment during the copying process
 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 sourcescip is in one of the following stages:
 This method can be called if targetscip is in one of the following stages:
 Note
 sourcescip stage does not get changed
 targetscip stage does not get changed
See SCIP_STAGE for a complete list of all possible solving stages.
 Parameters

sourcescip source SCIP data structure targetscip target SCIP data structure varmap a SCIP_HASHMAP mapping variables of the source SCIP to the corresponding variables of the target SCIP, or NULL consmap a hashmap to store the mapping of source constraints to the corresponding target constraints, or NULL global create a global or a local copy? enablepricing should pricing be enabled in copied SCIP instance? If TRUE, the modifiable flag of constraints will be copied. valid pointer to store whether all checked or enforced constraints were validly copied
Definition at line 1673 of file scip_copy.c.
References Scip::conflictstore, FALSE, Scip::mem, NULL, SCIP_Mem::probmem, Scip::reopt, SCIP_Bool, SCIP_CALL, SCIP_CONFTYPE_UNKNOWN, SCIP_OKAY, SCIPaddCons(), SCIPblkmem(), SCIPcheckStage(), SCIPconflictstoreAddConflict(), SCIPconsGetName(), SCIPconshdlrGetCheckConss(), SCIPconshdlrGetConss(), SCIPconshdlrGetNActiveConss(), SCIPconshdlrGetName(), SCIPconshdlrGetNCheckConss(), SCIPconsIsActive(), SCIPconsIsChecked(), SCIPconsIsConflict(), SCIPconsIsDeleted(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsSetModifiable(), SCIPdebugMsg, SCIPgetConsCopy(), SCIPgetConshdlrs(), SCIPgetNConshdlrs(), SCIPgetNConss(), SCIPgetNVars(), SCIPhashmapCreate(), SCIPhashmapFree(), SCIPinfinity(), SCIPreleaseCons(), Scip::set, Scip::stat, and TRUE.
Referenced by createSubSCIP(), and doCopy().
◆ SCIPcopyOrigConss()
SCIP_EXPORT SCIP_RETCODE SCIPcopyOrigConss  (  SCIP *  sourcescip, 
SCIP *  targetscip,  
SCIP_HASHMAP *  varmap,  
SCIP_HASHMAP *  consmap,  
SCIP_Bool  enablepricing,  
SCIP_Bool *  valid  
) 
copies all original constraints from the sourceSCIP and adds these to the targetSCIP; for mapping the variables between the source and the target SCIP a hash map can be given; if the variable hash map is NULL or necessary variable mapping is missing, the required variables are created in the targetSCIP and added to the hash map, if not NULL; all variables which are created are added to the targetSCIP but not (user) captured; if the constraint hash map is not NULL the mapping between the constraints of the source and targetSCIP is stored
 Note
 the constraints are added to the targetSCIP but are not (user) captured in the target SCIP. (If you mix SCIPgetConsCopy() with SCIPcopyConss() you should pay attention to what you add explicitly and what is already added.) You can check whether a constraint is added by calling SCIPconsIsAdded().
 In a multi thread case, you need to lock the copying procedure from outside with a mutex.
 Do not change the source SCIP environment during the copying process
 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 sourcescip is in one of the following stages:
 This method can be called if targetscip is in one of the following stages:
 Note
 sourcescip stage does not get changed
 targetscip stage does not get changed
See SCIP_STAGE for a complete list of all possible solving stages.
 Parameters

sourcescip source SCIP data structure targetscip target SCIP data structure varmap a SCIP_HASHMAP mapping variables of the source SCIP to the corresponding variables of the target SCIP, or NULL consmap a hashmap to store the mapping of source constraints to the corresponding target constraints, or NULL enablepricing should pricing be enabled in copied SCIP instance? If TRUE, the modifiable flag of constraints will be copied. valid pointer to store whether all constraints were validly copied
Definition at line 1878 of file scip_copy.c.
References FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPaddCons(), SCIPblkmem(), SCIPcheckStage(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconsIsChecked(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsModifiable(), SCIPconsIsOriginal(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsSetModifiable(), SCIPdebugMsg, SCIPgetConsCopy(), SCIPgetNConss(), SCIPgetNOrigConss(), SCIPgetNVars(), SCIPgetOrigConss(), SCIPhashmapCreate(), SCIPhashmapFree(), SCIPreleaseCons(), and TRUE.
Referenced by doCopy().
◆ SCIPconvertCutsToConss()
SCIP_EXPORT SCIP_RETCODE SCIPconvertCutsToConss  (  SCIP *  scip, 
SCIP_HASHMAP *  varmap,  
SCIP_HASHMAP *  consmap,  
SCIP_Bool  global,  
int *  ncutsadded  
) 
convert all active cuts from cutpool to linear constraints
 Note
 Do not change the source SCIP environment during the copying process
 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:
 Note
 SCIP stage does not get changed
See SCIP_STAGE for a complete list of all possible solving stages.
 Parameters

scip SCIP data structure varmap a hashmap to store the mapping of source variables corresponding target variables, or NULL consmap a hashmap to store the mapping of source constraints to the corresponding target constraints, or NULL global create a global or a local copy? ncutsadded pointer to store number of added cuts, or NULL
Definition at line 2011 of file scip_copy.c.
References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIP_STAGE_SOLVING, SCIPcheckStage(), SCIPcopyCuts(), Scip::set, SCIP_Set::stage, and TRUE.
Referenced by SCIP_DECL_CONSEXITSOL().
◆ SCIPcopyCuts()
SCIP_EXPORT SCIP_RETCODE SCIPcopyCuts  (  SCIP *  sourcescip, 
SCIP *  targetscip,  
SCIP_HASHMAP *  varmap,  
SCIP_HASHMAP *  consmap,  
SCIP_Bool  global,  
int *  ncutsadded  
) 
copies all active cuts from cutpool of sourcescip to linear constraints in targetscip
Cuts that contain variables that are marked as relaxationonly are skipped.
 Note
 In a multi thread case, you need to lock the copying procedure from outside with a mutex.
 Do not change the source SCIP environment during the copying process
 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 sourcescip is in one of the following stages:
 This method can be called if targetscip is in one of the following stages:
 Note
 sourcescip stage does not get changed
 targetscip stage does not get changed
See SCIP_STAGE for a complete list of all possible solving stages.
 Parameters

sourcescip source SCIP data structure targetscip target SCIP data structure varmap a hashmap to store the mapping of source variables corresponding target variables, or NULL consmap a hashmap to store the mapping of source constraints to the corresponding target constraints, or NULL global create a global or a local copy? ncutsadded pointer to store number of copied cuts, or NULL
Definition at line 2073 of file scip_copy.c.
References copyCuts(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIP_STAGE_SOLVING, SCIPcheckStage(), SCIPdebugMsg, SCIPfindConshdlr(), SCIPgetDelayedPoolCuts(), SCIPgetNDelayedPoolCuts(), SCIPgetNPoolCuts(), SCIPgetPoolCuts(), Scip::set, SCIP_Set::stage, and TRUE.
Referenced by SCIP_DECL_HEUREXEC(), SCIPconvertCutsToConss(), SCIPcopyLargeNeighborhoodSearch(), setupAndSolveSubscip(), setupAndSolveSubscipRapidlearning(), setupProbingSCIP(), setupSubscipLpface(), and solveSubproblem().
◆ SCIPcopyConflicts()
SCIP_EXPORT SCIP_RETCODE SCIPcopyConflicts  (  SCIP *  sourcescip, 
SCIP *  targetscip,  
SCIP_HASHMAP *  varmap,  
SCIP_HASHMAP *  consmap,  
SCIP_Bool  global,  
SCIP_Bool  enablepricing,  
SCIP_Bool *  valid  
) 
copies all active conflicts from the conflict pool of sourcescip and adds them as linear constraints to targetscip
 Note
 In a multi thread case, you need to lock the copying procedure from outside with a mutex.
 Do not change the source SCIP environment during the copying process
 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 sourcescip is in one of the following stages:
 This method can be called if targetscip is in one of the following stages:
 Note
 sourcescip stage does not change
 targetscip stage does not change
See SCIP_STAGE for a complete list of all possible solving stages.
 Parameters

sourcescip source SCIP data structure targetscip target SCIP data structure varmap a hashmap to store the mapping of source variables corresponding target variables, or NULL consmap a hashmap to store the mapping of source constraints to the corresponding target constraints, or NULL global create a global or a local copy? enablepricing should pricing be enabled in copied SCIP instance? If TRUE, the modifiable flag of constraints will be copied. valid pointer to store whether all constraints were validly copied
Definition at line 2165 of file scip_copy.c.
References Scip::conflictstore, FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPaddCons(), SCIPallocBufferArray, SCIPblkmem(), SCIPcheckStage(), SCIPconflictstoreGetConflicts(), SCIPconflictstoreGetNConflictsInStore(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconsIsActive(), SCIPconsIsChecked(), SCIPconsIsConflict(), SCIPconsIsDeleted(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsSetModifiable(), SCIPdebugMsg, SCIPgetConsCopy(), SCIPgetNConss(), SCIPgetNVars(), SCIPhashmapCreate(), SCIPhashmapFree(), SCIPreleaseCons(), and TRUE.
◆ SCIPcopyImplicationsCliques()
SCIP_EXPORT SCIP_RETCODE SCIPcopyImplicationsCliques  (  SCIP *  sourcescip, 
SCIP *  targetscip,  
SCIP_HASHMAP *  varmap,  
SCIP_HASHMAP *  consmap,  
SCIP_Bool  global,  
SCIP_Bool *  infeasible,  
int *  nbdchgs,  
int *  ncopied  
) 
copies implications and cliques of sourcescip to targetscip
This function should be called for a targetscip in transformed stage. It can save time in presolving of the targetscip, since implications and cliques are copied.
 Note
 In a multi thread case, you need to lock the copying procedure from outside with a mutex.
 Do not change the source SCIP environment during the copying process
 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 sourcescip is in one of the following stages:
 This method can be called if targetscip is in one of the following stages:
 Note
 sourcescip stage does not get changed
 targetscip stage does not get changed
See SCIP_STAGE for a complete list of all possible solving stages.
 Parameters

sourcescip source SCIP data structure targetscip target SCIP data structure varmap a hashmap to store the mapping of source variables corresponding target variables, or NULL consmap a hashmap to store the mapping of source constraints to the corresponding target constraints, or NULL global create a global or a local copy? infeasible pointer to store whether an infeasibility was detected nbdchgs pointer to store the number of performed bound changes, or NULL ncopied pointer to store number of copied implications and cliques, or NULL
Definition at line 2323 of file scip_copy.c.
References FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPaddClique(), SCIPaddVarImplication(), SCIPallocBufferArray, SCIPcheckStage(), SCIPcliqueGetNVars(), SCIPcliqueGetValues(), SCIPcliqueGetVars(), SCIPcliqueIsEquation(), SCIPdebugMsg, SCIPfreeBufferArray, SCIPgetCliques(), SCIPgetNCliques(), SCIPgetVarCopy(), SCIPgetVarsData(), SCIPvarGetImplBounds(), SCIPvarGetImplTypes(), SCIPvarGetImplVars(), SCIPvarGetName(), SCIPvarGetNImpls(), and TRUE.
◆ SCIPcopyParamSettings()
SCIP_EXPORT SCIP_RETCODE SCIPcopyParamSettings  (  SCIP *  sourcescip, 
SCIP *  targetscip  
) 
copies parameter settings from sourcescip to targetscip
 Note
 In a multi thread case, you need to lock the copying procedure from outside with a mutex.
 Do not change the source SCIP environment during the copying process
 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 sourcescip is in one of the following stages:
 This method can be called if targetscip is in one of the following stages:
 Note
 sourcescip stage does not get changed
 targetscip stage does not get changed
See SCIP_STAGE for a complete list of all possible solving stages.
 Parameters

sourcescip source SCIP data structure targetscip target SCIP data structure
Definition at line 2507 of file scip_copy.c.
References FALSE, Scip::messagehdlr, NULL, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPsetCopyParams(), Scip::set, and TRUE.
Referenced by applyRepair(), createSubscip(), createSubSCIP(), doCopy(), SCIPcopyLargeNeighborhoodSearch(), setupSCIPparamsStage3(), and setupSubscipLpface().
◆ SCIPgetSubscipDepth()
SCIP_EXPORT int SCIPgetSubscipDepth  (  SCIP *  scip  ) 
gets depth of current scip instance (increased by each copy call)
 Returns
 Depth of subscip of SCIP is returned.
 Precondition
 This method can be called if SCIP is in one of the following stages:
 Note
 SCIP stage does not get changed
See SCIP_STAGE for a complete list of all possible solving stages.
 Parameters

scip SCIP data structure
Definition at line 2548 of file scip_copy.c.
References FALSE, NULL, SCIP_CALL_ABORT, SCIPcheckStage(), Scip::stat, SCIP_Stat::subscipdepth, and TRUE.
Referenced by assignAuxiliaryVariables(), createSubSCIP(), createVariableMappings(), SCIP_DECL_CONSEXIT(), SCIP_DECL_CONSINITSOL(), SCIP_DECL_CONSPRESOL(), SCIP_DECL_EVENTINIT(), SCIP_DECL_HEUREXEC(), SCIPcreateConsOrbitope(), setupSubscipLpface(), and storeAllBilinearTerms().
◆ SCIPsetSubscipDepth()
SCIP_EXPORT void SCIPsetSubscipDepth  (  SCIP *  scip, 
int  newdepth  
) 
sets depth of scip instance
 Precondition
 This method can be called if SCIP is in one of the following stages:
 Note
 SCIP stage does not get changed
See SCIP_STAGE for a complete list of all possible solving stages.
 Parameters

scip SCIP data structure newdepth new subscip depth
Definition at line 2569 of file scip_copy.c.
References FALSE, NULL, SCIP_CALL_ABORT, SCIPcheckStage(), Scip::stat, SCIP_Stat::subscipdepth, and TRUE.
Referenced by createSubSCIP(), and setupSubscipLpface().
◆ SCIPcopy()
SCIP_EXPORT SCIP_RETCODE SCIPcopy  (  SCIP *  sourcescip, 
SCIP *  targetscip,  
SCIP_HASHMAP *  varmap,  
SCIP_HASHMAP *  consmap,  
const char *  suffix,  
SCIP_Bool  global,  
SCIP_Bool  enablepricing,  
SCIP_Bool  threadsafe,  
SCIP_Bool  passmessagehdlr,  
SCIP_Bool *  valid  
) 
copies source SCIP to target SCIP; the copying process is done in the following order: 1) copy the plugins 2) copy the settings 3) create problem data in targetSCIP and copy the problem data of the sourceSCIP 4) copy all active variables except those are marked as relaxationonly 5) copy all constraints
The source problem depends on the stage of the sourcescip
 In SCIP_STAGE_PROBLEM, the original problem is copied, otherwise, the transformed problem is copied. For an explicit copy of the original problem, use SCIPcopyOrig().
 Note
 all variables and constraints which are created in the targetSCIP are not (user) captured
 In a multi thread case, you need to lock the copying procedure from outside with a mutex. Also, 'passmessagehdlr' should be set to FALSE.
 the 'threadsafe' parameter should only be set to TRUE if you are absolutely certain that the source and target SCIP instances will be solved in parallel. The usual case is to set this to FALSE, since thread safety typically incurs a performance cost.
 Do not change the source SCIP environment during the copying process
 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 sourcescip is in one of the following stages:
 This method can be called if targetscip is in one of the following stages:
 Note
 sourcescip stage does not get changed
 targetscip stage does not get changed
See SCIP_STAGE for a complete list of all possible solving stages.
copies source SCIP to target SCIP; the copying process is done in the following order: 1) copy the plugins 2) copy the settings 3) create problem data in targetSCIP and copy the problem data of the sourceSCIP 4) copy all active variables except those that are marked as relaxationonly 5) copy all constraints
The source problem depends on the stage of the sourcescip
 In SCIP_STAGE_PROBLEM, the original problem is copied, otherwise, the transformed problem is copied. For an explicit copy of the original problem, use SCIPcopyOrig().
 Note
 all variables and constraints which are created in the targetSCIP are not (user) captured
 In a multi thread case, you need to lock the copying procedure from outside with a mutex. Also, 'passmessagehdlr' should be set to FALSE.
 the 'threadsafe' parameter should only be set to TRUE if you are absolutely certain that the source and target SCIP instances will be solved in parallel. The usual case is to set this to FALSE, since thread safety typically incurs a performance cost.
 Do not change the source SCIP environment during the copying process
 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 sourcescip is in one of the following stages:
 This method can be called if targetscip is in one of the following stages:
 Note
 sourcescip stage does not get changed
 targetscip stage does not get changed
See SCIP_STAGE for a complete list of all possible solving stages.
 Parameters

sourcescip source SCIP data structure targetscip target SCIP data structure varmap a hashmap to store the mapping of source variables corresponding target variables, or NULL consmap a hashmap to store the mapping of source constraints to the corresponding target constraints, or NULL suffix optional suffix for problem name inside the target SCIP global create a global or a local copy? enablepricing should pricing be enabled in copied SCIP instance? If TRUE, pricer plugins will be copied and activated, and the modifiable flag of constraints will be respected. If FALSE, valid will be set to FALSE, when there are pricers present threadsafe FALSE, if data can be safely shared between the source and target SCIP, otherwise TRUE. This is usually set to FALSE passmessagehdlr should the message handler be passed valid pointer to store whether the copying was valid, or NULL
Definition at line 2814 of file scip_copy.c.
References doCopy(), FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPcheckStage(), and TRUE.
Referenced by applyDomainChanges(), initConcsolver(), SCIP_DECL_HEUREXEC(), SCIP_DECL_RELAXEXEC(), setupAndSolveSubscip(), setupAndSolveSubscipOneopt(), and writeBounds().
◆ SCIPcopyConsCompression()
SCIP_EXPORT SCIP_RETCODE SCIPcopyConsCompression  (  SCIP *  sourcescip, 
SCIP *  targetscip,  
SCIP_HASHMAP *  varmap,  
SCIP_HASHMAP *  consmap,  
const char *  suffix,  
SCIP_VAR **  fixedvars,  
SCIP_Real *  fixedvals,  
int  nfixedvars,  
SCIP_Bool  global,  
SCIP_Bool  enablepricing,  
SCIP_Bool  threadsafe,  
SCIP_Bool  passmessagehdlr,  
SCIP_Bool *  valid  
) 
copies source SCIP to target SCIP but compresses constraints
constraint compression is performed by removing fixed variables immediately during constraint creation if the involved constraint handlers support compression
the copying process is done in the following order: 1) copy the plugins 2) copy the settings 3) create problem data in targetSCIP and copy the problem data of the sourceSCIP 4) copy all active variables except those are marked as relaxationonly a) fix all variable copies specified by fixedvars
, fixedvals
, and nfixedvars
b) enable constraint compression 5) copy all constraints
The source problem depends on the stage of the sourcescip
 In SCIP_STAGE_PROBLEM, the original problem is copied, otherwise, the transformed problem is copied. For an explicit copy of the original problem, use SCIPcopyOrigConsCompression().
 Note
 : in case that a combination of local bounds and explicit fixing values should be used, the fixing value of a variable is preferred if local bounds and fixing value disagree.
 all variables and constraints which are created in the targetSCIP are not (user) captured
 In a multi thread case, you need to lock the copying procedure from outside with a mutex. Also, 'passmessagehdlr' should be set to FALSE.
 the 'threadsafe' parameter should only be set to TRUE if you are absolutely certain that the source and target SCIP instances will be solved in parallel. The usual case is to set this to FALSE, since thread safety typically incurs a performance cost.
 Do not change the source SCIP environment during the copying process
 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 sourcescip is in one of the following stages:
 This method can be called if targetscip is in one of the following stages:
 Note
 sourcescip stage does not get changed
 targetscip stage does not get changed
See SCIP_STAGE for a complete list of all possible solving stages.
copies source SCIP to target SCIP but compresses constraints
constraint compression is performed by removing fixed variables immediately during constraint creation if the involved constraint handlers support compression
the copying process is done in the following order: 1) copy the plugins 2) copy the settings 3) create problem data in targetSCIP and copy the problem data of the sourceSCIP 4) copy all active variables except those that are marked as relaxationonly a) fix all variable copies specified by fixedvars
, fixedvals
, and nfixedvars
b) enable constraint compression 5) copy all constraints
The source problem depends on the stage of the sourcescip
 In SCIP_STAGE_PROBLEM, the original problem is copied, otherwise, the transformed problem is copied. For an explicit copy of the original problem, use SCIPcopyOrigConsCompression().
 Note
 : in case that a combination of local bounds and explicit fixing values should be used, the fixing value of a variable is preferred if local bounds and fixing value disagree.
 all variables and constraints which are created in the targetSCIP are not (user) captured
 In a multi thread case, you need to lock the copying procedure from outside with a mutex. Also, 'passmessagehdlr' should be set to FALSE.
 the 'threadsafe' parameter should only be set to TRUE if you are absolutely certain that the source and target SCIP instances will be solved in parallel. The usual case is to set this to FALSE, since thread safety typically incurs a performance cost.
 Do not change the source SCIP environment during the copying process
 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 sourcescip is in one of the following stages:
 This method can be called if targetscip is in one of the following stages:
 Note
 sourcescip stage does not get changed
 targetscip stage does not get changed
See SCIP_STAGE for a complete list of all possible solving stages.
 Parameters

sourcescip source SCIP data structure targetscip target SCIP data structure varmap a hashmap to store the mapping of source variables corresponding target variables, or NULL consmap a hashmap to store the mapping of source constraints to the corresponding target constraints, or NULL suffix optional suffix for problem name inside the target SCIP fixedvars source variables whose copies should be fixed in the target SCIP environment, or NULL fixedvals array of fixing values for target SCIP variables, or NULL nfixedvars number of source variables whose copies should be fixed in the target SCIP environment, or NULL global create a global or a local copy? enablepricing should pricing be enabled in copied SCIP instance? If TRUE, pricer plugins will be copied and activated, and the modifiable flag of constraints will be respected. If FALSE, valid will be set to FALSE, when there are pricers present threadsafe FALSE, if data can be safely shared between the source and target SCIP, otherwise TRUE. This is usually set to FALSE passmessagehdlr should the message handler be passed valid pointer to store whether the copying was valid, or NULL
Definition at line 2908 of file scip_copy.c.
References doCopy(), FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), and TRUE.
Referenced by doSolveSubMIP(), SCIPcopyLargeNeighborhoodSearch(), setupAndSolve(), setupAndSolveSubscip(), setupAndSolveSubscipRapidlearning(), setupProbingSCIP(), setupSubscipLpface(), and solveSubproblem().
◆ SCIPcopyOrig()
SCIP_EXPORT SCIP_RETCODE SCIPcopyOrig  (  SCIP *  sourcescip, 
SCIP *  targetscip,  
SCIP_HASHMAP *  varmap,  
SCIP_HASHMAP *  consmap,  
const char *  suffix,  
SCIP_Bool  enablepricing,  
SCIP_Bool  threadsafe,  
SCIP_Bool  passmessagehdlr,  
SCIP_Bool *  valid  
) 
copies source SCIP original problem to target SCIP; the copying process is done in the following order: 1) copy the plugins 2) copy the settings 3) create problem data in targetSCIP and copy the original problem data of the sourceSCIP 4) copy all original variables 5) copy all original constraints
 Note
 all variables and constraints which are created in the targetSCIP are not (user) captured
 In a multi thread case, you need to lock the copying procedure from outside with a mutex. Also, 'passmessagehdlr' should be set to FALSE.
 the 'threadsafe' parameter should only be set to TRUE if you are absolutely certain that the source and target SCIP instances will be solved in parallel. The usual case is to set this to FALSE, since thread safety typically incurs a performance cost.
 Do not change the source SCIP environment during the copying process
 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 sourcescip is in one of the following stages:
 This method can be called if targetscip is in one of the following stages:
 Note
 sourcescip stage does not get changed
 targetscip stage does not get changed
See SCIP_STAGE for a complete list of all possible solving stages.
 Parameters

sourcescip source SCIP data structure targetscip target SCIP data structure varmap a hashmap to store the mapping of source variables corresponding target variables, or NULL consmap a hashmap to store the mapping of source constraints to the corresponding target constraints, or NULL suffix suffix which will be added to the names of the target SCIP, might be empty enablepricing should pricing be enabled in copied SCIP instance? If TRUE, pricer plugins will be copied and activated, and the modifiable flag of constraints will be respected. If FALSE, valid will be set to FALSE, when there are pricers present threadsafe FALSE, if data can be safely shared between the source and target SCIP, otherwise TRUE. This is usually set to FALSE passmessagehdlr should the message handler be passed valid pointer to store whether the copying was valid, or NULL
Definition at line 2989 of file scip_copy.c.
References doCopy(), FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPcheckStage(), and TRUE.
Referenced by SCIP_DECL_BENDERSCOPY(), and setupAndSolveFiniteSolSubscip().
◆ SCIPcopyOrigConsCompression()
SCIP_EXPORT SCIP_RETCODE SCIPcopyOrigConsCompression  (  SCIP *  sourcescip, 
SCIP *  targetscip,  
SCIP_HASHMAP *  varmap,  
SCIP_HASHMAP *  consmap,  
const char *  suffix,  
SCIP_VAR **  fixedvars,  
SCIP_Real *  fixedvals,  
int  nfixedvars,  
SCIP_Bool  enablepricing,  
SCIP_Bool  threadsafe,  
SCIP_Bool  passmessagehdlr,  
SCIP_Bool *  valid  
) 
copies source SCIP original problem to target SCIP but compresses constraints
constraint compression is performed by removing fixed variables immediately during constraint creation if the involved constraint handlers support compression
the copying process is done in the following order: 1) copy the plugins 2) copy the settings 3) create problem data in targetSCIP and copy the problem data of the sourceSCIP 4) copy all original variables a) fix all variable copies specified by fixedvars
, fixedvals
, and nfixedvars
b) enable constraint compression 5) copy all constraints
 Note
 all variables and constraints which are created in the targetSCIP are not (user) captured
 In a multi thread case, you need to lock the copying procedure from outside with a mutex. Also, 'passmessagehdlr' should be set to FALSE.
 the 'threadsafe' parameter should only be set to TRUE if you are absolutely certain that the source and target SCIP instances will be solved in parallel. The usual case is to set this to FALSE, since thread safety typically incurs a performance cost.
 Do not change the source SCIP environment during the copying process
 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 sourcescip is in one of the following stages:
 This method can be called if targetscip is in one of the following stages:
 Note
 sourcescip stage does not get changed
 targetscip stage does not get changed
See SCIP_STAGE for a complete list of all possible solving stages.
 Parameters

sourcescip source SCIP data structure targetscip target SCIP data structure varmap a hashmap to store the mapping of source variables corresponding target variables, or NULL consmap a hashmap to store the mapping of source constraints to the corresponding target constraints, or NULL suffix optional suffix for problem name inside the target SCIP fixedvars source variables whose copies should be fixed in the target SCIP environment, or NULL fixedvals array of fixing values for target SCIP variables, or NULL nfixedvars number of source variables whose copies should be fixed in the target SCIP environment, or NULL enablepricing should pricing be enabled in copied SCIP instance? If TRUE, pricer plugins will be copied and activated, and the modifiable flag of constraints will be respected. If FALSE, valid will be set to FALSE, when there are pricers present threadsafe FALSE, if data can be safely shared between the source and target SCIP, otherwise TRUE. This is usually set to FALSE passmessagehdlr should the message handler be passed valid pointer to store whether the copying was valid, or NULL
Definition at line 3076 of file scip_copy.c.
References doCopy(), FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPsyncstoreCapture(), SCIPsyncstoreRelease(), Scip::syncstore, and TRUE.
◆ SCIPcheckCopyLimits()
SCIP_EXPORT SCIP_RETCODE SCIPcheckCopyLimits  (  SCIP *  sourcescip, 
SCIP_Bool *  success  
) 
checks if there is enough time and memory left for copying the sourcescip into a subSCIP and solve the subSCIP
This is the case if the time and memory limit that would be passed to the subSCIP are larger than 0.0
 Precondition
 This method can be called if sourcescip is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
 Parameters

sourcescip source SCIP data structure success pointer to store whether there is time and memory left to copy the problem and run the subSCIP
Definition at line 3192 of file scip_copy.c.
References getCopyMemlimit(), getCopyTimelimit(), SCIP_CALL, SCIP_OKAY, SCIP_Real, and SCIPgetMemExternEstim().
Referenced by applyCompletesol(), applyOfins(), applyVbounds(), determineLimits(), SCIP_DECL_HEUREXEC(), SCIPapplyProximity(), SCIPapplyRens(), SCIPapplyZeroobj(), solveSubMIP(), and solveSubscip().
◆ SCIPcopyLimits()
SCIP_EXPORT SCIP_RETCODE SCIPcopyLimits  (  SCIP *  sourcescip, 
SCIP *  targetscip  
) 
copies limits from source SCIP to target SCIP
 Note
 time and memory limit are reduced by the amount already spent in the source SCIP before installing the limit in the target SCIP
 all other limits are disabled and need to be enabled afterwards, if needed
 See also
 SCIPsetCommonSubscipParams() to set further working limits and other parameters commonly used for auxiliary problems
 Precondition
 This method can be called if sourcescip is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
copies limits from source SCIP to target SCIP
 Note
 time and memory limit are reduced by the amount already spent in the source SCIP before installing the limit in the target SCIP
 all other limits are disabled and need to be enabled afterwards, if needed
 Precondition
 This method can be called if sourcescip is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
 Parameters

sourcescip source SCIP data structure targetscip target SCIP data structure
Definition at line 3228 of file scip_copy.c.
References copySofttimelimit(), getCopyMemlimit(), getCopyTimelimit(), SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPsetIntParam(), SCIPsetLongintParam(), and SCIPsetRealParam().
Referenced by createSubscip(), doSolveSubMIP(), SCIP_DECL_HEUREXEC(), SCIPapplyProximity(), SCIPsetCommonSubscipParams(), setLimits(), setupAndSolve(), setupAndSolveSubscip(), setupAndSolveSubscipCrossover(), setupAndSolveSubscipMutation(), setupAndSolveSubscipOneopt(), setupAndSolveSubscipRapidlearning(), setupSCIPparamsStage3(), solveSubscip(), wrapperDins(), and wrapperRins().
◆ SCIPsetCommonSubscipParams()
SCIP_EXPORT SCIP_RETCODE SCIPsetCommonSubscipParams  (  SCIP *  sourcescip, 
SCIP *  subscip,  
SCIP_Longint  nsubnodes,  
SCIP_Longint  nstallnodes,  
int  bestsollimit  
) 
sets the working limits as well as common search parameters for the auxiliary problem
 Note
 memory and time limits are not affected, and must be set using SCIPcopyLimits() instead
 Parameters

sourcescip source SCIP data structure subscip target SCIP data structure, often a copy of sourcescip
nsubnodes nodelimit for subscip, or 1 for no limit nstallnodes stall node limit for subscip, or 1 for no limit bestsollimit the limit on the number of best solutions found, or 1 for no limit
Definition at line 3269 of file scip_copy.c.
References FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_PARAMSETTING_FAST, SCIP_PARAMSETTING_OFF, SCIPcopyLimits(), SCIPfindBranchrule(), SCIPfindConshdlr(), SCIPfindNodesel(), SCIPgetBoolParam(), SCIPisParamFixed(), SCIPsetBoolParam(), SCIPsetCharParam(), SCIPsetIntParam(), SCIPsetLongintParam(), SCIPsetPresolving(), SCIPsetSeparating(), SCIPsetSubscipsOff(), and TRUE.
Referenced by setupAndSolveSubscipLocalbranching(), and setupAndSolveSubscipTrustregion().