#include <VrpModel.h>
Inheritance diagram for VrpModel:


Public Member Functions | |
| VrpModel () | |
| Default construtor. | |
| virtual | ~VrpModel () |
| Destructor. | |
| virtual void | readInstance (const char *dateFile) |
| For parallel code, only the master calls this function. | |
| virtual void | readParameters (const int argnum, const char *const *arglist) |
| Read in Alps, Blis, Vrp parameters. | |
| virtual BlisSolution * | userFeasibleSolution (const double *solution, bool &userFeasible) |
| User's criteria for a feasible solution. | |
| int | index (int v0, int v1) |
| int | computeCost (int v0, int v1) |
| int | getNumVertices () |
| int | getNumEdges () |
| std::vector< VrpVariable * > | getEdgeList () |
| CoinPackedVector * | getSolution (const double *denseSol) |
| void | createNet (CoinPackedVector *vec) |
| virtual void | registerKnowledge () |
| Register knowledge. | |
| AlpsReturnStatus | encodeVrp (AlpsEncoded *encoded) const |
| Pack Vrp portion of the model into an encoded object. | |
| AlpsReturnStatus | decodeVrp (AlpsEncoded &encoded) |
| Unpack Vrp portion of the model from an encoded object. | |
| virtual AlpsEncoded * | encode () const |
| The method that encodes the model into an encoded object. | |
| virtual void | decodeToSelf (AlpsEncoded &) |
| The method that decodes the model from an encoded object. | |
Protected Member Functions | |
| void | setModelData () |
| 1) Set colMatrix_, varLB_, varUB_, conLB_, conUB, numCols_, numRows_ 2) Set objCoef_ and objSense_ 3) Set colType_ ('C', 'I', or 'B') | |
Private Attributes | |
| char | name_ [100] |
| int | vertnum_ |
| int | edgenum_ |
| int | numroutes_ |
| int | depot_ |
| int | capacity_ |
| int | wtype_ |
| int * | demand_ |
| int * | posx_ |
| int * | posy_ |
| double * | coordx_ |
| double * | coordy_ |
| double * | coordz_ |
| double | etol_ |
| VrpParams * | VrpPar_ |
| VrpNetwork * | n_ |
| std::vector< VrpVariable * > | edges_ |
Friends | |
| class | VrpCutGenerator |
| class | VrpSolution |
Definition at line 32 of file VrpModel.h.
| VrpModel::VrpModel | ( | ) | [inline] |
Default construtor.
Definition at line 73 of file VrpModel.h.
References ALPS_DBL_MAX, ALPS_INT_MAX, AlpsModel::AlpsPar(), AlpsSearchTypeBestFirst, BlisBranchingStrategyStrong, BlisCutStrategyNone, BlisHeurStrategyNone, BlisModel::BlisPar(), BlisParams::branchStrategy, BlisParams::branchStrategyRampUp, CoinSeedRandom(), coordx_, coordy_, coordz_, BlisParams::cutCliqueStrategy, BlisParams::cutFactor, BlisParams::cutFlowCoverStrategy, BlisParams::cutGomoryStrategy, BlisParams::cutKnapsackStrategy, BlisParams::cutMirStrategy, BlisParams::cutOddHoleStrategy, BlisParams::cutPass, BlisParams::cutProbingStrategy, BlisParams::cutTwoMirStrategy, demand_, BlisParams::denseConFactor, BlisParams::heurRoundStrategy, n_, AlpsParams::nodeLogInterval, posx_, posy_, AlpsParams::searchStrategy, BlisParams::setEntry(), AlpsParams::setEntry(), AlpsParams::staticBalanceScheme, BlisParams::tailOff, and VrpPar_.
| virtual VrpModel::~VrpModel | ( | ) | [inline, virtual] |
| void VrpModel::setModelData | ( | ) | [protected] |
1) Set colMatrix_, varLB_, varUB_, conLB_, conUB, numCols_, numRows_ 2) Set objCoef_ and objSense_ 3) Set colType_ ('C', 'I', or 'B')
| virtual void VrpModel::readInstance | ( | const char * | dateFile | ) | [virtual] |
For parallel code, only the master calls this function.
1) Read in the instance data 2) Set colMatrix_, varLB_, varUB_, conLB_, conUB numCols_, numRows_ 3) Set objCoef_ and objSense_ 4) Set colType_ ('C', 'I', or 'B') 5) Create variables and constraints 6) Set numCoreVariables_ and numCoreConstraints_
Reimplemented from BlisModel.
| virtual void VrpModel::readParameters | ( | const int | argnum, | |
| const char *const * | arglist | |||
| ) | [virtual] |
| virtual BlisSolution* VrpModel::userFeasibleSolution | ( | const double * | solution, | |
| bool & | userFeasible | |||
| ) | [virtual] |
User's criteria for a feasible solution.
If user think the given solution is feasible then need 1) set userFeasible to true, and 2) return a non-null VRP solution. If user think the solution is infeasible then need 1) set userFeasible to false, and 2) return a null.
Reimplemented from BlisModel.
| int VrpModel::index | ( | int | v0, | |
| int | v1 | |||
| ) | [inline] |
Definition at line 152 of file VrpModel.h.
| int VrpModel::computeCost | ( | int | v0, | |
| int | v1 | |||
| ) |
| int VrpModel::getNumVertices | ( | ) | [inline] |
| int VrpModel::getNumEdges | ( | ) | [inline] |
| std::vector<VrpVariable *> VrpModel::getEdgeList | ( | ) | [inline] |
| CoinPackedVector* VrpModel::getSolution | ( | const double * | denseSol | ) |
| void VrpModel::createNet | ( | CoinPackedVector * | vec | ) |
| virtual void VrpModel::registerKnowledge | ( | ) | [virtual] |
| AlpsReturnStatus VrpModel::encodeVrp | ( | AlpsEncoded * | encoded | ) | const |
Pack Vrp portion of the model into an encoded object.
| AlpsReturnStatus VrpModel::decodeVrp | ( | AlpsEncoded & | encoded | ) |
Unpack Vrp portion of the model from an encoded object.
| virtual AlpsEncoded* VrpModel::encode | ( | ) | const [virtual] |
| virtual void VrpModel::decodeToSelf | ( | AlpsEncoded & | ) | [virtual] |
friend class VrpCutGenerator [friend] |
Definition at line 35 of file VrpModel.h.
friend class VrpSolution [friend] |
Definition at line 36 of file VrpModel.h.
char VrpModel::name_[100] [private] |
Definition at line 40 of file VrpModel.h.
int VrpModel::vertnum_ [private] |
int VrpModel::edgenum_ [private] |
int VrpModel::numroutes_ [private] |
Definition at line 43 of file VrpModel.h.
int VrpModel::depot_ [private] |
Definition at line 44 of file VrpModel.h.
int VrpModel::capacity_ [private] |
Definition at line 45 of file VrpModel.h.
int VrpModel::wtype_ [private] |
Definition at line 46 of file VrpModel.h.
int* VrpModel::demand_ [private] |
int* VrpModel::posx_ [private] |
int* VrpModel::posy_ [private] |
double* VrpModel::coordx_ [private] |
double* VrpModel::coordy_ [private] |
double* VrpModel::coordz_ [private] |
double VrpModel::etol_ [private] |
Definition at line 53 of file VrpModel.h.
VrpParams* VrpModel::VrpPar_ [private] |
VrpNetwork* VrpModel::n_ [private] |
std::vector<VrpVariable *> VrpModel::edges_ [private] |
1.4.7