Couenne::CouenneDisjCuts Class Reference

Cut Generator for linear convexifications. More...

#include <CouenneDisjCuts.hpp>

Collaboration diagram for Couenne::CouenneDisjCuts:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 CouenneDisjCuts (Bonmin::OsiTMINLPInterface *minlp=NULL, Bonmin::BabSetupBase *base=NULL, CouenneCutGenerator *cg=NULL, OsiChooseVariable *bcv=NULL, bool is_strong=false, JnlstPtr journalist=NULL, const Ipopt::SmartPtr< Ipopt::OptionsList > options=NULL)
 constructor
 CouenneDisjCuts (const CouenneDisjCuts &)
 copy constructor
 ~CouenneDisjCuts ()
 destructor
CouenneDisjCutsclone () const
 clone method (necessary for the abstract CglCutGenerator class)
CouenneCutGeneratorcouenneCG () const
 return pointer to symbolic problem
void generateCuts (const OsiSolverInterface &, OsiCuts &, const CglTreeInfo=CglTreeInfo()) const
 the main CglCutGenerator
ConstJnlstPtr Jnlst () const
 Provide Journalist.
int getDisjunctions (std::vector< std::pair< OsiCuts *, OsiCuts * > > &disjunctions, OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo &info) const
 get all disjunctions
int separateWithDisjunction (OsiCuts *cuts, OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo &info) const
 separate couenne cuts on both sides of single disjunction
int generateDisjCuts (std::vector< std::pair< OsiCuts *, OsiCuts * > > &disjs, OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo &info) const
 generate one disjunctive cut from one CGLP
int checkDisjSide (OsiSolverInterface &si, OsiCuts *cuts) const
 check if (column!) cuts compatible with solver interface
int getBoxUnion (OsiSolverInterface &si, OsiCuts *left, OsiCuts *right, CoinPackedVector &lower, CoinPackedVector &upper) const
 compute smallest box containing both left and right boxes.

Static Public Member Functions

static void registerOptions (Ipopt::SmartPtr< Bonmin::RegisteredOptions > roptions)
 Add list of options to be read from file.

Protected Member Functions

OsiCuts * getSingleDisjunction (OsiSolverInterface &si) const
 create single osicolcut disjunction
void mergeBoxes (int dir, CoinPackedVector &left, CoinPackedVector &right, CoinPackedVector merged) const
 utility to merge vectors into one
void applyColCuts (OsiSolverInterface &si, OsiCuts *cuts) const
 our own applyColCuts
void applyColCuts (OsiSolverInterface &si, OsiColCut *cut) const
 our own applyColCut, single cut
void OsiSI2MatrVec (CoinPackedMatrix &M, CoinPackedVector &r, OsiSolverInterface &si) const
int OsiCuts2MatrVec (OsiSolverInterface *cglp, OsiCuts *cuts, int displRow, int displRhs) const
 add CGLP columns to solver interface; return number of columns added (for later removal)

Protected Attributes

CouenneCutGeneratorcouenneCG_
 pointer to symbolic repr. of constraint, variables, and bounds
int nrootcuts_
 number of cuts generated at the first call
int ntotalcuts_
 total number of cuts generated
double septime_
 separation time (includes generation of problem)
double objValue_
 Record obj value at final point of CouenneConv.
Bonmin::OsiTMINLPInterfaceminlp_
 nonlinear solver interface as used within Bonmin (used at first Couenne pass of each b&b node)
OsiChooseVariable * branchingMethod_
 Branching scheme (if strong, we can use SB candidates).
bool isBranchingStrong_
 Is branchMethod_ referred to a strong branching scheme?
JnlstPtr jnlst_
 SmartPointer to the Journalist.
int numDisjunctions_
 Number of disjunction to consider at each separation.
double initDisjPercentage_
 Initial percentage of objects to use for generating cuts, in [0,1].
int initDisjNumber_
 Initial number of objects to use for generating cuts.
int depthLevelling_
 Depth of the BB tree where start decreasing number of objects.
int depthStopSeparate_
 Depth of the BB tree where stop separation.
bool activeRows_
 only include active rows in CGLP
bool activeCols_
 only include active columns in CGLP
bool addPreviousCut_
 add previous disj cut to current CGLP?
double cpuTime_
 maximum CPU time

Detailed Description

Cut Generator for linear convexifications.

Definition at line 33 of file CouenneDisjCuts.hpp.


Constructor & Destructor Documentation

CouenneDisjCuts::CouenneDisjCuts ( Bonmin::OsiTMINLPInterface minlp = NULL,
Bonmin::BabSetupBase base = NULL,
CouenneCutGenerator cg = NULL,
OsiChooseVariable *  bcv = NULL,
bool  is_strong = false,
JnlstPtr  journalist = NULL,
const Ipopt::SmartPtr< Ipopt::OptionsList >  options = NULL 
)

constructor

Definition at line 19 of file CouenneDisjCuts.cpp.

References activeCols_, activeRows_, addPreviousCut_, cpuTime_, depthLevelling_, depthStopSeparate_, initDisjNumber_, initDisjPercentage_, and s.

Referenced by clone().

CouenneDisjCuts::CouenneDisjCuts ( const CouenneDisjCuts  ) 

copy constructor

Definition at line 55 of file CouenneDisjCuts.cpp.

CouenneDisjCuts::~CouenneDisjCuts (  ) 

destructor

Definition at line 77 of file CouenneDisjCuts.cpp.

References e, Couenne::J_DISJCUTS(), jnlst_, and septime_.


Member Function Documentation

CouenneDisjCuts* Couenne::CouenneDisjCuts::clone (  )  const [inline]

clone method (necessary for the abstract CglCutGenerator class)

Definition at line 110 of file CouenneDisjCuts.hpp.

References CouenneDisjCuts().

CouenneCutGenerator* Couenne::CouenneDisjCuts::couenneCG (  )  const [inline]

return pointer to symbolic problem

Definition at line 114 of file CouenneDisjCuts.hpp.

References couenneCG_.

void CouenneDisjCuts::generateCuts ( const OsiSolverInterface &  ,
OsiCuts &  ,
const   CglTreeInfo = CglTreeInfo() 
) const

the main CglCutGenerator

Definition at line 23 of file generateDisjCuts.cpp.

References COUENNE_EPS, Couenne::COUENNE_INFEASIBLE, Couenne::COUENNE_TIGHTENED, couenneCG_, depthLevelling_, depthStopSeparate_, generateDisjCuts(), getDisjunctions(), initDisjNumber_, initDisjPercentage_, isWiped(), Couenne::J_COUENNE(), Couenne::J_DISJCUTS(), jnlst_, nrootcuts_, ntotalcuts_, numDisjunctions_, separateWithDisjunction(), septime_, and WipeMakeInfeas().

void CouenneDisjCuts::registerOptions ( Ipopt::SmartPtr< Bonmin::RegisteredOptions roptions  )  [static]

Add list of options to be read from file.

Definition at line 82 of file CouenneDisjCuts.cpp.

Referenced by Couenne::CouenneSetup::registerAllOptions().

ConstJnlstPtr Couenne::CouenneDisjCuts::Jnlst (  )  const [inline]

Provide Journalist.

Definition at line 126 of file CouenneDisjCuts.hpp.

References jnlst_.

int CouenneDisjCuts::getDisjunctions ( std::vector< std::pair< OsiCuts *, OsiCuts * > > &  disjunctions,
OsiSolverInterface &  si,
OsiCuts &  cs,
const CglTreeInfo &  info 
) const

get all disjunctions

Definition at line 27 of file getDisjunctions.cpp.

References applyColCuts(), BranchingFBBT(), branchingMethod_, checkDisjSide(), Couenne::COUENNE_FEASIBLE, Couenne::COUENNE_INFEASIBLE, COUENNE_INFINITY, Couenne::COUENNE_TIGHTENED, couenneCG_, getBoxUnion(), getSingleDisjunction(), Couenne::J_DISJCUTS(), jnlst_, Couenne::CouenneProblem::Lb(), numDisjunctions_, Couenne::CouenneCutGenerator::Problem(), and Couenne::CouenneProblem::Ub().

Referenced by generateCuts().

int CouenneDisjCuts::separateWithDisjunction ( OsiCuts *  cuts,
OsiSolverInterface &  si,
OsiCuts &  cs,
const CglTreeInfo &  info 
) const

separate couenne cuts on both sides of single disjunction

Definition at line 20 of file separateWithDisjunction.cpp.

References Couenne::t_chg_bounds::CHANGED, COUENNE_EPS, Couenne::COUENNE_FEASIBLE, couenneCG_, Couenne::J_DISJCUTS(), jnlst_, print(), Couenne::t_chg_bounds::setLower(), Couenne::t_chg_bounds::setUpper(), and Couenne::sparse2dense().

Referenced by generateCuts().

int CouenneDisjCuts::generateDisjCuts ( std::vector< std::pair< OsiCuts *, OsiCuts * > > &  disjs,
OsiSolverInterface &  si,
OsiCuts &  cs,
const CglTreeInfo &  info 
) const

generate one disjunctive cut from one CGLP

Definition at line 47 of file disjCut.cpp.

References addPreviousCut_, addSubMatr(), COEFF_BOUNDS, Couenne::CoinCopyDisp(), COUENNE_EPS, Couenne::COUENNE_FEASIBLE, cpuTime_, Couenne::J_DISJCUTS(), jnlst_, m, MAX_NUM_COEFF, MAX_NUM_RATIO, MIN_NUM_COEFF, n, OsiCuts2MatrVec(), OsiSI2MatrVec(), print(), printLPMatrix(), and printMatrix().

Referenced by generateCuts().

int CouenneDisjCuts::checkDisjSide ( OsiSolverInterface &  si,
OsiCuts *  cuts 
) const

check if (column!) cuts compatible with solver interface

Definition at line 55 of file singleDisjunctions.cpp.

References COUENNE_EPS, Couenne::COUENNE_FEASIBLE, Couenne::COUENNE_INFEASIBLE, and Couenne::COUENNE_TIGHTENED.

Referenced by getDisjunctions().

int CouenneDisjCuts::getBoxUnion ( OsiSolverInterface &  si,
OsiCuts *  left,
OsiCuts *  right,
CoinPackedVector &  lower,
CoinPackedVector &  upper 
) const

compute smallest box containing both left and right boxes.

Definition at line 107 of file singleDisjunctions.cpp.

References Couenne::COUENNE_FEASIBLE, and mergeBoxes().

Referenced by getDisjunctions().

OsiCuts * CouenneDisjCuts::getSingleDisjunction ( OsiSolverInterface &  si  )  const [protected]

create single osicolcut disjunction

Definition at line 18 of file singleDisjunctions.cpp.

References COUENNE_EPS, and couenneCG_.

Referenced by getDisjunctions().

void CouenneDisjCuts::mergeBoxes ( int  dir,
CoinPackedVector &  left,
CoinPackedVector &  right,
CoinPackedVector  merged 
) const [protected]

utility to merge vectors into one

Definition at line 143 of file singleDisjunctions.cpp.

References diff().

Referenced by getBoxUnion().

void CouenneDisjCuts::applyColCuts ( OsiSolverInterface &  si,
OsiCuts *  cuts 
) const [protected]

our own applyColCuts

Definition at line 243 of file getDisjunctions.cpp.

References Couenne::J_DISJCUTS(), jnlst_, and print().

Referenced by getDisjunctions().

void CouenneDisjCuts::applyColCuts ( OsiSolverInterface &  si,
OsiColCut *  cut 
) const [protected]

our own applyColCut, single cut

Definition at line 260 of file getDisjunctions.cpp.

References COUENNE_EPS, Couenne::J_DISJCUTS(), jnlst_, and print().

void CouenneDisjCuts::OsiSI2MatrVec ( CoinPackedMatrix &  M,
CoinPackedVector &  r,
OsiSolverInterface &  si 
) const [protected]

Definition at line 28 of file OsiLinear2MatrVec.cpp.

References activeCols_, activeRows_, Couenne::CoinInvN(), COUENNE_EPS, COUENNE_INFINITY, couenneCG_, Couenne::J_DISJCUTS(), jnlst_, k, and x.

Referenced by generateDisjCuts().

int CouenneDisjCuts::OsiCuts2MatrVec ( OsiSolverInterface *  cglp,
OsiCuts *  cuts,
int  displRow,
int  displRhs 
) const [protected]

add CGLP columns to solver interface; return number of columns added (for later removal)

Definition at line 30 of file OsiCuts2MatrVec.cpp.

References Couenne::CoinCopyDisp(), Couenne::CoinInvN(), COUENNE_EPS, couenneCG_, Couenne::J_DISJCUTS(), jnlst_, k, m, and print().

Referenced by generateDisjCuts().


Member Data Documentation

CouenneCutGenerator* Couenne::CouenneDisjCuts::couenneCG_ [protected]

pointer to symbolic repr. of constraint, variables, and bounds

Definition at line 38 of file CouenneDisjCuts.hpp.

Referenced by couenneCG(), generateCuts(), getDisjunctions(), getSingleDisjunction(), OsiCuts2MatrVec(), OsiSI2MatrVec(), and separateWithDisjunction().

int Couenne::CouenneDisjCuts::nrootcuts_ [mutable, protected]

number of cuts generated at the first call

Definition at line 41 of file CouenneDisjCuts.hpp.

Referenced by generateCuts().

int Couenne::CouenneDisjCuts::ntotalcuts_ [mutable, protected]

total number of cuts generated

Definition at line 44 of file CouenneDisjCuts.hpp.

Referenced by generateCuts().

double Couenne::CouenneDisjCuts::septime_ [mutable, protected]

separation time (includes generation of problem)

Definition at line 47 of file CouenneDisjCuts.hpp.

Referenced by generateCuts(), and ~CouenneDisjCuts().

double Couenne::CouenneDisjCuts::objValue_ [mutable, protected]

Record obj value at final point of CouenneConv.

Definition at line 50 of file CouenneDisjCuts.hpp.

Bonmin::OsiTMINLPInterface* Couenne::CouenneDisjCuts::minlp_ [protected]

nonlinear solver interface as used within Bonmin (used at first Couenne pass of each b&b node)

Definition at line 54 of file CouenneDisjCuts.hpp.

OsiChooseVariable* Couenne::CouenneDisjCuts::branchingMethod_ [protected]

Branching scheme (if strong, we can use SB candidates).

Definition at line 57 of file CouenneDisjCuts.hpp.

Referenced by getDisjunctions().

bool Couenne::CouenneDisjCuts::isBranchingStrong_ [protected]

Is branchMethod_ referred to a strong branching scheme?

Definition at line 60 of file CouenneDisjCuts.hpp.

JnlstPtr Couenne::CouenneDisjCuts::jnlst_ [protected]

SmartPointer to the Journalist.

Definition at line 63 of file CouenneDisjCuts.hpp.

Referenced by applyColCuts(), generateCuts(), generateDisjCuts(), getDisjunctions(), Jnlst(), OsiCuts2MatrVec(), OsiSI2MatrVec(), separateWithDisjunction(), and ~CouenneDisjCuts().

int Couenne::CouenneDisjCuts::numDisjunctions_ [mutable, protected]

Number of disjunction to consider at each separation.

Definition at line 66 of file CouenneDisjCuts.hpp.

Referenced by generateCuts(), and getDisjunctions().

double Couenne::CouenneDisjCuts::initDisjPercentage_ [protected]

Initial percentage of objects to use for generating cuts, in [0,1].

Definition at line 69 of file CouenneDisjCuts.hpp.

Referenced by CouenneDisjCuts(), and generateCuts().

int Couenne::CouenneDisjCuts::initDisjNumber_ [protected]

Initial number of objects to use for generating cuts.

Definition at line 72 of file CouenneDisjCuts.hpp.

Referenced by CouenneDisjCuts(), and generateCuts().

int Couenne::CouenneDisjCuts::depthLevelling_ [protected]

Depth of the BB tree where start decreasing number of objects.

Definition at line 75 of file CouenneDisjCuts.hpp.

Referenced by CouenneDisjCuts(), and generateCuts().

int Couenne::CouenneDisjCuts::depthStopSeparate_ [protected]

Depth of the BB tree where stop separation.

Definition at line 78 of file CouenneDisjCuts.hpp.

Referenced by CouenneDisjCuts(), and generateCuts().

bool Couenne::CouenneDisjCuts::activeRows_ [protected]

only include active rows in CGLP

Definition at line 81 of file CouenneDisjCuts.hpp.

Referenced by CouenneDisjCuts(), and OsiSI2MatrVec().

bool Couenne::CouenneDisjCuts::activeCols_ [protected]

only include active columns in CGLP

Definition at line 84 of file CouenneDisjCuts.hpp.

Referenced by CouenneDisjCuts(), and OsiSI2MatrVec().

bool Couenne::CouenneDisjCuts::addPreviousCut_ [protected]

add previous disj cut to current CGLP?

Definition at line 87 of file CouenneDisjCuts.hpp.

Referenced by CouenneDisjCuts(), and generateDisjCuts().

double Couenne::CouenneDisjCuts::cpuTime_ [protected]

maximum CPU time

Definition at line 90 of file CouenneDisjCuts.hpp.

Referenced by CouenneDisjCuts(), and generateDisjCuts().


The documentation for this class was generated from the following files:
Generated on Thu Nov 10 03:13:56 2011 by  doxygen 1.4.7