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

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

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

`#include <VrpHeurTSP.h>`

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

## Public Member Functions
| VrpHeurTSP ()
| Default Constructor. More...
| VrpHeurTSP (VrpModel *model, const char *name, BlisHeurStrategy strategy, int freq)
| Constructor with model. More...
| ~VrpHeurTSP ()
| Destructor. More...
virtual bool | searchSolution (double &objectiveValue, double *newSolution)
| Returns 0 if no solution, 1 if valid solution. More...
Public Member Functions inherited from BlisHeuristic
| BlisHeuristic ()
| Default Constructor. More...
| BlisHeuristic (BlisModel *model, const char *name, int strategy)
| Useful constructor. More...
virtual | ~BlisHeuristic ()
| Distructor. More...
| BlisHeuristic (const BlisHeuristic &rhs)
| Copy constructor. More...
virtual void | setModel (BlisModel *model)
| update model (This is needed if cliques update matrix etc). More...
| BlisHeuristic ()
| Default Constructor. More...
| BlisHeuristic (BlisModel *model, const char *name, BlisHeurStrategy strategy, int heurCallFrequency)
| Useful constructor. More...
virtual | ~BlisHeuristic ()
| Distructor. More...
| BlisHeuristic (const BlisHeuristic &rhs)
| Copy constructor. More...
virtual void | setModel (BlisModel *model)
| update model (This is needed if cliques update matrix etc). More...
virtual void | setStrategy (int strategy)
| Get/set strategy. More...
virtual int | strategy ()
| Get/set strategy. More...
virtual BlisHeuristic * | clone () const =0
| Clone a heuristic. More...
virtual int | searchSolution (double &objectiveValue, double *newSolution, OsiCuts &cs)
| returns 0 if no solution, 1 if valid solution, -1 if just returning an estimate of best possible solution with better objective value than one passed in Sets solution values if good, sets objective value (only if nonzero code) This is called at same time as cut generators - so can add cuts Default is do nothing More...
int | numSolutions ()
| Number of solutions found. More...
double | time ()
| Cpu time used. More...
int | calls ()
| Cpu time used. More...
virtual void | setStrategy (BlisHeurStrategy strategy)
| Get/set strategy. More...
virtual BlisHeurStrategy | strategy () const
| Get/set strategy. More...
virtual void | setHeurCallFrequency (int freq)
| Get/set call frequency. More...
virtual int | heurCallFrequency () const
| Get/set strategy. More...
virtual BlisHeuristic * | clone () const
| Clone a heuristic. More...
virtual bool | searchSolution (double &objectiveValue, double *newSolution, OsiCuts &cs)
| returns 0 if no solution, 1 if valid solution, -1 if just returning an estimate of best possible solution with better objective value than one passed in Sets solution values if good, sets objective value (only if nonzero code) This is called at same time as cut generators - so can add cuts Default is do nothing More...
const char * | name () const
| return name of generator. More...
void | addNumSolutions (int num=1)
| Record number of solutions found. More...
int | numSolutions () const
| Number of solutions found. More...
void | addTime (double t=0.0)
| Record Cpu time used. More...
double | time () const
| Cpu time used. More...
void | addCalls (int c=1)
| Record number of times called. More...
int | calls () const
| Number of times called. More...
int | noSolCalls () const
| Number called and no cons found. More...
void | addNoSolCalls (int n=1)
| Increase the number of no cons called. More...

## Protected Member Functions
void | createAdjList (VrpModel *model)
| Create adjacent list for each vertex. More...
void | freeGuts ()

## Protected Attributes
std::vector< CoinPackedVector * > | adjList_
std::vector< int > | tour_
| TSP Tour. More...
bool * | visited_
| Mark if vertices have been visited. More...
int | preNode_
| The node at which this heuristic was call. More...
int * | neighbors_
| Neighbors determined from LP solution. More...
int | nodeCalls_
| Call how many time at a node. More...
std::vector< int > * | edgeColMatch_
| Edge and column relationship. More...
Protected Attributes inherited from BlisHeuristic
BlisModel * | model_
| Pointer to the model. More...
char * | name_
| Heuristics name. More...
int | strategy_
| When to call findSolution() routine. More...
int | numSolutions_
| Number of solutions found. More...
double | time_
| Used CPU/User time. More...
int | calls_
| The times of calling this heuristic. More...
BlisHeurStrategy | strategy_
| When to call findSolution() routine. More...
int | heurCallFrequency_
| The frequency with which to call the heuristic. More...
int | noSolsCalls_
| The times of calling this heuristic and no solutions found. More...

## Private Member Functions
VrpHeurTSP & | operator= (const VrpHeurTSP &rhs)
| Illegal Assignment operator. More...

## Detailed Description

Definition at line 54 of file VrpHeurTSP.h.

## Constructor & Destructor Documentation

VrpHeurTSP::VrpHeurTSP | ( |  | ) |
| inline

Default Constructor.

Definition at line 112 of file VrpHeurTSP.h.

VrpHeurTSP::VrpHeurTSP | ( | VrpModel * | model,
|  | const char * | name,
|  | BlisHeurStrategy | strategy,
|  | int | freq
| ) |  |
| inline

Constructor with model.

Definition at line 118 of file VrpHeurTSP.h.

VrpHeurTSP::~VrpHeurTSP | ( |  | ) |
| inline

Destructor.

Definition at line 132 of file VrpHeurTSP.h.

## Member Function Documentation

VrpHeurTSP& VrpHeurTSP::operator= | ( | const VrpHeurTSP & | rhs | ) |
| private

Illegal Assignment operator.

void VrpHeurTSP::createAdjList | ( | VrpModel * | model | ) |
| protected

Create adjacent list for each vertex.

void VrpHeurTSP::freeGuts | ( |  | ) |
| inline protected

Definition at line 90 of file VrpHeurTSP.h.

virtual bool VrpHeurTSP::searchSolution | ( | double & | objectiveValue,
|  | double * | newSolution
| ) |  |
| virtual

Returns 0 if no solution, 1 if valid solution.

newSolution stores the solution in dense format.

Implements BlisHeuristic.

## Member Data Documentation

std::vector<CoinPackedVector *> VrpHeurTSP::adjList_
| protected

Definition at line 65 of file VrpHeurTSP.h.

std::vector<int> VrpHeurTSP::tour_
| protected

TSP Tour.

Definition at line 71 of file VrpHeurTSP.h.

bool* VrpHeurTSP::visited_
| protected

Mark if vertices have been visited.

Definition at line 74 of file VrpHeurTSP.h.

int VrpHeurTSP::preNode_
| protected

The node at which this heuristic was call.

Definition at line 77 of file VrpHeurTSP.h.

int* VrpHeurTSP::neighbors_
| protected

Neighbors determined from LP solution.

Definition at line 81 of file VrpHeurTSP.h.

int VrpHeurTSP::nodeCalls_
| protected

Call how many time at a node.

Definition at line 84 of file VrpHeurTSP.h.

std::vector<int>* VrpHeurTSP::edgeColMatch_
| protected

Edge and column relationship.

Give an edge {v0, v1}, edgeColMatch_[v1-1][v0] is the column index.

Definition at line 88 of file VrpHeurTSP.h.

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

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