Loading...
Searching...
No Matches
CglAllDifferent Class Reference

AllDifferent Cut Generator Class This has a number of sets. More...

`#include <CglAllDifferent.hpp>`

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

## 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.
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.
Public Member Functions inherited from CglCutGenerator
| CglCutGenerator ()
| Default constructor.
| CglCutGenerator (const CglCutGenerator &)
| Copy constructor.
CglCutGenerator & | operator= (const CglCutGenerator &rhs)
| Assignment operator.
virtual | ~CglCutGenerator ()
| Destructor.
int | getAggressiveness () const
| Get Aggressiveness - 0 = neutral, 100 is normal root node.
void | setAggressiveness (int value)
| Set Aggressiveness - 0 = neutral, 100 is normal root node.
void | setGlobalCuts (bool trueOrFalse)
| Set whether can do global cuts.
bool | canDoGlobalCuts () const
| Say whether can do global cuts.
virtual bool | needsOptimalBasis () const
| Return true if needs optimal basis to do cuts.
virtual int | maximumLengthOfCutInTree () const
| Return maximum length of cut in tree.

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

## Additional Inherited Members

int | aggressive_
| Aggressiveness - 0 = neutral, 100 is normal root node.
bool | canDoGlobalCuts_
| True if can do global cuts i.e. no general integers.

## Detailed Description

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.

## Constructor & Destructor Documentation

## CglAllDifferent() [1/3]

CglAllDifferent::CglAllDifferent | ( |  | ) |

Default constructor.

## CglAllDifferent() [2/3]

CglAllDifferent::CglAllDifferent | ( | int | numberSets,
|  | const int * | starts,
|  | const int * | which )

Useful constructot.

## CglAllDifferent() [3/3]

CglAllDifferent::CglAllDifferent | ( | const CglAllDifferent & |  | ) |

Copy constructor.

## ~CglAllDifferent()

virtual CglAllDifferent::~CglAllDifferent | ( |  | ) |

virtual

Destructor.

## Member Function Documentation

## generateCuts()

virtual void CglAllDifferent::generateCuts | ( | const OsiSolverInterface & | si,
|  | OsiCuts & | cs,
|  | const CglTreeInfo | info = CglTreeInfo() )

virtual

This fixes (or reduces bounds) on sets of all different variables.

Implements CglCutGenerator.

## clone()

virtual CglCutGenerator * CglAllDifferent::clone | ( |  | ) | const

virtual

Clone.

Implements CglCutGenerator.

## operator=()

CglAllDifferent & CglAllDifferent::operator= | ( | const CglAllDifferent & | rhs | ) |

Assignment operator.

## generateCpp()

virtual std::string CglAllDifferent::generateCpp | ( | FILE * | fp | ) |

virtual

Create C++ lines to get to current state.

Reimplemented from CglCutGenerator.

## refreshSolver()

virtual void CglAllDifferent::refreshSolver | ( | OsiSolverInterface * | solver | ) |

virtual

This can be used to refresh any inforamtion.

Reimplemented from CglCutGenerator.

## mayGenerateRowCutsInTree()

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 69 of file CglAllDifferent.hpp.

## setLogLevel()

void CglAllDifferent::setLogLevel | ( | int | value | ) |

inline

Set log level.

Definition at line 75 of file CglAllDifferent.hpp.

## getLogLevel()

int CglAllDifferent::getLogLevel | ( |  | ) | const

inline

Get log level.

Definition at line 78 of file CglAllDifferent.hpp.

## setMaxLook()

void CglAllDifferent::setMaxLook | ( | int | value | ) |

inline

Set Maximum number of sets to look at at once.

Definition at line 81 of file CglAllDifferent.hpp.

## getMaxLook()

int CglAllDifferent::getMaxLook | ( |  | ) | const

inline

Get Maximum number of sets to look at at once.

Definition at line 84 of file CglAllDifferent.hpp.

## Member Data Documentation

## numberSets_

int CglAllDifferent::numberSets_

private

Number of sets.

Definition at line 100 of file CglAllDifferent.hpp.

## numberDifferent_

int CglAllDifferent::numberDifferent_

private

Total number of variables in all different sets.

Definition at line 102 of file CglAllDifferent.hpp.

## maxLook_

int CglAllDifferent::maxLook_

private

Maximum number of sets to look at at once.

Definition at line 104 of file CglAllDifferent.hpp.

## logLevel_

int CglAllDifferent::logLevel_

private

Log level - 0 none, 1 - a bit, 2 - more details.

Definition at line 106 of file CglAllDifferent.hpp.

## start_

int* CglAllDifferent::start_

private

Start of each set.

Definition at line 108 of file CglAllDifferent.hpp.

## which_

int* CglAllDifferent::which_

private

Members (0,1,....) not as in original model.

Definition at line 110 of file CglAllDifferent.hpp.

## originalWhich_

int* CglAllDifferent::originalWhich_

private

Original members.

Definition at line 112 of file CglAllDifferent.hpp.

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

- Cgl/src/CglAllDifferent/CglAllDifferent.hpp