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

OsiObject for auxiliary variables $w=f(x)$. More...

#include <CouenneObject.hpp>

+ Inheritance diagram for Couenne::CouenneObject:
+ Collaboration diagram for Couenne::CouenneObject:

Public Types

enum  pseudocostMult {
  INFEASIBILITY , INTERVAL_LP , INTERVAL_LP_REV , INTERVAL_BR ,
  INTERVAL_BR_REV , PROJECTDIST
}
 type of up/down estimate to return for pseudocosts More...
 
enum  branch_obj { EXPR_OBJ , VAR_OBJ , VT_OBJ }
 type of object (for branching variable selection) More...
 
enum  brSelStrat {
  NO_STRATEGY , NO_BRANCH , MID_INTERVAL , MIN_AREA ,
  BALANCED , LP_CENTRAL , LP_CLAMPED
}
 strategy names More...
 

Public Member Functions

 CouenneObject ()
 empty constructor (for unused objects)
 
 CouenneObject (CouenneCutGenerator *cutgen, CouenneProblem *p, exprVar *ref, Bonmin::BabSetupBase *base, JnlstPtr jnlst)
 Constructor with information for branching point selection strategy.
 
 CouenneObject (exprVar *ref, Bonmin::BabSetupBase *base, JnlstPtr jnlst)
 Constructor with lesser information, used for infeasibility only.
 
 ~CouenneObject ()
 Destructor.
 
 CouenneObject (const CouenneObject &src)
 Copy constructor.
 
virtual CouenneObjectclone () const
 Cloning method.
 
void setParameters (Bonmin::BabSetupBase *base)
 set object parameters by reading from command line
 
virtual double infeasibility (const OsiBranchingInformation *info, int &way) const
 compute infeasibility of this variable, |w - f(x)| (where w is the auxiliary variable defined as w = f(x)
 
virtual double checkInfeasibility (const OsiBranchingInformation *info) const
 compute infeasibility of this variable, |w - f(x)|, where w is the auxiliary variable defined as w = f(x)
 
virtual double feasibleRegion (OsiSolverInterface *, const OsiBranchingInformation *) const
 fix (one of the) arguments of reference auxiliary variable
 
virtual OsiBranchingObjectcreateBranch (OsiSolverInterface *, const OsiBranchingInformation *, int) const
 create CouenneBranchingObject or CouenneThreeWayBranchObj based on this object
 
exprVarReference () const
 return reference auxiliary variable
 
enum brSelStrat Strategy () const
 return branching point selection strategy
 
CouNumber getBrPoint (funtriplet *ft, CouNumber x0, CouNumber l, CouNumber u, const OsiBranchingInformation *info=NULL) const
 pick branching point based on current strategy
 
CouNumber midInterval (CouNumber x, CouNumber l, CouNumber u, const OsiBranchingInformation *info=NULL) const
 returns a point "inside enough" a given interval, or x if it already is.
 
virtual double downEstimate () const
 Return "down" estimate (for non-convex, distance old <--> new LP point)
 
virtual double upEstimate () const
 Return "up" estimate (for non-convex, distance old <--> new LP point)
 
void setEstimate (double est, int direction)
 set up/down estimate (0 for down, 1 for up).
 
void setEstimates (const OsiBranchingInformation *info, CouNumber *infeasibility, CouNumber *brpt) const
 set up/down estimates based on branching information
 
virtual bool isCuttable () const
 are we on the bad or good side of the expression?
 
virtual double intInfeasibility (double value, double lb, double ub) const
 integer infeasibility: min {value - floor(value), ceil(value) - value}
 
CouNumber lp_clamp () const
 Defines safe interval percentage for using LP point as a branching point.
 
virtual int columnNumber () const
 Returns the column index.
 
- Public Member Functions inherited from OsiObject
 OsiObject ()
 
 OsiObject (const OsiObject &)
 
OsiObjectoperator= (const OsiObject &rhs)
 
virtual ~OsiObject ()
 
double infeasibility (const OsiSolverInterface *solver, int &whichWay) const
 
virtual double feasibleRegion (OsiSolverInterface *solver) const
 
virtual bool canDoHeuristics () const
 
virtual bool canMoveToNearest () const
 
int priority () const
 
void setPriority (int priority)
 
virtual bool boundBranch () const
 
virtual bool canHandleShadowPrices () const
 
int numberWays () const
 
void setNumberWays (int numberWays)
 
void setWhichWay (int way)
 
int whichWay () const
 
virtual int preferredWay () const
 
double infeasibility () const
 
virtual void resetBounds (const OsiSolverInterface *)
 
virtual void resetSequenceEtc (int, const int *)
 
virtual void updateBefore (const OsiObject *)
 
virtual void updateAfter (const OsiObject *, const OsiObject *)
 

Protected Attributes

CouenneCutGeneratorcutGen_
 pointer to cut generator (not necessary, can be NULL)
 
CouenneProblemproblem_
 pointer to Couenne problem
 
exprVarreference_
 The (auxiliary) variable this branching object refers to.
 
enum brSelStrat strategy_
 Branching point selection strategy.
 
JnlstPtr jnlst_
 SmartPointer to the Journalist.
 
CouNumber alpha_
 Combination parameter for the mid-point branching point selection strategy.
 
CouNumber lp_clamp_
 Defines safe interval percentage for using LP point as a branching point.
 
CouNumber feas_tolerance_
 feasibility tolerance (equal to that of CouenneProblem)
 
bool doFBBT_
 shall we do Feasibility based Bound Tightening (FBBT) at branching?
 
bool doConvCuts_
 shall we add convexification cuts at branching?
 
double downEstimate_
 down estimate (to be used in pseudocost)
 
double upEstimate_
 up estimate (to be used in pseudocost)
 
enum pseudocostMult pseudoMultType_
 multiplier type for pseudocost
 
- Protected Attributes inherited from OsiObject
double infeasibility_
 
short whichWay_
 
short numberWays_
 
int priority_
 

Detailed Description

OsiObject for auxiliary variables $w=f(x)$.

Associated with a multi-variate function $f(x)$ and a related infeasibility $|w-f(x)|$, creates branches to help restoring feasibility

Definition at line 57 of file CouenneObject.hpp.

Member Enumeration Documentation

◆ pseudocostMult

type of up/down estimate to return for pseudocosts

Enumerator
INFEASIBILITY 
INTERVAL_LP 
INTERVAL_LP_REV 
INTERVAL_BR 
INTERVAL_BR_REV 
PROJECTDIST 

Definition at line 62 of file CouenneObject.hpp.

◆ branch_obj

type of object (for branching variable selection)

Enumerator
EXPR_OBJ 
VAR_OBJ 
VT_OBJ 

Definition at line 68 of file CouenneObject.hpp.

◆ brSelStrat

strategy names

Enumerator
NO_STRATEGY 
NO_BRANCH 
MID_INTERVAL 
MIN_AREA 
BALANCED 
LP_CENTRAL 
LP_CLAMPED 

Definition at line 71 of file CouenneObject.hpp.

Constructor & Destructor Documentation

◆ CouenneObject() [1/4]

Couenne::CouenneObject::CouenneObject ( )

empty constructor (for unused objects)

◆ CouenneObject() [2/4]

Couenne::CouenneObject::CouenneObject ( CouenneCutGenerator * cutgen,
CouenneProblem * p,
exprVar * ref,
Bonmin::BabSetupBase * base,
JnlstPtr jnlst )

Constructor with information for branching point selection strategy.

◆ CouenneObject() [3/4]

Couenne::CouenneObject::CouenneObject ( exprVar * ref,
Bonmin::BabSetupBase * base,
JnlstPtr jnlst )

Constructor with lesser information, used for infeasibility only.

◆ ~CouenneObject()

Couenne::CouenneObject::~CouenneObject ( )
inline

Destructor.

Definition at line 85 of file CouenneObject.hpp.

◆ CouenneObject() [4/4]

Couenne::CouenneObject::CouenneObject ( const CouenneObject & src)

Copy constructor.

Member Function Documentation

◆ clone()

virtual CouenneObject * Couenne::CouenneObject::clone ( ) const
inlinevirtual

Cloning method.

Implements OsiObject.

Reimplemented in Couenne::CouenneComplObject, Couenne::CouenneVarObject, and Couenne::CouenneVTObject.

Definition at line 91 of file CouenneObject.hpp.

◆ setParameters()

void Couenne::CouenneObject::setParameters ( Bonmin::BabSetupBase * base)

set object parameters by reading from command line

◆ infeasibility()

virtual double Couenne::CouenneObject::infeasibility ( const OsiBranchingInformation * info,
int & way ) const
virtual

compute infeasibility of this variable, |w - f(x)| (where w is the auxiliary variable defined as w = f(x)

Implements OsiObject.

Reimplemented in Couenne::CouenneComplObject, Couenne::CouenneVarObject, and Couenne::CouenneVTObject.

◆ checkInfeasibility()

virtual double Couenne::CouenneObject::checkInfeasibility ( const OsiBranchingInformation * info) const
virtual

compute infeasibility of this variable, |w - f(x)|, where w is the auxiliary variable defined as w = f(x)

Reimplemented from OsiObject.

Reimplemented in Couenne::CouenneComplObject, and Couenne::CouenneVarObject.

◆ feasibleRegion()

virtual double Couenne::CouenneObject::feasibleRegion ( OsiSolverInterface * ,
const OsiBranchingInformation *  ) const
virtual

fix (one of the) arguments of reference auxiliary variable

Implements OsiObject.

Reimplemented in Couenne::CouenneVarObject.

◆ createBranch()

virtual OsiBranchingObject * Couenne::CouenneObject::createBranch ( OsiSolverInterface * ,
const OsiBranchingInformation * ,
int  ) const
virtual

create CouenneBranchingObject or CouenneThreeWayBranchObj based on this object

Reimplemented from OsiObject.

Reimplemented in Couenne::CouenneComplObject, and Couenne::CouenneVarObject.

◆ Reference()

exprVar * Couenne::CouenneObject::Reference ( ) const
inline

return reference auxiliary variable

Definition at line 114 of file CouenneObject.hpp.

◆ Strategy()

enum brSelStrat Couenne::CouenneObject::Strategy ( ) const
inline

return branching point selection strategy

Definition at line 118 of file CouenneObject.hpp.

◆ getBrPoint()

CouNumber Couenne::CouenneObject::getBrPoint ( funtriplet * ft,
CouNumber x0,
CouNumber l,
CouNumber u,
const OsiBranchingInformation * info = NULL ) const

pick branching point based on current strategy

◆ midInterval()

CouNumber Couenne::CouenneObject::midInterval ( CouNumber x,
CouNumber l,
CouNumber u,
const OsiBranchingInformation * info = NULL ) const

returns a point "inside enough" a given interval, or x if it already is.

Modify alpha_ using gap provided by info

◆ downEstimate()

virtual double Couenne::CouenneObject::downEstimate ( ) const
inlinevirtual

Return "down" estimate (for non-convex, distance old <--> new LP point)

Reimplemented from OsiObject.

Definition at line 129 of file CouenneObject.hpp.

◆ upEstimate()

virtual double Couenne::CouenneObject::upEstimate ( ) const
inlinevirtual

Return "up" estimate (for non-convex, distance old <--> new LP point)

Reimplemented from OsiObject.

Definition at line 138 of file CouenneObject.hpp.

◆ setEstimate()

void Couenne::CouenneObject::setEstimate ( double est,
int direction )
inline

set up/down estimate (0 for down, 1 for up).

This happens in CouenneChooseStrong, where a new LP point is available and we can measure distance from old LP point. This is the denominator we use in pseudocost

Definition at line 150 of file CouenneObject.hpp.

◆ setEstimates()

void Couenne::CouenneObject::setEstimates ( const OsiBranchingInformation * info,
CouNumber * infeasibility,
CouNumber * brpt ) const

set up/down estimates based on branching information

◆ isCuttable()

virtual bool Couenne::CouenneObject::isCuttable ( ) const
inlinevirtual

are we on the bad or good side of the expression?

Reimplemented in Couenne::CouenneVarObject.

Definition at line 159 of file CouenneObject.hpp.

◆ intInfeasibility()

virtual double Couenne::CouenneObject::intInfeasibility ( double value,
double lb,
double ub ) const
virtual

integer infeasibility: min {value - floor(value), ceil(value) - value}

◆ lp_clamp()

CouNumber Couenne::CouenneObject::lp_clamp ( ) const
inline

Defines safe interval percentage for using LP point as a branching point.

Definition at line 170 of file CouenneObject.hpp.

◆ columnNumber()

virtual int Couenne::CouenneObject::columnNumber ( ) const
inlinevirtual

Returns the column index.

Reimplemented from OsiObject.

Definition at line 174 of file CouenneObject.hpp.

Member Data Documentation

◆ cutGen_

CouenneCutGenerator* Couenne::CouenneObject::cutGen_
protected

pointer to cut generator (not necessary, can be NULL)

Definition at line 180 of file CouenneObject.hpp.

◆ problem_

CouenneProblem* Couenne::CouenneObject::problem_
protected

pointer to Couenne problem

Definition at line 183 of file CouenneObject.hpp.

◆ reference_

exprVar* Couenne::CouenneObject::reference_
protected

The (auxiliary) variable this branching object refers to.

If the expression is w=f(x,y), this is w, as opposed to CouenneBranchingObject, where it would be either x or y.

Definition at line 188 of file CouenneObject.hpp.

◆ strategy_

enum brSelStrat Couenne::CouenneObject::strategy_
protected

Branching point selection strategy.

Definition at line 191 of file CouenneObject.hpp.

◆ jnlst_

JnlstPtr Couenne::CouenneObject::jnlst_
protected

SmartPointer to the Journalist.

Definition at line 194 of file CouenneObject.hpp.

◆ alpha_

CouNumber Couenne::CouenneObject::alpha_
protected

Combination parameter for the mid-point branching point selection strategy.

Definition at line 198 of file CouenneObject.hpp.

◆ lp_clamp_

CouNumber Couenne::CouenneObject::lp_clamp_
protected

Defines safe interval percentage for using LP point as a branching point.

Definition at line 201 of file CouenneObject.hpp.

◆ feas_tolerance_

CouNumber Couenne::CouenneObject::feas_tolerance_
protected

feasibility tolerance (equal to that of CouenneProblem)

Definition at line 204 of file CouenneObject.hpp.

◆ doFBBT_

bool Couenne::CouenneObject::doFBBT_
protected

shall we do Feasibility based Bound Tightening (FBBT) at branching?

Definition at line 207 of file CouenneObject.hpp.

◆ doConvCuts_

bool Couenne::CouenneObject::doConvCuts_
protected

shall we add convexification cuts at branching?

Definition at line 210 of file CouenneObject.hpp.

◆ downEstimate_

double Couenne::CouenneObject::downEstimate_
mutableprotected

down estimate (to be used in pseudocost)

Definition at line 213 of file CouenneObject.hpp.

◆ upEstimate_

double Couenne::CouenneObject::upEstimate_
mutableprotected

up estimate (to be used in pseudocost)

Definition at line 216 of file CouenneObject.hpp.

◆ pseudoMultType_

enum pseudocostMult Couenne::CouenneObject::pseudoMultType_
protected

multiplier type for pseudocost

Definition at line 219 of file CouenneObject.hpp.


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