CutPool Class Reference

A Cut management system. More...

#include <cuts.h>

List of all members.

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

Detailed Description

A Cut management system.

Parameters:
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.


Member Enumeration Documentation

Enumerator:
SIMPLE 
LINEARIZATION 
INTERVALGRADIENT 

Definition at line 258 of file cuts.h.


Constructor & Destructor Documentation

CutPool::CutPool ( int  inactivetime_limit_global_ = 10,
int  inactivetime_limit_local_ = 3 
) [inline]

Definition at line 315 of file cuts.h.

CutPool::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.


Member Function Documentation

CutInfo CutPool::add_cut ( Pointer< SimpleCut ,
Pointer< MinlpNode node,
int  blocknr = -1 
)

Adds a cut to the pool.

Parameters:
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 into the CutInfo. -1 for cuts that couple several blocks.
Returns:
cutinfo A CutInfo for the new cut.
CutInfo CutPool::add_cut ( Pointer< IntervalGradientCut intgradcut,
Pointer< MinlpNode node,
int  blocknr 
)

Adds a IntervalGradientCut to the pool.

Parameters:
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.
Returns:
cutinfo A CutInfo for the new cut.
CutInfo CutPool::add_cut ( Pointer< LinearizationCut linearizationcut,
Pointer< MinlpNode node,
int  blocknr 
)

Adds a LinearizationCut to the pool.

void CutPool::integrate ( const CutPool cutpool,
Pointer< MinlpNode node = NULL 
)

Adds the untagged cuts of a cutpool to this one.

Parameters:
cutpool The cuts to add.
node The node, which should use these cuts. Or NULL, if intended as global cuts.
void CutPool::duplicate_nodeinfo ( Pointer< MinlpNode oldnode,
Pointer< MinlpNode newnode 
)
void CutPool::remove_node ( Pointer< MinlpNode node  ) 
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.

Parameters:
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.

bool CutPool::feasible ( Pointer< MinlpNode node,
const dvector x,
double  tol = 1E-4 
) const

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.

int CutPool::nr_local_cuts ( Pointer< MinlpNode node  )  const

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]

The complete number of cuts, all local cuts plus the global ones.

Definition at line 386 of file cuts.h.


Member Data Documentation

list<Cut<SimpleCut> > CutPool::simplecuts [private]

Cuts which are defined by a seperating hyperplane.

Given a vector b and a double c, the cut has the form 2*b^T x + c <= 0.

Definition at line 240 of file cuts.h.

Cuts also defined by a seperating hyperplane.

The hyperplane was derived by linearization of a (convexified) constraint or objective function.

Definition at line 244 of file cuts.h.

IntervalGradientCuts.

Definition at line 248 of file cuts.h.

int CutPool::cuts_size [private]

The number of cuts in this CutPool.

Definition at line 252 of file cuts.h.

Definition at line 254 of file cuts.h.

Definition at line 255 of file cuts.h.


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

Generated on 10 Mar 2013 for LaGO by  doxygen 1.6.1