#include <scipParaInstanceTh.h>
Public Member Functions | |
| ScipParaInstanceTh () | |
| ScipParaInstanceTh (SCIP *inScip, int method) | |
| ~ScipParaInstanceTh () | |
| int | bcast (UG::ParaComm *comm, int rank, int method) |
| void | setFileName (const char *file) |
Public Member Functions inherited from ScipParaInstance | |
| ScipParaInstance () | |
| ScipParaInstance (SCIP *scip, int method) | |
| virtual | ~ScipParaInstance () |
| double | convertToExternalValue (double internalValue) |
| double | convertToInternalValue (double externalValue) |
| void | getSolValuesForOriginalProblem (ScipParaSolution *sol, SCIP_Real *vals) |
| void | createProblem (SCIP *scip, int method, bool noPreprocessingInLC, bool usetRootNodeCuts, ScipDiffParamSet *scipDiffParamSetRoot, ScipDiffParamSet *scipDiffParamSet, char *settingsNameLC, char *isolname) |
| const std::string | toString () |
| bool | isOriginalIndeciesMap () |
| bool | isSolverLocalIndeciesMap () |
| int | getOrigProbIndex (int index) |
| const char * | getProbName () |
| void | freeMemory () |
| int | getNVars () |
| int | getVarIndexRange () |
| SCIP_Real | getVarLb (int i) |
| SCIP_Real | getVarUb (int i) |
| SCIP_Real | getObjCoef (int i) |
| int | getVarType (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) |
| SCIP * | getScip () |
| void | setUserPlugins (ScipUserPlugins *inUi) |
| void | includeUserPlugins (SCIP *inScip) |
| virtual void | setFileName (const char *fileName)=0 |
| int * | extractOrigProbIndexMap () |
| int * | extractSolverLocalIndexMap () |
| SCIP * | getParaInstanceScip () |
| int | getOrigObjSense () |
| virtual bool | isCopyIncreasedVariables ()=0 |
| virtual void | copyIncrasedVariables ()=0 |
| 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... | |
| virtual int | getVarIndexRange ()=0 |
| get variable index range TODO: this function should be in inherited class More... | |
Public Member Functions inherited from ParaInstance | |
| ParaInstance () | |
| DO NOT HAVE DATA MEMBER!! More... | |
| virtual | ~ParaInstance () |
| destructor More... | |
| virtual const char * | getProbName ()=0 |
| get problem name More... | |
| virtual int | bcast (ParaComm *comm, int rank, int method)=0 |
| broadcast function to all solvers More... | |
| virtual const std::string | toString ()=0 |
| Stringfy this object. More... | |
Private Member Functions | |
| const char * | getFileName () |
ScipInstanceTh
Definition at line 382 of file scipParaInstanceTh.h.
constructor
Definition at line 391 of file scipParaInstanceTh.h.
| ScipParaInstanceTh | ( | SCIP * | inScip, |
| int | method | ||
| ) |
constructor : only called from ScipInitiator
Definition at line 578 of file scipParaInstanceTh.cpp.
References PRESOLVED_INSTANCE, and ScipParaInstance::scip.
| ~ScipParaInstanceTh | ( | ) |
destractor
Definition at line 403 of file scipParaInstanceTh.h.
|
virtual |
broadcasts instance to all solvers
mapToOriginalIndecies = new int[n]; mapToOriginalIndecies = new int[SCIPgetNTotalVars(tempScip)]; // need to allocate enough for SCIPvarGetIndex(copyvar) for( int i = 0; i < SCIPgetNTotalVars(tempScip); i++ ) { mapToOriginalIndecies[i] = -1; } SCIP_VAR **tempVars = SCIPgetVars(tempScip); for( int i = 0; i < n; i++ ) { mapToOriginalIndecies[i] = SCIPvarGetIndex(tempVars[i]); mapToOriginalIndecies[SCIPvarGetIndex(tempVars[i])] = i; }
SCIP_CALL_ABORT( SCIPtransformProb(scip)); orgScip = scip; nVars = n; varIndexRange = SCIPgetNTotalVars(tempScip); scip = tempScip;
if( SCIPgetNConss(scip) > 0 ) { SCIPhashmapFree(&conssmap); } if( SCIPgetNVars(scip) > 0 ) { SCIPhashmapFree(&varmap); } SCIP_CALL_ABORT( SCIPtransformProb(scip)); std::cout << "** ParaScipInstance is copied twice. **" << std::endl;
Implements ParaInstance.
Definition at line 161 of file scipParaInstanceTh.cpp.
References comm, ScipParaInstance::copyIncreasedVariables, ScipParaInstance::copyScipEnvironment(), cv, cv_m, DEF_PARA_COMM, ScipParaInstance::mapToOriginalIndecies, ScipParaInstance::mapToSolverLocalIndecies, nInitSolvers, ScipParaInstance::nVars, PARA_COMM_CALL, UG::ParaBYTE, UG::ParaInstanceType, ScipParaInstance::scip, UG::TagParaInstance, and ScipParaInstance::varIndexRange.
|
privatevirtual |
Implements ScipParaInstance.
Definition at line 384 of file scipParaInstanceTh.h.
|
virtual |
Implements ScipParaInstance.
Definition at line 411 of file scipParaInstanceTh.h.