Couenne 0.5.8
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Couenne::CouenneDisjCuts Class Reference

Cut Generator for linear convexifications. More...

#include <CouenneDisjCuts.hpp>

+ Inheritance diagram for Couenne::CouenneDisjCuts:
+ Collaboration diagram for Couenne::CouenneDisjCuts:

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.
 
- Public Member Functions inherited from CglCutGenerator
virtual void generateCuts (const OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo info=CglTreeInfo())=0
 
 CglCutGenerator ()
 
 CglCutGenerator (const CglCutGenerator &)
 
virtual CglCutGeneratorclone () const=0
 
CglCutGeneratoroperator= (const CglCutGenerator &rhs)
 
virtual ~CglCutGenerator ()
 
virtual std::string generateCpp (FILE *)
 
virtual void refreshSolver (OsiSolverInterface *)
 
int getAggressiveness () const
 
void setAggressiveness (int value)
 
void setGlobalCuts (bool trueOrFalse)
 
bool canDoGlobalCuts () const
 
virtual bool mayGenerateRowCutsInTree () const
 
virtual bool needsOptimalBasis () const
 
virtual int maximumLengthOfCutInTree () const
 
virtual void generateCuts (const OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo info=CglTreeInfo())=0
 
 CglCutGenerator ()
 
 CglCutGenerator (const CglCutGenerator &)
 
virtual CglCutGeneratorclone () const=0
 
CglCutGeneratoroperator= (const CglCutGenerator &rhs)
 
virtual ~CglCutGenerator ()
 
virtual std::string generateCpp (FILE *)
 
virtual void refreshSolver (OsiSolverInterface *)
 

Static Public Member Functions

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

Protected Member Functions

OsiCutsgetSingleDisjunction (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)
 
OsiChooseVariablebranchingMethod_
 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
 

Additional Inherited Members

- Public Attributes inherited from CglCutGenerator
int aggressive_
 
bool canDoGlobalCuts_
 

Detailed Description

Cut Generator for linear convexifications.

Definition at line 34 of file CouenneDisjCuts.hpp.

Constructor & Destructor Documentation

◆ CouenneDisjCuts() [1/2]

Couenne::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

◆ CouenneDisjCuts() [2/2]

Couenne::CouenneDisjCuts::CouenneDisjCuts ( const CouenneDisjCuts )

copy constructor

◆ ~CouenneDisjCuts()

Couenne::CouenneDisjCuts::~CouenneDisjCuts ( )

destructor

Member Function Documentation

◆ clone()

CouenneDisjCuts * Couenne::CouenneDisjCuts::clone ( ) const
inlinevirtual

clone method (necessary for the abstract CglCutGenerator class)

Implements CglCutGenerator.

Definition at line 111 of file CouenneDisjCuts.hpp.

◆ couenneCG()

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

return pointer to symbolic problem

Definition at line 115 of file CouenneDisjCuts.hpp.

◆ generateCuts()

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

the main CglCutGenerator

◆ registerOptions()

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

Add list of options to be read from file.

◆ Jnlst()

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

Provide Journalist.

Definition at line 131 of file CouenneDisjCuts.hpp.

◆ getDisjunctions()

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

get all disjunctions

◆ separateWithDisjunction()

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

separate couenne cuts on both sides of single disjunction

◆ generateDisjCuts()

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

generate one disjunctive cut from one CGLP

◆ checkDisjSide()

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

check if (column!) cuts compatible with solver interface

◆ getBoxUnion()

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

compute smallest box containing both left and right boxes.

◆ getSingleDisjunction()

OsiCuts * Couenne::CouenneDisjCuts::getSingleDisjunction ( OsiSolverInterface si) const
protected

create single osicolcut disjunction

◆ mergeBoxes()

void Couenne::CouenneDisjCuts::mergeBoxes ( int  dir,
CoinPackedVector left,
CoinPackedVector right,
CoinPackedVector  merged 
) const
protected

utility to merge vectors into one

◆ applyColCuts() [1/2]

void Couenne::CouenneDisjCuts::applyColCuts ( OsiSolverInterface si,
OsiCuts cuts 
) const
protected

our own applyColCuts

◆ applyColCuts() [2/2]

void Couenne::CouenneDisjCuts::applyColCuts ( OsiSolverInterface si,
OsiColCut cut 
) const
protected

our own applyColCut, single cut

◆ OsiSI2MatrVec()

void Couenne::CouenneDisjCuts::OsiSI2MatrVec ( CoinPackedMatrix M,
CoinPackedVector r,
OsiSolverInterface si 
) const
protected

◆ OsiCuts2MatrVec()

int Couenne::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)

Member Data Documentation

◆ couenneCG_

CouenneCutGenerator* Couenne::CouenneDisjCuts::couenneCG_
protected

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

Definition at line 39 of file CouenneDisjCuts.hpp.

◆ nrootcuts_

int Couenne::CouenneDisjCuts::nrootcuts_
mutableprotected

number of cuts generated at the first call

Definition at line 42 of file CouenneDisjCuts.hpp.

◆ ntotalcuts_

int Couenne::CouenneDisjCuts::ntotalcuts_
mutableprotected

total number of cuts generated

Definition at line 45 of file CouenneDisjCuts.hpp.

◆ septime_

double Couenne::CouenneDisjCuts::septime_
mutableprotected

separation time (includes generation of problem)

Definition at line 48 of file CouenneDisjCuts.hpp.

◆ objValue_

double Couenne::CouenneDisjCuts::objValue_
mutableprotected

Record obj value at final point of CouenneConv.

Definition at line 51 of file CouenneDisjCuts.hpp.

◆ minlp_

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 55 of file CouenneDisjCuts.hpp.

◆ branchingMethod_

OsiChooseVariable* Couenne::CouenneDisjCuts::branchingMethod_
protected

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

Definition at line 58 of file CouenneDisjCuts.hpp.

◆ isBranchingStrong_

bool Couenne::CouenneDisjCuts::isBranchingStrong_
protected

Is branchMethod_ referred to a strong branching scheme?

Definition at line 61 of file CouenneDisjCuts.hpp.

◆ jnlst_

JnlstPtr Couenne::CouenneDisjCuts::jnlst_
protected

SmartPointer to the Journalist.

Definition at line 64 of file CouenneDisjCuts.hpp.

◆ numDisjunctions_

int Couenne::CouenneDisjCuts::numDisjunctions_
mutableprotected

Number of disjunction to consider at each separation.

Definition at line 67 of file CouenneDisjCuts.hpp.

◆ initDisjPercentage_

double Couenne::CouenneDisjCuts::initDisjPercentage_
protected

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

Definition at line 70 of file CouenneDisjCuts.hpp.

◆ initDisjNumber_

int Couenne::CouenneDisjCuts::initDisjNumber_
protected

Initial number of objects to use for generating cuts.

Definition at line 73 of file CouenneDisjCuts.hpp.

◆ depthLevelling_

int Couenne::CouenneDisjCuts::depthLevelling_
protected

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

Definition at line 76 of file CouenneDisjCuts.hpp.

◆ depthStopSeparate_

int Couenne::CouenneDisjCuts::depthStopSeparate_
protected

Depth of the BB tree where stop separation.

Definition at line 79 of file CouenneDisjCuts.hpp.

◆ activeRows_

bool Couenne::CouenneDisjCuts::activeRows_
protected

only include active rows in CGLP

Definition at line 82 of file CouenneDisjCuts.hpp.

◆ activeCols_

bool Couenne::CouenneDisjCuts::activeCols_
protected

only include active columns in CGLP

Definition at line 85 of file CouenneDisjCuts.hpp.

◆ addPreviousCut_

bool Couenne::CouenneDisjCuts::addPreviousCut_
protected

add previous disj cut to current CGLP?

Definition at line 88 of file CouenneDisjCuts.hpp.

◆ cpuTime_

double Couenne::CouenneDisjCuts::cpuTime_
protected

maximum CPU time

Definition at line 91 of file CouenneDisjCuts.hpp.


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