Public Member Functions | Public Attributes | List of all members
OSDecompSolver Class Referenceabstract

#include <OSDecompSolver.h>

Inheritance diagram for OSDecompSolver:
Inheritance graph
[legend]
Collaboration diagram for OSDecompSolver:
Collaboration graph
[legend]

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: More...
 
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. More...
 
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: More...
 
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. More...
 
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. More...
 
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: More...
 
virtual void initializeDataStructures ()=0
 allocate memory and initialize arrays More...
 
 OSDecompSolver ()
 Default Constructor. More...
 
 OSDecompSolver (OSOption *osoption)
 Constructor with OSOption Arg. More...
 
virtual ~OSDecompSolver ()=0
 Default destructor. More...
 

Public Attributes

OSInstancem_osinstanceMaster
 
int m_multiCommodCutLimit
 
int m_numMultCuts
 
OSDecompParam m_osDecompParam
 share the parameters with the decomposition solver More...
 
double m_bestIPValue
 
double m_bestLPValue
 
double m_rootLPValue
 
intm_thetaPnt
 
intm_thetaIndex
 
int m_numThetaVar
 
int m_numThetaNonz
 
intm_pntBmatrix
 
intm_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 More...
 
int m_numHubs
 m_numHubs is the number of hubs/routes More...
 
int m_numNodes
 m_numNodes is the number of nodes (both pickup and hub) in the model More...
 
intm_pntAmatrix
 
intm_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 More...
 
int m_numBmatrixNonz
 
int m_maxBmatrixNonz
 m_maxBmatrixNonz is the maximum number of nonzero elements in the B matrix constraints More...
 
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 More...
 
int m_maxMasterColumns
 m_maxMasterColumns is the maximumn number of columns we allow in the master More...
 
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 More...
 
std::string * m_variableNames
 
OSOptionm_osoption
 

Detailed Description

Definition at line 40 of file OSDecompSolver.h.

Constructor & Destructor Documentation

OSDecompSolver::OSDecompSolver ( )

Default Constructor.

Definition at line 16 of file OSDecompSolver.cpp.

OSDecompSolver::OSDecompSolver ( OSOption osoption)

Constructor with OSOption Arg.

OSDecompSolver::~OSDecompSolver ( )
pure virtual

Default destructor.

Definition at line 19 of file OSDecompSolver.cpp.

Member Function Documentation

virtual OSInstance* OSDecompSolver::getInitialRestrictedMaster ( )
pure virtual
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.

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 OSBearcatSolverXkij, and OSBearcatSolverXij.

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 lowerBound – the lowerBound

INPUT:

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

Implemented in OSBearcatSolverXij, and OSBearcatSolverXkij.

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.

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 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 – the map of variables in x_{ij} space to a consraint number

Implemented in OSBearcatSolverXij, and OSBearcatSolverXkij.

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.

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.

virtual void OSDecompSolver::initializeDataStructures ( )
pure virtual

allocate memory and initialize arrays

Implemented in OSBearcatSolverXij, and OSBearcatSolverXkij.

Member Data Documentation

OSInstance* OSDecompSolver::m_osinstanceMaster

Definition at line 44 of file OSDecompSolver.h.

int OSDecompSolver::m_multiCommodCutLimit

Definition at line 46 of file OSDecompSolver.h.

int OSDecompSolver::m_numMultCuts

Definition at line 47 of file OSDecompSolver.h.

OSDecompParam OSDecompSolver::m_osDecompParam

share the parameters with the decomposition solver

Definition at line 53 of file OSDecompSolver.h.

double OSDecompSolver::m_bestIPValue

Definition at line 55 of file OSDecompSolver.h.

double OSDecompSolver::m_bestLPValue

Definition at line 56 of file OSDecompSolver.h.

double OSDecompSolver::m_rootLPValue

Definition at line 57 of file OSDecompSolver.h.

int* OSDecompSolver::m_thetaPnt

Definition at line 62 of file OSDecompSolver.h.

int* OSDecompSolver::m_thetaIndex

Definition at line 63 of file OSDecompSolver.h.

int OSDecompSolver::m_numThetaVar

Definition at line 64 of file OSDecompSolver.h.

int OSDecompSolver::m_numThetaNonz

Definition at line 65 of file OSDecompSolver.h.

int* OSDecompSolver::m_pntBmatrix

Definition at line 73 of file OSDecompSolver.h.

int* OSDecompSolver::m_BmatrixIdx

Definition at line 75 of file OSDecompSolver.h.

double* OSDecompSolver::m_BmatrixVal

Definition at line 77 of file OSDecompSolver.h.

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.

int OSDecompSolver::m_numHubs

m_numHubs is the number of hubs/routes

Definition at line 87 of file OSDecompSolver.h.

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.

int* OSDecompSolver::m_pntAmatrix

Definition at line 100 of file OSDecompSolver.h.

int* OSDecompSolver::m_Amatrix

Definition at line 102 of file OSDecompSolver.h.

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.

int OSDecompSolver::m_numBmatrixNonz

Definition at line 113 of file OSDecompSolver.h.

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.

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.

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.

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.

std::string* OSDecompSolver::m_variableNames

Definition at line 148 of file OSDecompSolver.h.

OSOption* OSDecompSolver::m_osoption

Definition at line 151 of file OSDecompSolver.h.


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