#include <scipParaInstanceTh.h>
Public Member Functions | |
ScipParaInstance () | |
ScipParaInstance (SCIP *inScip) | |
virtual | ~ScipParaInstance () |
double | convertToExternalValue (double internalValue) |
double | convertToInternalValue (double externalValue) |
void | getSolValuesForOriginalProblem (ScipParaSolution *sol, SCIP_Real *vals) |
void | copyScipEnvironment (SCIP **scip) |
SCIP * | getScip () |
void | createProblem (SCIP *scip, int method, bool noPreprocessingInLC, bool usetRootNodeCuts, ScipDiffParamSet *scipDiffParamSetRoot, ScipDiffParamSet *scipDiffParamSet, char *settingsNameLC, char *isolname) |
const std::string | toString () |
const char * | getProbName () |
int | getNVars () |
int | getVarIndexRange () |
SCIP_Real | getVarLb (int i) |
SCIP_Real | getVarUb (int i) |
int | getVarType (int i) |
SCIP_Real | getObjCoef (int i) |
const char * | getVarName (int i) |
int | getNConss () |
SCIP_Real | getLhsLinear (int i) |
SCIP_Real | getRhsLinear (int i) |
int | getNVarsLinear (int i) |
int | getIdxLinearCoefVar (int i, int j) |
SCIP_Real * | getLinearCoefs (int i) |
const char * | getConsName (int i) |
void | setUserPlugins (ScipUserPlugins *inUi) |
void | includeUserPlugins (SCIP *inScip) |
virtual void | setFileName (const char *file)=0 |
bool | isOriginalIndeciesMap () |
bool | isSolverLocalIndeciesMap () |
int | getOrigProbIndex (int index) |
int * | extractOrigProbIndexMap () |
int * | extractSolverLocalIndexMap () |
SCIP * | getParaInstanceScip () |
int | getOrigObjSense () |
bool | isCopyIncreasedVariables () |
void | copyIncrasedVariables () |
Public Member Functions inherited from BbParaInstance | |
BbParaInstance () | |
DO NOT HAVE DATA MEMBER!! More... | |
virtual | ~BbParaInstance () |
destructor More... | |
Public Member Functions inherited from ParaInstance | |
ParaInstance () | |
DO NOT HAVE DATA MEMBER!! More... | |
virtual | ~ParaInstance () |
destructor More... | |
virtual int | bcast (ParaComm *comm, int rank, int method)=0 |
broadcast function to all solvers More... | |
Protected Member Functions | |
virtual const char * | getFileName ()=0 |
Protected Attributes | |
SCIP * | scip |
int | nVars |
int | varIndexRange |
int * | mapToOriginalIndecies |
int * | mapToSolverLocalIndecies |
SCIP * | orgScip |
bool | copyIncreasedVariables |
Definition at line 53 of file scipParaInstanceTh.h.
ScipParaInstance | ( | ) |
constructor
Definition at line 69 of file scipParaInstanceTh.h.
Referenced by SCIP_DECL_HASHKEYVAL().
ScipParaInstance | ( | SCIP * | inScip | ) |
Definition at line 75 of file scipParaInstanceTh.h.
|
virtual |
destractor
for linear constraints
for setppc constraints
for logical constraints
for knapsack constraints
for varbound constraints
for bounddisjunction constraints
for SOS1 constraints
for SOS2 constraints
for agrregated constraints
Definition at line 82 of file scipParaInstanceTh.h.
References ScipParaInstance::mapToOriginalIndecies, and ScipParaInstance::mapToSolverLocalIndecies.
Referenced by SCIP_DECL_HASHKEYVAL().
double convertToExternalValue | ( | double | internalValue | ) |
convert an internal value to external value
Definition at line 106 of file scipParaInstanceTh.h.
Referenced by ScipParaInitiator::convertToExternalValue().
double convertToInternalValue | ( | double | externalValue | ) |
convert an external value to internal value
Definition at line 119 of file scipParaInstanceTh.h.
Referenced by ScipParaInitiator::convertToInternalValue().
void copyIncrasedVariables | ( | ) |
Definition at line 369 of file scipParaInstanceTh.h.
void copyScipEnvironment | ( | SCIP ** | scip | ) |
create presolved problem instance that is solved by ParaSCIP form scip environment in this object
Definition at line 52 of file scipParaInstanceTh.cpp.
Referenced by ScipParaInstance::getSolValuesForOriginalProblem().
void createProblem | ( | SCIP * | inScip, |
int | method, | ||
bool | noPreprocessingInLC, | ||
bool | usetRootNodeCuts, | ||
ScipDiffParamSet * | scipDiffParamSetRoot, | ||
ScipDiffParamSet * | scipDiffParamSet, | ||
char * | settingsNameLC, | ||
char * | isolname | ||
) |
create presolved problem instance that is solved by ParaSCIP
user include plugins
user include plugins
Definition at line 1362 of file scipParaInstance.cpp.
References ScipParaInstance::copyIncreasedVariables, ScipParaInstance::getFileName(), ScipParaInstance::includeUserPlugins(), ScipParaInstance::mapToOriginalIndecies, ScipParaInstance::mapToSolverLocalIndecies, ScipParaInstance::nVars, PRESOLVED_INSTANCE, ScipDiffParamSet::setParametersInScip(), THROW_LOGICAL_ERROR1, ScipParaInstance::toString(), and ScipParaInstance::varIndexRange.
Referenced by ScipParaInstance::getScip(), ScipParaSolver::reinitialize(), ScipParaInstanceTh::ScipParaInstanceTh(), ScipParaObjCommPointHdlr::ScipParaObjCommPointHdlr(), and ScipParaSolver::ScipParaSolver().
int* extractOrigProbIndexMap | ( | ) |
Definition at line 327 of file scipParaInstanceTh.h.
References ScipParaInstance::mapToOriginalIndecies.
Referenced by ScipParaSolver::saveOrgProblemBounds().
int* extractSolverLocalIndexMap | ( | ) |
Definition at line 335 of file scipParaInstanceTh.h.
References ScipParaInstance::mapToSolverLocalIndecies.
Referenced by ScipParaSolver::saveOrgProblemBounds().
const char* getConsName | ( | int | i | ) |
Definition at line 303 of file scipParaInstanceTh.h.
|
protectedpure virtual |
Implemented in ScipParaInstanceTh, and ScipParaInstanceMpi.
Referenced by ScipParaInstance::createProblem().
int getIdxLinearCoefVar | ( | int | i, |
int | j | ||
) |
Definition at line 290 of file scipParaInstanceTh.h.
SCIP_Real getLhsLinear | ( | int | i | ) |
Definition at line 254 of file scipParaInstanceTh.h.
References THROW_LOGICAL_ERROR2.
SCIP_Real* getLinearCoefs | ( | int | i | ) |
Definition at line 297 of file scipParaInstanceTh.h.
int getNConss | ( | ) |
Definition at line 249 of file scipParaInstanceTh.h.
int getNVars | ( | ) |
Definition at line 220 of file scipParaInstanceTh.h.
References ScipParaInstance::nVars.
Referenced by ScipParaSolver::saveOrgProblemBounds().
int getNVarsLinear | ( | int | i | ) |
Definition at line 278 of file scipParaInstanceTh.h.
References THROW_LOGICAL_ERROR2.
SCIP_Real getObjCoef | ( | int | i | ) |
Definition at line 237 of file scipParaInstanceTh.h.
int getOrigObjSense | ( | ) |
Definition at line 359 of file scipParaInstanceTh.h.
int getOrigProbIndex | ( | int | index | ) |
Definition at line 321 of file scipParaInstanceTh.h.
Referenced by ScipParaDiffSubproblem::getFixedVariables(), and ScipParaInitiator::tryToSetIncumbentSolution().
SCIP* getParaInstanceScip | ( | ) |
Definition at line 353 of file scipParaInstanceTh.h.
References ScipParaInstance::scip.
Referenced by ScipParaInitiator::accumulateInitialStat(), ScipParaInitiator::setInitialStatOnDiffSubproblem(), ScipParaInitiator::writeParaInstance(), and ScipParaInitiator::writeSolution().
|
virtual |
Implements ParaInstance.
Definition at line 208 of file scipParaInstanceTh.h.
SCIP_Real getRhsLinear | ( | int | i | ) |
Definition at line 266 of file scipParaInstanceTh.h.
References THROW_LOGICAL_ERROR2.
SCIP* getScip | ( | ) |
Definition at line 182 of file scipParaInstanceTh.h.
References ScipParaInstance::createProblem(), and ScipParaInstance::scip.
Referenced by ScipParaSolver::reinitialize(), and ScipParaSolver::ScipParaSolver().
void getSolValuesForOriginalProblem | ( | ScipParaSolution * | sol, |
SCIP_Real * | vals | ||
) |
get solution values for the original problem
Definition at line 132 of file scipParaInstanceTh.h.
References ScipParaInstance::copyScipEnvironment(), ScipParaSolution::getNVars(), ScipParaSolution::getValues(), ScipParaSolution::indexAmongSolvers(), and ScipParaInstance::varIndexRange.
Referenced by ScipParaInitiator::tryToSetIncumbentSolution().
|
virtual |
Implements BbParaInstance.
Definition at line 221 of file scipParaInstanceTh.h.
References ScipParaInstance::varIndexRange.
Referenced by ScipParaSolver::saveOrgProblemBounds().
SCIP_Real getVarLb | ( | int | i | ) |
Definition at line 222 of file scipParaInstanceTh.h.
Referenced by ScipParaDiffSubproblem::getFixedVariables(), and ScipParaSolver::saveOrgProblemBounds().
const char* getVarName | ( | int | i | ) |
Definition at line 243 of file scipParaInstanceTh.h.
int getVarType | ( | int | i | ) |
Definition at line 232 of file scipParaInstanceTh.h.
Referenced by ScipParaDiffSubproblem::getFixedVariables().
SCIP_Real getVarUb | ( | int | i | ) |
Definition at line 227 of file scipParaInstanceTh.h.
Referenced by ScipParaDiffSubproblem::getFixedVariables(), and ScipParaSolver::saveOrgProblemBounds().
void includeUserPlugins | ( | SCIP * | inScip | ) |
include user plugins
should not be called
Definition at line 313 of file scipParaInstanceTh.h.
References ScipParaInstance::setFileName().
Referenced by ScipParaInstance::createProblem().
bool isCopyIncreasedVariables | ( | ) |
Definition at line 364 of file scipParaInstanceTh.h.
References ScipParaInstance::copyIncreasedVariables.
bool isOriginalIndeciesMap | ( | ) |
Definition at line 317 of file scipParaInstanceTh.h.
Referenced by ScipParaInitiator::accumulateInitialStat(), ScipParaDiffSubproblem::getFixedVariables(), ScipParaSolver::saveOrgProblemBounds(), ScipParaInitiator::setInitialStatOnDiffSubproblem(), ScipParaInitiator::tryToSetIncumbentSolution(), ScipParaInitiator::writeParaInstance(), and ScipParaInitiator::writeSolution().
bool isSolverLocalIndeciesMap | ( | ) |
Definition at line 319 of file scipParaInstanceTh.h.
|
pure virtual |
Implemented in ScipParaInstanceTh, and ScipParaInstanceMpi.
Referenced by ScipParaInstance::includeUserPlugins(), and ScipParaSolver::reinitialize().
void setUserPlugins | ( | ScipUserPlugins * | inUi | ) |
set user plugins
maybe called, no need to do anything
Definition at line 310 of file scipParaInstanceTh.h.
Referenced by setUserPlugins().
|
virtual |
stringfy ParaCalculationState
stringfy ScipParaInstance: for debug
Implements ParaInstance.
Definition at line 201 of file scipParaInstanceTh.h.
Referenced by ScipParaInstance::createProblem().
|
protected |
indicate if SCIP copy increase the number of veariables or not
Definition at line 66 of file scipParaInstanceTh.h.
Referenced by ScipParaInstanceMpi::copyIncrasedVariables(), ScipParaInstance::createProblem(), ScipParaInstanceMpi::isCopyIncreasedVariables(), ScipParaInstance::isCopyIncreasedVariables(), SCIP_DECL_HASHKEYVAL(), and ScipParaInstanceMpi::ScipParaInstanceMpi().
|
protected |
array of indices to map to original problem's probindices LC does not have this map in general, it is in the transformed prob. in scip
Definition at line 61 of file scipParaInstanceTh.h.
Referenced by ScipParaInstance::createProblem(), ScipParaInstance::extractOrigProbIndexMap(), SCIP_DECL_HASHKEYVAL(), and ScipParaInstance::~ScipParaInstance().
|
protected |
array of reverse indices mapToOriginalIndecies
Definition at line 63 of file scipParaInstanceTh.h.
Referenced by ScipParaInstance::createProblem(), ScipParaInstance::extractSolverLocalIndexMap(), SCIP_DECL_HASHKEYVAL(), and ScipParaInstance::~ScipParaInstance().
|
protected |
Definition at line 59 of file scipParaInstanceTh.h.
Referenced by ScipParaInstance::createProblem(), ScipParaInstance::getNVars(), SCIP_DECL_HASHKEYVAL(), and ScipParaInstanceMpi::ScipParaInstanceMpi().
|
protected |
if LC has the above MAP, variables need to be converted to this scip
Definition at line 65 of file scipParaInstanceTh.h.
Referenced by SCIP_DECL_HASHKEYVAL(), and ScipParaInstanceMpi::~ScipParaInstanceMpi().
|
protected |
Definition at line 56 of file scipParaInstanceTh.h.
Referenced by ScipParaInstance::getParaInstanceScip(), ScipParaInstance::getScip(), SCIP_DECL_HASHKEYVAL(), ScipParaInstanceMpi::ScipParaInstanceMpi(), and ScipParaInstanceTh::ScipParaInstanceTh().
|
protected |
Definition at line 60 of file scipParaInstanceTh.h.
Referenced by ScipParaInstance::createProblem(), ScipParaInstance::getSolValuesForOriginalProblem(), ScipParaInstance::getVarIndexRange(), ScipParaInstanceMpi::getVarIndexRange(), SCIP_DECL_HASHKEYVAL(), and ScipParaInstanceMpi::ScipParaInstanceMpi().