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 copynlpis, SCIP_Bool passmessagehdlr, 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) |
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) |
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 | 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.
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 |
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 1561 of file scip.c.
References checkStage(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPgetMessagehdlr(), SCIPsetCopyPlugins(), SCIPsetMessagehdlr(), Scip::set, and TRUE.
Referenced by createSubscip(), createSubSCIP(), and 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 1730 of file scip.c.
References checkStage(), copyProb(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, and TRUE.
Referenced by copyToSubscip(), 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 1783 of file scip.c.
References checkStage(), copyProb(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPgetObjsense(), 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 1821 of file scip.c.
References checkStage(), FALSE, NULL, Scip::origprob, SCIP_CALL, SCIP_OKAY, 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 1861 of file scip.c.
References checkStage(), FALSE, NULL, Scip::origprob, SCIP_CALL_ABORT, SCIP_STAGE_PROBLEM, SCIPgetStage(), SCIPprobIsConsCompressionEnabled(), and TRUE.
Referenced by consdataCreate(), 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; 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
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
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 1911 of file scip.c.
References checkStage(), 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(), 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(), 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 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.
copies all active 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 are not 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 |
global | should global or local bounds be used? |
Definition at line 2332 of file scip.c.
References checkStage(), copyVars(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, and TRUE.
Referenced by createSubSCIP(), and SCIPcopyLargeNeighborhoodSearch().
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 2389 of file scip.c.
References checkStage(), copyVars(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, 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 |
targetvars | target variables for history merge |
nvars | number of variables in both variable arrays |
Definition at line 2419 of file scip.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 SCIP_DECL_HEUREXEC(), SCIPapplyRens(), and solveSubproblem().
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 2524 of file scip.c.
References checkStage(), FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPblkmem(), SCIPcaptureCons(), SCIPconsCopy(), SCIPgetNConss(), SCIPgetNVars(), SCIPhashmapCreate(), SCIPhashmapFree(), SCIPhashmapGetImage(), SCIPhashmapInsert(), Scip::set, and TRUE.
Referenced by copyConsPseudoboolean(), copyToSubscip(), SCIP_DECL_CONSCOPY(), SCIPcopyConflicts(), SCIPcopyConss(), and SCIPcopyOrigConss().
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
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 constraints were validly copied |
Definition at line 2660 of file scip.c.
References checkStage(), Scip::conflictstore, FALSE, Scip::mem, NULL, SCIP_Mem::probmem, Scip::reopt, SCIP_Bool, SCIP_CALL, SCIP_CONFTYPE_UNKNOWN, SCIP_OKAY, SCIPaddCons(), SCIPblkmem(), 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(), SCIPisTransformed(), SCIPreleaseCons(), Scip::set, Scip::stat, and TRUE.
Referenced by 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 2863 of file scip.c.
References checkStage(), FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPaddCons(), SCIPblkmem(), 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().
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 2996 of file scip.c.
References checkStage(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIP_STAGE_SOLVING, SCIPcopyCuts(), Scip::set, SCIP_Set::stage, 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
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 3056 of file scip.c.
References checkStage(), copyCuts(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIP_STAGE_SOLVING, SCIPdebugMsg, SCIPfindConshdlr(), SCIPgetDelayedPoolCuts(), SCIPgetNDelayedPoolCuts(), SCIPgetNPoolCuts(), SCIPgetPoolCuts(), Scip::set, SCIP_Set::stage, and TRUE.
Referenced by applyVbounds(), SCIPconvertCutsToConss(), SCIPcopyLargeNeighborhoodSearch(), setupProbingSCIP(), 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 3148 of file scip.c.
References checkStage(), Scip::conflictstore, FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPaddCons(), SCIPallocBufferArray, SCIPblkmem(), SCIPconflictstoreGetConflicts(), SCIPconflictstoreGetNConflictsInStore(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconsIsActive(), SCIPconsIsChecked(), SCIPconsIsConflict(), SCIPconsIsDeleted(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsSetModifiable(), SCIPdebugMsg, SCIPgetConsCopy(), SCIPgetNConss(), SCIPgetNVars(), SCIPhashmapCreate(), SCIPhashmapFree(), SCIPisTransformed(), SCIPreleaseCons(), and TRUE.
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 3308 of file scip.c.
References checkStage(), FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPaddClique(), SCIPaddVarImplication(), SCIPallocBufferArray, 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.
sourcescip | source SCIP data structure |
targetscip | target SCIP data structure |
Definition at line 3492 of file scip.c.
References checkStage(), FALSE, Scip::messagehdlr, NULL, SCIP_CALL, SCIP_OKAY, SCIPsetCopyParams(), Scip::set, and TRUE.
Referenced by applyRepair(), createSubscip(), createSubSCIP(), doCopy(), and setupSCIPparamsStage3().
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 3533 of file scip.c.
References checkStage(), FALSE, NULL, SCIP_CALL_ABORT, Scip::stat, SCIP_Stat::subscipdepth, and TRUE.
Referenced by SCIP_DECL_CONSEXIT(), SCIP_DECL_CONSINITSOL(), SCIP_DECL_EVENTINIT(), and SCIP_DECL_HEUREXEC().
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 target-SCIP and copy the problem data of the source-SCIP 4) copy all active variables 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 |
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 3757 of file scip.c.
References checkStage(), doCopy(), FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, and TRUE.
Referenced by applyDomainChanges(), initConcsolver(), SCIP_DECL_HEUREXEC(), SCIP_DECL_RELAXEXEC(), SCIPapplyZeroobj(), 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 | 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 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 |
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 3843 of file scip.c.
References checkStage(), doCopy(), FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, and TRUE.
Referenced by applyCompletesol(), applyVbounds(), SCIPcopyLargeNeighborhoodSearch(), setupProbingSCIP(), solveSubMIP(), and solveSubproblem().
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 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 |
passmessagehdlr | should the message handler be passed |
valid | pointer to store whether the copying was valid, or NULL |
Definition at line 3919 of file scip.c.
References checkStage(), doCopy(), FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, and TRUE.
Referenced by SCIPcreateFiniteSolCopy().
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 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 |
passmessagehdlr | should the message handler be passed |
valid | pointer to store whether the copying was valid, or NULL |
Definition at line 4001 of file scip.c.
References checkStage(), doCopy(), FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPsyncstoreCapture(), SCIPsyncstoreRelease(), Scip::syncstore, and TRUE.
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 4090 of file scip.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().
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.
sourcescip | source SCIP data structure |
targetscip | target SCIP data structure |
Definition at line 4126 of file scip.c.
References getCopyMemlimit(), getCopyTimelimit(), NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPgetParam(), SCIPsetIntParam(), SCIPsetLongintParam(), and SCIPsetRealParam().
Referenced by applyCompletesol(), applyOfins(), applyVbounds(), SCIP_DECL_HEUREXEC(), SCIPapplyProximity(), SCIPapplyRens(), SCIPapplyZeroobj(), setupSCIPparamsStage3(), solveSubMIP(), and solveSubscip().