/home/coin/SVN-release/OS-2.3.4/OS/applications/columnGen/code/OSRouteSolver.h

Go to the documentation of this file.
00001 /* $Id: OSRouteSolver.h 3038 2009-11-07 11:43:44Z kmartin $ */
00018 #ifndef OSROUTESOLVER_H
00019 #define OSROUTESOLVER_H
00020 
00021 #include "OSInstance.h"
00022 #include "OSOption.h"
00023 // --------------------------------------------------------------------- //
00030 // --------------------------------------------------------------------- //
00031 class OSRouteSolver {
00032 public:
00033         
00034         
00035         
00036         
00037         std::string m_initOSiLFile;
00038         std::map<int, std::map<int, std::vector<int> > > m_initSolMap;
00039         
00040         //variables for the q-route dynamic programming solution
00041         int m_numberOfVar;
00042         int m_numHubs;
00043         int m_numNodes;
00044         int m_routeCapacity;
00045         int m_minDemand;
00046         int* m_demand;
00047         
00051         double** m_cost;
00052         
00056         double* m_rc;
00061         double* m_psi;
00065         double* m_phi;
00066         
00067         //will be the optimal reduced cost for each hub
00068         double* m_optValHub;
00069         
00070         
00071         //start variables for the q-route dynamic program
00072         double** m_u; 
00073         double** m_v;
00074         int** m_px;
00075         int** m_tx;
00076         double** m_g;
00077         int* m_varIdx;
00078         //end variables for the q-route  dynamic programming solution
00079         
00080         //variables for the outer dynamic program 
00081         //get the optimal l value for each route
00082         int* m_optL; //size is number of routes
00083         int* m_optD; //size is number of routes
00084         double** m_vv;
00085         int** m_vvpnt;
00086         //end of variable on the outer dynamic program
00087         
00088         
00089         int m_totalDemand;
00090         int m_upperBoundL;
00091         int m_numberOfSolutions;
00092         
00093 
00094         
00095         //these variable names are in x(i, j) space
00096         std::string* m_variableNames;
00097         
00098         //arrays for the coupling constraint matrix
00099         int* m_pntAmatrix;
00100         int* m_Amatrix;
00101         
00102         //below  is a scatter array we scatter into in order
00103         //to multiply the transformation matrix times the A matrix
00104         int* m_tmpScatterArray;
00105         
00106         //arguments for getColumns
00107         double m_lowerBnd;
00108         int* m_nonzVec;
00109         double* m_costVec;
00110         
00111         int** m_newColumnRowIdx;
00112         double** m_newColumnRowValue;
00113         
00114         //the transformation matrix
00115         int* m_thetaPnt;
00116         int* m_thetaIndex;
00117         int m_numThetaVar;
00118         int m_numThetaNonz;
00119         double* m_thetaCost;
00120 
00121 
00122 
00123         
00124         OSInstance *m_osinstanceMaster;
00125         OSInstance *m_osinstanceSeparation;
00126 
00127         //create the initial restricted master
00128         OSInstance* getInitialRestrictedMaster( );
00129         //this method generates the instance for 
00130         //separating the tour breaking constraints
00131         OSInstance* getSeparationInstance();
00132 
00134         // note -- this c vector is only for hub k
00135         double qrouteCost(const int& k, const int& l, const double* c, int* kountVar) ;
00136         
00137         //this c vector is for the entire cost vector
00138         void getOptL(const  double* c) ;
00139         
00140         
00141         void getCuts(const  double* x) ;
00142         
00157         void getColumns(const  double* y, const int numRows,
00158                         int &numColumns, int* numNonz, double* cost, double* rcost,
00159                         int** rowIdx, double** values, double &lowerBound) ;
00160         
00161         
00162         void getOptions( OSOption *osoption);
00163         
00164         
00170         void calcReducedCost( double** c, double* phi, double* d);
00171         
00172         //these are the variable in x(i, j) space
00173         void createVariableNames( );
00174         
00175         //this is the matrix that says we must visit each node
00176         //this A matrix defines the "coupling constraints"
00177         void createAmatrix();
00178         
00179         //this method gets called when we are done
00180         void pauHana(const double* theta);
00181         
00182 
00183         
00188         OSRouteSolver();
00189         
00194         OSRouteSolver(OSOption* osoption);
00195         
00196         
00201         ~OSRouteSolver();
00202         
00203 
00204 };//end class OSRouteSolver
00205 
00206 #endif
00207 

Generated on Wed Mar 23 03:05:44 2011 by  doxygen 1.4.7