Scippy

UG

Ubiquity Generator framework

ScipParaInstance Class Referenceabstract

#include <scipParaInstance.h>

Inheritance diagram for ScipParaInstance:
BbParaInstance BbParaInstance ParaInstance ParaInstance ScipParaInstanceMpi ScipParaInstanceTh

Public Member Functions

 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...
 

Protected Member Functions

void allocateMemoryForOrdinaryConstraints ()
 
void addOrdinaryConstraintName (int c, SCIP_CONS *cons)
 
void setLinearConstraint (SCIP *scip, int c, SCIP_CONS *cons)
 
void createLinearConstraintsInSCIP (SCIP *scip)
 
void setSetppcConstraint (SCIP *scip, int c, SCIP_CONS *cons)
 
void createSetppcConstraintsInSCIP (SCIP *scip)
 
void setLogicorConstraint (SCIP *scip, int c, SCIP_CONS *cons)
 
void createLogicorConstraintsInSCIP (SCIP *scip)
 
void setKnapsackConstraint (SCIP *scip, int c, SCIP_CONS *cons)
 
void createKnapsackConstraintsInSCIP (SCIP *scip)
 
void setVarboundConstraint (SCIP *scip, int c, SCIP_CONS *cons)
 
void createVarboundConstraintsInSCIP (SCIP *scip)
 
void setBoundDisjunctionConstraint (SCIP *scip, int c, SCIP_CONS *cons)
 
void createBoundDisjunctionConstraintInSCIP (SCIP *scip)
 
void setSos1Constraint (SCIP *scip, int c, SCIP_CONS *cons, SCIP_CONS **consSOS1)
 
void createSos1ConstraintsInSCIP (SCIP *scip)
 
void setSos2Constraint (SCIP *scip, int c, SCIP_CONS *cons, SCIP_CONS **consSOS2)
 
void createSos2ConstraintsInSCIP (SCIP *scip)
 
void getActiveVariables (SCIP *scip, SCIP_VAR **vars, SCIP_Real *scalars, int *nvars, SCIP_Real *constant, SCIP_Bool transformed)
 
void collectAggregatedVars (SCIP *scip, int nvars, SCIP_VAR **vars, int *nAggregatedVars, SCIP_VAR ***aggregatedVars, SCIP_HASHTABLE **varAggregated)
 
void setAggregatedConstraint (SCIP *scip, int c, const char *constName, SCIP_VAR **vars, SCIP_Real *vals, int nvars, SCIP_Real lhsAndrhs)
 
void setAggregatedConstrains (SCIP *scip, int nvars, int nAggregatedVars, SCIP_VAR **aggregatedVars)
 
void createAggregatedVarsAndConstrainsInSCIP (SCIP *scip)
 
virtual const char * getFileName ()=0
 
bool addRootNodeCuts (SCIP *scip, ScipDiffParamSet *scipDiffParamSetRoot)
 
virtual const char * getFileName ()=0
 

Protected Attributes

SCIP * orgScip
 
SCIP * paraInstanceScip
 
int lProbName
 
char * probName
 
int nCopies
 
int origObjSense
 
SCIP_Real objScale
 
SCIP_Real objOffset
 
int nVars
 
int varIndexRange
 
SCIP_Real * varLbs
 
SCIP_Real * varUbs
 
SCIP_Real * objCoefs
 
int * varTypes
 
size_t lVarNames
 
char * varNames
 
int * posVarNames
 
int * mapToOriginalIndecies
 
int * mapToSolverLocalIndecies
 
int nConss
 
int lConsNames
 
char * consNames
 
int * posConsNames
 
bool copyIncreasedVariables
 
int nLinearConss
 
int * idxLinearConsNames
 
SCIP_Real * linearLhss
 
SCIP_Real * linearRhss
 
int * nLinearCoefs
 
SCIP_Real ** linearCoefs
 
int ** idxLinearCoefsVars
 
int nSetppcConss
 
int * idxSetppcConsNames
 
int * nIdxSetppcVars
 
int * setppcTypes
 
int ** idxSetppcVars
 
int nLogicorConss
 
int * idxLogicorConsNames
 
int * nIdxLogicorVars
 
int ** idxLogicorVars
 
int nKnapsackConss
 
int * idxKnapsackConsNames
 
SCIP_Longint * capacities
 
int * nLKnapsackCoefs
 
SCIP_Longint ** knapsackCoefs
 
int ** idxKnapsackCoefsVars
 
int nVarboundConss
 
int * idxVarboundConsNames
 
SCIP_Real * varboundLhss
 
SCIP_Real * varboundRhss
 
int * idxVarboundCoefVar1s
 
SCIP_Real * varboundCoef2s
 
int * idxVarboundCoefVar2s
 
int nVarBoundDisjunctionConss
 
int * idxBoundDisjunctionConsNames
 
int * nVarsBoundDisjunction
 
int ** idxVarBoundDisjunction
 
SCIP_BOUNDTYPE ** boundTypesBoundDisjunction
 
SCIP_Real ** boundsBoundDisjunction
 
int nSos1Conss
 
int * idxSos1ConsNames
 
int * nSos1Coefs
 
SCIP_Real ** sos1Coefs
 
int ** idxSos1CoefsVars
 
int nSos2Conss
 
int * idxSos2ConsNames
 
int * nSos2Coefs
 
SCIP_Real ** sos2Coefs
 
int ** idxSos2CoefsVars
 
int nAggregatedConss
 
int lAggregatedVarNames
 
char * aggregatedVarNames
 
int * posAggregatedVarNames
 
int lAggregatedConsNames
 
char * aggregatedConsNames
 
int * posAggregatedConsNames
 
SCIP_Real * aggregatedLhsAndLhss
 
int * nAggregatedCoefs
 
SCIP_Real ** aggregatedCoefs
 
int ** idxAggregatedCoefsVars
 
ScipUserPluginsuserPlugins
 
SCIP * scip
 

Detailed Description

ScipInstance

Definition at line 51 of file scipParaInstance.h.

Constructor & Destructor Documentation

◆ ScipParaInstance() [1/4]

constructor

Definition at line 224 of file scipParaInstance.h.

◆ ScipParaInstance() [2/4]

ScipParaInstance ( SCIP *  scip,
int  method 
)

constractor : only called from ScipInitiator

set objsen

collect SOS constraints in array for later output

count number of each constraint

re-initialize counters for ordinary constraints

initialize length of constraint names area

Definition at line 820 of file scipParaInstance.cpp.

References ScipParaInstance::allocateMemoryForOrdinaryConstraints(), ScipParaInstance::collectAggregatedVars(), ScipParaInstance::consNames, ScipParaInstance::lConsNames, ScipParaInstance::lProbName, ScipParaInstance::lVarNames, ScipParaInstance::nConss, ScipParaInstance::nKnapsackConss, ScipParaInstance::nLinearConss, ScipParaInstance::nLogicorConss, ScipParaInstance::nSetppcConss, ScipParaInstance::nSos1Conss, ScipParaInstance::nSos2Conss, ScipParaInstance::nVarboundConss, ScipParaInstance::nVarBoundDisjunctionConss, ScipParaInstance::nVars, ScipParaInstance::objCoefs, ScipParaInstance::objOffset, ScipParaInstance::objScale, ScipParaInstance::origObjSense, ScipParaInstance::paraInstanceScip, ScipParaInstance::posConsNames, ScipParaInstance::posVarNames, PRESOLVED_INSTANCE, ScipParaInstance::probName, ScipParaInstance::scip, ScipParaInstance::setAggregatedConstrains(), ScipParaInstance::setBoundDisjunctionConstraint(), ScipParaInstance::setKnapsackConstraint(), ScipParaInstance::setLinearConstraint(), ScipParaInstance::setLogicorConstraint(), ScipParaInstance::setSetppcConstraint(), ScipParaInstance::setSos1Constraint(), ScipParaInstance::setSos2Constraint(), ScipParaInstance::setVarboundConstraint(), THROW_LOGICAL_ERROR3, ScipParaInstance::varIndexRange, ScipParaInstance::varLbs, ScipParaInstance::varNames, ScipParaInstance::varTypes, and ScipParaInstance::varUbs.

◆ ~ScipParaInstance() [1/2]

~ScipParaInstance ( )
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 1127 of file scipParaInstance.cpp.

References ScipParaInstance::aggregatedCoefs, ScipParaInstance::aggregatedConsNames, ScipParaInstance::aggregatedLhsAndLhss, ScipParaInstance::aggregatedVarNames, ScipParaInstance::boundsBoundDisjunction, ScipParaInstance::boundTypesBoundDisjunction, ScipParaInstance::capacities, ScipParaInstance::consNames, ScipParaInstance::idxAggregatedCoefsVars, ScipParaInstance::idxBoundDisjunctionConsNames, ScipParaInstance::idxKnapsackCoefsVars, ScipParaInstance::idxKnapsackConsNames, ScipParaInstance::idxLinearCoefsVars, ScipParaInstance::idxLinearConsNames, ScipParaInstance::idxLogicorConsNames, ScipParaInstance::idxLogicorVars, ScipParaInstance::idxSetppcConsNames, ScipParaInstance::idxSetppcVars, ScipParaInstance::idxSos1CoefsVars, ScipParaInstance::idxSos2CoefsVars, ScipParaInstance::idxVarboundCoefVar1s, ScipParaInstance::idxVarboundCoefVar2s, ScipParaInstance::idxVarboundConsNames, ScipParaInstance::idxVarBoundDisjunction, ScipParaInstance::knapsackCoefs, ScipParaInstance::linearCoefs, ScipParaInstance::linearLhss, ScipParaInstance::linearRhss, ScipParaInstance::mapToOriginalIndecies, ScipParaInstance::mapToSolverLocalIndecies, ScipParaInstance::nAggregatedConss, ScipParaInstance::nIdxLogicorVars, ScipParaInstance::nIdxSetppcVars, ScipParaInstance::nKnapsackConss, ScipParaInstance::nLinearCoefs, ScipParaInstance::nLinearConss, ScipParaInstance::nLKnapsackCoefs, ScipParaInstance::nLogicorConss, ScipParaInstance::nSetppcConss, ScipParaInstance::nSos1Coefs, ScipParaInstance::nSos1Conss, ScipParaInstance::nSos2Coefs, ScipParaInstance::nSos2Conss, ScipParaInstance::nVarboundConss, ScipParaInstance::nVarBoundDisjunctionConss, ScipParaInstance::nVarsBoundDisjunction, ScipParaInstance::objCoefs, ScipParaInstance::posAggregatedConsNames, ScipParaInstance::posAggregatedVarNames, ScipParaInstance::posConsNames, ScipParaInstance::posVarNames, ScipParaInstance::probName, ScipParaInstance::setppcTypes, ScipParaInstance::sos1Coefs, ScipParaInstance::sos2Coefs, ScipParaInstance::userPlugins, ScipParaInstance::varboundCoef2s, ScipParaInstance::varLbs, ScipParaInstance::varNames, ScipParaInstance::varTypes, and ScipParaInstance::varUbs.

◆ ScipParaInstance() [3/4]

constructor

Definition at line 69 of file scipParaInstanceTh.h.

◆ ScipParaInstance() [4/4]

ScipParaInstance ( SCIP *  inScip)

Definition at line 75 of file scipParaInstanceTh.h.

◆ ~ScipParaInstance() [2/2]

Member Function Documentation

◆ addOrdinaryConstraintName()

◆ addRootNodeCuts()

bool addRootNodeCuts ( SCIP *  scip,
ScipDiffParamSet scipDiffParamSetRoot 
)
protected

◆ allocateMemoryForOrdinaryConstraints()

void allocateMemoryForOrdinaryConstraints ( )
protected

for linear constraints

for setppc constraints

for logical constraints

for knapsack constraints

for varbound constraints

for bounddisjunction constraints

for SOS1 constraints

for SOS2 constraints

Definition at line 91 of file scipParaInstance.cpp.

References ScipParaInstance::boundsBoundDisjunction, ScipParaInstance::boundTypesBoundDisjunction, ScipParaInstance::capacities, ScipParaInstance::idxBoundDisjunctionConsNames, ScipParaInstance::idxKnapsackCoefsVars, ScipParaInstance::idxKnapsackConsNames, ScipParaInstance::idxLinearCoefsVars, ScipParaInstance::idxLinearConsNames, ScipParaInstance::idxLogicorConsNames, ScipParaInstance::idxLogicorVars, ScipParaInstance::idxSetppcConsNames, ScipParaInstance::idxSetppcVars, ScipParaInstance::idxSos1CoefsVars, ScipParaInstance::idxSos1ConsNames, ScipParaInstance::idxSos2CoefsVars, ScipParaInstance::idxSos2ConsNames, ScipParaInstance::idxVarboundCoefVar1s, ScipParaInstance::idxVarboundCoefVar2s, ScipParaInstance::idxVarboundConsNames, ScipParaInstance::idxVarBoundDisjunction, ScipParaInstance::knapsackCoefs, ScipParaInstance::linearCoefs, ScipParaInstance::linearLhss, ScipParaInstance::linearRhss, ScipParaInstance::nIdxLogicorVars, ScipParaInstance::nIdxSetppcVars, ScipParaInstance::nKnapsackConss, ScipParaInstance::nLinearCoefs, ScipParaInstance::nLinearConss, ScipParaInstance::nLKnapsackCoefs, ScipParaInstance::nLogicorConss, ScipParaInstance::nSetppcConss, ScipParaInstance::nSos1Coefs, ScipParaInstance::nSos1Conss, ScipParaInstance::nSos2Coefs, ScipParaInstance::nSos2Conss, ScipParaInstance::nVarboundConss, ScipParaInstance::nVarBoundDisjunctionConss, ScipParaInstance::nVarsBoundDisjunction, ScipParaInstance::setppcTypes, ScipParaInstance::sos1Coefs, ScipParaInstance::sos2Coefs, ScipParaInstance::varboundCoef2s, ScipParaInstance::varboundLhss, and ScipParaInstance::varboundRhss.

Referenced by ScipParaInstance::ScipParaInstance().

◆ collectAggregatedVars()

void collectAggregatedVars ( SCIP *  scip,
int  nvars,
SCIP_VAR **  vars,
int *  nAggregatedVars,
SCIP_VAR ***  aggregatedVars,
SCIP_HASHTABLE **  varAggregated 
)
protected
Parameters
scipSCIP data structure
nvarsnumber of mutable variables in the problem
varsvariable array
nAggregatedVarsnumber of aggregated variables on output
aggregatedVarsarray storing the aggregated variables on output
varAggregatedhashtable for checking duplicates

Definition at line 646 of file scipParaInstance.cpp.

Referenced by ScipParaInstance::ScipParaInstance().

◆ convertToExternalValue() [1/2]

double convertToExternalValue ( double  internalValue)

convert an internal value to external value double convertToExternalValue(double internalValue) { return ( (internalValue + objOffset) * objScale * origObjSense ); }

convert an external value to internal value double convertToInternalValue(double exteranlValue) { return ( ( exteranlValue / ( objScale * origObjSense ) ) - objOffset ); } convert an internal value to external value

Definition at line 274 of file scipParaInstance.h.

References ScipParaInstance::orgScip, and ScipParaInstance::paraInstanceScip.

Referenced by ScipParaInitiator::convertToExternalValue(), ScipParaInitiator::getAbsgap(), ScipParaInitiator::getGap(), and ScipParaInitiator::outputFinalSolverStatistics().

◆ convertToExternalValue() [2/2]

double convertToExternalValue ( double  internalValue)

convert an internal value to external value

Definition at line 106 of file scipParaInstanceTh.h.

References ScipParaInstance::orgScip, and ScipParaInstance::scip.

◆ convertToInternalValue() [1/2]

double convertToInternalValue ( double  externalValue)

convert an external value to internal value

Definition at line 287 of file scipParaInstance.h.

References ScipParaInstance::orgScip, and ScipParaInstance::paraInstanceScip.

Referenced by ScipParaInitiator::convertToInternalValue(), ScipParaInitiator::init(), and ScipParaInitiator::reInit().

◆ convertToInternalValue() [2/2]

double convertToInternalValue ( double  externalValue)

convert an external value to internal value

Definition at line 119 of file scipParaInstanceTh.h.

References ScipParaInstance::orgScip, and ScipParaInstance::scip.

◆ copyIncrasedVariables() [1/2]

void copyIncrasedVariables ( )

Definition at line 369 of file scipParaInstanceTh.h.

References ScipParaInstance::copyIncreasedVariables.

◆ copyIncrasedVariables() [2/2]

virtual void copyIncrasedVariables ( )
pure virtual

Implemented in ScipParaInstanceMpi.

◆ copyScipEnvironment()

void copyScipEnvironment ( SCIP **  scip)

create presolved problem instance that is solved by ParaSCIP form scip environment in this object

Definition at line 57 of file scipParaInstanceTh.cpp.

References ScipParaInstance::scip.

Referenced by ScipParaInstanceTh::bcast().

◆ createAggregatedVarsAndConstrainsInSCIP()

◆ createBoundDisjunctionConstraintInSCIP()

◆ createKnapsackConstraintsInSCIP()

◆ createLinearConstraintsInSCIP()

◆ createLogicorConstraintsInSCIP()

◆ createProblem() [1/2]

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 1361 of file scipParaInstance.cpp.

References ScipParaInstance::addRootNodeCuts(), ScipParaInstance::copyIncreasedVariables, ScipParaInstance::createAggregatedVarsAndConstrainsInSCIP(), ScipParaInstance::createBoundDisjunctionConstraintInSCIP(), ScipParaInstance::createKnapsackConstraintsInSCIP(), ScipParaInstance::createLinearConstraintsInSCIP(), ScipParaInstance::createLogicorConstraintsInSCIP(), ScipParaInstance::createSetppcConstraintsInSCIP(), ScipParaInstance::createSos1ConstraintsInSCIP(), ScipParaInstance::createSos2ConstraintsInSCIP(), ScipParaInstance::createVarboundConstraintsInSCIP(), ScipParaInstance::getFileName(), ScipParaInstance::includeUserPlugins(), ScipParaInstance::mapToOriginalIndecies, ScipParaInstance::mapToSolverLocalIndecies, ScipParaInstance::nAggregatedConss, ScipParaInstance::nCopies, ScipParaInstance::nKnapsackConss, ScipParaInstance::nLinearConss, ScipParaInstance::nLogicorConss, ScipParaInstance::nSetppcConss, ScipParaInstance::nSos1Conss, ScipParaInstance::nSos2Conss, ScipParaInstance::nVarboundConss, ScipParaInstance::nVarBoundDisjunctionConss, ScipParaInstance::nVars, ScipParaInstance::objCoefs, ScipParaInstance::posVarNames, PRESOLVED_INSTANCE, ScipParaInstance::probName, ScipParaInstance::scip, ScipDiffParamSet::setParametersInScip(), THROW_LOGICAL_ERROR1, ScipParaInstance::varIndexRange, ScipParaInstance::varLbs, ScipParaInstance::varNames, ScipParaInstance::varTypes, and ScipParaInstance::varUbs.

Referenced by ScipParaSolver::reinitialize(), ScipParaObjCommPointHdlr::ScipParaObjCommPointHdlr(), and ScipParaSolver::ScipParaSolver().

◆ createProblem() [2/2]

void createProblem ( SCIP *  scip,
int  method,
bool  noPreprocessingInLC,
bool  usetRootNodeCuts,
ScipDiffParamSet scipDiffParamSetRoot,
ScipDiffParamSet scipDiffParamSet,
char *  settingsNameLC,
char *  isolname 
)

create presolved problem instance that is solved by ParaSCIP

◆ createSetppcConstraintsInSCIP()

◆ createSos1ConstraintsInSCIP()

◆ createSos2ConstraintsInSCIP()

◆ createVarboundConstraintsInSCIP()

◆ extractOrigProbIndexMap() [1/2]

int * extractOrigProbIndexMap ( )

◆ extractOrigProbIndexMap() [2/2]

int * extractOrigProbIndexMap ( )

Definition at line 327 of file scipParaInstanceTh.h.

References ScipParaInstance::mapToOriginalIndecies.

◆ extractSolverLocalIndexMap() [1/2]

int * extractSolverLocalIndexMap ( )

◆ extractSolverLocalIndexMap() [2/2]

int * extractSolverLocalIndexMap ( )

Definition at line 335 of file scipParaInstanceTh.h.

References ScipParaInstance::mapToSolverLocalIndecies.

◆ freeMemory()

◆ getActiveVariables()

void getActiveVariables ( SCIP *  scip,
SCIP_VAR **  vars,
SCIP_Real *  scalars,
int *  nvars,
SCIP_Real *  constant,
SCIP_Bool  transformed 
)
protected
Parameters
scipSCIP data structure
varsvars array to get active variables for
scalarsscalars a_1, ..., a_n in linear sum a_1*x_1 + ... + a_n*x_n + c
nvarspointer to number of variables and values in vars and vals array
constantpointer to constant c in linear sum a_1*x_1 + ... + a_n*x_n + c
transformedtransformed constraint?

Definition at line 603 of file scipParaInstance.cpp.

References ScipParaInstance::scip.

Referenced by ScipParaInstance::setAggregatedConstrains().

◆ getConsName() [1/2]

const char * getConsName ( int  i)

◆ getConsName() [2/2]

const char * getConsName ( int  i)

Definition at line 303 of file scipParaInstanceTh.h.

References ScipParaInstance::scip.

◆ getFileName() [1/2]

virtual const char * getFileName ( )
protectedpure virtual

◆ getFileName() [2/2]

virtual const char * getFileName ( )
protectedpure virtual

◆ getIdxLinearCoefVar() [1/2]

int getIdxLinearCoefVar ( int  i,
int  j 
)

Definition at line 383 of file scipParaInstance.h.

References ScipParaInstance::idxLinearCoefsVars.

◆ getIdxLinearCoefVar() [2/2]

int getIdxLinearCoefVar ( int  i,
int  j 
)

Definition at line 290 of file scipParaInstanceTh.h.

References ScipParaInstance::scip.

◆ getLhsLinear() [1/2]

SCIP_Real getLhsLinear ( int  i)

Definition at line 380 of file scipParaInstance.h.

References ScipParaInstance::linearLhss.

◆ getLhsLinear() [2/2]

SCIP_Real getLhsLinear ( int  i)

Definition at line 254 of file scipParaInstanceTh.h.

References ScipParaInstance::scip, and THROW_LOGICAL_ERROR2.

◆ getLinearCoefs() [1/2]

SCIP_Real * getLinearCoefs ( int  i)

Definition at line 387 of file scipParaInstance.h.

References ScipParaInstance::linearCoefs.

◆ getLinearCoefs() [2/2]

SCIP_Real * getLinearCoefs ( int  i)

Definition at line 297 of file scipParaInstanceTh.h.

References ScipParaInstance::scip.

◆ getNConss() [1/2]

int getNConss ( )

Definition at line 379 of file scipParaInstance.h.

References ScipParaInstance::nLinearConss.

◆ getNConss() [2/2]

int getNConss ( )

Definition at line 249 of file scipParaInstanceTh.h.

References ScipParaInstance::scip.

◆ getNVars() [1/2]

◆ getNVars() [2/2]

int getNVars ( )

Definition at line 220 of file scipParaInstanceTh.h.

References ScipParaInstance::nVars.

◆ getNVarsLinear() [1/2]

int getNVarsLinear ( int  i)

Definition at line 382 of file scipParaInstance.h.

References ScipParaInstance::nLinearCoefs.

◆ getNVarsLinear() [2/2]

int getNVarsLinear ( int  i)

Definition at line 278 of file scipParaInstanceTh.h.

References ScipParaInstance::scip, and THROW_LOGICAL_ERROR2.

◆ getObjCoef() [1/2]

SCIP_Real getObjCoef ( int  i)

Definition at line 375 of file scipParaInstance.h.

References ScipParaInstance::objCoefs.

◆ getObjCoef() [2/2]

SCIP_Real getObjCoef ( int  i)

Definition at line 237 of file scipParaInstanceTh.h.

References ScipParaInstance::scip.

◆ getOrigObjSense() [1/2]

int getOrigObjSense ( )

Definition at line 434 of file scipParaInstance.h.

References ScipParaInstance::origObjSense.

◆ getOrigObjSense() [2/2]

int getOrigObjSense ( )

Definition at line 359 of file scipParaInstanceTh.h.

References ScipParaInstance::scip.

◆ getOrigProbIndex() [1/2]

int getOrigProbIndex ( int  index)

◆ getOrigProbIndex() [2/2]

int getOrigProbIndex ( int  index)

Definition at line 321 of file scipParaInstanceTh.h.

References ScipParaInstance::mapToOriginalIndecies.

◆ getParaInstanceScip() [1/2]

◆ getParaInstanceScip() [2/2]

SCIP * getParaInstanceScip ( )

Definition at line 353 of file scipParaInstanceTh.h.

References ScipParaInstance::orgScip, and ScipParaInstance::scip.

◆ getProbName() [1/2]

const char * getProbName ( )
virtual

◆ getProbName() [2/2]

const char * getProbName ( )
virtual

Implements ParaInstance.

Definition at line 208 of file scipParaInstanceTh.h.

References ScipParaInstance::orgScip, and ScipParaInstance::scip.

◆ getRhsLinear() [1/2]

SCIP_Real getRhsLinear ( int  i)

Definition at line 381 of file scipParaInstance.h.

References ScipParaInstance::linearRhss.

◆ getRhsLinear() [2/2]

SCIP_Real getRhsLinear ( int  i)

Definition at line 266 of file scipParaInstanceTh.h.

References ScipParaInstance::scip, and THROW_LOGICAL_ERROR2.

◆ getScip() [1/2]

SCIP * getScip ( )

◆ getScip() [2/2]

SCIP * getScip ( )

Definition at line 182 of file scipParaInstanceTh.h.

References ScipParaInstance::scip.

◆ getSolValuesForOriginalProblem() [1/2]

void getSolValuesForOriginalProblem ( ScipParaSolution sol,
SCIP_Real *  vals 
)

◆ getSolValuesForOriginalProblem() [2/2]

void getSolValuesForOriginalProblem ( ScipParaSolution sol,
SCIP_Real *  vals 
)

◆ getVarIndexRange() [1/2]

int getVarIndexRange ( )
virtual

◆ getVarIndexRange() [2/2]

int getVarIndexRange ( )
virtual

Implements BbParaInstance.

Definition at line 221 of file scipParaInstanceTh.h.

References ScipParaInstance::varIndexRange.

◆ getVarLb() [1/2]

SCIP_Real getVarLb ( int  i)

◆ getVarLb() [2/2]

SCIP_Real getVarLb ( int  i)

Definition at line 222 of file scipParaInstanceTh.h.

References ScipParaInstance::scip.

◆ getVarName() [1/2]

const char * getVarName ( int  i)

◆ getVarName() [2/2]

const char * getVarName ( int  i)

Definition at line 243 of file scipParaInstanceTh.h.

References ScipParaInstance::scip.

◆ getVarType() [1/2]

int getVarType ( int  i)

Definition at line 376 of file scipParaInstance.h.

References ScipParaInstance::varTypes.

Referenced by ScipParaDiffSubproblem::getFixedVariables().

◆ getVarType() [2/2]

int getVarType ( int  i)

Definition at line 232 of file scipParaInstanceTh.h.

References ScipParaInstance::scip.

◆ getVarUb() [1/2]

SCIP_Real getVarUb ( int  i)

◆ getVarUb() [2/2]

SCIP_Real getVarUb ( int  i)

Definition at line 227 of file scipParaInstanceTh.h.

References ScipParaInstance::scip.

◆ includeUserPlugins() [1/2]

void includeUserPlugins ( SCIP *  inScip)

include user plugins

Definition at line 402 of file scipParaInstance.h.

References ScipParaInstance::userPlugins.

Referenced by ScipParaInstance::createProblem().

◆ includeUserPlugins() [2/2]

void includeUserPlugins ( SCIP *  inScip)

include user plugins

should not be called

Definition at line 313 of file scipParaInstanceTh.h.

◆ isCopyIncreasedVariables() [1/2]

bool isCopyIncreasedVariables ( )

Definition at line 364 of file scipParaInstanceTh.h.

References ScipParaInstance::copyIncreasedVariables.

◆ isCopyIncreasedVariables() [2/2]

virtual bool isCopyIncreasedVariables ( )
pure virtual

Implemented in ScipParaInstanceMpi.

◆ isOriginalIndeciesMap() [1/2]

◆ isOriginalIndeciesMap() [2/2]

bool isOriginalIndeciesMap ( )

Definition at line 317 of file scipParaInstanceTh.h.

References ScipParaInstance::mapToOriginalIndecies.

◆ isSolverLocalIndeciesMap() [1/2]

bool isSolverLocalIndeciesMap ( )

Definition at line 359 of file scipParaInstance.h.

References ScipParaInstance::mapToSolverLocalIndecies.

◆ isSolverLocalIndeciesMap() [2/2]

bool isSolverLocalIndeciesMap ( )

Definition at line 319 of file scipParaInstanceTh.h.

References ScipParaInstance::mapToSolverLocalIndecies.

◆ setAggregatedConstrains()

void setAggregatedConstrains ( SCIP *  scip,
int  nvars,
int  nAggregatedVars,
SCIP_VAR **  aggregatedVars 
)
protected
Parameters
scipSCIP data structure
nvarsnumber of mutable variables in the problem
nAggregatedVarsnumber of aggregated variables
aggregatedVarsarray storing the aggregated variables

Definition at line 715 of file scipParaInstance.cpp.

References ScipParaInstance::aggregatedConsNames, ScipParaInstance::aggregatedVarNames, ScipParaInstance::getActiveVariables(), ScipParaInstance::lAggregatedConsNames, ScipParaInstance::lAggregatedVarNames, UG::LpMaxNamelen, ScipParaInstance::nAggregatedConss, ScipParaInstance::scip, and ScipParaInstance::setAggregatedConstraint().

Referenced by ScipParaInstance::ScipParaInstance().

◆ setAggregatedConstraint()

void setAggregatedConstraint ( SCIP *  scip,
int  c,
const char *  constName,
SCIP_VAR **  vars,
SCIP_Real *  vals,
int  nvars,
SCIP_Real  lhsAndrhs 
)
protected

◆ setBoundDisjunctionConstraint()

◆ setFileName() [1/2]

virtual void setFileName ( const char *  file)
pure virtual

◆ setFileName() [2/2]

virtual void setFileName ( const char *  fileName)
pure virtual

◆ setKnapsackConstraint()

◆ setLinearConstraint()

◆ setLogicorConstraint()

◆ setSetppcConstraint()

◆ setSos1Constraint()

◆ setSos2Constraint()

◆ setUserPlugins() [1/2]

void setUserPlugins ( ScipUserPlugins inUi)

set user plugins

Definition at line 399 of file scipParaInstance.h.

References ScipParaInstance::userPlugins.

Referenced by setUserPlugins().

◆ setUserPlugins() [2/2]

void setUserPlugins ( ScipUserPlugins inUi)

set user plugins

maybe called, no need to do anything

Definition at line 310 of file scipParaInstanceTh.h.

◆ setVarboundConstraint()

◆ toString() [1/2]

const std::string toString ( )
virtual

stringfy ParaCalculationState

stringfy ScipParaInstance: for debug

Implements ParaInstance.

Definition at line 1849 of file scipParaInstance.cpp.

References ScipParaInstance::aggregatedCoefs, ScipParaInstance::aggregatedConsNames, ScipParaInstance::aggregatedLhsAndLhss, ScipParaInstance::aggregatedVarNames, ScipParaInstance::capacities, ScipParaInstance::consNames, ScipParaInstance::idxAggregatedCoefsVars, ScipParaInstance::idxKnapsackCoefsVars, ScipParaInstance::idxKnapsackConsNames, ScipParaInstance::idxLinearCoefsVars, ScipParaInstance::idxLinearConsNames, ScipParaInstance::idxLogicorConsNames, ScipParaInstance::idxLogicorVars, ScipParaInstance::idxSetppcConsNames, ScipParaInstance::idxSetppcVars, ScipParaInstance::idxSos1CoefsVars, ScipParaInstance::idxSos1ConsNames, ScipParaInstance::idxSos2CoefsVars, ScipParaInstance::idxSos2ConsNames, ScipParaInstance::idxVarboundCoefVar1s, ScipParaInstance::idxVarboundCoefVar2s, ScipParaInstance::idxVarboundConsNames, ScipParaInstance::knapsackCoefs, ScipParaInstance::lAggregatedConsNames, ScipParaInstance::lAggregatedVarNames, ScipParaInstance::lConsNames, ScipParaInstance::linearCoefs, ScipParaInstance::linearLhss, ScipParaInstance::linearRhss, ScipParaInstance::lProbName, ScipParaInstance::lVarNames, ScipParaInstance::mapToOriginalIndecies, ScipParaInstance::mapToSolverLocalIndecies, ScipParaInstance::nAggregatedCoefs, ScipParaInstance::nAggregatedConss, ScipParaInstance::nConss, ScipParaInstance::nIdxLogicorVars, ScipParaInstance::nIdxSetppcVars, ScipParaInstance::nKnapsackConss, ScipParaInstance::nLinearCoefs, ScipParaInstance::nLinearConss, ScipParaInstance::nLKnapsackCoefs, ScipParaInstance::nLogicorConss, ScipParaInstance::nSetppcConss, ScipParaInstance::nSos1Coefs, ScipParaInstance::nSos1Conss, ScipParaInstance::nSos2Coefs, ScipParaInstance::nSos2Conss, ScipParaInstance::nVarboundConss, ScipParaInstance::nVars, ScipParaInstance::objCoefs, ScipParaInstance::objOffset, ScipParaInstance::objScale, ScipParaInstance::origObjSense, ScipParaInstance::posAggregatedConsNames, ScipParaInstance::posAggregatedVarNames, ScipParaInstance::posConsNames, ScipParaInstance::posVarNames, ScipParaInstance::probName, ScipParaInstance::setppcTypes, ScipParaInstance::sos1Coefs, ScipParaInstance::sos2Coefs, ScipParaInstance::varboundCoef2s, ScipParaInstance::varboundLhss, ScipParaInstance::varboundRhss, ScipParaInstance::varLbs, ScipParaInstance::varNames, ScipParaInstance::varTypes, and ScipParaInstance::varUbs.

◆ toString() [2/2]

const std::string toString ( )
virtual

stringfy ParaCalculationState

Implements ParaInstance.

Definition at line 201 of file scipParaInstanceTh.h.

Member Data Documentation

◆ aggregatedCoefs

◆ aggregatedConsNames

◆ aggregatedLhsAndLhss

◆ aggregatedVarNames

◆ boundsBoundDisjunction

◆ boundTypesBoundDisjunction

◆ capacities

◆ consNames

◆ copyIncreasedVariables

◆ idxAggregatedCoefsVars

◆ idxBoundDisjunctionConsNames

◆ idxKnapsackCoefsVars

◆ idxKnapsackConsNames

◆ idxLinearCoefsVars

◆ idxLinearConsNames

◆ idxLogicorConsNames

◆ idxLogicorVars

◆ idxSetppcConsNames

◆ idxSetppcVars

◆ idxSos1CoefsVars

◆ idxSos1ConsNames

◆ idxSos2CoefsVars

◆ idxSos2ConsNames

◆ idxVarboundCoefVar1s

◆ idxVarboundCoefVar2s

◆ idxVarboundConsNames

◆ idxVarBoundDisjunction

◆ knapsackCoefs

◆ lAggregatedConsNames

int lAggregatedConsNames
protected

◆ lAggregatedVarNames

◆ lConsNames

◆ linearCoefs

◆ linearLhss

◆ linearRhss

◆ lProbName

◆ lVarNames

◆ mapToOriginalIndecies

int * mapToOriginalIndecies
protected

array of indices to map to original problem's probindices NOTE: these indices are not transferred. Only valid for Initiator object

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 72 of file scipParaInstance.h.

Referenced by ScipParaInstanceTh::bcast(), ScipParaInstance::createProblem(), ScipParaInstance::extractOrigProbIndexMap(), ScipParaInstance::getOrigProbIndex(), ScipParaInstance::getSolValuesForOriginalProblem(), ScipParaInstance::isOriginalIndeciesMap(), ScipParaInstance::toString(), and ScipParaInstance::~ScipParaInstance().

◆ mapToSolverLocalIndecies

◆ nAggregatedCoefs

◆ nAggregatedConss

◆ nConss

◆ nCopies

int nCopies
protected

the number of copies in Solver side

Definition at line 58 of file scipParaInstance.h.

Referenced by ScipParaInstanceMpi::createDatatype1(), ScipParaInstance::createProblem(), and ScipParaInstanceMpi::ScipParaInstanceMpi().

◆ nIdxLogicorVars

◆ nIdxSetppcVars

◆ nKnapsackConss

◆ nLinearCoefs

◆ nLinearConss

◆ nLKnapsackCoefs

◆ nLogicorConss

◆ nSetppcConss

◆ nSos1Coefs

◆ nSos1Conss

◆ nSos2Coefs

◆ nSos2Conss

◆ nVarboundConss

◆ nVarBoundDisjunctionConss

◆ nVars

◆ nVarsBoundDisjunction

◆ objCoefs

◆ objOffset

SCIP_Real objOffset
protected

objective offset from bound shifting and fixing

Definition at line 62 of file scipParaInstance.h.

Referenced by ScipParaInstanceMpi::createDatatype1(), ScipParaInstance::ScipParaInstance(), and ScipParaInstance::toString().

◆ objScale

SCIP_Real objScale
protected

Do not set objScale and objOffset in SCIP scalar applied to objective function; original objective value is extobj = objsense * objscale * (intobj + objoffset)

Definition at line 61 of file scipParaInstance.h.

Referenced by ScipParaInstanceMpi::createDatatype1(), ScipParaInstance::ScipParaInstance(), and ScipParaInstance::toString().

◆ orgScip

◆ origObjSense

int origObjSense
protected

objective sense : SCIP_OBJSENSE_MAXIMIZE = -1, SCIP_OBJSENSE_MINIMIZE = +1

Definition at line 59 of file scipParaInstance.h.

Referenced by ScipParaInstanceMpi::createDatatype1(), ScipParaInstance::getOrigObjSense(), ScipParaInstance::ScipParaInstance(), and ScipParaInstance::toString().

◆ paraInstanceScip

◆ posAggregatedConsNames

◆ posAggregatedVarNames

◆ posConsNames

◆ posVarNames

◆ probName

◆ scip

SCIP* scip
protected

Definition at line 56 of file scipParaInstanceTh.h.

Referenced by ScipParaInstanceTh::bcast(), ScipParaInstance::convertToExternalValue(), ScipParaInstance::convertToInternalValue(), ScipParaInstance::copyScipEnvironment(), ScipParaInstance::createAggregatedVarsAndConstrainsInSCIP(), ScipParaInstance::createBoundDisjunctionConstraintInSCIP(), ScipParaInstance::createKnapsackConstraintsInSCIP(), ScipParaInstance::createLinearConstraintsInSCIP(), ScipParaInstance::createLogicorConstraintsInSCIP(), ScipParaInstance::createProblem(), ScipParaInstance::createSetppcConstraintsInSCIP(), ScipParaInstance::createSos1ConstraintsInSCIP(), ScipParaInstance::createSos2ConstraintsInSCIP(), ScipParaInstance::createVarboundConstraintsInSCIP(), ScipParaInstance::getActiveVariables(), ScipParaInstance::getConsName(), ScipParaInstance::getIdxLinearCoefVar(), ScipParaInstance::getLhsLinear(), ScipParaInstance::getLinearCoefs(), ScipParaInstance::getNConss(), ScipParaInstance::getNVarsLinear(), ScipParaInstance::getObjCoef(), ScipParaInstance::getOrigObjSense(), ScipParaInstance::getParaInstanceScip(), ScipParaInstance::getProbName(), ScipParaInstance::getRhsLinear(), ScipParaInstance::getScip(), ScipParaInstance::getSolValuesForOriginalProblem(), ScipParaInstance::getVarLb(), ScipParaInstance::getVarName(), ScipParaInstance::getVarType(), ScipParaInstance::getVarUb(), ScipParaInstance::ScipParaInstance(), ScipParaInstanceMpi::ScipParaInstanceMpi(), ScipParaInstanceTh::ScipParaInstanceTh(), ScipParaInstance::setAggregatedConstrains(), ScipParaInstance::setBoundDisjunctionConstraint(), ScipParaInstance::setKnapsackConstraint(), ScipParaInstance::setLinearConstraint(), ScipParaInstance::setLogicorConstraint(), ScipParaInstance::setSetppcConstraint(), ScipParaInstance::setSos1Constraint(), ScipParaInstance::setSos2Constraint(), ScipParaInstance::setVarboundConstraint(), and ScipParaInstance::~ScipParaInstance().

◆ setppcTypes

◆ sos1Coefs

◆ sos2Coefs

◆ userPlugins

◆ varboundCoef2s

◆ varboundLhss

◆ varboundRhss

◆ varIndexRange

◆ varLbs

◆ varNames

◆ varTypes

◆ varUbs