AllDifferent Cut Generator Class This has a number of sets. More...
#include <CglAllDifferent.hpp>
Public Member Functions | |
Generate Cuts | |
virtual void | generateCuts (const OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo info=CglTreeInfo()) |
This fixes (or reduces bounds) on sets of all different variables. More... | |
Constructors and destructors | |
CglAllDifferent () | |
Default constructor. More... | |
CglAllDifferent (int numberSets, const int *starts, const int *which) | |
Useful constructot. More... | |
CglAllDifferent (const CglAllDifferent &) | |
Copy constructor. More... | |
virtual CglCutGenerator * | clone () const |
Clone. More... | |
CglAllDifferent & | operator= (const CglAllDifferent &rhs) |
Assignment operator. More... | |
virtual | ~CglAllDifferent () |
Destructor. More... | |
virtual std::string | generateCpp (FILE *fp) |
Create C++ lines to get to current state. More... | |
virtual void | refreshSolver (OsiSolverInterface *solver) |
This can be used to refresh any inforamtion. More... | |
virtual bool | mayGenerateRowCutsInTree () const |
Returns true if may generate Row cuts in tree (rather than root node). More... | |
Sets and Gets | |
void | setLogLevel (int value) |
Set log level. More... | |
int | getLogLevel () const |
Get log level. More... | |
void | setMaxLook (int value) |
Set Maximum number of sets to look at at once. More... | |
int | getMaxLook () const |
Get Maximum number of sets to look at at once. More... | |
![]() | |
CglCutGenerator () | |
Default constructor. More... | |
CglCutGenerator (const CglCutGenerator &) | |
Copy constructor. More... | |
CglCutGenerator & | operator= (const CglCutGenerator &rhs) |
Assignment operator. More... | |
virtual | ~CglCutGenerator () |
Destructor. More... | |
int | getAggressiveness () const |
Get Aggressiveness - 0 = neutral, 100 is normal root node. More... | |
void | setAggressiveness (int value) |
Set Aggressiveness - 0 = neutral, 100 is normal root node. More... | |
void | setGlobalCuts (bool trueOrFalse) |
Set whether can do global cuts. More... | |
bool | canDoGlobalCuts () const |
Say whether can do global cuts. More... | |
virtual bool | needsOptimalBasis () const |
Return true if needs optimal basis to do cuts. More... | |
virtual int | maximumLengthOfCutInTree () const |
Return maximum length of cut in tree. More... | |
Private Attributes | |
Private member data | |
int | numberSets_ |
Number of sets. More... | |
int | numberDifferent_ |
Total number of variables in all different sets. More... | |
int | maxLook_ |
Maximum number of sets to look at at once. More... | |
int | logLevel_ |
Log level - 0 none, 1 - a bit, 2 - more details. More... | |
int * | start_ |
Start of each set. More... | |
int * | which_ |
Members (0,1,....) not as in original model. More... | |
int * | originalWhich_ |
Original members. More... | |
Additional Inherited Members | |
![]() | |
int | aggressive_ |
Aggressiveness - 0 = neutral, 100 is normal root node. More... | |
bool | canDoGlobalCuts_ |
True if can do global cuts i.e. no general integers. More... | |
AllDifferent Cut Generator Class This has a number of sets.
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 20 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 |
Destructor.
|
virtual |
This fixes (or reduces bounds) on sets of all different variables.
Implements CglCutGenerator.
|
virtual |
Clone.
Implements CglCutGenerator.
CglAllDifferent& CglAllDifferent::operator= | ( | const CglAllDifferent & | rhs | ) |
Assignment operator.
|
virtual |
Create C++ lines to get to current state.
Reimplemented from CglCutGenerator.
|
virtual |
This can be used to refresh any inforamtion.
Reimplemented from CglCutGenerator.
|
inlinevirtual |
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 69 of file CglAllDifferent.hpp.
|
inline |
Set log level.
Definition at line 75 of file CglAllDifferent.hpp.
|
inline |
Get log level.
Definition at line 78 of file CglAllDifferent.hpp.
|
inline |
Set Maximum number of sets to look at at once.
Definition at line 81 of file CglAllDifferent.hpp.
|
inline |
Get Maximum number of sets to look at at once.
Definition at line 84 of file CglAllDifferent.hpp.
|
private |
Number of sets.
Definition at line 100 of file CglAllDifferent.hpp.
|
private |
Total number of variables in all different sets.
Definition at line 102 of file CglAllDifferent.hpp.
|
private |
Maximum number of sets to look at at once.
Definition at line 104 of file CglAllDifferent.hpp.
|
private |
Log level - 0 none, 1 - a bit, 2 - more details.
Definition at line 106 of file CglAllDifferent.hpp.
|
private |
Start of each set.
Definition at line 108 of file CglAllDifferent.hpp.
|
private |
Members (0,1,....) not as in original model.
Definition at line 110 of file CglAllDifferent.hpp.
|
private |
Original members.
Definition at line 112 of file CglAllDifferent.hpp.