#include <CglAllDifferent.hpp>
Inheritance diagram for CglAllDifferent:
Public Member Functions | |
Generate Cuts | |
virtual void | generateCuts (const OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo info=CglTreeInfo()) const |
This fixes (or reduces bounds) on sets of all different variables. | |
Constructors and destructors | |
CglAllDifferent () | |
Default constructor. | |
CglAllDifferent (int numberSets, const int *starts, const int *which) | |
Useful constructot. | |
CglAllDifferent (const CglAllDifferent &) | |
Copy constructor. | |
virtual CglCutGenerator * | clone () const |
Clone. | |
CglAllDifferent & | operator= (const CglAllDifferent &rhs) |
Assignment operator. | |
virtual | ~CglAllDifferent () |
Destructor. | |
virtual std::string | generateCpp (FILE *fp) |
Create C++ lines to get to current state. | |
virtual void | refreshSolver (OsiSolverInterface *solver) |
This can be used to refresh any inforamtion. | |
virtual bool | mayGenerateRowCutsInTree () const |
Returns true if may generate Row cuts in tree (rather than root node). | |
Sets and Gets | |
void | setLogLevel (int value) |
Set log level. | |
int | getLogLevel () const |
Get log level. | |
void | setMaxLook (int value) |
Set Maximum number of sets to look at at once. | |
int | getMaxLook () const |
Get Maximum number of sets to look at at once. | |
Private Attributes | |
Private member data | |
int | numberSets_ |
Number of sets. | |
int | numberDifferent_ |
Total number of variables in all different sets. | |
int | maxLook_ |
Maximum number of sets to look at at once. | |
int | logLevel_ |
Log level - 0 none, 1 - a bit, 2 - more details. | |
int * | start_ |
Start of each set. | |
int * | which_ |
Members (0,1,....) not as in original model. | |
int * | originalWhich_ |
Original members. |
All the members in each set are general integer variables which have to be different from all others in the set.
At present this only generates column cuts
At present it is very primitive compared to proper CSP implementations
Definition at line 18 of file CglAllDifferent.hpp.
CglAllDifferent::CglAllDifferent | ( | ) |
Default constructor.
CglAllDifferent::CglAllDifferent | ( | int | numberSets, | |
const int * | starts, | |||
const int * | which | |||
) |
Useful constructot.
CglAllDifferent::CglAllDifferent | ( | const CglAllDifferent & | ) |
Copy constructor.
virtual CglAllDifferent::~CglAllDifferent | ( | ) | [virtual] |
Destructor.
virtual void CglAllDifferent::generateCuts | ( | const OsiSolverInterface & | si, | |
OsiCuts & | cs, | |||
const CglTreeInfo | info = CglTreeInfo() | |||
) | const [virtual] |
virtual CglCutGenerator* CglAllDifferent::clone | ( | ) | const [virtual] |
CglAllDifferent& CglAllDifferent::operator= | ( | const CglAllDifferent & | rhs | ) |
Assignment operator.
virtual std::string CglAllDifferent::generateCpp | ( | FILE * | fp | ) | [virtual] |
virtual void CglAllDifferent::refreshSolver | ( | OsiSolverInterface * | solver | ) | [virtual] |
virtual bool CglAllDifferent::mayGenerateRowCutsInTree | ( | ) | const [inline, virtual] |
Returns true if may generate Row cuts in tree (rather than root node).
Used so know if matrix will change in tree. Really meant so column cut generators can still be active without worrying code. Default is true
Reimplemented from CglCutGenerator.
Definition at line 67 of file CglAllDifferent.hpp.
void CglAllDifferent::setLogLevel | ( | int | value | ) | [inline] |
int CglAllDifferent::getLogLevel | ( | ) | const [inline] |
void CglAllDifferent::setMaxLook | ( | int | value | ) | [inline] |
Set Maximum number of sets to look at at once.
Definition at line 79 of file CglAllDifferent.hpp.
References maxLook_.
int CglAllDifferent::getMaxLook | ( | ) | const [inline] |
Get Maximum number of sets to look at at once.
Definition at line 82 of file CglAllDifferent.hpp.
References maxLook_.
int CglAllDifferent::numberSets_ [private] |
int CglAllDifferent::numberDifferent_ [private] |
Total number of variables in all different sets.
Definition at line 100 of file CglAllDifferent.hpp.
int CglAllDifferent::maxLook_ [private] |
Maximum number of sets to look at at once.
Definition at line 102 of file CglAllDifferent.hpp.
Referenced by getMaxLook(), and setMaxLook().
int CglAllDifferent::logLevel_ [private] |
Log level - 0 none, 1 - a bit, 2 - more details.
Definition at line 104 of file CglAllDifferent.hpp.
Referenced by getLogLevel(), and setLogLevel().
int* CglAllDifferent::start_ [private] |
int* CglAllDifferent::which_ [private] |
int* CglAllDifferent::originalWhich_ [private] |