- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# OsiBabSolver Class Reference

This class allows for the use of more exotic solvers e.g. More...

`#include <OsiAuxInfo.hpp>`

Inheritance diagram for OsiBabSolver:

[legend]
Collaboration diagram for OsiBabSolver:

[legend]
List of all members.

## Public Member Functions
| OsiBabSolver (int solverType=0)
| OsiBabSolver (const OsiBabSolver &rhs)
virtual | ~OsiBabSolver ()
virtual OsiAuxInfo * | clone () const
| Clone.
OsiBabSolver & | operator= (const OsiBabSolver &rhs)
| Assignment operator.
void | setSolver (const OsiSolverInterface *solver)
| Update solver.
void | setSolver (const OsiSolverInterface &solver)
| Update solver.
int | solution (double &objectiveValue, double *newSolution, int numberColumns)
| returns 0 if no heuristic solution, 1 if valid solution with better objective value than one passed in Sets solution values if good, sets objective value numberColumns is size of newSolution
void | setSolution (const double *solution, int numberColumns, double objectiveValue)
| Set solution and objective value.
bool | hasSolution (double &solutionValue, double *solution)
| returns true if the object stores a solution, false otherwise.
void | setSolverType (int value)
| Sets solver type 0 - normal LP solver 1 - DW - may also return heuristic solutions 2 - NLP solver or similar - can't compute objective value just from solution check solver to see if feasible and what objective value is may also return heuristic solution 3 - NLP solver or similar - can't compute objective value just from solution check this (rather than solver) to see if feasible and what objective value is.
int | solverType () const
| gets solver type 0 - normal LP solver 1 - DW - may also return heuristic solutions 2 - NLP solver or similar - can't compute objective value just from solution check this (rather than solver) to see if feasible and what objective value is may also return heuristic solution 3 - NLP solver or similar - can't compute objective value just from solution check this (rather than solver) to see if feasible and what objective value is.
bool | solutionAddsCuts () const
| Return true if getting solution may add cuts so hot start etc will be obsolete.
bool | alwaysTryCutsAtRootNode () const
| Return true if we should try cuts at root even if looks satisfied.
bool | solverAccurate () const
| Returns true if can use solver objective or feasible values, otherwise use mipBound etc.
bool | reducedCostsAccurate () const
| Returns true if can use reduced costs for fixing.
double | mipBound () const
| Get objective (well mip bound).
bool | mipFeasible () const
| Returns true if node feasible.
void | setMipBound (double value)
| Set mip bound (only used for some solvers).
double | bestObjectiveValue () const
| Get objective value of saved solution.
bool | tryCuts () const
| Says whether we want to try cuts at all.
bool | warmStart () const
| Says whether we have a warm start (so can do strong branching).
int | extraCharacteristics () const
| Get bit mask for odd actions of solvers 1 - solution or bound arrays may move in mysterious ways e.g.
void | setExtraCharacteristics (int value)
| Set bit mask for odd actions of solvers 1 - solution or bound arrays may move in mysterious ways e.g.
const double * | beforeLower () const
| Pointer to lower bounds before branch (only if extraCharacteristics set).
void | setBeforeLower (const double *array)
| Set pointer to lower bounds before branch (only if extraCharacteristics set).
const double * | beforeUpper () const
| Pointer to upper bounds before branch (only if extraCharacteristics set).
void | setBeforeUpper (const double *array)
| Set pointer to upper bounds before branch (only if extraCharacteristics set).
## Protected Attributes
double | bestObjectiveValue_
| Objective value of best solution (if there is one) (minimization).
double | mipBound_
| Current lower bound on solution ( if > 1.0e50 infeasible).
const OsiSolverInterface * | solver_
| Solver to use for getting/setting solutions etc.
double * | bestSolution_
| Best integer feasible solution.
const double * | beforeLower_
| Pointer to lower bounds before branch (only if extraCharacteristics set).
const double * | beforeUpper_
| Pointer to upper bounds before branch (only if extraCharacteristics set).
int | solverType_
| Solver type 0 - normal LP solver 1 - DW - may also return heuristic solutions 2 - NLP solver or similar - can't compute objective value just from solution check this (rather than solver) to see if feasible and what objective value is may also return heuristic solution 3 - NLP solver or similar - can't compute objective value just from solution check this (rather than solver) to see if feasible and what objective value is.
int | sizeSolution_
| Size of solution.
int | extraCharacteristics_
| Bit mask for odd actions of solvers 1 - solution or bound arrays may move in mysterious ways e.g.

## Detailed Description

This class allows for the use of more exotic solvers e.g.

Non-Linear or Volume.

You can derive from this although at present I can't see the need.

Definition at line 47 of file OsiAuxInfo.hpp.

## Constructor & Destructor Documentation

OsiBabSolver::OsiBabSolver | ( | int | solverType = `0` | ) |

OsiBabSolver::OsiBabSolver | ( | const OsiBabSolver & | rhs | ) |

virtual OsiBabSolver::~OsiBabSolver | ( |  | ) | `[virtual]`

## Member Function Documentation

virtual OsiAuxInfo* OsiBabSolver::clone | ( |  | ) | const`[virtual]`

Clone.

Reimplemented from OsiAuxInfo.

OsiBabSolver& OsiBabSolver::operator= | ( | const OsiBabSolver & | rhs | ) |

Assignment operator.

void OsiBabSolver::setSolver | ( | const OsiSolverInterface * | solver | ) | `[inline]`

Update solver.

Definition at line 63 of file OsiAuxInfo.hpp.

References solver_.

void OsiBabSolver::setSolver | ( | const OsiSolverInterface & | solver | ) | `[inline]`

Update solver.

Definition at line 66 of file OsiAuxInfo.hpp.

References solver_.

int OsiBabSolver::solution | ( | double & | objectiveValue,
|  | double * | newSolution,
|  | int | numberColumns |
| ) |  |  |

returns 0 if no heuristic solution, 1 if valid solution with better objective value than one passed in Sets solution values if good, sets objective value numberColumns is size of newSolution

void OsiBabSolver::setSolution | ( | const double * | solution,
|  | int | numberColumns,
|  | double | objectiveValue |
| ) |  |  |

Set solution and objective value.

Number of columns and optimization direction taken from current solver. Size of solution is numberColumns (may be padded or truncated in function)

bool OsiBabSolver::hasSolution | ( | double & | solutionValue,
|  | double * | solution |
| ) |  |  |

returns true if the object stores a solution, false otherwise.

If there is a solution then solutionValue and solution will be filled out as well. In that case the user needs to allocate solution to be a big enough array.

void OsiBabSolver::setSolverType | ( | int | value | ) | `[inline]`

Sets solver type 0 - normal LP solver 1 - DW - may also return heuristic solutions 2 - NLP solver or similar - can't compute objective value just from solution check solver to see if feasible and what objective value is

- may also return heuristic solution 3 - NLP solver or similar - can't compute objective value just from solution check this (rather than solver) to see if feasible and what objective value is.

Using Outer Approximation so called lp based

- may also return heuristic solution 4 - normal solver but cuts are needed for integral solution

Definition at line 100 of file OsiAuxInfo.hpp.

References solverType_.

int OsiBabSolver::solverType | ( |  | ) | const`[inline]`

gets solver type 0 - normal LP solver 1 - DW - may also return heuristic solutions 2 - NLP solver or similar - can't compute objective value just from solution check this (rather than solver) to see if feasible and what objective value is

- may also return heuristic solution 3 - NLP solver or similar - can't compute objective value just from solution check this (rather than solver) to see if feasible and what objective value is.

Using Outer Approximation so called lp based

- may also return heuristic solution 4 - normal solver but cuts are needed for integral solution

Definition at line 114 of file OsiAuxInfo.hpp.

References solverType_.

bool OsiBabSolver::solutionAddsCuts | ( |  | ) | const`[inline]`

Return true if getting solution may add cuts so hot start etc will be obsolete.

Definition at line 118 of file OsiAuxInfo.hpp.

References solverType_.

bool OsiBabSolver::alwaysTryCutsAtRootNode | ( |  | ) | const`[inline]`

Return true if we should try cuts at root even if looks satisfied.

Definition at line 121 of file OsiAuxInfo.hpp.

References solverType_.

bool OsiBabSolver::solverAccurate | ( |  | ) | const`[inline]`

Returns true if can use solver objective or feasible values, otherwise use mipBound etc.

Definition at line 125 of file OsiAuxInfo.hpp.

References solverType_.

bool OsiBabSolver::reducedCostsAccurate | ( |  | ) | const`[inline]`

Returns true if can use reduced costs for fixing.

Definition at line 128 of file OsiAuxInfo.hpp.

References solverType_.

double OsiBabSolver::mipBound | ( |  | ) | const

Get objective (well mip bound).

bool OsiBabSolver::mipFeasible | ( |  | ) | const

Returns true if node feasible.

void OsiBabSolver::setMipBound | ( | double | value | ) | `[inline]`

Set mip bound (only used for some solvers).

Definition at line 135 of file OsiAuxInfo.hpp.

References mipBound_.

double OsiBabSolver::bestObjectiveValue | ( |  | ) | const`[inline]`

Get objective value of saved solution.

Definition at line 138 of file OsiAuxInfo.hpp.

References bestObjectiveValue_.

bool OsiBabSolver::tryCuts | ( |  | ) | const`[inline]`

Says whether we want to try cuts at all.

Definition at line 141 of file OsiAuxInfo.hpp.

References solverType_.

bool OsiBabSolver::warmStart | ( |  | ) | const`[inline]`

Says whether we have a warm start (so can do strong branching).

Definition at line 144 of file OsiAuxInfo.hpp.

References solverType_.

int OsiBabSolver::extraCharacteristics | ( |  | ) | const`[inline]`

Get bit mask for odd actions of solvers 1 - solution or bound arrays may move in mysterious ways e.g.

cplex 2 - solver may want bounds before branch

Definition at line 150 of file OsiAuxInfo.hpp.

References extraCharacteristics_.

void OsiBabSolver::setExtraCharacteristics | ( | int | value | ) | `[inline]`

Set bit mask for odd actions of solvers 1 - solution or bound arrays may move in mysterious ways e.g.

cplex 2 - solver may want bounds before branch

Definition at line 156 of file OsiAuxInfo.hpp.

References extraCharacteristics_.

const double* OsiBabSolver::beforeLower | ( |  | ) | const`[inline]`

Pointer to lower bounds before branch (only if extraCharacteristics set).

Definition at line 159 of file OsiAuxInfo.hpp.

References beforeLower_.

void OsiBabSolver::setBeforeLower | ( | const double * | array | ) | `[inline]`

Set pointer to lower bounds before branch (only if extraCharacteristics set).

Definition at line 162 of file OsiAuxInfo.hpp.

References beforeLower_.

const double* OsiBabSolver::beforeUpper | ( |  | ) | const`[inline]`

Pointer to upper bounds before branch (only if extraCharacteristics set).

Definition at line 165 of file OsiAuxInfo.hpp.

References beforeUpper_.

void OsiBabSolver::setBeforeUpper | ( | const double * | array | ) | `[inline]`

Set pointer to upper bounds before branch (only if extraCharacteristics set).

Definition at line 168 of file OsiAuxInfo.hpp.

References beforeUpper_.

## Member Data Documentation

double OsiBabSolver::bestObjectiveValue_`[protected]`

Objective value of best solution (if there is one) (minimization).

Definition at line 172 of file OsiAuxInfo.hpp.

Referenced by bestObjectiveValue().

double OsiBabSolver::mipBound_`[protected]`

Current lower bound on solution ( if > 1.0e50 infeasible).

Definition at line 174 of file OsiAuxInfo.hpp.

Referenced by setMipBound().

const OsiSolverInterface* OsiBabSolver::solver_`[protected]`

Solver to use for getting/setting solutions etc.

Definition at line 176 of file OsiAuxInfo.hpp.

Referenced by setSolver().

double* OsiBabSolver::bestSolution_`[protected]`

Best integer feasible solution.

Definition at line 178 of file OsiAuxInfo.hpp.

const double* OsiBabSolver::beforeLower_`[protected]`

Pointer to lower bounds before branch (only if extraCharacteristics set).

Definition at line 180 of file OsiAuxInfo.hpp.

Referenced by beforeLower(), and setBeforeLower().

const double* OsiBabSolver::beforeUpper_`[protected]`

Pointer to upper bounds before branch (only if extraCharacteristics set).

Definition at line 182 of file OsiAuxInfo.hpp.

Referenced by beforeUpper(), and setBeforeUpper().

int OsiBabSolver::solverType_`[protected]`

Solver type 0 - normal LP solver 1 - DW - may also return heuristic solutions 2 - NLP solver or similar - can't compute objective value just from solution check this (rather than solver) to see if feasible and what objective value is

- may also return heuristic solution 3 - NLP solver or similar - can't compute objective value just from solution check this (rather than solver) to see if feasible and what objective value is.

Using Outer Approximation so called lp based

- may also return heuristic solution

Definition at line 194 of file OsiAuxInfo.hpp.

Referenced by alwaysTryCutsAtRootNode(), reducedCostsAccurate(), setSolverType(), solutionAddsCuts(), solverAccurate(), solverType(), tryCuts(), and warmStart().

int OsiBabSolver::sizeSolution_`[protected]`

Size of solution.

Definition at line 196 of file OsiAuxInfo.hpp.

int OsiBabSolver::extraCharacteristics_`[protected]`

Bit mask for odd actions of solvers 1 - solution or bound arrays may move in mysterious ways e.g.

cplex 2 - solver may want bounds before branch

Definition at line 201 of file OsiAuxInfo.hpp.

Referenced by extraCharacteristics(), and setExtraCharacteristics().

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

- /home/coin/SVN-release/Blis-0.91.2/Osi/src/OsiAuxInfo.hpp