Detailed Description
methods to copy problems between a source and a target SCIP
Functions  
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_RETCODE  SCIPcopyBenders (SCIP *sourcescip, SCIP *targetscip, SCIP_HASHMAP *varmap, SCIP_Bool *valid) 
SCIP_RETCODE  SCIPcopyProb (SCIP *sourcescip, SCIP *targetscip, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, SCIP_Bool global, const char *name) 
SCIP_RETCODE  SCIPcopyOrigProb (SCIP *sourcescip, SCIP *targetscip, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, const char *name) 
SCIP_RETCODE  SCIPenableConsCompression (SCIP *scip) 
SCIP_Bool  SCIPisConsCompressionEnabled (SCIP *scip) 
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_RETCODE  SCIPcopyVars (SCIP *sourcescip, SCIP *targetscip, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, SCIP_VAR **fixedvars, SCIP_Real *fixedvals, int nfixedvars, SCIP_Bool global) 
SCIP_RETCODE  SCIPcopyOrigVars (SCIP *sourcescip, SCIP *targetscip, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, SCIP_VAR **fixedvars, SCIP_Real *fixedvals, int nfixedvars) 
SCIP_RETCODE  SCIPmergeVariableStatistics (SCIP *sourcescip, SCIP *targetscip, SCIP_VAR **sourcevars, SCIP_VAR **targetvars, int nvars) 
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_RETCODE  SCIPcopyConss (SCIP *sourcescip, SCIP *targetscip, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, SCIP_Bool global, SCIP_Bool enablepricing, SCIP_Bool *valid) 
SCIP_RETCODE  SCIPcopyOrigConss (SCIP *sourcescip, SCIP *targetscip, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, SCIP_Bool enablepricing, SCIP_Bool *valid) 
SCIP_RETCODE  SCIPconvertCutsToConss (SCIP *scip, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, SCIP_Bool global, int *ncutsadded) 
SCIP_RETCODE  SCIPcopyCuts (SCIP *sourcescip, SCIP *targetscip, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, SCIP_Bool global, int *ncutsadded) 
SCIP_RETCODE  SCIPcopyConflicts (SCIP *sourcescip, SCIP *targetscip, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, SCIP_Bool global, SCIP_Bool enablepricing, SCIP_Bool *valid) 
SCIP_RETCODE  SCIPcopyImplicationsCliques (SCIP *sourcescip, SCIP *targetscip, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, SCIP_Bool global, SCIP_Bool *infeasible, int *nbdchgs, int *ncopied) 
SCIP_RETCODE  SCIPcopyParamSettings (SCIP *sourcescip, SCIP *targetscip) 
int  SCIPgetSubscipDepth (SCIP *scip) 
void  SCIPsetSubscipDepth (SCIP *scip, int newdepth) 
SCIP_RETCODE  SCIPcopy (SCIP *sourcescip, SCIP *targetscip, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, const char *suffix, SCIP_Bool global, SCIP_Bool enablepricing, SCIP_Bool passmessagehdlr, SCIP_Bool *valid) 
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 passmessagehdlr, SCIP_Bool *valid) 
SCIP_RETCODE  SCIPcopyOrig (SCIP *sourcescip, SCIP *targetscip, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, const char *suffix, SCIP_Bool enablepricing, SCIP_Bool passmessagehdlr, SCIP_Bool *valid) 
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 passmessagehdlr, SCIP_Bool *valid) 
SCIP_RETCODE  SCIPcheckCopyLimits (SCIP *sourcescip, SCIP_Bool *success) 
SCIP_RETCODE  SCIPcopyLimits (SCIP *sourcescip, SCIP *targetscip) 
Function Documentation
◆ SCIPcopyPlugins()
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 316 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(), and setupSubscipLpface().
◆ SCIPcopyBenders()
SCIP_RETCODE SCIPcopyBenders  (  SCIP *  sourcescip, 
SCIP *  targetscip,  
SCIP_HASHMAP *  varmap,  
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.
 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.
 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; must not be NULL valid pointer to store whether all plugins were validly copied
Definition at line 393 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_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 557 of file scip_copy.c.
References copyProb(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), and TRUE.
Referenced by copyToSubscip(), and doCopy().
◆ SCIPcopyOrigProb()
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 610 of file scip_copy.c.
References copyProb(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPgetObjsense(), SCIPsetObjsense(), and TRUE.
Referenced by doCopy().
◆ SCIPenableConsCompression()
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 648 of file scip_copy.c.
References FALSE, NULL, Scip::origprob, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPprobEnableConsCompression(), and TRUE.
Referenced by doCopy().
◆ SCIPisConsCompressionEnabled()
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 687 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_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; elsewise 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
 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.
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 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
 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 737 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(), 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_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 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.
copies all active 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 are not 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 global should global or local bounds be used?
Definition at line 1158 of file scip_copy.c.
References copyVars(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), and TRUE.
Referenced by createSubSCIP(), SCIPcopyLargeNeighborhoodSearch(), and setupSubscipLpface().
◆ SCIPcopyOrigVars()
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 1215 of file scip_copy.c.
References copyVars(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), and TRUE.
◆ SCIPmergeVariableStatistics()
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 targetvars target variables for history merge nvars number of variables in both variable arrays
Definition at line 1245 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().
◆ SCIPgetConsCopy()
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 1350 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 copyConsPseudoboolean(), copyToSubscip(), SCIP_DECL_CONSCOPY(), SCIP_DECL_PROBCOPY(), SCIPbendersMergeSubproblemIntoMaster(), SCIPcopyConflicts(), SCIPcopyConss(), SCIPcopyOrigConss(), and setupAndSolveSubscipRapidlearning().
◆ SCIPcopyConss()
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
 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 constraints were validly copied
Definition at line 1486 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_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 1686 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_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 1819 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_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
 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 1879 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_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 1971 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_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 2129 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_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 2313 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()
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 2354 of file scip_copy.c.
References FALSE, NULL, SCIP_CALL_ABORT, SCIPcheckStage(), Scip::stat, SCIP_Stat::subscipdepth, and TRUE.
Referenced by createSubSCIP(), createVariableMappings(), SCIP_DECL_CONSEXIT(), SCIP_DECL_CONSINITSOL(), SCIP_DECL_CONSPRESOL(), SCIP_DECL_EVENTINIT(), SCIP_DECL_HEUREXEC(), SCIPcreateConsOrbitope(), setupSubscipLpface(), and storeAllBilinearTerms().
◆ SCIPsetSubscipDepth()
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 2375 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_RETCODE SCIPcopy  (  SCIP *  sourcescip, 
SCIP *  targetscip,  
SCIP_HASHMAP *  varmap,  
SCIP_HASHMAP *  consmap,  
const char *  suffix,  
SCIP_Bool  global,  
SCIP_Bool  enablepricing,  
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 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.
 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 passmessagehdlr should the message handler be passed valid pointer to store whether the copying was valid, or NULL
Definition at line 2615 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(), setupSubscipLpface(), and writeBounds().
◆ SCIPcopyConsCompression()
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  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 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.
 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 passmessagehdlr should the message handler be passed valid pointer to store whether the copying was valid, or NULL
Definition at line 2704 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(), and solveSubproblem().
◆ SCIPcopyOrig()
SCIP_RETCODE SCIPcopyOrig  (  SCIP *  sourcescip, 
SCIP *  targetscip,  
SCIP_HASHMAP *  varmap,  
SCIP_HASHMAP *  consmap,  
const char *  suffix,  
SCIP_Bool  enablepricing,  
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.
 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 passmessagehdlr should the message handler be passed valid pointer to store whether the copying was valid, or NULL
Definition at line 2780 of file scip_copy.c.
References doCopy(), FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPcheckStage(), and TRUE.
Referenced by setupAndSolveFiniteSolSubscip().
◆ SCIPcopyOrigConsCompression()
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  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.
 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 passmessagehdlr should the message handler be passed valid pointer to store whether the copying was valid, or NULL
Definition at line 2862 of file scip_copy.c.
References doCopy(), FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPsyncstoreCapture(), SCIPsyncstoreRelease(), Scip::syncstore, and TRUE.
◆ SCIPcheckCopyLimits()
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 2976 of file scip_copy.c.
References getCopyMemlimit(), getCopyTimelimit(), SCIP_CALL, SCIP_OKAY, SCIP_Real, and SCIPgetMemExternEstim().
Referenced by applyCompletesol(), applyOfins(), applyVbounds(), SCIP_DECL_HEUREXEC(), SCIPapplyProximity(), SCIPapplyRens(), SCIPapplyZeroobj(), solveSubMIP(), and solveSubscip().
◆ SCIPcopyLimits()
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
 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 3012 of file scip_copy.c.
References copySofttimelimit(), getCopyMemlimit(), getCopyTimelimit(), SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPsetIntParam(), SCIPsetLongintParam(), and SCIPsetRealParam().
Referenced by doSolveSubMIP(), SCIP_DECL_HEUREXEC(), SCIPapplyProximity(), setupAndSolve(), setupAndSolveSubscip(), setupAndSolveSubscipCrossover(), setupAndSolveSubscipLocalbranching(), setupAndSolveSubscipMutation(), setupAndSolveSubscipOneopt(), setupAndSolveSubscipRapidlearning(), setupSCIPparamsStage3(), solveSubscip(), wrapperDins(), and wrapperRins().