21 #include "OSInstance.h"
188 bool isInteger(
const double *thetaVar,
const int numThetaVar,
210 void getCuts(
const double* thetaVar,
const int numThetaVar,
211 int &numNewRows,
int* &numNonz,
int** &colIdx,
212 double** &
values,
double* &rowLB,
double* &rowUB) ;
229 void getColumns(
const double* yA,
const int numARows,
230 const double* yB,
const int numBRows,
231 int &numNewColumns,
int* &numNonz,
double* &cost,
232 int** &rowIdx,
double** &
values,
double &lowerBound) ;
249 const int rowIdx,
const double rowLB,
const double rowUB);
267 const int numThetaVar, std::map<int, int> &varConMap,
int &rowIdx);
283 std::map<int, int> &varConMap,
int &rowIdx);
double * m_yB
m_yB is the dual for the cuts that get added
void getOptions(OSOption *osoption)
std::string m_message
m_message is the message to the pauHana routine
void solveRestrictedMasterRelaxation()
kipp – document
std::vector< int > m_zOptIndexes
m_zOptIndexes is the vector theta indexes corresponding to the current m_zUB
void getCuts(const double *thetaVar, const int numThetaVar, int &numNewRows, int *&numNonz, int **&colIdx, double **&values, double *&rowLB, double *&rowUB)
RETURN VALUES: int numNewRows – number of new rows generated int* numNonz – number of nonzeros in eac...
std::vector< int > m_zOptRootLP
m_zOptRootLP is the vector theta indexes corresponding to optimal LP solution at the roor tnode ...
OSColGenApp()
Default Constructor.
bool m_calledBranchAndBound
this variable is true if we have called the branchAndBound() method
OSDecompFactoryInitializer * m_factoryInit
int m_numColumnsGenerated
kount the columns generated
double m_zUB
m_zUB is the upper bound
double * m_yA
m_yA is the dual values for the initial restricted constraints
~OSColGenApp()
Default destructor.
OSDecompParam m_osDecompParam
Application specific parameters.
std::vector< int > m_zRootLPx_idx
m_zRootLPx_idxs holds root node optimal LP solution nonzero indexes
void getColumns(const double *yA, const int numARows, const double *yB, const int numBRows, int &numNewColumns, int *&numNonz, double *&cost, int **&rowIdx, double **&values, double &lowerBound)
RETURN VALUES: int numNewColumns – number of new columns generated int* numNonz – number of nonzeros ...
OsiSolverInterface * m_si
int m_numNodesGenerated
kount the nodes generated
double m_zRootLP
m_zRootLP is the value of the root LP relaxation
int m_maxCols
m_maxCols is the maximum number of columns we can have
OSDecompSolver * m_osrouteSolver
void getInitialRestrictedMaster()
OSInstance * m_osinstanceMaster
int m_numColumnsOld
when m_numColumnsGenerated - m_numColumnsOld hits masterColumnResetValue we do a reset ...
std::map< int, int > m_rowIdxVarMap
map the variable generated at a node with a variable
double m_zLB
m_zLB is the lower bound
void createBranchingCut(const int *thetaIdx, const double *theta, const int numThetaVar, std::map< int, int > &varConMap, int &rowIdx)
INPUT: – sparse version int* thetaIdx – index vector of nonzero theta variables double* theta – the s...
std::vector< double > m_zRootLPx_vals
m_zRootLPx_vals holds root node optimal LP solution nonzero values
Implements a solve method for the Coin solvers.
std::ostringstream outStr
OSNode * createChild(const OSNode *osnode, std::map< int, int > &varConMap, const int rowIdx, const double rowLB, const double rowUB)
INPUT: OSNode* osnode – the parent node for which we create a child std::map<int, int> varConMap – th...
void checkNodeConsistency(const int rowIdx, const OSNode *osnode)
std::map< int, int > inVars
double * m_theta
m_theta is the primal values in the master
bool branchAndBound()
the method that invokes and controls branch and bound
The in-memory representation of an OSiL instance..
std::map< int, OSNode * > m_nodeMap
nodeMap is the map of nodes in the branch and bound tree
int m_maxRows
m_maxRows is the maximum number of rows we can have
bool isInteger(const double *thetaVar, const int numThetaVar, const double tol)
INPUT: double* thetaVar – the vector of primal master values int numThetaVar – size of master primal ...