Scippy

UG

Ubiquity Generator framework

ScipParaInstance Class Referenceabstract

#include <scipParaInstanceTh.h>

+ Inheritance diagram for ScipParaInstance:

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
 

Detailed Description

Definition at line 53 of file scipParaInstanceTh.h.

Constructor & Destructor Documentation

◆ ScipParaInstance() [1/2]

constructor

Definition at line 69 of file scipParaInstanceTh.h.

Referenced by SCIP_DECL_HASHKEYVAL().

◆ ScipParaInstance() [2/2]

ScipParaInstance ( SCIP *  inScip)

Definition at line 75 of file scipParaInstanceTh.h.

◆ ~ScipParaInstance()

~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 82 of file scipParaInstanceTh.h.

References ScipParaInstance::mapToOriginalIndecies, and ScipParaInstance::mapToSolverLocalIndecies.

Referenced by SCIP_DECL_HASHKEYVAL().

Member Function Documentation

◆ convertToExternalValue()

double convertToExternalValue ( double  internalValue)

convert an internal value to external value

Definition at line 106 of file scipParaInstanceTh.h.

Referenced by ScipParaInitiator::convertToExternalValue().

◆ convertToInternalValue()

double convertToInternalValue ( double  externalValue)

convert an external value to internal value

Definition at line 119 of file scipParaInstanceTh.h.

Referenced by ScipParaInitiator::convertToInternalValue().

◆ copyIncrasedVariables()

void copyIncrasedVariables ( )

Definition at line 369 of file scipParaInstanceTh.h.

◆ copyScipEnvironment()

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

◆ createProblem()

◆ extractOrigProbIndexMap()

int* extractOrigProbIndexMap ( )

◆ extractSolverLocalIndexMap()

int* extractSolverLocalIndexMap ( )

◆ getConsName()

const char* getConsName ( int  i)

Definition at line 303 of file scipParaInstanceTh.h.

◆ getFileName()

virtual const char* getFileName ( )
protectedpure virtual

◆ getIdxLinearCoefVar()

int getIdxLinearCoefVar ( int  i,
int  j 
)

Definition at line 290 of file scipParaInstanceTh.h.

◆ getLhsLinear()

SCIP_Real getLhsLinear ( int  i)

Definition at line 254 of file scipParaInstanceTh.h.

References THROW_LOGICAL_ERROR2.

◆ getLinearCoefs()

SCIP_Real* getLinearCoefs ( int  i)

Definition at line 297 of file scipParaInstanceTh.h.

◆ getNConss()

int getNConss ( )

Definition at line 249 of file scipParaInstanceTh.h.

◆ getNVars()

int getNVars ( )

Definition at line 220 of file scipParaInstanceTh.h.

References ScipParaInstance::nVars.

Referenced by ScipParaSolver::saveOrgProblemBounds().

◆ getNVarsLinear()

int getNVarsLinear ( int  i)

Definition at line 278 of file scipParaInstanceTh.h.

References THROW_LOGICAL_ERROR2.

◆ getObjCoef()

SCIP_Real getObjCoef ( int  i)

Definition at line 237 of file scipParaInstanceTh.h.

◆ getOrigObjSense()

int getOrigObjSense ( )

Definition at line 359 of file scipParaInstanceTh.h.

◆ getOrigProbIndex()

int getOrigProbIndex ( int  index)

◆ getParaInstanceScip()

◆ getProbName()

const char* getProbName ( )
virtual

Implements ParaInstance.

Definition at line 208 of file scipParaInstanceTh.h.

◆ getRhsLinear()

SCIP_Real getRhsLinear ( int  i)

Definition at line 266 of file scipParaInstanceTh.h.

References THROW_LOGICAL_ERROR2.

◆ getScip()

◆ getSolValuesForOriginalProblem()

void getSolValuesForOriginalProblem ( ScipParaSolution sol,
SCIP_Real *  vals 
)

◆ getVarIndexRange()

int getVarIndexRange ( )
virtual

Implements BbParaInstance.

Definition at line 221 of file scipParaInstanceTh.h.

References ScipParaInstance::varIndexRange.

Referenced by ScipParaSolver::saveOrgProblemBounds().

◆ getVarLb()

SCIP_Real getVarLb ( int  i)

◆ getVarName()

const char* getVarName ( int  i)

Definition at line 243 of file scipParaInstanceTh.h.

◆ getVarType()

int getVarType ( int  i)

Definition at line 232 of file scipParaInstanceTh.h.

Referenced by ScipParaDiffSubproblem::getFixedVariables().

◆ getVarUb()

SCIP_Real getVarUb ( int  i)

◆ includeUserPlugins()

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

◆ isCopyIncreasedVariables()

bool isCopyIncreasedVariables ( )

Definition at line 364 of file scipParaInstanceTh.h.

References ScipParaInstance::copyIncreasedVariables.

◆ isOriginalIndeciesMap()

◆ isSolverLocalIndeciesMap()

bool isSolverLocalIndeciesMap ( )

Definition at line 319 of file scipParaInstanceTh.h.

◆ setFileName()

virtual void setFileName ( const char *  file)
pure virtual

◆ setUserPlugins()

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

◆ toString()

const std::string toString ( )
virtual

stringfy ParaCalculationState

stringfy ScipParaInstance: for debug

Implements ParaInstance.

Definition at line 201 of file scipParaInstanceTh.h.

Referenced by ScipParaInstance::createProblem().

Member Data Documentation

◆ copyIncreasedVariables

◆ mapToOriginalIndecies

int* mapToOriginalIndecies
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().

◆ mapToSolverLocalIndecies

int* mapToSolverLocalIndecies
protected

◆ nVars

◆ orgScip

SCIP* orgScip
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().

◆ scip

◆ varIndexRange