CouenneSolverInterface< T > Class Template Reference

Solver interface class with a pointer to a Couenne cut generator. More...

#include <CouenneSolverInterface.hpp>

Collaboration diagram for CouenneSolverInterface< T >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 CouenneSolverInterface (CouenneCutGenerator *cg=NULL)
 Constructor.
 CouenneSolverInterface (const CouenneSolverInterface &src)
 Copy constructor.
 ~CouenneSolverInterface ()
 Destructor.
virtual OsiSolverInterface * clone (bool copyData=true) const
 Clone.
virtual bool isProvenPrimalInfeasible () const
 we need to overwrite this since we might have internal knowledge
virtual bool isProvenOptimal () const
 we need to overwrite this since we might have internal knowledge
CouenneCutGeneratorCutGen ()
 Return cut generator pointer.
void setCutGenPtr (CouenneCutGenerator *cg)
 Set cut generator pointer after setup, to avoid changes in the pointer due to cut generator cloning (it happens twice in the algorithm).
virtual void initialSolve ()
 Solve initial LP relaxation.
virtual void resolve ()
 Resolve an LP relaxation after problem modification.
virtual void resolve_nobt ()
 Resolve an LP without applying bound tightening beforehand.
virtual int tightenBounds (int lightweight)
 Tighten bounds on all variables (including continuous).
bool isProvenDualInfeasible () const
 is this problem unbounded?
Methods for strong branching.
virtual void markHotStart ()
 Create a hot start snapshot of the optimization process.
virtual void solveFromHotStart ()
 Optimize starting from the hot start snapshot.
virtual void unmarkHotStart ()
 Delete the hot start snapshot.

Protected Member Functions

virtual int tightenBoundsCLP (int lightweight)
 Copy of the Clp version --- not light version.
virtual int tightenBoundsCLP_Light (int lightweight)
 Copy of the Clp version --- light version.

Protected Attributes

CouenneCutGeneratorcutgen_
 The pointer to the Couenne cut generator.
bool knowInfeasible_
 Flag indicating that infeasibility was detected during solveFromHotStart.
bool knowOptimal_
 Flag indicating that optimality was detected during solveFromHotStart.
bool knowDualInfeasible_
 Flag indicating this problem's continuous relaxation is unbounded.

Detailed Description

template<class T>
class CouenneSolverInterface< T >

Solver interface class with a pointer to a Couenne cut generator.

Its main purposes are:

1) to apply bound tightening before re-solving 2) to replace OsiSolverInterface::isInteger () with problem_ -> [expression] -> isInteger () 3) to use NLP solution at branching

Definition at line 26 of file CouenneSolverInterface.hpp.


Constructor & Destructor Documentation

template<class T>
CouenneSolverInterface< T >::CouenneSolverInterface ( CouenneCutGenerator cg = NULL  ) 

Constructor.

Definition at line 18 of file CouenneSolverInterface.cpp.

Referenced by CouenneSolverInterface< T >::clone().

template<class T>
CouenneSolverInterface< T >::CouenneSolverInterface ( const CouenneSolverInterface< T > &  src  ) 

Copy constructor.

Definition at line 31 of file CouenneSolverInterface.cpp.

template<class T>
CouenneSolverInterface< T >::~CouenneSolverInterface (  ) 

Destructor.

Definition at line 43 of file CouenneSolverInterface.cpp.


Member Function Documentation

template<class T>
virtual OsiSolverInterface* CouenneSolverInterface< T >::clone ( bool  copyData = true  )  const [inline, virtual]

Clone.

Definition at line 40 of file CouenneSolverInterface.hpp.

References CouenneSolverInterface< T >::CouenneSolverInterface().

Referenced by CouenneSolverInterface< T >::resolve().

template<class T>
bool CouenneSolverInterface< T >::isProvenPrimalInfeasible (  )  const [virtual]

we need to overwrite this since we might have internal knowledge

Definition at line 74 of file CouenneSolverInterface.cpp.

References CouenneSolverInterface< T >::knowInfeasible_.

Referenced by CouenneSolverInterface< T >::solveFromHotStart().

template<class T>
bool CouenneSolverInterface< T >::isProvenOptimal (  )  const [virtual]

we need to overwrite this since we might have internal knowledge

Definition at line 79 of file CouenneSolverInterface.cpp.

References CouenneSolverInterface< T >::knowOptimal_.

Referenced by CouenneSolverInterface< T >::resolve(), and CouenneSolverInterface< T >::solveFromHotStart().

template<class T>
CouenneCutGenerator* CouenneSolverInterface< T >::CutGen (  )  [inline]

Return cut generator pointer.

Definition at line 50 of file CouenneSolverInterface.hpp.

References CouenneSolverInterface< T >::cutgen_.

template<class T>
void CouenneSolverInterface< T >::setCutGenPtr ( CouenneCutGenerator cg  )  [inline]

Set cut generator pointer after setup, to avoid changes in the pointer due to cut generator cloning (it happens twice in the algorithm).

Definition at line 56 of file CouenneSolverInterface.hpp.

References CouenneSolverInterface< T >::cutgen_.

template<class T>
void CouenneSolverInterface< T >::initialSolve (  )  [virtual]

Solve initial LP relaxation.

Definition at line 51 of file CouenneSolverInterface.cpp.

References Couenne_large_bound, CouenneSolverInterface< T >::cutgen_, CouenneSolverInterface< T >::knowDualInfeasible_, CouenneSolverInterface< T >::knowInfeasible_, CouenneSolverInterface< T >::knowOptimal_, and x.

Referenced by CouenneSolverInterface< T >::resolve().

template<class T>
void CouenneSolverInterface< T >::resolve (  )  [virtual]

Resolve an LP relaxation after problem modification.

Definition at line 94 of file CouenneSolverInterface.cpp.

References CouenneSolverInterface< T >::clone(), COUENNE_EPS, COUENNE_INFINITY, Couenne_large_bound, CouenneSolverInterface< T >::cutgen_, e, CouenneSolverInterface< T >::initialSolve(), CouenneSolverInterface< T >::isProvenOptimal(), CouenneSolverInterface< T >::knowDualInfeasible_, CouenneSolverInterface< T >::knowInfeasible_, CouenneSolverInterface< T >::knowOptimal_, ws, and x.

Referenced by CouenneSolverInterface< T >::solveFromHotStart().

template<class T>
virtual void CouenneSolverInterface< T >::resolve_nobt (  )  [inline, virtual]

Resolve an LP without applying bound tightening beforehand.

Definition at line 69 of file CouenneSolverInterface.hpp.

template<class T>
void CouenneSolverInterface< T >::markHotStart (  )  [virtual]

Create a hot start snapshot of the optimization process.

Definition at line 210 of file CouenneSolverInterface.cpp.

template<class T>
void CouenneSolverInterface< T >::solveFromHotStart (  )  [virtual]

Optimize starting from the hot start snapshot.

Definition at line 222 of file CouenneSolverInterface.cpp.

References Couenne_large_bound, CouenneSolverInterface< T >::cutgen_, CouenneSolverInterface< T >::isProvenDualInfeasible(), CouenneSolverInterface< T >::isProvenOptimal(), CouenneSolverInterface< T >::isProvenPrimalInfeasible(), CouenneSolverInterface< T >::knowDualInfeasible_, CouenneSolverInterface< T >::knowInfeasible_, CouenneSolverInterface< T >::knowOptimal_, CouenneSolverInterface< T >::resolve(), and x.

template<class T>
void CouenneSolverInterface< T >::unmarkHotStart (  )  [virtual]

Delete the hot start snapshot.

Definition at line 216 of file CouenneSolverInterface.cpp.

template<class T>
int CouenneSolverInterface< T >::tightenBounds ( int  lightweight  )  [virtual]

Tighten bounds on all variables (including continuous).

Definition at line 17 of file CouenneLPtightenBounds.cpp.

References t_chg_bounds::CHANGED, COUENNE_EPS, CouenneSolverInterface< T >::cutgen_, and CouenneSolverInterface< T >::tightenBoundsCLP().

template<class T>
bool CouenneSolverInterface< T >::isProvenDualInfeasible (  )  const

is this problem unbounded?

Definition at line 84 of file CouenneSolverInterface.cpp.

References CouenneSolverInterface< T >::knowDualInfeasible_.

Referenced by CouenneSolverInterface< T >::solveFromHotStart().

template<class T>
int CouenneSolverInterface< T >::tightenBoundsCLP ( int  lightweight  )  [protected, virtual]

Copy of the Clp version --- not light version.

Definition at line 21 of file CouenneLPtightenBoundsCLP.cpp.

References COUENNE_EPS, CouenneSolverInterface< T >::cutgen_, e, isInteger(), and CouenneSolverInterface< T >::tightenBoundsCLP_Light().

Referenced by CouenneSolverInterface< T >::tightenBounds().

template<class T>
int CouenneSolverInterface< T >::tightenBoundsCLP_Light ( int  lightweight  )  [protected, virtual]

Copy of the Clp version --- light version.

Definition at line 19 of file CouenneLPtightenBoundsCLP-light.cpp.

References CouenneSolverInterface< T >::cutgen_, isInteger(), and n.

Referenced by CouenneSolverInterface< T >::tightenBoundsCLP().


Member Data Documentation

template<class T>
CouenneCutGenerator* CouenneSolverInterface< T >::cutgen_ [protected]

The pointer to the Couenne cut generator.

Gives us a lot of information, for instance the nlp solver pointer, and the chance to do bound tightening before resolve ().

Definition at line 107 of file CouenneSolverInterface.hpp.

Referenced by CouenneSolverInterface< T >::CutGen(), CouenneSolverInterface< T >::initialSolve(), CouenneSolverInterface< T >::resolve(), CouenneSolverInterface< T >::setCutGenPtr(), CouenneSolverInterface< T >::solveFromHotStart(), CouenneSolverInterface< T >::tightenBounds(), CouenneSolverInterface< T >::tightenBoundsCLP(), and CouenneSolverInterface< T >::tightenBoundsCLP_Light().

template<class T>
bool CouenneSolverInterface< T >::knowInfeasible_ [protected]

Flag indicating that infeasibility was detected during solveFromHotStart.

Definition at line 110 of file CouenneSolverInterface.hpp.

Referenced by CouenneSolverInterface< T >::initialSolve(), CouenneSolverInterface< T >::isProvenPrimalInfeasible(), CouenneSolverInterface< T >::resolve(), and CouenneSolverInterface< T >::solveFromHotStart().

template<class T>
bool CouenneSolverInterface< T >::knowOptimal_ [protected]

Flag indicating that optimality was detected during solveFromHotStart.

Definition at line 113 of file CouenneSolverInterface.hpp.

Referenced by CouenneSolverInterface< T >::initialSolve(), CouenneSolverInterface< T >::isProvenOptimal(), CouenneSolverInterface< T >::resolve(), and CouenneSolverInterface< T >::solveFromHotStart().

template<class T>
bool CouenneSolverInterface< T >::knowDualInfeasible_ [protected]

Flag indicating this problem's continuous relaxation is unbounded.

Definition at line 116 of file CouenneSolverInterface.hpp.

Referenced by CouenneSolverInterface< T >::initialSolve(), CouenneSolverInterface< T >::isProvenDualInfeasible(), CouenneSolverInterface< T >::resolve(), and CouenneSolverInterface< T >::solveFromHotStart().


The documentation for this class was generated from the following files:
Generated on Tue Mar 30 03:12:02 2010 by  doxygen 1.4.7