#include <OSDipInterface.h>
Collaboration diagram for OS_DipInterface:
Helper Methods. | |
void | readOSiL (string &filename) |
void | readOSoL (string &filename) |
CoinPackedVector * | getRow (int i) |
CoinPackedMatrix * | getCoinPackedMatrix () |
const char * | getIntegerColumns () |
Returns array[getNumCols()] specifying if a variable is integer. | |
double | getObjectiveOffset () |
std::vector< std::set< int > > | getBlockVarIndexes () |
std::set< int > | getCoreConstraintIndexes () |
std::vector< std::map< int, int > > | getBlockConstraintIndexes () |
std::vector< OSInstance * > | getBlockOSInstances () |
std::vector< std::string > | getBlockFactories () |
double * | getObjectiveFunctionCoeff () |
const double | getBestKnownLB () const |
const double | getBestKnownUB () const |
const std::string * | getObjectiveMaxOrMins () const |
Get objective maxOrMins. | |
const double * | getObjectiveConstants () const |
Get objective constants. | |
const double * | getObjectiveWeights () const |
Get objective weights. | |
const int | getNumberOfIntegerVariables () const |
getNumberOfIntegerVariables | |
const int | getNumberOfBinaryVariables () const |
getNumberOfBinaryVariables | |
const int | getVariableNumber () const |
Get variable number. | |
const int | getConstraintNumber () const |
Get constraint number. | |
const double * | getColLower () const |
Get variable lower bounds. | |
const double * | getColUpper () const |
Get variable upper bounds. | |
const std::string * | getVariableNames () const |
Get variable names. | |
const double * | getRowLower () const |
Get constraint lower bounds. | |
const double * | getRowUpper () const |
Get constraint upper bounds. | |
const std::string * | getConstraintNames () const |
Get constraint names. | |
std::map< int, std::vector< int > > | generateInitialMaster () |
OS_DipInterface () | |
class constructor | |
~OS_DipInterface () | |
class destructor | |
std::vector< std::set< int > > | m_blockVariableIndexes |
bool | m_blockVariableIndexesProcessed |
std::set< int > | m_coreConstraintIndexes |
bool | m_coreConstraintIndexesProcessed |
std::vector< std::map< int, int > > | m_blockConstraintIndexes |
bool | m_blockConstraintIndexesProcessed |
std::vector< OSInstance * > | m_blockOSInstances |
bool | m_blockOSInstancesProcessed |
std::vector< std::string > | m_blockFactories |
bool | m_blockFactoriesProcessed |
Public Attributes | |
bool | m_isProvenOptimal |
Best known LB/UB. | |
double | m_bestKnownLB |
double | m_bestKnownUB |
OSInstance * | m_osinstance |
OSOption * | m_osoption |
OSiLReader * | m_osilreader |
OSoLReader * | m_osolreader |
char * | m_integerVars |
CoinPackedMatrix * | m_coinpm |
CoinPackedVector * | m_row |
Definition at line 59 of file OSDipInterface.h.
OS_DipInterface::OS_DipInterface | ( | ) |
OS_DipInterface::~OS_DipInterface | ( | ) |
class destructor
Definition at line 693 of file OSDipInterface.cpp.
References m_blockOSInstances, m_coinpm, m_osilreader, and m_osolreader.
void OS_DipInterface::readOSiL | ( | string & | filename | ) |
Definition at line 25 of file OSDipInterface.cpp.
References ErrorClass::errormsg, OSInstance::getConstraintNumber(), FileUtil::getFileAsString(), OSInstance::getLinearConstraintCoefficientNumber(), OSInstance::getLinearConstraintCoefficientsInColumnMajor(), OSInstance::getLinearConstraintCoefficientsInRowMajor(), OSInstance::getVariableNumber(), SparseMatrix::indexes, m_coinpm, m_osilreader, m_osinstance, OSiLReader::readOSiL(), SparseMatrix::starts, and SparseMatrix::values.
Referenced by OSDipApp::initializeApp().
void OS_DipInterface::readOSoL | ( | string & | filename | ) |
Definition at line 76 of file OSDipInterface.cpp.
References ErrorClass::errormsg, FileUtil::getFileAsString(), m_osolreader, m_osoption, and OSoLReader::readOSoL().
Referenced by OSDipApp::initializeApp().
CoinPackedVector * OS_DipInterface::getRow | ( | int | i | ) |
Definition at line 110 of file OSDipInterface.cpp.
References OSInstance::getLinearConstraintCoefficientsInRowMajor(), SparseMatrix::indexes, k, m_osinstance, m_row, SparseMatrix::starts, and SparseMatrix::values.
CoinPackedMatrix * OS_DipInterface::getCoinPackedMatrix | ( | ) |
const char * OS_DipInterface::getIntegerColumns | ( | ) |
Returns array[getNumCols()] specifying if a variable is integer.
At present, simply coded as zero (continuous) and non-zero (integer) May be extended at a later date.
Definition at line 129 of file OSDipInterface.cpp.
References getVariableNumber(), OSInstance::getVariableTypes(), m_integerVars, and m_osinstance.
Referenced by OSDipApp::createModelMasterOnlys2(), and OSDipApp::createModelPart().
double OS_DipInterface::getObjectiveOffset | ( | ) |
std::vector< std::set< int > > OS_DipInterface::getBlockVarIndexes | ( | ) |
Definition at line 213 of file OSDipInterface.cpp.
References ErrorClass::errormsg, OSOption::getNumberOfOtherVariableOptions(), OSOption::getOtherVariableOptions(), OSInstance::getVariableNumber(), m_blockVariableIndexes, m_blockVariableIndexesProcessed, m_osinstance, and m_osoption.
Referenced by getBlockConstraintIndexes(), getBlockOSInstances(), and OSDipApp::initializeApp().
std::set< int > OS_DipInterface::getCoreConstraintIndexes | ( | ) |
Definition at line 605 of file OSDipInterface.cpp.
References ErrorClass::errormsg, OSInstance::getConstraintNumber(), OSOption::getNumberOfOtherConstraintOptions(), OSOption::getOtherConstraintOptions(), m_coreConstraintIndexes, m_coreConstraintIndexesProcessed, m_osinstance, and m_osoption.
Referenced by getBlockConstraintIndexes(), getBlockOSInstances(), and OSDipApp::initializeApp().
std::vector< std::map< int, int > > OS_DipInterface::getBlockConstraintIndexes | ( | ) |
Definition at line 281 of file OSDipInterface.cpp.
References ErrorClass::errormsg, getBlockVarIndexes(), getCoreConstraintIndexes(), OSInstance::getLinearConstraintCoefficientsInColumnMajor(), SparseMatrix::indexes, m_blockConstraintIndexes, m_blockConstraintIndexesProcessed, m_osinstance, and SparseMatrix::starts.
Referenced by getBlockOSInstances().
std::vector< OSInstance * > OS_DipInterface::getBlockOSInstances | ( | ) |
Definition at line 361 of file OSDipInterface.cpp.
References OSInstance::addObjective(), SparseVector::bDeleteArrays, ErrorClass::errormsg, getBlockConstraintIndexes(), getBlockVarIndexes(), OSInstance::getConstraintLowerBounds(), OSInstance::getConstraintUpperBounds(), getCoreConstraintIndexes(), OSInstance::getDenseObjectiveCoefficients(), OSInstance::getLinearConstraintCoefficientsInColumnMajor(), OSInstance::getObjectiveMaxOrMins(), OSInstance::getVariableLowerBounds(), OSInstance::getVariableNames(), OSInstance::getVariableTypes(), OSInstance::getVariableUpperBounds(), SparseMatrix::indexes, SparseVector::indexes, m_blockOSInstances, m_blockOSInstancesProcessed, m_osinstance, osinstance, OSInstance::setConstraintNumber(), OSInstance::setConstraints(), OSInstance::setLinearConstraintCoefficients(), OSInstance::setObjectiveNumber(), OSInstance::setVariableNumber(), OSInstance::setVariables(), SparseMatrix::starts, SparseMatrix::values, and SparseVector::values.
Referenced by OSDipApp::initializeApp().
std::vector< std::string > OS_DipInterface::getBlockFactories | ( | ) |
Definition at line 162 of file OSDipInterface.cpp.
References ErrorClass::errormsg, OSOption::getNumberOfOtherVariableOptions(), OSOption::getOtherVariableOptions(), m_blockFactories, m_blockFactoriesProcessed, and m_osoption.
Referenced by OSDipApp::initializeApp().
double * OS_DipInterface::getObjectiveFunctionCoeff | ( | ) |
Definition at line 673 of file OSDipInterface.cpp.
References OSInstance::getDenseObjectiveCoefficients(), and m_osinstance.
Referenced by OSDipApp::createModels().
const double OS_DipInterface::getBestKnownLB | ( | ) | const [inline] |
const double OS_DipInterface::getBestKnownUB | ( | ) | const [inline] |
const std::string* OS_DipInterface::getObjectiveMaxOrMins | ( | ) | const [inline] |
Get objective maxOrMins.
One maxOrMin for each objective.
Exception | if the elements in objectives are logically inconsistent. |
Definition at line 146 of file OSDipInterface.h.
References OSInstance::getObjectiveMaxOrMins(), and m_osinstance.
const double* OS_DipInterface::getObjectiveConstants | ( | ) | const [inline] |
Get objective constants.
One constant for each objective.
Exception | if the elements in objectives are logically inconsistent. |
Definition at line 155 of file OSDipInterface.h.
References OSInstance::getObjectiveConstants(), and m_osinstance.
Referenced by getObjectiveOffset().
const double* OS_DipInterface::getObjectiveWeights | ( | ) | const [inline] |
Get objective weights.
One weight for each objective.
Exception | if the elements in objectives are logically inconsistent. |
Definition at line 163 of file OSDipInterface.h.
References OSInstance::getObjectiveWeights(), and m_osinstance.
const int OS_DipInterface::getNumberOfIntegerVariables | ( | ) | const [inline] |
getNumberOfIntegerVariables
Definition at line 169 of file OSDipInterface.h.
References OSInstance::getNumberOfIntegerVariables(), and m_osinstance.
const int OS_DipInterface::getNumberOfBinaryVariables | ( | ) | const [inline] |
getNumberOfBinaryVariables
Definition at line 175 of file OSDipInterface.h.
References OSInstance::getNumberOfBinaryVariables(), and m_osinstance.
const int OS_DipInterface::getVariableNumber | ( | ) | const [inline] |
Get variable number.
Definition at line 183 of file OSDipInterface.h.
References OSInstance::getVariableNumber(), and m_osinstance.
Referenced by OSDipApp::createModelMasterOnlys2(), OSDipApp::createModelPart(), OSDipApp::createModels(), and getIntegerColumns().
const int OS_DipInterface::getConstraintNumber | ( | ) | const [inline] |
Get constraint number.
Definition at line 190 of file OSDipInterface.h.
References OSInstance::getConstraintNumber(), and m_osinstance.
const double* OS_DipInterface::getColLower | ( | ) | const [inline] |
Get variable lower bounds.
Definition at line 197 of file OSDipInterface.h.
References OSInstance::getVariableLowerBounds(), and m_osinstance.
Referenced by OSDipApp::createModelMasterOnlys2(), and OSDipApp::createModelPart().
const double* OS_DipInterface::getColUpper | ( | ) | const [inline] |
Get variable upper bounds.
Definition at line 205 of file OSDipInterface.h.
References OSInstance::getVariableUpperBounds(), and m_osinstance.
Referenced by OSDipApp::createModelMasterOnlys2(), and OSDipApp::createModelPart().
const std::string* OS_DipInterface::getVariableNames | ( | ) | const [inline] |
Get variable names.
Definition at line 213 of file OSDipInterface.h.
References OSInstance::getVariableNames(), and m_osinstance.
const double* OS_DipInterface::getRowLower | ( | ) | const [inline] |
Get constraint lower bounds.
Definition at line 221 of file OSDipInterface.h.
References OSInstance::getConstraintLowerBounds(), and m_osinstance.
Referenced by OSDipApp::createModelPart().
const double* OS_DipInterface::getRowUpper | ( | ) | const [inline] |
Get constraint upper bounds.
Definition at line 229 of file OSDipInterface.h.
References OSInstance::getConstraintUpperBounds(), and m_osinstance.
Referenced by OSDipApp::createModelPart().
const std::string* OS_DipInterface::getConstraintNames | ( | ) | const [inline] |
Get constraint names.
Definition at line 237 of file OSDipInterface.h.
References OSInstance::getConstraintNames(), and m_osinstance.
Referenced by OSDipApp::createModelPart().
std::map< int, std::vector< int > > OS_DipInterface::generateInitialMaster | ( | ) |
Definition at line 713 of file OSDipInterface.cpp.
References ErrorClass::errormsg, FileUtil::getFileAsString(), OSResult::getOptimalPrimalVariableValues(), OSInstance::getVariableNames(), k, DefaultSolver::osinstance, osinstance, DefaultSolver::osoption, osoption, DefaultSolver::osresult, OSiLReader::readOSiL(), DefaultSolver::solve(), and DefaultSolver::sSolverName.
Definition at line 71 of file OSDipInterface.h.
Referenced by getBlockConstraintIndexes(), getBlockOSInstances(), getBlockVarIndexes(), getColLower(), getColUpper(), getConstraintNames(), getConstraintNumber(), getCoreConstraintIndexes(), getIntegerColumns(), getNumberOfBinaryVariables(), getNumberOfIntegerVariables(), getObjectiveConstants(), getObjectiveFunctionCoeff(), getObjectiveMaxOrMins(), getObjectiveWeights(), getRow(), getRowLower(), getRowUpper(), getVariableNames(), getVariableNumber(), and readOSiL().
Definition at line 72 of file OSDipInterface.h.
Referenced by OSDipApp::generateInitVars(), getBlockFactories(), getBlockVarIndexes(), getCoreConstraintIndexes(), OSDipApp::initializeApp(), and readOSoL().
CoinPackedMatrix* OS_DipInterface::m_coinpm |
Definition at line 76 of file OSDipInterface.h.
Referenced by OSDipApp::createModelPart(), getCoinPackedMatrix(), readOSiL(), and ~OS_DipInterface().
CoinPackedVector* OS_DipInterface::m_row |
std::vector<std::set<int> > OS_DipInterface::m_blockVariableIndexes |
std::set<int> OS_DipInterface::m_coreConstraintIndexes |
std::vector<std::map<int, int> > OS_DipInterface::m_blockConstraintIndexes |
std::vector<OSInstance* > OS_DipInterface::m_blockOSInstances |
Definition at line 120 of file OSDipInterface.h.
Referenced by getBlockOSInstances(), and ~OS_DipInterface().
std::vector<std::string > OS_DipInterface::m_blockFactories |