13 #ifndef OSBEARCATSOLVERXKIJ_H
14 #define OSBEARCATSOLVERXKIJ_H
18 #include "OSInstance.h"
20 #include "ClpSimplex.hpp"
201 double qrouteCost(
const int&
k,
const int& l,
const double*
c,
int* kountVar) ;
220 void getCutsTheta(
const double* thetaVar,
const int numThetaVar,
221 int &numNewRows,
int* &numNonz,
int** &colIdx,
222 double** &
values,
double* &rowLB,
double* &rowUB) ;
238 void getCutsX(
const double* xVar,
const int numXVar,
239 int &numNewRows,
int* &numNonz,
int** &colIdx,
240 double** &
values,
double* &rowLB,
double* &rowUB) ;
261 virtual void getBranchingCut(
const double* thetaVar,
const int numThetaVar,
262 const std::map<int, int> &varConMap,
int &varIdx,
int &numNonz,
263 int* &indexes,
double* &
values) ;
289 const int numThetaVar,
const std::map<int, int> &varConMap,
290 int &varIdx,
int &numNonz,
int* &indexes,
double* &
values) ;
317 int getBranchingVar(
const int* thetaIdx,
const double* theta,
const int numThetaVar ) ;
333 virtual void getColumns(
const double* yA,
const int numARows,
334 const double* yB,
const int numBRows,
335 int &numNewColumns,
int* &numNonz,
double* &cost,
336 int** &rowIdx,
double** &
values,
double &lowerBound) ;
372 virtual void resetMaster( std::map<int, int> &inVars,
373 OsiSolverInterface *si );
376 virtual void pauHana(std::vector<int> &m_zOptIndexes ,
int numNodes,
396 int &numNewRows,
int* &numNonz,
int** &colIdx,
397 double** &
values,
double* &rowLB,
double* &rowUB) ;
int * m_separationIndexMap
m_separationIndexMap maps the variable index into the appropriate row in the separation problem for t...
OSInstance * m_osinstanceSeparation
double ** m_newColumnRowValue
void getOptions(OSOption *osoption)
void calcReducedCost(const double *yA, const double *yB)
calculate the reduced costs c – input of the objective function costs yA – dual values on node assign...
OSDecompSolver * create()
std::string m_initOSiLFile
int * m_routeCapacity
the route capacity – bus seating limit this can vary with the route/hub
int * m_upperBoundL
largest possible L-value on a route – this will be the minimum of m_routeCapacity and total demand ...
std::map< int, std::map< int, std::vector< int > > > m_initSolMap
the index on the outer map is on the solution number, the index on the inner map indexes the route nu...
OSInstance * getSeparationInstance()
void getInitialSolution()
generate an intitial feasible solution in theta space for the initial master
int m_minDemand
m_minDemand is the value of the minimum demand node – it is not the minimum demand that must be carri...
double ** m_cost
the distance/cost vectors
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)
RETURN VALUES: int numNewColumns – number of new columns generated int* numNonz – number of nonzeros ...
void getCutsX(const double *xVar, const int numXVar, 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...
virtual void resetMaster(std::map< int, int > &inVars, OsiSolverInterface *si)
INPUT:
int * m_lowerBoundL
smallest possible L-value on a route for now this will equal
int * m_demand
m_demand is the vector of node demands
virtual void pauHana(std::vector< int > &m_zOptIndexes, int numNodes, int numColsGen)
~OSBearcatSolverXkij()
Default Destructor.
double qrouteCost(const int &k, const int &l, const double *c, int *kountVar)
kipp – document
virtual void initializeDataStructures()
allocate memory and initialize arrays
double ** m_newRowColumnValue
void createVariableNames()
int * convexityRowIndex
conconvexityRowIndex holds the index of the convexity row that the theta columns are in...
OSBearcatSolverXkij()
Default Constructor.
ClpSimplex * m_separationClpModel
int m_maxThetaNonz
m_maxMasterNonz is the maximumn number of nonzero elements we allow in the transformation matrix betw...
int getBranchingVar(const double *theta, const int numThetaVar)
RETURN VALUES: return the integer index of a fractional x_{ij} variable.
int * m_routeMinPickup
the minimum number of students that we pickup on a route this can vary with the route/hub ...
virtual void getBranchingCut(const double *thetaVar, const int numThetaVar, const std::map< int, int > &varConMap, int &varIdx, int &numNonz, int *&indexes, double *&values)
RETURN VALUES: varIdx – the variable number x_{ij} for branching numNonz – number of theta indexes in...
bool m_use1OPTstart
if m_use1OPTstart is true we use the option file to fix the nodes to hubs found by SK's 1OPT heuristi...
void getCutsTheta(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...
void getCutsMultiCommod(const double *thetaVar, const int numThetaVar, int &numNewRows, int *&numNonz, int **&colIdx, double **&values, double *&rowLB, double *&rowUB)
This is the routine that generates the multi-item cuts.
The in-memory representation of an OSiL instance..
virtual OSInstance * getInitialRestrictedMaster()
OSInstance* OSBearcatSolverXkij::getInitialRestrictedMaster( ){.
int m_upperBoundLMax
largest possible L-value over all routes
double ** m_rc
the reduced cost vector for each k, we asssume order is (l, i, j)