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 copycutselectors, 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 copyexprhdlrs, SCIP_Bool copynlpis, SCIP_Bool passmessagehdlr, SCIP_Bool *valid) |
SCIP_RETCODE | SCIPcopyBenders (SCIP *sourcescip, SCIP *targetscip, SCIP_HASHMAP *varmap, SCIP_Bool threadsafe, 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) |
void | SCIPmergeNLPIStatistics (SCIP *sourcescip, SCIP *targetscip, SCIP_Bool reset) |
SCIP_RETCODE | SCIPtranslateSubSol (SCIP *scip, SCIP *subscip, SCIP_SOL *subsol, SCIP_HEUR *heur, SCIP_VAR **subvars, SCIP_SOL **newsol) |
SCIP_RETCODE | SCIPtranslateSubSols (SCIP *scip, SCIP *subscip, SCIP_HEUR *heur, SCIP_VAR **subvars, SCIP_Bool *success, int *solindex) |
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 threadsafe, 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 threadsafe, 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 threadsafe, 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 threadsafe, SCIP_Bool passmessagehdlr, SCIP_Bool *valid) |
SCIP_RETCODE | SCIPcheckCopyLimits (SCIP *sourcescip, SCIP_Bool *success) |
SCIP_RETCODE | SCIPcopyLimits (SCIP *sourcescip, SCIP *targetscip) |
SCIP_RETCODE | SCIPsetCommonSubscipParams (SCIP *sourcescip, SCIP *subscip, SCIP_Longint nsubnodes, SCIP_Longint nstallnodes, int bestsollimit) |
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 | copycutselectors, | ||
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 | copyexprhdlrs, | ||
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.
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.
See SCIP_STAGE for a complete list of all possible solving stages.
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 |
copycutselectors | should the cut selectors 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 |
copyexprhdlrs | should the expression handlers 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 275 of file scip_copy.c.
References assert(), FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPgetMessagehdlr(), SCIPsetCopyPlugins(), SCIPsetMessagehdlr(), Scip::set, TRUE, and valid.
Referenced by createSubSCIP(), createSubSCIP(), createSubscip(), doCopy(), SCIPbendersApplyDecomposition(), and setupSubscipLpface().
SCIP_RETCODE SCIPcopyBenders | ( | SCIP * | sourcescip, |
SCIP * | targetscip, | ||
SCIP_HASHMAP * | varmap, | ||
SCIP_Bool | threadsafe, | ||
SCIP_Bool * | valid ) |
copies all Benders' decomposition plugins
See SCIP_STAGE for a complete list of all possible solving stages.
copies all Benders' decomposition plugins
See SCIP_STAGE for a complete list of all possible solving stages.
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 357 of file scip_copy.c.
References assert(), SCIP_Set::benders, FALSE, SCIP_Set::nbenders, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPbendersCopyInclude(), SCIPcheckStage(), Scip::set, TRUE, and valid.
Referenced by doCopy().
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
See SCIP_STAGE for a complete list of all possible solving stages.
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 527 of file scip_copy.c.
References assert(), copyProb(), FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), and TRUE.
Referenced by copyToSubscip(), copyToSubscip(), createSubSCIP(), and doCopy().
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
See SCIP_STAGE for a complete list of all possible solving stages.
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 580 of file scip_copy.c.
References assert(), copyProb(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPaddOrigObjoffset(), SCIPcheckStage(), SCIPgetObjsense(), SCIPgetOrigObjoffset(), SCIPsetObjsense(), and TRUE.
Referenced by doCopy().
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.
See SCIP_STAGE for a complete list of all possible solving stages.
scip | source SCIP data structure |
Definition at line 621 of file scip_copy.c.
References assert(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPprobEnableConsCompression(), and TRUE.
Referenced by doCopy().
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.
See SCIP_STAGE for a complete list of all possible solving stages.
scip | source SCIP data structure |
Definition at line 660 of file scip_copy.c.
References assert(), FALSE, NULL, SCIP_Bool, SCIP_CALL_ABORT, SCIP_STAGE_PROBLEM, SCIPcheckStage(), SCIPgetStage(), SCIPprobIsConsCompressionEnabled(), and TRUE.
Referenced by consdataCreate(), consdataCreate(), consdataCreate(), consdataCreate(), consdataCreateRedundant(), and copyConsPseudoboolean().
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 relaxation-only, 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; relaxation-only variables are not copied and FALSE is returned in *success
See SCIP_STAGE for a complete list of all possible solving stages.
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 711 of file scip_copy.c.
References assert(), FALSE, i, 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, TRUE, and var.
Referenced by copyConsPseudoboolean(), copyCuts(), copyToSubscip(), copyToSubscip(), copyVars(), tsp::ProbDataTSP::scip_copy(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSCOPY(), SCIP_DECL_EXPR_MAPEXPR(), SCIP_DECL_PROBCOPY(), SCIPcopyConsLinear(), SCIPcopyImplicationsCliques(), and SCIPgetVarCopy().
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 source-SCIP, except those that are marked as relaxation only, and adds these variable to the target-SCIP.
The mapping between these variables are stored in the variable hashmap.
The target-SCIP has to be in problem creation stage.
See SCIP_STAGE for a complete list of all possible solving stages.
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 1178 of file scip_copy.c.
References assert(), copyVars(), FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPcheckStage(), and TRUE.
Referenced by createSubSCIP(), createSubSCIP(), SCIPcopyLargeNeighborhoodSearch(), and setupSubscipLpface().
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 source-SCIP and adds these variable to the target-SCIP; the mapping between these variables are stored in the variable hashmap, target-SCIP has to be in problem creation stage, fixed and aggregated variables do not get copied
See SCIP_STAGE for a complete list of all possible solving stages.
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 1235 of file scip_copy.c.
References assert(), copyVars(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPcheckStage(), and TRUE.
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.
sourcescip
usually denotes a copied SCIP instance, whereas targetscip
denotes the original instance 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 1265 of file scip_copy.c.
References assert(), SCIP_Set::history_allowmerge, i, NULL, nvars, 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 SCIP_DECL_HEUREXEC(), setupAndSolveSubscipCrossover(), setupAndSolveSubscipMutation(), solveSubproblem(), and wrapperRins().
merges the statistics of NLPIs from a source SCIP into a target SCIP
The two SCIP instances should point to different SCIP instances.
sourcescip
usually denotes a copied SCIP instance, whereas targetscip
denotes the original instance sourcescip | source SCIP data structure |
targetscip | target SCIP data structure |
reset | whether to reset statistics in sourcescip |
Definition at line 1330 of file scip_copy.c.
References assert(), i, SCIP_Set::nlpis, SCIP_Set::nnlpis, NULL, SCIP_Bool, SCIPdebugMsg, SCIPnlpiGetName(), SCIPnlpiMergeStatistics(), SCIPsetFindNlpi(), and Scip::set.
Referenced by solveSubNLP().
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 relaxation-only 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.
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 1408 of file scip_copy.c.
References assert(), NULL, nvars, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPcreateSol(), SCIPfreeBufferArray, SCIPgetVarsData(), SCIPsetSolVals(), translateSubSol(), and vars.
Referenced by createNewSol(), reoptimize(), setupAndSolve(), setupAndSolve(), setupAndSolveSubscip(), setupAndSolveSubscipRapidlearning(), solveSubproblem(), transferSolution(), and transferSolution().
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 relaxation-only 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.
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 1448 of file scip_copy.c.
References assert(), FALSE, i, NULL, nvars, SCIP_Bool, SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIP_Real, SCIPaddSolFree(), SCIPallocBufferArray, SCIPcheckSol(), SCIPclearSol(), SCIPcreateSol(), SCIPdebugMsg, SCIPfreeBufferArray, SCIPfreeSol(), SCIPgetNSols(), SCIPgetSolOrigObj(), SCIPgetSols(), SCIPgetSolTransObj(), SCIPgetVarsData(), SCIPsetSolVals(), SCIPsolGetIndex(), translateSubSol(), TRUE, and vars.
Referenced by createNewSols(), SCIP_DECL_HEUREXEC(), SCIP_DECL_HEUREXEC(), SCIP_DECL_HEUREXEC(), setupAndSolveSubscip(), setupAndSolveSubscipCrossover(), setupAndSolveSubscipLocalbranching(), setupAndSolveSubscipMutation(), setupAndSolveSubscipOneopt(), setupAndSolveSubscipTrustregion(), solveSubscipLpface(), wrapperDins(), and wrapperRins().
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
See SCIP_STAGE for a complete list of all possible solving stages.
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 1591 of file scip_copy.c.
References assert(), FALSE, NULL, propagate, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPblkmem(), SCIPcaptureCons(), SCIPcheckStage(), SCIPconsCopy(), SCIPgetNConss(), SCIPgetNVars(), SCIPhashmapCreate(), SCIPhashmapFree(), SCIPhashmapGetImage(), SCIPhashmapInsert(), Scip::set, TRUE, and valid.
Referenced by addConstraintToBendersSubproblem(), addScenarioConsToProb(), copyConsPseudoboolean(), copyToSubscip(), copyToSubscip(), copyToSubscip(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSCOPY(), SCIPbendersMergeSubproblemIntoMaster(), SCIPcopyConflicts(), SCIPcopyConss(), SCIPcopyOrigConss(), and setupAndSolveSubscipRapidlearning().
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 source-SCIP and adds these to the target-SCIP; 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 target-SCIP and added to the hash map, if not NULL; all variables which are created are added to the target-SCIP but not (user) captured; if the constraint hash map is not NULL the mapping between the constraints of the source and target-SCIP 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.
See SCIP_STAGE for a complete list of all possible solving stages.
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 1730 of file scip_copy.c.
References assert(), c, Scip::conflictstore, FALSE, i, 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, TRUE, and valid.
Referenced by createSubSCIP(), createSubSCIP(), and doCopy().
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 source-SCIP and adds these to the target-SCIP; 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 target-SCIP and added to the hash map, if not NULL; all variables which are created are added to the target-SCIP but not (user) captured; if the constraint hash map is not NULL the mapping between the constraints of the source and target-SCIP is stored
See SCIP_STAGE for a complete list of all possible solving stages.
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 1935 of file scip_copy.c.
References assert(), c, 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(), TRUE, and valid.
Referenced by doCopy().
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
See SCIP_STAGE for a complete list of all possible solving stages.
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 2068 of file scip_copy.c.
References assert(), FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_STAGE_SOLVING, SCIPcheckStage(), SCIPcopyCuts(), and TRUE.
Referenced by SCIP_DECL_CONSEXITSOL().
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 relaxation-only are skipped.
See SCIP_STAGE for a complete list of all possible solving stages.
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 2130 of file scip_copy.c.
References assert(), copyCuts(), FALSE, NULL, SCIP_Bool, 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(), SCIP_DECL_HEUREXEC(), SCIPconvertCutsToConss(), SCIPcopyLargeNeighborhoodSearch(), setupAndSolveSubscip(), setupAndSolveSubscipRapidlearning(), setupProbingSCIP(), setupSubscipLpface(), and solveSubproblem().
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
See SCIP_STAGE for a complete list of all possible solving stages.
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 2222 of file scip_copy.c.
References assert(), c, 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(), TRUE, and valid.
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.
See SCIP_STAGE for a complete list of all possible solving stages.
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 2380 of file scip_copy.c.
References assert(), c, FALSE, nbinvars, NULL, nvars, 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.
SCIP_RETCODE SCIPcopyParamSettings | ( | SCIP * | sourcescip, |
SCIP * | targetscip ) |
copies parameter settings from sourcescip to targetscip
See SCIP_STAGE for a complete list of all possible solving stages.
Definition at line 2564 of file scip_copy.c.
References assert(), FALSE, Scip::messagehdlr, NULL, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPsetCopyParams(), Scip::set, and TRUE.
Referenced by applyRepair(), createSubSCIP(), createSubSCIP(), createSubscip(), doCopy(), SCIPcopyLargeNeighborhoodSearch(), setupSCIPparamsStage3(), and setupSubscipLpface().
int SCIPgetSubscipDepth | ( | SCIP * | scip | ) |
gets depth of current scip instance (increased by each copy call)
See SCIP_STAGE for a complete list of all possible solving stages.
scip | SCIP data structure |
Definition at line 2605 of file scip_copy.c.
References assert(), FALSE, NULL, SCIP_CALL_ABORT, SCIPcheckStage(), and TRUE.
Referenced by assignAuxiliaryVariables(), createCoveringProblem(), createSubscip(), createVariableMappings(), SCIP_DECL_BRANCHEXECLP(), SCIP_DECL_CONSENFOLP(), SCIP_DECL_CONSEXIT(), SCIP_DECL_CONSPRESOL(), SCIP_DECL_EVENTINIT(), SCIP_DECL_HEUREXEC(), SCIP_DECL_NLHDLRDETECT(), SCIP_DECL_NLHDLRDETECT(), SCIP_DECL_NLHDLRENFO(), SCIP_DECL_NLPISOLVE(), SCIP_DECL_PROPEXEC(), SCIP_DECL_SEPAEXECLP(), SCIPcreateConsOrbitope(), SCIPgenerateAndApplyBendersOptCut(), and setupSubscipLpface().
void SCIPsetSubscipDepth | ( | SCIP * | scip, |
int | newdepth ) |
sets depth of scip instance
See SCIP_STAGE for a complete list of all possible solving stages.
scip | SCIP data structure |
newdepth | new subscip depth |
Definition at line 2626 of file scip_copy.c.
References assert(), FALSE, NULL, SCIP_CALL_ABORT, SCIPcheckStage(), and TRUE.
Referenced by createCoveringProblem(), createSubscip(), and setupSubscipLpface().
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 those plugins that have copy callbacks 2) copy the settings for the present parameters 3) create problem data in target-SCIP and copy the problem data of the source-SCIP 4) copy all active variables except those that are marked as relaxation-only 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().
See SCIP_STAGE for a complete list of all possible solving stages.
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 2875 of file scip_copy.c.
References assert(), doCopy(), FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPcheckStage(), TRUE, and valid.
Referenced by initConcsolver(), SCIP_DECL_HEUREXEC(), SCIP_DECL_RELAXEXEC(), setupAndSolveSubscip(), setupAndSolveSubscipOneopt(), and writeBounds().
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 target-SCIP and copy the problem data of the source-SCIP 4) copy all active variables except those are marked as relaxation-only 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().
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 target-SCIP and copy the problem data of the source-SCIP 4) copy all active variables except those that are marked as relaxation-only 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().
See SCIP_STAGE for a complete list of all possible solving stages.
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 2969 of file scip_copy.c.
References assert(), doCopy(), FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPcheckStage(), TRUE, and valid.
Referenced by doSolveSubMIP(), reoptimize(), SCIP_DECL_HEUREXEC(), SCIPcopyLargeNeighborhoodSearch(), setupAndSolve(), setupAndSolveSubscip(), setupAndSolveSubscipRapidlearning(), setupProbingSCIP(), setupSubscipLpface(), and solveSubproblem().
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 target-SCIP and copy the original problem data of the source-SCIP 4) copy all original variables 5) copy all original constraints
See SCIP_STAGE for a complete list of all possible solving stages.
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 3050 of file scip_copy.c.
References assert(), doCopy(), FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPcheckStage(), TRUE, and valid.
Referenced by SCIP_DECL_BENDERSCOPY(), and setupAndSolveFiniteSolSubscip().
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 target-SCIP and copy the problem data of the source-SCIP 4) copy all original variables a) fix all variable copies specified by fixedvars
, fixedvals
, and nfixedvars
b) enable constraint compression 5) copy all constraints
See SCIP_STAGE for a complete list of all possible solving stages.
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 3137 of file scip_copy.c.
References assert(), doCopy(), FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPcheckStage(), SCIPsyncstoreCapture(), SCIPsyncstoreRelease(), Scip::syncstore, TRUE, and valid.
Referenced by reoptimize().
SCIP_RETCODE SCIPcheckCopyLimits | ( | SCIP * | sourcescip, |
SCIP_Bool * | success ) |
checks if there is enough time and memory left for copying the sourcescip into a sub-SCIP and solve the sub-SCIP
This is the case if the time and memory limit that would be passed to the sub-SCIP are larger than 0.0
See SCIP_STAGE for a complete list of all possible solving stages.
sourcescip | source SCIP data structure |
success | pointer to store whether there is time and memory left to copy the problem and run the sub-SCIP |
Definition at line 3253 of file scip_copy.c.
References getCopyMemlimit(), getCopyTimelimit(), SCIP_Set::misc_avoidmemout, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPgetMemExternEstim(), and Scip::set.
Referenced by applyCompletesol(), applyOfins(), applyVbounds(), determineLimits(), SCIP_DECL_HEUREXEC(), SCIP_DECL_HEUREXEC(), SCIP_DECL_HEUREXEC(), SCIP_DECL_HEUREXEC(), SCIP_DECL_HEUREXEC(), SCIP_DECL_HEUREXEC(), SCIP_DECL_HEUREXEC(), SCIP_DECL_HEUREXEC(), SCIP_DECL_HEUREXEC(), SCIP_DECL_HEUREXEC(), SCIP_DECL_SEPAEXECLP(), SCIPapplyProximity(), SCIPapplyZeroobj(), solveSubMIP(), and solveSubscip().
SCIP_RETCODE SCIPcopyLimits | ( | SCIP * | sourcescip, |
SCIP * | targetscip ) |
copies limits from source SCIP to target SCIP
See SCIP_STAGE for a complete list of all possible solving stages.
copies limits from source SCIP to target SCIP
See SCIP_STAGE for a complete list of all possible solving stages.
Definition at line 3296 of file scip_copy.c.
References copySofttimelimit(), getCopyMemlimit(), getCopyTimelimit(), SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIP_Real, SCIPsetIntParam(), SCIPsetLongintParam(), and SCIPsetRealParam().
Referenced by createSubscip(), createSubscip(), doSolveSubMIP(), reoptimize(), reoptimize(), SCIP_DECL_HEUREXEC(), SCIP_DECL_HEUREXEC(), SCIP_DECL_HEUREXEC(), SCIP_DECL_HEUREXEC(), SCIPapplyProximity(), SCIPsetCommonSubscipParams(), setLimits(), setupAndSolve(), setupAndSolve(), setupAndSolveSubscip(), setupAndSolveSubscip(), setupAndSolveSubscipCrossover(), setupAndSolveSubscipMutation(), setupAndSolveSubscipOneopt(), setupAndSolveSubscipRapidlearning(), setupSCIPparamsStage3(), solveSubscip(), wrapperDins(), and wrapperRins().
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
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 3339 of file scip_copy.c.
References assert(), FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIP_PARAMSETTING_FAST, SCIP_PARAMSETTING_OFF, SCIPcopyLimits(), SCIPfindBranchrule(), SCIPfindNodesel(), SCIPgetBoolParam(), SCIPisParamFixed(), SCIPsetBoolParam(), SCIPsetCharParam(), SCIPsetIntParam(), SCIPsetLongintParam(), SCIPsetPresolving(), SCIPsetSeparating(), SCIPsetSubscipsOff(), and TRUE.
Referenced by setupAndSolveSubscipLocalbranching(), and setupAndSolveSubscipTrustregion().