Bonmin::OaDecompositionBase::solverManip Class Reference

Small class to manipulatee various things in an OsiSolverInterface and restore them. More...

#include <BonOaDecBase.hpp>

List of all members.

Cached info from solver interface.

void getCached ()
int numcols_
 Number of columns.
int numrows_
 Number of rows.
const double * siColLower_
 Lower bounds on variables.
const double * siColUpper_
 Upper bounds on variables.

Public Member Functions

 solverManip (OsiSolverInterface *si, bool saveNumRows=true, bool saveBasis=true, bool saveBounds=false, bool saveCutoff=false, bool resolve=true)
 Constructor.
 solverManip (const OsiSolverInterface &si)
 Constructor which clone an other interface.
 ~solverManip ()
 Destructor.
void restore ()
 Restore solver.
void cloneOther (const OsiSolverInterface &si)
 Clone the state of another solver (bounds, cutoff, basis).
bool integerFeasible (const OsiBranchingInformation &info) const
 Check for integer feasibility of a solution return 1 if it is.
void fixIntegers (const OsiBranchingInformation &info)
 Fix integer variables in si to their values in colsol.
bool isDifferentOnIntegers (const double *colsol)
 Check if solution in solver is the same as colsol on integer variables.
bool isDifferentOnIntegers (const double *colsol, const double *other)
 Check if two solutions are the same on integer variables.
void installCuts (const OsiCuts &cs, int numberCuts)
 Install cuts in solver.
OsiSolverInterface * si ()
 Get pointer to solver interface.
void setObjects (OsiObject **objects, int nObjects)
 Set objects.
void setIntegerTolerance (double v)

Private Attributes

OsiSolverInterface * si_
 Interface saved.
int initialNumberRows_
 Initial number of rows (-1 if don't save).
double * colLower_
 Initial lower bounds.
double * colUpper_
 Initial Upper bounds.
CoinWarmStart * warm_
 Inital basis.
double cutoff_
 Initial cutoff.
bool deleteSolver_
 delete si_ ?
OsiObject ** objects_
 Some objects the feasiblitiy of which to verify.
int nObjects_
 Number of objects.*/.
double integerTolerance_


Detailed Description

Small class to manipulatee various things in an OsiSolverInterface and restore them.

The OsiSolverInterface manipulated may already exist or may be cloned from another one.

Definition at line 122 of file BonOaDecBase.hpp.


Constructor & Destructor Documentation

Bonmin::OaDecompositionBase::solverManip::solverManip ( OsiSolverInterface *  si,
bool  saveNumRows = true,
bool  saveBasis = true,
bool  saveBounds = false,
bool  saveCutoff = false,
bool  resolve = true 
)

Constructor.

Definition at line 296 of file BonOaDecBase.cpp.

Bonmin::OaDecompositionBase::solverManip::solverManip ( const OsiSolverInterface &  si  ) 

Constructor which clone an other interface.

Definition at line 332 of file BonOaDecBase.cpp.

Bonmin::OaDecompositionBase::solverManip::~solverManip (  ) 

Destructor.

Definition at line 348 of file BonOaDecBase.cpp.

References colLower_, colUpper_, deleteSolver_, si_, and warm_.


Member Function Documentation

void Bonmin::OaDecompositionBase::solverManip::restore (  ) 

Restore solver.

Definition at line 357 of file BonOaDecBase.cpp.

References colLower_, colUpper_, cutoff_, getCached(), initialNumberRows_, numrows_, si_, and warm_.

Referenced by Bonmin::OaDecompositionBase::generateCuts().

void Bonmin::OaDecompositionBase::solverManip::cloneOther ( const OsiSolverInterface &  si  ) 

Clone the state of another solver (bounds, cutoff, basis).

Definition at line 515 of file BonOaDecBase.cpp.

References e, k, Bonmin::OaDecompositionBase::lp_, numcols_, numrows_, and si_.

Referenced by Bonmin::OaDecompositionBase::generateCuts().

bool Bonmin::OaDecompositionBase::solverManip::integerFeasible ( const OsiBranchingInformation &  info  )  const

Check for integer feasibility of a solution return 1 if it is.

Todo:
Handle SOS Type 2 constraints.

Definition at line 402 of file BonOaDecBase.cpp.

References integerTolerance_, nObjects_, objects_, and si_.

Referenced by Bonmin::OaDecompositionBase::generateCuts().

void Bonmin::OaDecompositionBase::solverManip::fixIntegers ( const OsiBranchingInformation &  info  ) 

Fix integer variables in si to their values in colsol.

Remarks:
colsol is assumed to be integer on the integer constrained variables.
Todo:
Handle SOS type 2.

Definition at line 428 of file BonOaDecBase.cpp.

References colLower_, colUpper_, integerTolerance_, nObjects_, numcols_, objects_, and si_.

bool Bonmin::OaDecompositionBase::solverManip::isDifferentOnIntegers ( const double *  colsol  ) 

Check if solution in solver is the same as colsol on integer variables.

Definition at line 473 of file BonOaDecBase.cpp.

References si_.

bool Bonmin::OaDecompositionBase::solverManip::isDifferentOnIntegers ( const double *  colsol,
const double *  other 
)

Check if two solutions are the same on integer variables.

Definition at line 480 of file BonOaDecBase.cpp.

References integerTolerance_, k, nObjects_, numcols_, objects_, and si_.

void Bonmin::OaDecompositionBase::solverManip::installCuts ( const OsiCuts &  cs,
int  numberCuts 
)

Install cuts in solver.

Definition at line 588 of file BonOaDecBase.cpp.

References numcols_, numrows_, and si_.

OsiSolverInterface* Bonmin::OaDecompositionBase::solverManip::si (  )  [inline]

Get pointer to solver interface.

Definition at line 158 of file BonOaDecBase.hpp.

References si_.

void Bonmin::OaDecompositionBase::solverManip::setObjects ( OsiObject **  objects,
int  nObjects 
) [inline]

Set objects.

Definition at line 164 of file BonOaDecBase.hpp.

References nObjects_, and objects_.

Referenced by Bonmin::OaDecompositionBase::generateCuts().

void Bonmin::OaDecompositionBase::solverManip::setIntegerTolerance ( double  v  )  [inline]

Definition at line 170 of file BonOaDecBase.hpp.

References integerTolerance_.

Referenced by Bonmin::OaDecompositionBase::generateCuts().

void Bonmin::OaDecompositionBase::solverManip::getCached (  )  [private]

Definition at line 712 of file BonOaDecBase.cpp.

References numcols_, numrows_, si_, siColLower_, and siColUpper_.

Referenced by restore().


Member Data Documentation

OsiSolverInterface* Bonmin::OaDecompositionBase::solverManip::si_ [private]

Interface saved.

Definition at line 176 of file BonOaDecBase.hpp.

Referenced by cloneOther(), fixIntegers(), getCached(), installCuts(), integerFeasible(), isDifferentOnIntegers(), restore(), si(), and ~solverManip().

int Bonmin::OaDecompositionBase::solverManip::initialNumberRows_ [private]

Initial number of rows (-1 if don't save).

Definition at line 178 of file BonOaDecBase.hpp.

Referenced by restore().

double* Bonmin::OaDecompositionBase::solverManip::colLower_ [private]

Initial lower bounds.

Definition at line 181 of file BonOaDecBase.hpp.

Referenced by fixIntegers(), restore(), and ~solverManip().

double* Bonmin::OaDecompositionBase::solverManip::colUpper_ [private]

Initial Upper bounds.

Definition at line 184 of file BonOaDecBase.hpp.

Referenced by fixIntegers(), restore(), and ~solverManip().

CoinWarmStart* Bonmin::OaDecompositionBase::solverManip::warm_ [private]

Inital basis.

Definition at line 187 of file BonOaDecBase.hpp.

Referenced by restore(), and ~solverManip().

double Bonmin::OaDecompositionBase::solverManip::cutoff_ [private]

Initial cutoff.

Definition at line 190 of file BonOaDecBase.hpp.

Referenced by restore().

bool Bonmin::OaDecompositionBase::solverManip::deleteSolver_ [private]

delete si_ ?

Definition at line 193 of file BonOaDecBase.hpp.

Referenced by ~solverManip().

OsiObject* * Bonmin::OaDecompositionBase::solverManip::objects_ [private]

Some objects the feasiblitiy of which to verify.

Definition at line 196 of file BonOaDecBase.hpp.

Referenced by fixIntegers(), integerFeasible(), isDifferentOnIntegers(), and setObjects().

int Bonmin::OaDecompositionBase::solverManip::nObjects_ [private]

Number of objects.*/.

Definition at line 198 of file BonOaDecBase.hpp.

Referenced by fixIntegers(), integerFeasible(), isDifferentOnIntegers(), and setObjects().

int Bonmin::OaDecompositionBase::solverManip::numcols_ [private]

Number of columns.

Definition at line 202 of file BonOaDecBase.hpp.

Referenced by cloneOther(), fixIntegers(), getCached(), installCuts(), and isDifferentOnIntegers().

int Bonmin::OaDecompositionBase::solverManip::numrows_ [private]

Number of rows.

Definition at line 204 of file BonOaDecBase.hpp.

Referenced by cloneOther(), getCached(), installCuts(), and restore().

const double* Bonmin::OaDecompositionBase::solverManip::siColLower_ [private]

Lower bounds on variables.

Definition at line 206 of file BonOaDecBase.hpp.

Referenced by getCached().

const double* Bonmin::OaDecompositionBase::solverManip::siColUpper_ [private]

Upper bounds on variables.

Definition at line 208 of file BonOaDecBase.hpp.

Referenced by getCached().

double Bonmin::OaDecompositionBase::solverManip::integerTolerance_ [private]

Definition at line 212 of file BonOaDecBase.hpp.

Referenced by fixIntegers(), integerFeasible(), isDifferentOnIntegers(), and setIntegerTolerance().


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