Osi
0.108.8
|
This class allows for the use of more exotic solvers e.g. More...
#include <OsiAuxInfo.hpp>
Public Member Functions | |
OsiBabSolver (int solverType=0) | |
OsiBabSolver (const OsiBabSolver &rhs) | |
virtual | ~OsiBabSolver () |
virtual OsiAuxInfo * | clone () const |
Clone. More... | |
OsiBabSolver & | operator= (const OsiBabSolver &rhs) |
Assignment operator. More... | |
void | setSolver (const OsiSolverInterface *solver) |
Update solver. More... | |
void | setSolver (const OsiSolverInterface &solver) |
Update solver. More... | |
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 More... | |
void | setSolution (const double *solution, int numberColumns, double objectiveValue) |
Set solution and objective value. More... | |
bool | hasSolution (double &solutionValue, double *solution) |
returns true if the object stores a solution, false otherwise. More... | |
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. More... | |
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 More... | |
bool | solutionAddsCuts () const |
Return true if getting solution may add cuts so hot start etc will be obsolete. More... | |
bool | alwaysTryCutsAtRootNode () const |
Return true if we should try cuts at root even if looks satisfied. More... | |
bool | solverAccurate () const |
Returns true if can use solver objective or feasible values, otherwise use mipBound etc. More... | |
bool | reducedCostsAccurate () const |
Returns true if can use reduced costs for fixing. More... | |
double | mipBound () const |
Get objective (well mip bound) More... | |
bool | mipFeasible () const |
Returns true if node feasible. More... | |
void | setMipBound (double value) |
Set mip bound (only used for some solvers) More... | |
double | bestObjectiveValue () const |
Get objective value of saved solution. More... | |
bool | tryCuts () const |
Says whether we want to try cuts at all. More... | |
bool | warmStart () const |
Says whether we have a warm start (so can do strong branching) More... | |
int | extraCharacteristics () const |
Get bit mask for odd actions of solvers 1 - solution or bound arrays may move in mysterious ways e.g. More... | |
void | setExtraCharacteristics (int value) |
Set bit mask for odd actions of solvers 1 - solution or bound arrays may move in mysterious ways e.g. More... | |
const double * | beforeLower () const |
Pointer to lower bounds before branch (only if extraCharacteristics set) More... | |
void | setBeforeLower (const double *array) |
Set pointer to lower bounds before branch (only if extraCharacteristics set) More... | |
const double * | beforeUpper () const |
Pointer to upper bounds before branch (only if extraCharacteristics set) More... | |
void | setBeforeUpper (const double *array) |
Set pointer to upper bounds before branch (only if extraCharacteristics set) More... | |
void | setExtraPointer (void *extraInfo) |
Set pointer to extra stuff. More... | |
void * | getExtraPointer () const |
get pointer to extra info More... | |
![]() | |
OsiAuxInfo (void *appData=NULL) | |
OsiAuxInfo (const OsiAuxInfo &rhs) | |
virtual | ~OsiAuxInfo () |
OsiAuxInfo & | operator= (const OsiAuxInfo &rhs) |
Assignment operator. More... | |
void * | getApplicationData () const |
Get application data. More... | |
Protected Attributes | |
double | bestObjectiveValue_ |
Objective value of best solution (if there is one) (minimization) More... | |
double | mipBound_ |
Current lower bound on solution ( if > 1.0e50 infeasible) More... | |
const OsiSolverInterface * | solver_ |
Solver to use for getting/setting solutions etc. More... | |
double * | bestSolution_ |
Best integer feasible solution. More... | |
const double * | beforeLower_ |
Pointer to lower bounds before branch (only if extraCharacteristics set) More... | |
const double * | beforeUpper_ |
Pointer to upper bounds before branch (only if extraCharacteristics set) More... | |
void * | extraInfo_ |
Pointer to extra info. More... | |
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. More... | |
int | sizeSolution_ |
Size of solution. More... | |
int | extraCharacteristics_ |
Bit mask for odd actions of solvers 1 - solution or bound arrays may move in mysterious ways e.g. More... | |
![]() | |
void * | appData_ |
Pointer to user-defined data structure. More... | |
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 52 of file OsiAuxInfo.hpp.
OsiBabSolver::OsiBabSolver | ( | int | solverType = 0 | ) |
OsiBabSolver::OsiBabSolver | ( | const OsiBabSolver & | rhs | ) |
|
virtual |
|
virtual |
Clone.
Reimplemented from OsiAuxInfo.
OsiBabSolver& OsiBabSolver::operator= | ( | const OsiBabSolver & | rhs | ) |
Assignment operator.
|
inline |
Update solver.
Definition at line 68 of file OsiAuxInfo.hpp.
|
inline |
Update solver.
Definition at line 73 of file OsiAuxInfo.hpp.
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.
|
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.
Definition at line 109 of file OsiAuxInfo.hpp.
|
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
Definition at line 125 of file OsiAuxInfo.hpp.
|
inline |
Return true if getting solution may add cuts so hot start etc will be obsolete.
Definition at line 131 of file OsiAuxInfo.hpp.
|
inline |
Return true if we should try cuts at root even if looks satisfied.
Definition at line 136 of file OsiAuxInfo.hpp.
|
inline |
Returns true if can use solver objective or feasible values, otherwise use mipBound etc.
Definition at line 142 of file OsiAuxInfo.hpp.
|
inline |
Returns true if can use reduced costs for fixing.
Definition at line 147 of file OsiAuxInfo.hpp.
double OsiBabSolver::mipBound | ( | ) | const |
Get objective (well mip bound)
bool OsiBabSolver::mipFeasible | ( | ) | const |
Returns true if node feasible.
|
inline |
Set mip bound (only used for some solvers)
Definition at line 156 of file OsiAuxInfo.hpp.
|
inline |
Get objective value of saved solution.
Definition at line 161 of file OsiAuxInfo.hpp.
|
inline |
Says whether we want to try cuts at all.
Definition at line 166 of file OsiAuxInfo.hpp.
|
inline |
Says whether we have a warm start (so can do strong branching)
Definition at line 171 of file OsiAuxInfo.hpp.
|
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 179 of file OsiAuxInfo.hpp.
|
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 187 of file OsiAuxInfo.hpp.
|
inline |
Pointer to lower bounds before branch (only if extraCharacteristics set)
Definition at line 192 of file OsiAuxInfo.hpp.
|
inline |
Set pointer to lower bounds before branch (only if extraCharacteristics set)
Definition at line 197 of file OsiAuxInfo.hpp.
|
inline |
Pointer to upper bounds before branch (only if extraCharacteristics set)
Definition at line 202 of file OsiAuxInfo.hpp.
|
inline |
Set pointer to upper bounds before branch (only if extraCharacteristics set)
Definition at line 207 of file OsiAuxInfo.hpp.
|
inline |
Set pointer to extra stuff.
Definition at line 212 of file OsiAuxInfo.hpp.
|
inline |
get pointer to extra info
Definition at line 217 of file OsiAuxInfo.hpp.
|
protected |
Objective value of best solution (if there is one) (minimization)
Definition at line 224 of file OsiAuxInfo.hpp.
|
protected |
Current lower bound on solution ( if > 1.0e50 infeasible)
Definition at line 226 of file OsiAuxInfo.hpp.
|
protected |
Solver to use for getting/setting solutions etc.
Definition at line 228 of file OsiAuxInfo.hpp.
|
protected |
Best integer feasible solution.
Definition at line 230 of file OsiAuxInfo.hpp.
|
protected |
Pointer to lower bounds before branch (only if extraCharacteristics set)
Definition at line 232 of file OsiAuxInfo.hpp.
|
protected |
Pointer to upper bounds before branch (only if extraCharacteristics set)
Definition at line 234 of file OsiAuxInfo.hpp.
|
protected |
Pointer to extra info.
Definition at line 236 of file OsiAuxInfo.hpp.
|
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.
Definition at line 248 of file OsiAuxInfo.hpp.
|
protected |
Size of solution.
Definition at line 250 of file OsiAuxInfo.hpp.
|
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 255 of file OsiAuxInfo.hpp.