Alps
2.0.2
|
Interface between Abc and Cut Generation Library. More...
#include <AbcCutGenerator.h>
Public Member Functions | |
Generate Cuts | |
bool | generateCuts (OsiCuts &cs, bool fullScan) |
Generate cuts for the client model. More... | |
bool | generateCuts (OsiCuts &cs, bool fullScan) |
Generate cuts for the client model. More... | |
bool | generateCuts (OsiCuts &cs, bool fullScan) |
Generate cuts for the client model. More... | |
Constructors and destructors | |
AbcCutGenerator () | |
Default constructor. More... | |
AbcCutGenerator (AbcModel *model, CglCutGenerator *generator, int howOften=1, const char *name=NULL, bool normal=true, bool atSolution=false, bool infeasible=false) | |
Normal constructor. More... | |
AbcCutGenerator (const AbcCutGenerator &) | |
Copy constructor. More... | |
AbcCutGenerator & | operator= (const AbcCutGenerator &rhs) |
Assignment operator. More... | |
~AbcCutGenerator () | |
Destructor. More... | |
AbcCutGenerator () | |
Default constructor. More... | |
AbcCutGenerator (AbcModel *model, CglCutGenerator *generator, int howOften=1, const char *name=NULL, bool normal=true, bool atSolution=false, bool infeasible=false) | |
Normal constructor. More... | |
AbcCutGenerator (const AbcCutGenerator &) | |
Copy constructor. More... | |
AbcCutGenerator & | operator= (const AbcCutGenerator &rhs) |
Assignment operator. More... | |
~AbcCutGenerator () | |
Destructor. More... | |
AbcCutGenerator () | |
Default constructor. More... | |
AbcCutGenerator (AbcModel *model, CglCutGenerator *generator, int howOften=1, const char *name=NULL, bool normal=true, bool atSolution=false, bool infeasible=false) | |
Normal constructor. More... | |
AbcCutGenerator (const AbcCutGenerator &) | |
Copy constructor. More... | |
AbcCutGenerator & | operator= (const AbcCutGenerator &rhs) |
Assignment operator. More... | |
~AbcCutGenerator () | |
Destructor. More... | |
Gets and sets | |
AbcModel * | model_ |
The client model. More... | |
CglCutGenerator * | generator_ |
int | whenCutGenerator_ |
Number of nodes between calls to the CglCutGenerator::generateCuts routine. More... | |
char * | generatorName_ |
Name of generator. More... | |
bool | normal_ |
Whether to call the generator in the normal place. More... | |
bool | atSolution_ |
Whether to call the generator when a new solution is found. More... | |
bool | whenInfeasible_ |
Whether to call generator when a subproblem is found to be infeasible. More... | |
void | refreshModel (AbcModel *model) |
Set the client model. More... | |
const char * | cutGeneratorName () const |
return name of generator More... | |
void | setHowOften (int value) |
Set the cut generation interval. More... | |
int | howOften () const |
Get the cut generation interval. More... | |
bool | normal () const |
Get whether the cut generator should be called in the normal place. More... | |
void | setNormal (bool value) |
Set whether the cut generator should be called in the normal place. More... | |
bool | atSolution () const |
Get whether the cut generator should be called when a solution is found. More... | |
void | setAtSolution (bool value) |
Set whether the cut generator should be called when a solution is found. More... | |
bool | whenInfeasible () const |
Get whether the cut generator should be called when the subproblem is found to be infeasible. More... | |
void | setWhenInfeasible (bool value) |
Set whether the cut generator should be called when the subproblem is found to be infeasible. More... | |
CglCutGenerator * | generator () const |
Get the CglCutGenerator bound to this AbcCutGenerator . More... | |
void | refreshModel (AbcModel *model) |
Set the client model. More... | |
const char * | cutGeneratorName () const |
return name of generator More... | |
void | setHowOften (int value) |
Set the cut generation interval. More... | |
int | howOften () const |
Get the cut generation interval. More... | |
bool | normal () const |
Get whether the cut generator should be called in the normal place. More... | |
void | setNormal (bool value) |
Set whether the cut generator should be called in the normal place. More... | |
bool | atSolution () const |
Get whether the cut generator should be called when a solution is found. More... | |
void | setAtSolution (bool value) |
Set whether the cut generator should be called when a solution is found. More... | |
bool | whenInfeasible () const |
Get whether the cut generator should be called when the subproblem is found to be infeasible. More... | |
void | setWhenInfeasible (bool value) |
Set whether the cut generator should be called when the subproblem is found to be infeasible. More... | |
CglCutGenerator * | generator () const |
Get the CglCutGenerator bound to this AbcCutGenerator . More... | |
void | refreshModel (AbcModel *model) |
Set the client model. More... | |
const char * | cutGeneratorName () const |
return name of generator More... | |
void | setHowOften (int value) |
Set the cut generation interval. More... | |
int | howOften () const |
Get the cut generation interval. More... | |
bool | normal () const |
Get whether the cut generator should be called in the normal place. More... | |
void | setNormal (bool value) |
Set whether the cut generator should be called in the normal place. More... | |
bool | atSolution () const |
Get whether the cut generator should be called when a solution is found. More... | |
void | setAtSolution (bool value) |
Set whether the cut generator should be called when a solution is found. More... | |
bool | whenInfeasible () const |
Get whether the cut generator should be called when the subproblem is found to be infeasible. More... | |
void | setWhenInfeasible (bool value) |
Set whether the cut generator should be called when the subproblem is found to be infeasible. More... | |
CglCutGenerator * | generator () const |
Get the CglCutGenerator bound to this AbcCutGenerator . More... | |
Interface between Abc and Cut Generation Library.
AbcCutGenerator
is intended to provide an intelligent interface between Abc and the cutting plane algorithms in the CGL. A AbcCutGenerator
is bound to a CglCutGenerator
and to an AbcModel
. It contains parameters which control when and how the generateCuts
method of the CglCutGenerator
will be called.
The builtin decision criteria available to use when deciding whether to generate cuts are limited: every X nodes, when a solution is found, and when a subproblem is found to be infeasible. The idea is that the class will grow more intelligent with time.
generateCuts
method. Create a default decision method that looks at the builtin criteria.AbcCutGenerator
is intended to provide an intelligent interface between Abc and the cutting plane algorithms in the CGL. A AbcCutGenerator
is bound to a CglCutGenerator
and to an AbcModel
. It contains parameters which control when and how the generateCuts
method of the CglCutGenerator
will be called.
The builtin decision criteria available to use when deciding whether to generate cuts are limited: every X nodes, when a solution is found, and when a subproblem is found to be infeasible. The idea is that the class will grow more intelligent with time.
generateCuts
method. Create a default decision method that looks at the builtin criteria.AbcCutGenerator
is intended to provide an intelligent interface between Abc and the cutting plane algorithms in the CGL. A AbcCutGenerator
is bound to a CglCutGenerator
and to an AbcModel
. It contains parameters which control when and how the generateCuts
method of the CglCutGenerator
will be called.
The builtin decision criteria available to use when deciding whether to generate cuts are limited: every X nodes, when a solution is found, and when a subproblem is found to be infeasible. The idea is that the class will grow more intelligent with time.
generateCuts
method. Create a default decision method that looks at the builtin criteria.Definition at line 73 of file AbcCutGenerator.h.
AbcCutGenerator::AbcCutGenerator | ( | ) |
Default constructor.
AbcCutGenerator::AbcCutGenerator | ( | AbcModel * | model, |
CglCutGenerator * | generator, | ||
int | howOften = 1 , |
||
const char * | name = NULL , |
||
bool | normal = true , |
||
bool | atSolution = false , |
||
bool | infeasible = false |
||
) |
Normal constructor.
AbcCutGenerator::AbcCutGenerator | ( | const AbcCutGenerator & | ) |
Copy constructor.
AbcCutGenerator::~AbcCutGenerator | ( | ) |
Destructor.
AbcCutGenerator::AbcCutGenerator | ( | ) |
Default constructor.
AbcCutGenerator::AbcCutGenerator | ( | AbcModel * | model, |
CglCutGenerator * | generator, | ||
int | howOften = 1 , |
||
const char * | name = NULL , |
||
bool | normal = true , |
||
bool | atSolution = false , |
||
bool | infeasible = false |
||
) |
Normal constructor.
AbcCutGenerator::AbcCutGenerator | ( | const AbcCutGenerator & | ) |
Copy constructor.
AbcCutGenerator::~AbcCutGenerator | ( | ) |
Destructor.
AbcCutGenerator::AbcCutGenerator | ( | ) |
Default constructor.
AbcCutGenerator::AbcCutGenerator | ( | AbcModel * | model, |
CglCutGenerator * | generator, | ||
int | howOften = 1 , |
||
const char * | name = NULL , |
||
bool | normal = true , |
||
bool | atSolution = false , |
||
bool | infeasible = false |
||
) |
Normal constructor.
AbcCutGenerator::AbcCutGenerator | ( | const AbcCutGenerator & | ) |
Copy constructor.
AbcCutGenerator::~AbcCutGenerator | ( | ) |
Destructor.
bool AbcCutGenerator::generateCuts | ( | OsiCuts & | cs, |
bool | fullScan | ||
) |
Generate cuts for the client model.
Evaluate the state of the client model and decide whether to generate cuts. The generated cuts are inserted into and returned in the collection of cuts cs
.
If fullScan
is true, the generator is obliged to call the CGL generateCuts
routine. Otherwise, it is free to make a local decision. The current implementation uses whenCutGenerator_
to decide.
The routine returns true if reoptimisation is needed (because the state of the solver interface has been modified).
AbcCutGenerator& AbcCutGenerator::operator= | ( | const AbcCutGenerator & | rhs | ) |
Assignment operator.
void AbcCutGenerator::refreshModel | ( | AbcModel * | model | ) |
Set the client model.
In addition to setting the client model, refreshModel also calls the refreshSolver
method of the CglCutGenerator object.
|
inline |
return name of generator
Definition at line 128 of file AbcCutGenerator.h.
void AbcCutGenerator::setHowOften | ( | int | value | ) |
Set the cut generation interval.
Set the number of nodes evaluated between calls to the Cgl object's generateCuts
routine.
If value
is positive, cuts will always be generated at the specified interval. If value
is negative, cuts will initially be generated at the specified interval, but Abc may adjust the value depending on the success of cuts produced by this generator.
A value of -100 disables the generator, while a value of -99 means just at root.
|
inline |
Get the cut generation interval.
Definition at line 150 of file AbcCutGenerator.h.
|
inline |
Get whether the cut generator should be called in the normal place.
Definition at line 154 of file AbcCutGenerator.h.
|
inline |
Set whether the cut generator should be called in the normal place.
Definition at line 157 of file AbcCutGenerator.h.
|
inline |
Get whether the cut generator should be called when a solution is found.
Definition at line 160 of file AbcCutGenerator.h.
|
inline |
Set whether the cut generator should be called when a solution is found.
Definition at line 163 of file AbcCutGenerator.h.
|
inline |
Get whether the cut generator should be called when the subproblem is found to be infeasible.
Definition at line 168 of file AbcCutGenerator.h.
|
inline |
Set whether the cut generator should be called when the subproblem is found to be infeasible.
Definition at line 173 of file AbcCutGenerator.h.
|
inline |
Get the CglCutGenerator
bound to this AbcCutGenerator
.
Definition at line 176 of file AbcCutGenerator.h.
bool AbcCutGenerator::generateCuts | ( | OsiCuts & | cs, |
bool | fullScan | ||
) |
Generate cuts for the client model.
Evaluate the state of the client model and decide whether to generate cuts. The generated cuts are inserted into and returned in the collection of cuts cs
.
If fullScan
is true, the generator is obliged to call the CGL generateCuts
routine. Otherwise, it is free to make a local decision. The current implementation uses whenCutGenerator_
to decide.
The routine returns true if reoptimisation is needed (because the state of the solver interface has been modified).
AbcCutGenerator& AbcCutGenerator::operator= | ( | const AbcCutGenerator & | rhs | ) |
Assignment operator.
void AbcCutGenerator::refreshModel | ( | AbcModel * | model | ) |
Set the client model.
In addition to setting the client model, refreshModel also calls the refreshSolver
method of the CglCutGenerator object.
|
inline |
return name of generator
Definition at line 128 of file AbcCutGenerator.h.
void AbcCutGenerator::setHowOften | ( | int | value | ) |
Set the cut generation interval.
Set the number of nodes evaluated between calls to the Cgl object's generateCuts
routine.
If value
is positive, cuts will always be generated at the specified interval. If value
is negative, cuts will initially be generated at the specified interval, but Abc may adjust the value depending on the success of cuts produced by this generator.
A value of -100 disables the generator, while a value of -99 means just at root.
|
inline |
Get the cut generation interval.
Definition at line 150 of file AbcCutGenerator.h.
|
inline |
Get whether the cut generator should be called in the normal place.
Definition at line 154 of file AbcCutGenerator.h.
|
inline |
Set whether the cut generator should be called in the normal place.
Definition at line 157 of file AbcCutGenerator.h.
|
inline |
Get whether the cut generator should be called when a solution is found.
Definition at line 160 of file AbcCutGenerator.h.
|
inline |
Set whether the cut generator should be called when a solution is found.
Definition at line 163 of file AbcCutGenerator.h.
|
inline |
Get whether the cut generator should be called when the subproblem is found to be infeasible.
Definition at line 168 of file AbcCutGenerator.h.
|
inline |
Set whether the cut generator should be called when the subproblem is found to be infeasible.
Definition at line 173 of file AbcCutGenerator.h.
|
inline |
Get the CglCutGenerator
bound to this AbcCutGenerator
.
Definition at line 176 of file AbcCutGenerator.h.
bool AbcCutGenerator::generateCuts | ( | OsiCuts & | cs, |
bool | fullScan | ||
) |
Generate cuts for the client model.
Evaluate the state of the client model and decide whether to generate cuts. The generated cuts are inserted into and returned in the collection of cuts cs
.
If fullScan
is true, the generator is obliged to call the CGL generateCuts
routine. Otherwise, it is free to make a local decision. The current implementation uses whenCutGenerator_
to decide.
The routine returns true if reoptimisation is needed (because the state of the solver interface has been modified).
AbcCutGenerator& AbcCutGenerator::operator= | ( | const AbcCutGenerator & | rhs | ) |
Assignment operator.
void AbcCutGenerator::refreshModel | ( | AbcModel * | model | ) |
Set the client model.
In addition to setting the client model, refreshModel also calls the refreshSolver
method of the CglCutGenerator object.
|
inline |
return name of generator
Definition at line 128 of file AbcCutGenerator.h.
void AbcCutGenerator::setHowOften | ( | int | value | ) |
Set the cut generation interval.
Set the number of nodes evaluated between calls to the Cgl object's generateCuts
routine.
If value
is positive, cuts will always be generated at the specified interval. If value
is negative, cuts will initially be generated at the specified interval, but Abc may adjust the value depending on the success of cuts produced by this generator.
A value of -100 disables the generator, while a value of -99 means just at root.
|
inline |
Get the cut generation interval.
Definition at line 150 of file AbcCutGenerator.h.
|
inline |
Get whether the cut generator should be called in the normal place.
Definition at line 154 of file AbcCutGenerator.h.
|
inline |
Set whether the cut generator should be called in the normal place.
Definition at line 157 of file AbcCutGenerator.h.
|
inline |
Get whether the cut generator should be called when a solution is found.
Definition at line 160 of file AbcCutGenerator.h.
|
inline |
Set whether the cut generator should be called when a solution is found.
Definition at line 163 of file AbcCutGenerator.h.
|
inline |
Get whether the cut generator should be called when the subproblem is found to be infeasible.
Definition at line 168 of file AbcCutGenerator.h.
|
inline |
Set whether the cut generator should be called when the subproblem is found to be infeasible.
Definition at line 173 of file AbcCutGenerator.h.
|
inline |
Get the CglCutGenerator
bound to this AbcCutGenerator
.
Definition at line 176 of file AbcCutGenerator.h.
|
private |
The client model.
Definition at line 182 of file AbcCutGenerator.h.
|
private |
Definition at line 185 of file AbcCutGenerator.h.
|
private |
Number of nodes between calls to the CglCutGenerator::generateCuts routine.
Definition at line 190 of file AbcCutGenerator.h.
|
private |
Name of generator.
Definition at line 193 of file AbcCutGenerator.h.
|
private |
Whether to call the generator in the normal place.
Definition at line 196 of file AbcCutGenerator.h.
|
private |
Whether to call the generator when a new solution is found.
Definition at line 199 of file AbcCutGenerator.h.
|
private |
Whether to call generator when a subproblem is found to be infeasible.
Definition at line 202 of file AbcCutGenerator.h.