A Cut management system. More...
#include <cuts.h>
Classes | |
class | CutInfo |
Class for communication between CutPool and LinearRelax. More... | |
Public Types | |
enum | CutType { SIMPLE, LINEARIZATION, INTERVALGRADIENT } |
Public Member Functions | |
CutPool (int inactivetime_limit_global_=10, int inactivetime_limit_local_=3) | |
CutPool (const CutPool &cutpool, Pointer< MinlpNode > node=NULL) | |
A copy of a given cutpool, containing only these cuts, which are defined for a specific node, or are global. | |
CutInfo | add_cut (Pointer< SimpleCut >, Pointer< MinlpNode > node, int blocknr=-1) |
Adds a cut to the pool. | |
CutInfo | add_cut (Pointer< IntervalGradientCut > intgradcut, Pointer< MinlpNode > node, int blocknr) |
Adds a IntervalGradientCut to the pool. | |
CutInfo | add_cut (Pointer< LinearizationCut > linearizationcut, Pointer< MinlpNode > node, int blocknr) |
Adds a LinearizationCut to the pool. | |
void | integrate (const CutPool &cutpool, Pointer< MinlpNode > node=NULL) |
Adds the untagged cuts of a cutpool to this one. | |
void | duplicate_nodeinfo (Pointer< MinlpNode > oldnode, Pointer< MinlpNode > newnode) |
void | remove_node (Pointer< MinlpNode > node) |
void | update_nodeinfo (list< CutInfo > &cutinfos, int block_nr, Pointer< MinlpNode > node) |
Updates the information, which cuts were inactive. | |
void | get_cuts (list< CutInfo > &cutinfos, int blocknr, Pointer< MinlpNode > node=NULL) |
Builds a list of CutInfo's to point to these cuts, which belong to a given node. | |
void | update_cuts (Pointer< MinlpNode > node, int blocknr, const dvector &low, const dvector &up, IntervalGradientCutGenerator &generator, LinearizedConCutGenerator &linconcutgen) |
Updates the IntervalGradientCuts of a specific node after the bounds changed. | |
bool | feasible (Pointer< MinlpNode > node, const dvector &x, double tol=1E-4) const |
Checks, whether a point is feasible for the cuts. | |
int | nr_local_cuts (Pointer< MinlpNode > node) const |
The number of local cuts for a specific node. | |
int | nr_global_cuts () const |
The number of global cuts. | |
int | nr_all_cuts () const |
The complete number of cuts, all local cuts plus the global ones. | |
Private Attributes | |
list< Cut< SimpleCut > > | simplecuts |
Cuts which are defined by a seperating hyperplane. | |
list< Cut< LinearizationCut > > | linearizationcuts |
Cuts also defined by a seperating hyperplane. | |
list< Cut< IntervalGradientCut > > | intgradcuts |
IntervalGradientCuts. | |
int | cuts_size |
The number of cuts in this CutPool. | |
int | inactivetime_limit_global |
int | inactivetime_limit_local |
A Cut management system.
Cut | inactive time limit options integer defaults 10 level 2 Determines, after how many consecutive (R)-solves, in which a cut was inactive, will be removed. 0 means no removals. Affects only cuts which are not specific for a node (global). So called local cuts are removed (from their node) as soon as they become inactive. |
Definition at line 235 of file cuts.h.
enum CutPool::CutType |
CutPool::CutPool | ( | int | inactivetime_limit_global_ = 10 , |
|
int | inactivetime_limit_local_ = 3 | |||
) | [inline] |
A copy of a given cutpool, containing only these cuts, which are defined for a specific node, or are global.
CutInfo CutPool::add_cut | ( | Pointer< IntervalGradientCut > | intgradcut, | |
Pointer< MinlpNode > | node, | |||
int | blocknr | |||
) |
Adds a IntervalGradientCut to the pool.
cut | The cut to add. | |
node | For local cuts, put the node, the cut belongs to, here. For global cuts, put NULL here. | |
blocknr | The block number to put in the CutInfo. |
CutInfo CutPool::add_cut | ( | Pointer< LinearizationCut > | linearizationcut, | |
Pointer< MinlpNode > | node, | |||
int | blocknr | |||
) |
Adds a LinearizationCut to the pool.
Adds the untagged cuts of a cutpool to this one.
cutpool | The cuts to add. | |
node | The node, which should use these cuts. Or NULL, if intended as global cuts. |
void CutPool::update_nodeinfo | ( | list< CutInfo > & | cutinfos, | |
int | block_nr, | |||
Pointer< MinlpNode > | node | |||
) |
Updates the information, which cuts were inactive.
If a cut is not needed anymore, it's removed from the cutlist.
cutinfos | On input, info about the inactivity of the cuts. On output, info about which cuts are invalid for the node now. | |
block_nr | Only CutInfo's with this block number are checked. |
void CutPool::get_cuts | ( | list< CutInfo > & | cutinfos, | |
int | blocknr, | |||
Pointer< MinlpNode > | node = NULL | |||
) |
Builds a list of CutInfo's to point to these cuts, which belong to a given node.
This method is used for the communication between the CutPool and the LinearRelaxSolver about inactivity of cuts. A list, where we can push back the CutInfos. The number of the block to put into the CutInfos. Give -1 for coupling cuts.
void CutPool::update_cuts | ( | Pointer< MinlpNode > | node, | |
int | blocknr, | |||
const dvector & | low, | |||
const dvector & | up, | |||
IntervalGradientCutGenerator & | generator, | |||
LinearizedConCutGenerator & | linconcutgen | |||
) |
Updates the IntervalGradientCuts of a specific node after the bounds changed.
Checks, whether a point is feasible for the cuts.
Checks each global cut and the local cuts, which belong to the given node (if not NULL), if the cut is valid for the constraints.
The number of local cuts for a specific node.
Does not count global cuts.
int CutPool::nr_global_cuts | ( | ) | const |
The number of global cuts.
Does not count local cuts.
int CutPool::nr_all_cuts | ( | ) | const [inline] |
list<Cut<SimpleCut> > CutPool::simplecuts [private] |
list<Cut<LinearizationCut> > CutPool::linearizationcuts [private] |
list<Cut<IntervalGradientCut> > CutPool::intgradcuts [private] |
int CutPool::cuts_size [private] |
int CutPool::inactivetime_limit_global [private] |
int CutPool::inactivetime_limit_local [private] |