#include <CouenneSolverInterface.hpp>
Collaboration diagram for Couenne::CouenneSolverInterface< T >:
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 | |
CouenneCutGenerator * | CutGen () |
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 | |
CouenneCutGenerator * | cutgen_ |
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. |
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 27 of file CouenneSolverInterface.hpp.
Couenne::CouenneSolverInterface< T >::CouenneSolverInterface | ( | CouenneCutGenerator * | cg = NULL |
) |
constructor
Definition at line 27 of file CouenneSolverInterface.cpp.
Referenced by Couenne::CouenneSolverInterface< T >::clone().
Couenne::CouenneSolverInterface< T >::CouenneSolverInterface | ( | const CouenneSolverInterface< T > & | src | ) |
Couenne::CouenneSolverInterface< T >::~CouenneSolverInterface | ( | ) |
virtual OsiSolverInterface* Couenne::CouenneSolverInterface< T >::clone | ( | bool | copyData = true |
) | const [inline, virtual] |
Clone.
Definition at line 41 of file CouenneSolverInterface.hpp.
References Couenne::CouenneSolverInterface< T >::CouenneSolverInterface().
Referenced by Couenne::CouenneSolverInterface< T >::resolve().
bool Couenne::CouenneSolverInterface< T >::isProvenPrimalInfeasible | ( | ) | const [virtual] |
we need to overwrite this since we might have internal knowledge
Definition at line 91 of file CouenneSolverInterface.cpp.
References Couenne::CouenneSolverInterface< T >::knowInfeasible_.
Referenced by Couenne::CouenneSolverInterface< T >::solveFromHotStart().
bool Couenne::CouenneSolverInterface< T >::isProvenOptimal | ( | ) | const [virtual] |
we need to overwrite this since we might have internal knowledge
Definition at line 96 of file CouenneSolverInterface.cpp.
References Couenne::CouenneSolverInterface< T >::knowOptimal_.
Referenced by Couenne::CouenneSolverInterface< T >::resolve(), and Couenne::CouenneSolverInterface< T >::solveFromHotStart().
CouenneCutGenerator* Couenne::CouenneSolverInterface< T >::CutGen | ( | ) | [inline] |
Return cut generator pointer.
Definition at line 51 of file CouenneSolverInterface.hpp.
References Couenne::CouenneSolverInterface< T >::cutgen_.
void Couenne::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 57 of file CouenneSolverInterface.hpp.
References Couenne::CouenneSolverInterface< T >::cutgen_.
void Couenne::CouenneSolverInterface< T >::initialSolve | ( | ) | [virtual] |
Solve initial LP relaxation.
Definition at line 60 of file CouenneSolverInterface.cpp.
References Couenne::Couenne_large_bound, Couenne::CouenneSolverInterface< T >::cutgen_, Couenne::CouenneSolverInterface< T >::knowDualInfeasible_, Couenne::CouenneSolverInterface< T >::knowInfeasible_, Couenne::CouenneSolverInterface< T >::knowOptimal_, and x.
Referenced by Couenne::CouenneSolverInterface< T >::resolve().
void Couenne::CouenneSolverInterface< T >::resolve | ( | ) | [virtual] |
Resolve an LP relaxation after problem modification.
Definition at line 111 of file CouenneSolverInterface.cpp.
References Couenne::CouenneProblem::checkNLP(), Couenne::CouenneProblem::checkNLP2(), Couenne::CouenneSolverInterface< T >::clone(), COUENNE_EPS, COUENNE_INFINITY, Couenne::Couenne_large_bound, Couenne::CouenneSolverInterface< T >::cutgen_, e, Couenne::CouenneProblem::getFeasTol(), Couenne::CouenneRecordBestSol::getHasSol(), Couenne::CouenneRecordBestSol::getModSolVal(), Couenne::CouenneProblem::getRecordBestSol(), Couenne::CouenneRecordBestSol::getVal(), Couenne::CouenneSolverInterface< T >::initialSolve(), Couenne::CouenneSolverInterface< T >::isProvenOptimal(), Couenne::CouenneSolverInterface< T >::knowDualInfeasible_, Couenne::CouenneSolverInterface< T >::knowInfeasible_, Couenne::CouenneSolverInterface< T >::knowOptimal_, Couenne::CouenneProblem::nVars(), Couenne::CouenneCutGenerator::Problem(), Couenne::CouenneRecordBestSol::update(), ws, and x.
Referenced by Couenne::CouenneSolverInterface< T >::solveFromHotStart().
virtual void Couenne::CouenneSolverInterface< T >::resolve_nobt | ( | ) | [inline, virtual] |
Resolve an LP without applying bound tightening beforehand.
Definition at line 70 of file CouenneSolverInterface.hpp.
void Couenne::CouenneSolverInterface< T >::markHotStart | ( | ) | [virtual] |
Create a hot start snapshot of the optimization process.
Definition at line 288 of file CouenneSolverInterface.cpp.
void Couenne::CouenneSolverInterface< T >::solveFromHotStart | ( | ) | [virtual] |
Optimize starting from the hot start snapshot.
Definition at line 300 of file CouenneSolverInterface.cpp.
References Couenne::Couenne_large_bound, Couenne::CouenneSolverInterface< T >::cutgen_, Couenne::CouenneSolverInterface< T >::isProvenDualInfeasible(), Couenne::CouenneSolverInterface< T >::isProvenOptimal(), Couenne::CouenneSolverInterface< T >::isProvenPrimalInfeasible(), Couenne::CouenneSolverInterface< T >::knowDualInfeasible_, Couenne::CouenneSolverInterface< T >::knowInfeasible_, Couenne::CouenneSolverInterface< T >::knowOptimal_, Couenne::CouenneSolverInterface< T >::resolve(), and x.
void Couenne::CouenneSolverInterface< T >::unmarkHotStart | ( | ) | [virtual] |
int Couenne::CouenneSolverInterface< T >::tightenBounds | ( | int | lightweight | ) | [virtual] |
Tighten bounds on all variables (including continuous).
Definition at line 19 of file CouenneLPtightenBounds.cpp.
References Couenne::t_chg_bounds::CHANGED, COUENNE_EPS, Couenne::CouenneSolverInterface< T >::cutgen_, and Couenne::CouenneSolverInterface< T >::tightenBoundsCLP().
bool Couenne::CouenneSolverInterface< T >::isProvenDualInfeasible | ( | ) | const |
is this problem unbounded?
Definition at line 101 of file CouenneSolverInterface.cpp.
References Couenne::CouenneSolverInterface< T >::knowDualInfeasible_.
Referenced by Couenne::CouenneSolverInterface< T >::solveFromHotStart().
int Couenne::CouenneSolverInterface< T >::tightenBoundsCLP | ( | int | lightweight | ) | [protected, virtual] |
Copy of the Clp version --- not light version.
Definition at line 23 of file CouenneLPtightenBoundsCLP.cpp.
References COUENNE_EPS, Couenne::CouenneSolverInterface< T >::cutgen_, e, Couenne::isInteger(), and Couenne::CouenneSolverInterface< T >::tightenBoundsCLP_Light().
Referenced by Couenne::CouenneSolverInterface< T >::tightenBounds().
int Couenne::CouenneSolverInterface< T >::tightenBoundsCLP_Light | ( | int | lightweight | ) | [protected, virtual] |
Copy of the Clp version --- light version.
Definition at line 21 of file CouenneLPtightenBoundsCLP-light.cpp.
References Couenne::CouenneSolverInterface< T >::cutgen_, Couenne::isInteger(), and n.
Referenced by Couenne::CouenneSolverInterface< T >::tightenBoundsCLP().
CouenneCutGenerator* Couenne::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 108 of file CouenneSolverInterface.hpp.
Referenced by Couenne::CouenneSolverInterface< T >::CutGen(), Couenne::CouenneSolverInterface< T >::initialSolve(), Couenne::CouenneSolverInterface< T >::resolve(), Couenne::CouenneSolverInterface< T >::setCutGenPtr(), Couenne::CouenneSolverInterface< T >::solveFromHotStart(), Couenne::CouenneSolverInterface< T >::tightenBounds(), Couenne::CouenneSolverInterface< T >::tightenBoundsCLP(), and Couenne::CouenneSolverInterface< T >::tightenBoundsCLP_Light().
bool Couenne::CouenneSolverInterface< T >::knowInfeasible_ [protected] |
Flag indicating that infeasibility was detected during solveFromHotStart.
Definition at line 111 of file CouenneSolverInterface.hpp.
Referenced by Couenne::CouenneSolverInterface< T >::initialSolve(), Couenne::CouenneSolverInterface< T >::isProvenPrimalInfeasible(), Couenne::CouenneSolverInterface< T >::resolve(), and Couenne::CouenneSolverInterface< T >::solveFromHotStart().
bool Couenne::CouenneSolverInterface< T >::knowOptimal_ [protected] |
Flag indicating that optimality was detected during solveFromHotStart.
Definition at line 114 of file CouenneSolverInterface.hpp.
Referenced by Couenne::CouenneSolverInterface< T >::initialSolve(), Couenne::CouenneSolverInterface< T >::isProvenOptimal(), Couenne::CouenneSolverInterface< T >::resolve(), and Couenne::CouenneSolverInterface< T >::solveFromHotStart().
bool Couenne::CouenneSolverInterface< T >::knowDualInfeasible_ [protected] |
Flag indicating this problem's continuous relaxation is unbounded.
Definition at line 117 of file CouenneSolverInterface.hpp.
Referenced by Couenne::CouenneSolverInterface< T >::initialSolve(), Couenne::CouenneSolverInterface< T >::isProvenDualInfeasible(), Couenne::CouenneSolverInterface< T >::resolve(), and Couenne::CouenneSolverInterface< T >::solveFromHotStart().