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

#include <VrpCutGenerator.h>

Inheritance diagram for VrpCutGenerator:
Inheritance graph
[legend]
Collaboration diagram for VrpCutGenerator:
Collaboration graph
[legend]

Public Member Functions

 VrpCutGenerator (VrpModel *vrp=0, int vertnum=0)
 Construtors. More...
 
virtual ~VrpCutGenerator ()
 Destructor. More...
 
virtual bool generateConstraints (BcpsConstraintPool &conPool)
 Generate cons for the client model. More...
 
int connectivityCuts (BcpsConstraintPool &conPool)
 
int addVrpCut (BcpsConstraintPool &conPool, char *coef, int rhs, int type)
 
void setModel (VrpModel *vrp)
 
int greedyShrinking1 (VrpModel *m, int max_shrink_cuts, BcpsConstraintPool &conPool)
 
int greedyShrinking1One (VrpModel *m, int max_shrink_cuts, BcpsConstraintPool &conPool)
 
int greedyShrinking6 (VrpModel *m, int max_shrink_cuts, int trial_num, double prob, BcpsConstraintPool &conPool)
 
int greedyShrinking6One (VrpModel *m, int max_shrink_cuts, int trial_num, double prob, BcpsConstraintPool &conPool)
 
int greedyShrinking2One (VrpModel *m, int max_shrink_cuts, BcpsConstraintPool &conPool)
 
- Public Member Functions inherited from BlisConGenerator
 BlisConGenerator ()
 Default constructor. More...
 
 BlisConGenerator (BlisModel *model, CglCutGenerator *generator, const char *name=NULL, int strategy=0, bool normal=true, bool atSolution=false, bool infeasible=false)
 Useful constructor. More...
 
 BlisConGenerator (const BlisConGenerator &)
 Copy constructor. More...
 
BlisConGeneratoroperator= (const BlisConGenerator &rhs)
 Assignment operator. More...
 
 ~BlisConGenerator ()
 Destructor. More...
 
 BlisConGenerator ()
 Default constructor. More...
 
 BlisConGenerator (BlisModel *model, CglCutGenerator *generator, const char *name=NULL, BlisCutStrategy strategy=BlisCutStrategyAuto, int cutGenerationFrequency_=1, bool normal=true, bool atSolution=false, bool infeasible=false)
 Useful constructor. More...
 
 BlisConGenerator (const BlisConGenerator &)
 Copy constructor. More...
 
BlisConGeneratoroperator= (const BlisConGenerator &rhs)
 Assignment operator. More...
 
virtual ~BlisConGenerator ()
 Destructor. More...
 
bool generateCons (OsiCuts &cs, bool fullScan)
 Generate cons for the client model. More...
 
void refreshModel (BlisModel *model)
 Set the client model. More...
 
const char * name () const
 return name of generator. More...
 
void setStrategy (int value)
 Set the con generation strategy. More...
 
int strategy () const
 Get the con generation interval. More...
 
bool normal () const
 Get whether the con generator should be called in the normal place. More...
 
void setNormal (bool value)
 Set whether the con generator should be called in the normal place. More...
 
bool atSolution () const
 Get whether the con generator should be called when a solution is found. More...
 
void setAtSolution (bool value)
 Set whether the con generator should be called when a solution is found. More...
 
bool whenInfeasible () const
 Get whether the con generator should be called when the subproblem is found to be infeasible. More...
 
void setWhenInfeasible (bool value)
 Set whether the con generator should be called when the subproblem is found to be infeasible. More...
 
CglCutGeneratorgenerator () const
 Get the CglCutGenerator bound to this BlisConGenerator. More...
 
int numConsGenerated ()
 Get number of generated cons. More...
 
void addNumConsGenerated (int n)
 Increase the number of generated cons. More...
 
int numConsUsed ()
 Get number of used cons. More...
 
void addNumConsUsed (int n)
 Increase the number of generated cons. More...
 
double time ()
 Cpu time used. More...
 
void addTime (double t)
 Increase Cpu time used. More...
 
int calls ()
 Number called. More...
 
void addCalls (int n=1)
 Increase the number of called. More...
 
int noConsCalls ()
 Number called and no cons found. More...
 
void addNoConsCalls (int n=1)
 Increase the number of no cons called. More...
 
BlisModelgetModel ()
 Set the client model. More...
 
void setModel (BlisModel *m)
 Set the model. More...
 
void refreshModel (BlisModel *model)
 Refresh the model. More...
 
void setName (const char *str)
 return name of generator. More...
 
std::string name () const
 return name of generator. More...
 
void setStrategy (BlisCutStrategy value)
 Set the con generation strategy. More...
 
BlisCutStrategy strategy () const
 Get the con generation interval. More...
 
void setCutGenerationFreq (int freq)
 Set the con generation strategy. More...
 
int cutGenerationFreq () const
 Get the con generation interval. More...
 
bool normal () const
 Get whether the con generator should be called in the normal place. More...
 
void setNormal (bool value)
 Set whether the con generator should be called in the normal place. More...
 
bool atSolution () const
 Get whether the con generator should be called when a solution is found. More...
 
void setAtSolution (bool value)
 Set whether the con generator should be called when a solution is found. More...
 
bool whenInfeasible () const
 Get whether the con generator should be called when the subproblem is found to be infeasible. More...
 
void setWhenInfeasible (bool value)
 Set whether the con generator should be called when the subproblem is found to be infeasible. More...
 
CglCutGeneratorgenerator () const
 Get the CglCutGenerator bound to this BlisConGenerator. More...
 
int numConsGenerated ()
 Get number of generated cons. More...
 
void addNumConsGenerated (int n)
 Increase the number of generated cons. More...
 
int numConsUsed ()
 Get number of used cons. More...
 
void addNumConsUsed (int n)
 Increase the number of generated cons. More...
 
double time () const
 Cpu time used. More...
 
void addTime (double t)
 Increase Cpu time used. More...
 
int calls () const
 Number called. More...
 
void addCalls (int n=1)
 Increase the number of called. More...
 
int noConsCalls () const
 Number called and no cons found. More...
 
void addNoConsCalls (int n=1)
 Increase the number of no cons called. More...
 

Private Attributes

VrpModelmodel_
 
char ** coef_list
 
int * ref_
 
double * cutVal_
 
char * cutList_
 
char * inSet_
 

Additional Inherited Members

- Protected Attributes inherited from BlisConGenerator
BlisCutStrategy strategy_
 When to call CglCutGenerator::generateCuts routine. More...
 
int cutGenerationFrequency_
 The frequency of calls to the cut generator. More...
 
std::string name_
 Name of generator. More...
 

Detailed Description

Definition at line 34 of file VrpCutGenerator.h.

Constructor & Destructor Documentation

VrpCutGenerator::VrpCutGenerator ( VrpModel vrp = 0,
int  vertnum = 0 
)

Construtors.

virtual VrpCutGenerator::~VrpCutGenerator ( )
inlinevirtual

Destructor.

Definition at line 51 of file VrpCutGenerator.h.

Member Function Documentation

virtual bool VrpCutGenerator::generateConstraints ( BcpsConstraintPool conPool)
virtual

Generate cons for the client model.

The routine returns true if reoptimisation is needed (because the state of the solver interface has been modified).

Reimplemented from BlisConGenerator.

int VrpCutGenerator::connectivityCuts ( BcpsConstraintPool conPool)
int VrpCutGenerator::addVrpCut ( BcpsConstraintPool conPool,
char *  coef,
int  rhs,
int  type 
)
void VrpCutGenerator::setModel ( VrpModel vrp)
inline

Definition at line 68 of file VrpCutGenerator.h.

int VrpCutGenerator::greedyShrinking1 ( VrpModel m,
int  max_shrink_cuts,
BcpsConstraintPool conPool 
)
int VrpCutGenerator::greedyShrinking1One ( VrpModel m,
int  max_shrink_cuts,
BcpsConstraintPool conPool 
)
int VrpCutGenerator::greedyShrinking6 ( VrpModel m,
int  max_shrink_cuts,
int  trial_num,
double  prob,
BcpsConstraintPool conPool 
)
int VrpCutGenerator::greedyShrinking6One ( VrpModel m,
int  max_shrink_cuts,
int  trial_num,
double  prob,
BcpsConstraintPool conPool 
)
int VrpCutGenerator::greedyShrinking2One ( VrpModel m,
int  max_shrink_cuts,
BcpsConstraintPool conPool 
)

Member Data Documentation

VrpModel* VrpCutGenerator::model_
private

Definition at line 38 of file VrpCutGenerator.h.

char** VrpCutGenerator::coef_list
private

Definition at line 39 of file VrpCutGenerator.h.

int* VrpCutGenerator::ref_
private

Definition at line 40 of file VrpCutGenerator.h.

double* VrpCutGenerator::cutVal_
private

Definition at line 41 of file VrpCutGenerator.h.

char* VrpCutGenerator::cutList_
private

Definition at line 42 of file VrpCutGenerator.h.

char* VrpCutGenerator::inSet_
private

Definition at line 43 of file VrpCutGenerator.h.


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