My Project
OSDecompSolver Class Referenceabstract

#include <OSDecompSolver.h>

Inheritance diagram for OSDecompSolver:
OSBearcatSolverXij OSBearcatSolverXkij

Public Member Functions

virtual OSInstancegetInitialRestrictedMaster ()=0
 
virtual void getCutsTheta (const double *thetaVar, const int numThetaVar, int &numNewRows, int *&numNonz, int **&colIdx, double **&values, double *&rowLB, double *&rowUB)=0
 RETURN VALUES:
 
virtual void getCutsMultiCommod (const double *thetaVar, const int numThetaVar, int &numNewRows, int *&numNonz, int **&colIdx, double **&values, double *&rowLB, double *&rowUB)=0
 This is the routine that generates the multi-item cuts.
 
virtual 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)=0
 RETURN VALUES:
 
virtual void getBranchingCut (const double *thetaVar, const int numThetaVar, const std::map< int, int > &varConMap, int &varIdx, int &numNonz, int *&indexes, double *&values)=0
 Dense Version.
 
virtual void getBranchingCut (const int *thetaIdx, const double *theta, const int numThetaVar, const std::map< int, int > &varConMap, int &varIdx, int &numNonz, int *&indexes, double *&values)=0
 Sparse Version.
 
virtual void pauHana (std::vector< int > &m_zOptIndexes, std::vector< double > &m_zRootLPx_vals, int numNodes, int numColsGen, std::string message)=0
 
virtual void resetMaster (std::map< int, int > &inVars, OsiSolverInterface *si)=0
 INPUT:
 
virtual void initializeDataStructures ()=0
 allocate memory and initialize arrays
 
 OSDecompSolver ()
 Default Constructor.
 
 OSDecompSolver (OSOption *osoption)
 Constructor with OSOption Arg.
 
virtual ~OSDecompSolver ()=0
 Default destructor.
 

Public Attributes

OSInstancem_osinstanceMaster
 
int m_multiCommodCutLimit
 
int m_numMultCuts
 
OSDecompParam m_osDecompParam
 share the parameters with the decomposition solver
 
double m_bestIPValue
 
double m_bestLPValue
 
double m_rootLPValue
 
int * m_thetaPnt
 
int * m_thetaIndex
 
int m_numThetaVar
 
int m_numThetaNonz
 
int * m_pntBmatrix
 
int * m_BmatrixIdx
 
double * m_BmatrixVal
 
std::set< std::pair< int, double > > intVarSet
 intVarSet holds and std::pair where the first element is the index of an integer variable and the second is the variable upper bound
 
int m_numHubs
 m_numHubs is the number of hubs/routes
 
int m_numNodes
 m_numNodes is the number of nodes (both pickup and hub) in the model
 
int * m_pntAmatrix
 
int * m_Amatrix
 
int m_numBmatrixCon
 m_numBmatrixCon is the number of constraints in B - 1, we have the -1 because: m_pntBmatrix[ k] points to the start of constraint k and m_pntBmatrix[ m_numBmatrixCon ] is equal to m_numBmatrixNonz
 
int m_numBmatrixNonz
 
int m_maxBmatrixNonz
 m_maxBmatrixNonz is the maximum number of nonzero elements in the B matrix constraints
 
int m_maxBmatrixCon
 m_maxBmatrixCon is the maximum number of B matrix constraints it is the number of tour breaking constraints plus variable branch constraints
 
int m_maxMasterColumns
 m_maxMasterColumns is the maximumn number of columns we allow in the master
 
int m_maxMasterRows
 m_maxMasterColumns is the maximumn number of rows we allow in the master, in this application it is equal to m_maxBmatrixCon plus m_numNodes – we therefore do not need to read this from an option file as we might for other problems
 
std::string * m_variableNames
 
OSOptionm_osoption
 

Detailed Description

OSBDecompSolver is a virtual class for solving the Block subproblem

Definition at line 40 of file OSDecompSolver.h.

Constructor & Destructor Documentation

◆ OSDecompSolver() [1/2]

OSDecompSolver::OSDecompSolver ( )

Default Constructor.

Definition at line 16 of file OSDecompSolver.cpp.

◆ OSDecompSolver() [2/2]

OSDecompSolver::OSDecompSolver ( OSOption * osoption)

Constructor with OSOption Arg.

◆ ~OSDecompSolver()

OSDecompSolver::~OSDecompSolver ( )
pure virtual

Default destructor.

Definition at line 19 of file OSDecompSolver.cpp.

Member Function Documentation

◆ getInitialRestrictedMaster()

virtual OSInstance * OSDecompSolver::getInitialRestrictedMaster ( )
pure virtual

◆ getCutsTheta()

virtual void OSDecompSolver::getCutsTheta ( const double * thetaVar,
const int numThetaVar,
int & numNewRows,
int *& numNonz,
int **& colIdx,
double **& values,
double *& rowLB,
double *& rowUB )
pure virtual

RETURN VALUES:

Parameters
intnumNewRows – number of new rows generated
int*numNonz – number of nonzeros in each row
int**colIdx – vectors column indexes of new rows
double**values – vectors of matrix coefficient values of new rows
double*rowLB – vector of row lower bounds
double*rowUB – vector of row upper bounds

INPUT:

Parameters
double*thetaVar – the vector of primal master values
intnumThetaVar – size of master primal vector

Implemented in OSBearcatSolverXij, and OSBearcatSolverXkij.

◆ getCutsMultiCommod()

virtual void OSDecompSolver::getCutsMultiCommod ( const double * thetaVar,
const int numThetaVar,
int & numNewRows,
int *& numNonz,
int **& colIdx,
double **& values,
double *& rowLB,
double *& rowUB )
pure virtual

This is the routine that generates the multi-item cuts.

RETURN VALUES: int numNewRows – number of new rows generated int* numNonz – number of nonzeros in each row int** colIdx – vectors column indexes of new rows double** values – vectors of matrix coefficient values of new rows double* rowLB – vector of row lower bounds double* rowUB – vector of row upper bounds

INPUT: double* thetaVar – the vector of primal master values int numThetaVar – size of master primal vector

Implemented in OSBearcatSolverXij, and OSBearcatSolverXkij.

◆ getColumns()

virtual void OSDecompSolver::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 )
pure virtual

RETURN VALUES:

Parameters
inynumNewColumns – number of new columns generated
int*numNonz – number of nonzeros in each column
double*cost – the objective function coefficient on each new column
double**rowIdx – vectors row indexes of new columns
double**values – vectors of matrix coefficient values of new columns @paramdouble lowerBound – the lowerBound

INPUT:

Parameters
double*yA – the vector of dual values on the coupling constraints
intnumARows – size of the yA dual vector @paramdouble* yB – the vector of dual values on the tour breaking constaints
intnumBRows – size of the yA dual vector

Implemented in OSBearcatSolverXij, and OSBearcatSolverXkij.

◆ getBranchingCut() [1/2]

virtual void OSDecompSolver::getBranchingCut ( const double * thetaVar,
const int numThetaVar,
const std::map< int, int > & varConMap,
int & varIdx,
int & numNonz,
int *& indexes,
double *& values )
pure virtual

Dense Version.

RETURN VALUES:

Parameters
varIdx– the variable number x_{ij} for branching
numNonz– number of theta indexes in the cut
indexes– the indexes of the theta variables
values– the number of times the theta indexed in indexes appears in the cut note – set numNonz to zero if the generated cut variable already appears in varConMap

INPUT: double* thetaVar – the vector of primal master values int numThetaVar – size of master primal vector varConMap – the map of variables in x_{ij} space to a consraint number

Implemented in OSBearcatSolverXij, and OSBearcatSolverXkij.

◆ getBranchingCut() [2/2]

virtual void OSDecompSolver::getBranchingCut ( const int * thetaIdx,
const double * theta,
const int numThetaVar,
const std::map< int, int > & varConMap,
int & varIdx,
int & numNonz,
int *& indexes,
double *& values )
pure virtual

Sparse Version.

RETURN VALUES:

Parameters
varIdx– the variable number x_{ij} for branching @paramnum Nonz – number of theta indexes in the cut
indexes– the indexes of the theta variables
values– the number of times the theta indexed in indexes appears in the cut note – set numNonz to zero if the generated cut variable already appears in varConMap

INPUT:

Parameters
double*theta – the vector of primal master values
intnumThetaVar – size of master primal vector @paramvarConMap – the map of variables in x_{ij} space to a consraint number

Implemented in OSBearcatSolverXij, and OSBearcatSolverXkij.

◆ pauHana()

virtual void OSDecompSolver::pauHana ( std::vector< int > & m_zOptIndexes,
std::vector< double > & m_zRootLPx_vals,
int numNodes,
int numColsGen,
std::string message )
pure virtual

Implemented in OSBearcatSolverXij.

◆ resetMaster()

virtual void OSDecompSolver::resetMaster ( std::map< int, int > & inVars,
OsiSolverInterface * si )
pure virtual

INPUT:

Parameters
dstd::map<int,int>&inVars – the mapping of variables, the first index is the variable number before resetting, the second index is the variable number after the reset
OsiSolverInterface*si – the solver interface that corresponds to the master this is what gets rebuilt

Implemented in OSBearcatSolverXij, and OSBearcatSolverXkij.

◆ initializeDataStructures()

virtual void OSDecompSolver::initializeDataStructures ( )
pure virtual

allocate memory and initialize arrays

Implemented in OSBearcatSolverXij, and OSBearcatSolverXkij.

Member Data Documentation

◆ m_osinstanceMaster

OSInstance* OSDecompSolver::m_osinstanceMaster

Definition at line 44 of file OSDecompSolver.h.

◆ m_multiCommodCutLimit

int OSDecompSolver::m_multiCommodCutLimit

Definition at line 46 of file OSDecompSolver.h.

◆ m_numMultCuts

int OSDecompSolver::m_numMultCuts

Definition at line 47 of file OSDecompSolver.h.

◆ m_osDecompParam

OSDecompParam OSDecompSolver::m_osDecompParam

share the parameters with the decomposition solver

Definition at line 53 of file OSDecompSolver.h.

◆ m_bestIPValue

double OSDecompSolver::m_bestIPValue

Definition at line 55 of file OSDecompSolver.h.

◆ m_bestLPValue

double OSDecompSolver::m_bestLPValue

Definition at line 56 of file OSDecompSolver.h.

◆ m_rootLPValue

double OSDecompSolver::m_rootLPValue

Definition at line 57 of file OSDecompSolver.h.

◆ m_thetaPnt

int* OSDecompSolver::m_thetaPnt

Definition at line 62 of file OSDecompSolver.h.

◆ m_thetaIndex

int* OSDecompSolver::m_thetaIndex

Definition at line 63 of file OSDecompSolver.h.

◆ m_numThetaVar

int OSDecompSolver::m_numThetaVar

Definition at line 64 of file OSDecompSolver.h.

◆ m_numThetaNonz

int OSDecompSolver::m_numThetaNonz

Definition at line 65 of file OSDecompSolver.h.

◆ m_pntBmatrix

int* OSDecompSolver::m_pntBmatrix

Definition at line 73 of file OSDecompSolver.h.

◆ m_BmatrixIdx

int* OSDecompSolver::m_BmatrixIdx

Definition at line 75 of file OSDecompSolver.h.

◆ m_BmatrixVal

double* OSDecompSolver::m_BmatrixVal

Definition at line 77 of file OSDecompSolver.h.

◆ intVarSet

std::set<std::pair<int, double> > OSDecompSolver::intVarSet

intVarSet holds and std::pair where the first element is the index of an integer variable and the second is the variable upper bound

Definition at line 84 of file OSDecompSolver.h.

◆ m_numHubs

int OSDecompSolver::m_numHubs

m_numHubs is the number of hubs/routes

Definition at line 87 of file OSDecompSolver.h.

◆ m_numNodes

int OSDecompSolver::m_numNodes

m_numNodes is the number of nodes (both pickup and hub) in the model

Definition at line 92 of file OSDecompSolver.h.

◆ m_pntAmatrix

int* OSDecompSolver::m_pntAmatrix

Definition at line 100 of file OSDecompSolver.h.

◆ m_Amatrix

int* OSDecompSolver::m_Amatrix

Definition at line 102 of file OSDecompSolver.h.

◆ m_numBmatrixCon

int OSDecompSolver::m_numBmatrixCon

m_numBmatrixCon is the number of constraints in B - 1, we have the -1 because: m_pntBmatrix[ k] points to the start of constraint k and m_pntBmatrix[ m_numBmatrixCon ] is equal to m_numBmatrixNonz

Definition at line 112 of file OSDecompSolver.h.

◆ m_numBmatrixNonz

int OSDecompSolver::m_numBmatrixNonz

Definition at line 113 of file OSDecompSolver.h.

◆ m_maxBmatrixNonz

int OSDecompSolver::m_maxBmatrixNonz

m_maxBmatrixNonz is the maximum number of nonzero elements in the B matrix constraints

Definition at line 119 of file OSDecompSolver.h.

◆ m_maxBmatrixCon

int OSDecompSolver::m_maxBmatrixCon

m_maxBmatrixCon is the maximum number of B matrix constraints it is the number of tour breaking constraints plus variable branch constraints

Definition at line 128 of file OSDecompSolver.h.

◆ m_maxMasterColumns

int OSDecompSolver::m_maxMasterColumns

m_maxMasterColumns is the maximumn number of columns we allow in the master

Definition at line 134 of file OSDecompSolver.h.

◆ m_maxMasterRows

int OSDecompSolver::m_maxMasterRows

m_maxMasterColumns is the maximumn number of rows we allow in the master, in this application it is equal to m_maxBmatrixCon plus m_numNodes – we therefore do not need to read this from an option file as we might for other problems

Definition at line 143 of file OSDecompSolver.h.

◆ m_variableNames

std::string* OSDecompSolver::m_variableNames

Definition at line 148 of file OSDecompSolver.h.

◆ m_osoption

OSOption* OSDecompSolver::m_osoption

Definition at line 151 of file OSDecompSolver.h.


The documentation for this class was generated from the following files: