- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions | Private Attributes | Friends | List of all members
VrpModel Class Reference

Model class for VRP. More...

`#include <VrpModel.h>`

Inheritance diagram for VrpModel:
[legend]
Collaboration diagram for VrpModel:
[legend]

## Public Member Functions
| VrpModel ()
| Default construtor. More...
virtual | ~VrpModel ()
| Destructor. More...
virtual void | readInstance (const char *dateFile)
| For parallel code, only the master calls this function. More...
virtual void | readParameters (const int argnum, const char *const *arglist)
| Read in Alps, Blis, Vrp parameters. More...
virtual BlisSolution * | userFeasibleSolution (const double *solution, bool &userFeasible)
| User's criteria for a feasible solution. More...
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. More...
AlpsReturnStatus | encodeVrp (AlpsEncoded *encoded) const
| Pack Vrp portion of the model into an encoded object. More...
AlpsReturnStatus | decodeVrp (AlpsEncoded &encoded)
| Unpack Vrp portion of the model from an encoded object. More...
virtual AlpsEncoded * | encode () const
| The method that encodes the model into an encoded object. More...
virtual void | decodeToSelf (AlpsEncoded &)
| The method that decodes the model from an encoded object. More...
Public Member Functions inherited from BlisModel
| BlisModel ()
| Default construtor. More...
virtual | ~BlisModel ()
| Destructor. More...
void | gutsOfDestructor ()
| Actual destructor. More...
void | init ()
| Intialize member data. More...
virtual void | writeParameters (std::ostream &outstream) const
| Write out parameters. More...
virtual AlpsTreeNode * | createRoot ()
| Create the root node based on model. More...
virtual bool | setupSelf ()
| Do necessary work to make model usable. More...
virtual void | setSolver (OsiSolverInterface *si)
| Set lp solver. More...
virtual OsiSolverInterface * | solver ()
| Get lp solver. More...
bool | resolve ()
| Resolving a lp. More...
void | setActiveNode (AlpsTreeNode *node)
| Set active node. More...
void | setSolEstimate (double est)
| Set the solution estimate of the active node. More...
int | getNumStrong ()
| Get number of strong branchings. More...
void | addNumStrong (int num=1)
| Add num to number of strong branchings. More...
double * | getObjCoef () const
| Get objective coefficients. More...
const double * | getColLower ()
| Get column lower bound. More...
const double * | getColUpper ()
| Get column upper bound. More...
int | getNumCols ()
| Get number of columns. More...
int | getNumRows ()
| Get number of rows. More...
double * | origVarLB ()
| Get original variable bounds arrary. More...
double * | origVarUB ()
double * | origConLB ()
| Get original constraint bounds arrary. More...
double * | origConUB ()
double * | startVarLB ()
| The starting variable bounds arrary of a subproblem (internal use). More...
double * | startVarUB ()
double * | startConLB ()
| The starting constraint bounds arrary of a subproblem (internal use). More...
double * | startConUB ()
int * | tempVarLBPos ()
| Temparory storage. More...
int * | tempVarUBPos ()
int * | tempConLBPos ()
int * | tempConUBPos ()
double | getLpObjValue () const
| Get current objective function value. More...
const double * | getLpSolution () const
| Get active lp solution. More...
int | getNumSolutions () const
| Return the stored lp solution. More...
int | getNumHeurSolutions () const
| Get number of heuristic solutions. More...
double * | incumbent ()
| Return best ip solution found so far. More...
bool | setBestSolution (BLIS_SOL_TYPE how, double &objectiveValue, const double *solution, bool fixVariables=false)
| Record a new incumbent solution and update objectiveValue. More...
double | getCutoff () const
| Get cut off value. More...
void | setCutoff (double co)
| Set cut off value. More...
bool | feasibleSolution (int &numIntegerInfs)
| Test the current lp solution for feasiblility. More...
bool | feasibleSolution (int &numIntegerInfs, int &numObjectInfs)
| Test the current solution for feasiblility. More...
void | findIntegers (bool startAgain)
| Identify integer variable. More...
int | getNumIntVars () const
| Get number of integers. More...
int * | getIntVars () const
| Get integer indices. More...
bool | checkInteger (double value) const
| Check if a value is integer. More...
void | addHeuristic (BlisHeuristic *heur)
| Add a heuristic. More...
BlisHeuristic * | heuristics (int i) const
| Get a specific heuristic. More...
int | numHeuristics () const
| Get the number of heuristics. More...
void | addCutGenerator (CglCutGenerator *generator, const char *name=NULL, int strategy=0, bool normal=true, bool atSolution=false, bool whenInfeasible=false)
| Add a cut generator. More...
BlisConGenerator * | cutGenerators (int i) const
| Get a specific cut generator. More...
int | numCutGenerators () const
| Get the number of cut generators. More...
int | getMaxNumCons () const
| Get the max number of cuts can be generated. More...
void | setMaxNumCons (int m)
| Set the max number of cuts can be generated. More...
BcpsConstraintPool * | constraintPool ()
| Access constraint pool. More...
int | useCons () const
| Query constraint generation strategy. More...
void | setUseCons (int u)
| Set constraint generation strategy. More...
int | getDenseConCutoff () const
| Get the thresheld to be considered as a dense constraint. More...
void | setDenseConCutoff (int cutoff)
| Set the thresheld to be considered as a dense constraint. More...
double * | getConRandoms () const
| Get randoms for check parallel constraints. More...
void | passInPriorities (const int *priorities, bool ifNotSimpleIntegers, int defaultValue=1000)
| Pass in branching priorities. More...
const int * | priority () const
| Priorities. More...
int | priority (int sequence) const
| Returns priority level for an object (or 1000 if no priorities exist) More...
const double | getNodeWeight () const
void | setNodeWeight (double nw)
virtual void | modelLog ()
| Log of specific models. More...
int | getNumNodes () const
| Get how many Nodes it took to solve the problem. More...
int | getNumIterations () const
| Get how many iterations it took to solve the problem. More...
int | getAveIterations () const
| Get the average iterations it took to solve a lp. More...
void | addNumNodes (int newNodes=1)
| Increment node count. More...
void | addNumIterations (int newIter)
| Increment Iteration count. More...
CoinMessageHandler * | messageHandler () const
| Get the message handler. More...
int | getHotstartStrategy ()
| Don't know what it is. More...
void | setHotstartStrategy (int value)
| BlisModel ()
| Default construtor. More...
virtual | ~BlisModel ()
| Destructor. More...
void | gutsOfDestructor ()
| Actual destructor. More...
void | setColMatrix (CoinPackedMatrix *mat)
| Pass a matrix in. More...
void | setNumCons (int num)
| Pass column upper bounds. More...
void | setNumVars (int num)
| Pass column upper bounds. More...
void | setNumElems (int num)
| Pass column upper bounds. More...
void | setConLb (double *cl)
| Pass column upper bounds. More...
void | setConUb (double *cu)
| Pass column lower bounds. More...
void | setVarLb (double *lb)
| Pass variable upper bounds. More...
void | setVarUb (double *ub)
| Pass variable lower bounds. More...
void | setColType (char *colType)
| Pass variable types. More...
void | setObjCoef (double *obj)
| Pass objective coefficients. More...
virtual void | importModel (std::vector< BlisVariable * > vars, std::vector< BlisConstraint * > cons)
| For parallel code, only the master calls this function. More...
virtual void | writeParameters (std::ostream &outstream) const
| Write out parameters. More...
virtual AlpsTreeNode * | createRoot ()
| For parallel code, only the master calls this function. More...
virtual bool | setupSelf ()
| All processes call this function. More...
virtual void | preprocess ()
| Preprocessing the model. More...
virtual void | postprocess ()
| Postprocessing the searching results. More...
virtual void | setSolver (OsiSolverInterface *si)
| Set lp solver. More...
virtual OsiSolverInterface * | getSolver ()
| Get lp solver. More...
virtual OsiSolverInterface * | solver ()
| Get lp solver. More...
bool | resolve ()
| Resolving a lp. More...
void | setActiveNode (AlpsTreeNode *node)
| Set active node. More...
void | setSolEstimate (double est)
| Set the solution estimate of the active node. More...
int | getNumStrong ()
| Get number of strong branchings. More...
void | addNumStrong (int num=1)
| Add num to number of strong branchings. More...
int | getNumBranchResolve ()
| Get the maximum number of resolve during branching. More...
void | setNumBranchResolve (int num)
| Set the maximum number of resolve during branching. More...
double * | getObjCoef () const
| Get objective coefficients. More...
const double * | getColLower ()
| Get column lower bound. More...
const double * | getColUpper ()
| Get column upper bound. More...
int | getNumCols ()
| Get number of columns. More...
int | getNumRows ()
| Get number of rows. More...
double * | varLB ()
| Get variable bounds arrary. More...
double * | varUB ()
double * | conLB ()
| Get original constraint bounds arrary. More...
double * | conUB ()
double * | startVarLB ()
| The starting variable bounds arrary of a subproblem (internal use). More...
double * | startVarUB ()
double * | startConLB ()
| The starting constraint bounds arrary of a subproblem (internal use). More...
double * | startConUB ()
int * | tempVarLBPos ()
| Temparory storage. More...
int * | tempVarUBPos ()
int * | tempConLBPos ()
int * | tempConUBPos ()
double | getLpObjValue () const
| Get current objective function value. More...
const double * | getLpSolution () const
| Get active lp solution. More...
int | getNumSolutions () const
| Get number of solutions. More...
int | getNumHeurSolutions () const
| Get number of heuristic solutions. More...
double * | incumbent ()
| Return best ip solution found so far. More...
int | storeSolution (BlisSolutionType how, BlisSolution *sol)
| Record a new incumbent solution and update objectiveValue. More...
double | getCutoff () const
| Get cut off value. More...
void | setCutoff (double co)
| Set cut off value. More...
BlisSolution * | feasibleSolutionHeur (const double *solution)
| Test if a solution found by heuristic is feasible. More...
virtual BlisSolution * | feasibleSolution (int &numIntegerInfs, int &numObjectInfs)
| Test the current LP solution for feasiblility. More...
void | createIntgerObjects (bool startAgain)
| Identify integer variable. More...
int * | getIntObjIndices () const
| Get integers' object indices. More...
int | getNumIntObjects () const
| Get number of integers. More...
int * | getIntColIndices () const
| Get integers' column indices. More...
bool | checkInteger (double value) const
| Check if a value is integer. More...
void | analyzeObjective ()
void | addHeuristic (BlisHeuristic *heur)
| Add a heuristic. More...
BlisHeuristic * | heuristics (int i) const
| Get a specific heuristic. More...
int | numHeuristics () const
| Get the number of heuristics. More...
void | addCutGenerator (BlisConGenerator *generator)
| Add a Blis cut generator. More...
void | addCutGenerator (CglCutGenerator *generator, const char *name=NULL, BlisCutStrategy strategy=BlisCutStrategyAuto, int cutGenerationFrequency=1, bool normal=true, bool atSolution=false, bool whenInfeasible=false)
| Add a Cgl cut generator. More...
BlisConGenerator * | cutGenerators (int i) const
| Get a specific cut generator. More...
int | numCutGenerators () const
| Get the number of cut generators. More...
int | getMaxNumCons () const
| Get the max number of cuts can be generated. More...
void | setMaxNumCons (int m)
| Set the max number of cuts can be generated. More...
BcpsConstraintPool * | constraintPool ()
| Access constraint pool. More...
BcpsConstraintPool * | constraintPoolReceive ()
| Access receive constraint pool. More...
BcpsConstraintPool * | constraintPoolSend ()
| Access send constraint pool. More...
BlisCutStrategy | getCutStrategy () const
| Query constraint generation strategy. More...
void | setCutStrategy (BlisCutStrategy u)
| Set constraint generation strategy. More...
int | getCutGenerationFrequency () const
| Query constraint generation frequency. More...
void | setCutStrategy (int f)
| Set constraint generation frequency. More...
int | getDenseConCutoff () const
| Get the thresheld to be considered as a dense constraint. More...
void | setDenseConCutoff (int cutoff)
| Set the thresheld to be considered as a dense constraint. More...
double * | getConRandoms () const
| Get randoms for check parallel constraints. More...
void | passInPriorities (const int *priorities, bool ifNotSimpleIntegers, int defaultValue=1000)
| Pass in branching priorities. More...
const int * | priority () const
| Priorities. More...
int | priority (int sequence) const
| Returns priority level for an object (or 1000 if no priorities exist) More...
double | getNodeWeight () const
void | setNodeWeight (double nw)
virtual void | modelLog ()
| Log of specific models. More...
int | getNumNodes () const
| Get how many Nodes it took to solve the problem. More...
int | getNumIterations () const
| Get how many iterations it took to solve the problem. More...
int | getAveIterations () const
| Get the average iterations it took to solve a lp. More...
void | addNumNodes (int newNodes=1)
| Increment node count. More...
void | addNumIterations (int newIter)
| Increment Iteration count. More...
CoinMessageHandler * | blisMessageHandler () const
| Get the message handler. More...
CoinMessages | blisMessages ()
| Return messages. More...
virtual void | nodeLog (AlpsTreeNode *node, bool force)
| Node log. More...
virtual bool | fathomAllNodes ()
| Return true, if all nodes can be fathomed. More...
virtual AlpsEncoded * | packSharedKnowlege ()
| Pack knowledge to be shared with others into an encoded object. More...
virtual void | unpackSharedKnowledge (AlpsEncoded &)
| Unpack and store shared knowledge from an encoded object. More...
virtual void | presolveForTheWholeTree ()
BcpsBranchStrategy * | branchStrategy () const
| Get the current branching strategy. More...
void | setBranchingMethod (BcpsBranchStrategy *method)
| Set the branching strategy. More...
void | setBranchingMethod (BcpsBranchStrategy &method)
| Set the branching stratedy. More...
BcpsBranchStrategy * | branchStrategy () const
| Get the current branching strategy. More...
void | setBranchingMethod (BcpsBranchStrategy *method)
| Set the branching strategy. More...
void | setBranchingMethod (BcpsBranchStrategy &method)
| Set the branching stratedy. More...
BcpsBranchStrategy * | rampUpBranchStrategy () const
| Get the current branching strategy. More...
int | numObjects () const
| Get the number of objects. More...
void | setNumObjects (int num)
| Set the number of objects. More...
BcpsObject ** | objects ()
| Get the array of objects. More...
BcpsObject * | objects (int which)
| Get the specified object. More...
void | deleteObjects ()
| Delete all object information. More...
void | addObjects (int numObjects, BcpsObject **objects)
| Add in object information. More...
int | numObjects () const
| Get the number of objects. More...
void | setNumObjects (int num)
| Set the number of objects. More...
BcpsObject ** | objects ()
| Get the array of objects. More...
BcpsObject * | objects (int which)
| Get the specified object. More...
void | setSharedObjectMark (int i)
| Mark object to be shared. More...
void | clearSharedObjectMark ()
| Clear all the share mark. More...
void | deleteObjects ()
| Delete all object information. More...
void | addObjects (int numObjects, BcpsObject **objects)
| Add in object information. More...
int | getNumOldConstraints () const
| Get number of old constraints. More...
void | setNumOldConstraints (int num)
| Set number of old constraints. More...
int | getOldConstraintsSize () const
| Get max number of old constraints. More...
void | setOldConstraintsSize (int num)
| Set max number of old constraints. More...
BlisConstraint ** | oldConstraints ()
| Access old constraints. More...
void | setOldConstraints (BlisConstraint **old)
| set old constraints. More...
void | delOldConstraints ()
| Set max number of old constraints. More...
BlisParams * | BlisPar ()
| Access parameters. More...
int | getNumOldConstraints () const
| Get number of old constraints. More...
void | setNumOldConstraints (int num)
| Set number of old constraints. More...
int | getOldConstraintsSize () const
| Get max number of old constraints. More...
void | setOldConstraintsSize (int num)
| Set max number of old constraints. More...
BlisConstraint ** | oldConstraints ()
| Access old constraints. More...
void | setOldConstraints (BlisConstraint **old)
| set old constraints. More...
void | delOldConstraints ()
| Set max number of old constraints. More...
BlisParams * | BlisPar ()
| Access parameters. More...
Public Member Functions inherited from BcpsModel
| BcpsModel ()
virtual | ~BcpsModel ()
std::vector< BcpsVariable * > | getVariables () const
| Return list of variables. More...
std::vector< BcpsConstraint * > | getConstrints () const
| Return list of constraints. More...
CoinMessageHandler * | bcpsMessageHandler () const
| Get the message handler. More...
CoinMessages | bcpsMessages ()
| Return messages. More...
AlpsReturnStatus | encodeBcps (AlpsEncoded *encoded) const
| Pack Bcps portion of model into an encoded object. More...
AlpsReturnStatus | decodeBcps (AlpsEncoded &encoded)
| Unpack Bcps portion of model from an encoded object. More...
std::vector< BcpsConstraint * > & | getConstraints ()
| Get variables and constraints. More...
std::vector< BcpsVariable * > & | getVariables ()
| Get variables and constraints. More...
int | getNumCoreConstraints () const
| Get variables and constraints. More...
int | getNumCoreVariables () const
| Get variables and constraints. More...
void | setConstraints (BcpsConstraint **con, int size)
| Set variables and constraints. More...
void | setNumCoreConstraints (int num)
| Set variables and constraints. More...
void | setVariables (BcpsVariable **var, int size)
| Set variables and constraints. More...
void | setNumCoreVariables (int num)
| Set variables and constraints. More...
Public Member Functions inherited from AlpsModel
| AlpsModel ()
| Default construtor. More...
virtual | ~AlpsModel ()
| Destructor. More...
AlpsKnowledgeBroker * | getKnowledgeBroker ()
| Get knowledge broker. More...
void | setKnowledgeBroker (AlpsKnowledgeBroker *b)
| Set knowledge broker. More...
std::string | getDataFile () const
| Get the input file. More...
void | setDataFile (std::string infile)
| Set the data file. More...
AlpsParams * | AlpsPar ()
| Access Alps Parameters. More...
void | writeParameters (std::ostream &outstream) const
| Write out parameters. More...
AlpsReturnStatus | encodeAlps (AlpsEncoded *encoded) const
| Pack Alps portion of node into an encoded object. More...
AlpsReturnStatus | decodeAlps (AlpsEncoded &encoded)
| Unpack Alps portion of node from an encoded object. More...
virtual void | sendGeneratedKnowledge ()
| Send generated knowledge. More...
virtual void | receiveGeneratedKnowledge ()
| Receive generated knowledge. More...
Public Member Functions inherited from AlpsKnowledge
| AlpsKnowledge ()
virtual | ~AlpsKnowledge ()
KnowledgeType | getType ()
void | setType (KnowledgeType t)
virtual AlpsReturnStatus | encode (AlpsEncoded *encoded)
| Pack into a encode object. More...
virtual AlpsKnowledge * | decode (AlpsEncoded &encoded) const
| This method should decode and return a pointer to a brand new object, i.e., the method must create a new object on the heap from the decoded data instead of filling up the object for which the method was invoked. More...
AlpsEncoded * | getEncoded () const
| Get/set encoded. More...
void | setEncoded (AlpsEncoded *e)

## 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') More...
Protected Member Functions inherited from BlisModel
void | init ()
| Intialize member data. More...
void | createObjects ()
| Create variables and constraints. More...
AlpsReturnStatus | encodeBlis (AlpsEncoded *encoded) const
| Pack Blis portion of the model into an encoded object. More...
AlpsReturnStatus | decodeBlis (AlpsEncoded &encoded)
| Unpack Blis portion of the model from an encoded object. More...
void | packSharedPseudocost (AlpsEncoded *encoded, int numToShare)
| Retrieve and pack shared pseudocost. More...
void | unpackSharedPseudocost (AlpsEncoded &encoded)
| Unpack and store shared pseduocost. More...
void | packSharedConstraints (AlpsEncoded *encoded)
| Retrieve and pack shared constraints. More...
void | unpackSharedConstraints (AlpsEncoded &encoded)
| Unpack and store shared constraints. More...
void | packSharedVariables (AlpsEncoded *encoded)
| Retrieve and pack shared variables. More...
void | unpackSharedVariables (AlpsEncoded &encoded)
| Unpack and store shared variables. More...

## 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

## Additional Inherited Members
Public Attributes inherited from BlisModel
bool | isRoot_
| If root node. More...
double | startTime_
| Search starting time. More...
double | timeLimit_
| Max solution time. More...
double | integerTol_
| Integer tolerance. More...
double | optimalRelGap_
| Relative optimal gap. More...
double | optimalAbsGap_
| Absolute optimal gap. More...
bool | useHeuristics_
| If use heuristics. More...
OsiCuts | newCutPool_
| Store new cuts in each pass. More...
std::vector< AlpsTreeNode * > | leafToRootPath
| Record the path from leaf to root. More...
int | boundingPass_
| The number of passes during bounding procedure. More...
double | currRelGap_
| Current relative optimal gap. More...
double | currAbsGap_
| Current absolute optimal gap. More...
BlisHeurStrategy | heurStrategy_
| If use heuristics. More...
int | heurCallFrequency_
| Frequency of using heuristics. More...
Protected Attributes inherited from BlisModel
OsiSolverInterface * | origLpSolver_
| Input by user. More...
OsiSolverInterface * | presolvedLpSolver_
| Presolved. More...
BlisPresolve * | presolve_
bool | presolved
bool | problemSetup
int * | intObjIndices_
BcpsBranchStrategy * | rampUpBranchStrategy_
BlisHotStartStrategy | hotstartStrategy_
char * | sharedObjectMark_
| The objects that can be shared. More...
int | numBranchResolve_
| Maximum number of resolve during branching. More...
BlisCutStrategy | cutStrategy_
| If use cut generators. More...
int | cutGenerationFrequency_
| Frequency of cut generation. More...
CoinMessageHandler * | blisMessageHandler_
| Message handler. More...
CoinMessages | blisMessages_
| Blis messages. More...
BcpsConstraintPool * | constraintPoolSend_
| Constraints that can be sent/broadcasted to other processes. More...
BcpsConstraintPool * | constraintPoolReceive_
| Constraints that are received from other processses. More...
double * | varLB_
| Variable and constraint bounds. More...
double * | varUB_
| Variable and constraint bounds. More...
double * | conLB_
| Variable and constraint bounds. More...
double * | conUB_
| Variable and constraint bounds. More...
int | numIntObjects_
| Column types. More...
int * | intColIndices_
| Column types. More...
std::vector< BcpsVariable * > | inputVar_
| User's input objects. More...
std::vector< BcpsConstraint * > | inputCon_
| User's input objects. More...
Protected Attributes inherited from BcpsModel
std::vector< BcpsConstraint * > | constraints_
| Constraints input by users (before preprocessing). More...
std::vector< BcpsVariable * > | variables_
| Variables input by users (before preprocessing). More...
int | numCoreConstraints_
| Number of core constraints. More...
int | numCoreVariables_
| Number of core variables. More...
CoinMessageHandler * | bcpsMessageHandler_
| Message handler. More...
CoinMessages | bcpsMessages_
| Bcps messages. More...
Protected Attributes inherited from AlpsModel
AlpsKnowledgeBroker * | broker_
| Knowledge broker. More...
std::string | dataFile_
| Data file. More...
AlpsParams * | AlpsPar_
| The parameter set that is used in Alps. More...
Protected Attributes inherited from AlpsKnowledge
KnowledgeType | type_

## Detailed Description

Model class for VRP.

Definition at line 32 of file VrpModel.h.

## Constructor & Destructor Documentation

VrpModel::VrpModel | ( |  | ) |
| inline

Default construtor.

Definition at line 73 of file VrpModel.h.

virtual VrpModel::~VrpModel | ( |  | ) |
| inline virtual

Destructor.

Definition at line 116 of file VrpModel.h.

## Member Function Documentation

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

Read in Alps, Blis, Vrp parameters.

Reimplemented from BlisModel.

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

Definition at line 158 of file VrpModel.h.

int VrpModel::getNumEdges | ( |  | ) |
| inline

Definition at line 160 of file VrpModel.h.

std::vector<VrpVariable *> VrpModel::getEdgeList | ( |  | ) |
| inline

Definition at line 162 of file VrpModel.h.

CoinPackedVector* VrpModel::getSolution | ( | const double * | denseSol | ) |

void VrpModel::createNet | ( | CoinPackedVector * | vec | ) |

virtual void VrpModel::registerKnowledge | ( |  | ) |
| virtual

Register knowledge.

Reimplemented from BlisModel.

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

The method that encodes the model into an encoded object.

Reimplemented from BlisModel.

virtual void VrpModel::decodeToSelf | ( | AlpsEncoded & |  | ) |
| virtual

The method that decodes the model from an encoded object.

Reimplemented from BlisModel.

## Friends And Related Function Documentation

friend class VrpCutGenerator
| friend

Definition at line 35 of file VrpModel.h.

friend class VrpSolution
| friend

Definition at line 36 of file VrpModel.h.

## Member Data Documentation

char VrpModel::name_[100]
| private

Definition at line 40 of file VrpModel.h.

int VrpModel::vertnum_
| private

Definition at line 41 of file VrpModel.h.

int VrpModel::edgenum_
| private

Definition at line 42 of file VrpModel.h.

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

Definition at line 47 of file VrpModel.h.

int* VrpModel::posx_
| private

Definition at line 48 of file VrpModel.h.

int* VrpModel::posy_
| private

Definition at line 49 of file VrpModel.h.

double* VrpModel::coordx_
| private

Definition at line 50 of file VrpModel.h.

double* VrpModel::coordy_
| private

Definition at line 51 of file VrpModel.h.

double* VrpModel::coordz_
| private

Definition at line 52 of file VrpModel.h.

double VrpModel::etol_
| private

Definition at line 53 of file VrpModel.h.

VrpParams* VrpModel::VrpPar_
| private

Definition at line 55 of file VrpModel.h.

VrpNetwork* VrpModel::n_
| private

Definition at line 56 of file VrpModel.h.

std::vector<VrpVariable *> VrpModel::edges_
| private

Definition at line 60 of file VrpModel.h.

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

- /tmp/CHiPPS-Blis-0.94.3/Blis/examples/VRP/VrpModel.h