# OsiDylpSolverInterface Class Reference

COIN OSI API for dylp. More...

`#include <OsiDylpSolverInterface.hpp>`

Inheritance diagram for OsiDylpSolverInterface:
[legend]
Collaboration diagram for OsiDylpSolverInterface:
[legend]

List of all members.

## Public Member Functions
Constructors and Destructors
| OsiDylpSolverInterface ()
| Default constructor.
| OsiDylpSolverInterface (const OsiDylpSolverInterface &src)
| Copy constructor.
OsiSolverInterface * | clone (bool copyData=true) const
| Clone the solver object.
OsiDylpSolverInterface & | operator= (const OsiDylpSolverInterface &rhs)
| Assignment.
| ~OsiDylpSolverInterface ()
| Destructor.
void | reset ()
| Reset the solver object to the state produced by the default constructor.
Methods to load a problem
int | readMps (const char *filename, const char *extension="mps")
| Read a problem description in MPS format from a file.
int | readMps (const char *filename, const char *extension, int &numberSets, CoinSet **&sets)
| Read a problem description in MPS format from a file, including SOS information.
void | writeMps (const char *basename, const char *extension="mps", double objsense=0.0) const
| Write the problem into the specified file in MPS format.
void | loadProblem (const CoinPackedMatrix &matrix, const double *collb, const double *colub, const double *obj, const char *rowsen, const double *rowrhs, const double *rowrng)
| Load a problem description (OSI packed matrix, row sense, parameters unaffected).
void | loadProblem (const CoinPackedMatrix &matrix, const double *collb, const double *colub, const double *obj, const double *rowlb, const double *rowub)
| Load a problem description (OSI packed matrix, row bounds, parameters unaffected).
void | loadProblem (const int colcnt, const int rowcnt, const int *start, const int *index, const double *value, const double *collb, const double *colub, const double *obj, const char *sense, const double *rhsin, const double *range)
| Load a problem description (standard column-major packed matrix, row sense, parameters unaffected).
void | loadProblem (const int colcnt, const int rowcnt, const int *start, const int *index, const double *value, const double *collb, const double *colub, const double *obj, const double *row_lower, const double *row_upper)
| Load a problem description (standard column-major packed matrix, row bounds, parameters unaffected).
void | assignProblem (CoinPackedMatrix *&matrix, double *&collb, double *&colub, double *&obj, char *&rowsen, double *&rowrhs, double *&rowrng)
| Load a problem description (OSI packed matrix, row sense, parameters destroyed).
void | assignProblem (CoinPackedMatrix *&matrix, double *&collb, double *&colub, double *&obj, double *&rowlb, double *&rowub)
| Load a problem description (OSI packed matrix, row bounds, parameters destroyed).
Methods to obtain problem information
int | getNumCols () const
| Get the number of columns (variables).
int | getNumRows () const
| Get the number of rows (constraints).
int | getNumElements () const
| Get the number of non-zero coefficients.
int | getNumIntegers () const
| Get the number of integer variables.
const double * | getColLower () const
| Get the column (variable) lower bound vector.
const double * | getColUpper () const
| Get the column (variable) upper bound vector.
bool | isContinuous (int colIndex) const
| Return true if the variable is continuous.
bool | isBinary (int colIndex) const
| Return true if the variable is binary.
bool | isIntegerNonBinary (int colIndex) const
| Return true if the variable is general integer.
bool | isInteger (int colIndex) const
| Return true if the variable is integer (general or binary).
const char * | getRowSense () const
| Get the row sense (constraint type) vector.
const double * | getRightHandSide () const
| Get the row (constraint) right-hand-side vector.
const double * | getRowRange () const
| Get the row (constraint) range vector.
const double * | getRowLower () const
| Get the row (constraint) lower bound vector.
const double * | getRowUpper () const
| Get the row (constraint) upper bound vector.
const double * | getObjCoefficients () const
| Get the objective function coefficient vector.
double | getObjSense () const
| Get the objective function sense (min/max).
const CoinPackedMatrix * | getMatrixByRow () const
| Get a pointer to a row-major copy of the constraint matrix.
const CoinPackedMatrix * | getMatrixByCol () const
| Get a pointer to a column-major copy of the constraint matrix.
Methods for row and column names.
Only the set methods need to be overridden to ensure consistent names between OsiDylp and the OSI base class.
void | setObjName (std::string name)
| Set the objective function name.
void | setRowName (int ndx, std::string name)
| Set a row name.
void | setColName (int ndx, std::string name)
| Set a column name.
Methods to modify the problem
void | setContinuous (int index)
| Set a single variable to be continuous.
void | setInteger (int index)
| Set a single variable to be integer.
void | setColLower (int index, double value)
| Set the lower bound on a column (variable).
void | setColUpper (int index, double value)
| Set the upper bound on a column (variable).
void | setRowLower (int index, double value)
| Set the lower bound on a row (constraint).
void | setRowUpper (int index, double value)
| Set the upper bound on a row (constraint).
void | setRowType (int index, char rowsen, double rowrhs, double rowrng)
| Set the type of a row (constraint).
void | setObjCoeff (int index, double value)
| Set an objective function coefficient.
void | setObjective (const double *array)
| Set the objective coefficients for all columns.
void | setObjSense (double sense)
| Set the sense (min/max) of the objective.
void | setColSolution (const double *colsol)
| Set the value of the primal variables in the problem solution.
void | setRowPrice (const double *)
| Set the value of the dual variables in the problem solution.
void | addCol (const CoinPackedVectorBase &vec, const double collb, const double colub, const double obj)
| Add a column (variable) to the problem.
void | deleteCols (const int num, const int *colIndices)
| Remove column(s) (variable(s)) from the problem.
void | addRow (const CoinPackedVectorBase &row, const double rowlb, const double rowub)
| Add a row (constraint) to the problem.
void | addRow (const CoinPackedVectorBase &row, const char rowsen, const double rowrhs, const double rowrng)
| Add a row (constraint) to the problem.
void | deleteRows (const int num, const int *rowIndices)
| Delete row(s) (constraint(s)) from the problem.
void | applyRowCut (const OsiRowCut &cut)
| Apply a row (constraint) cut (add one constraint).
void | applyColCut (const OsiColCut &cut)
| Apply a column (variable) cut (adjust one or more bounds).
Solve methods
void | initialSolve ()
| Solve an lp from scratch.
CoinWarmStart * | getEmptyWarmStart () const
| Get an empty OsiDylpWarmStartBasis object.
CoinWarmStart * | getWarmStart () const
| Build a warm start object for the current lp solution.
bool | setWarmStart (const CoinWarmStart *warmStart)
| Apply a warm start object.
void | resolve ()
| Call dylp to reoptimize (warm start).
void | markHotStart ()
| Create a hot start snapshot.
void | solveFromHotStart ()
| Call dylp to reoptimize (hot start).
void | unmarkHotStart ()
| Delete the hot start snapshot.
Methods returning solver termination status
bool | isAbandoned () const
| True if dylp abandoned the problem.
bool | isProvenOptimal () const
| True if dylp reported an optimal solution.
bool | isProvenPrimalInfeasible () const
| True if dylp reported the problem to be primal infeasible.
bool | isProvenDualInfeasible () const
| True if dylp reported the problem to be dual infeasible (primal unbounded).
bool | isIterationLimitReached () const
| True if dylp reached the iteration limit.
int | getIterationCount () const
| Get the number of iterations for the last lp.
bool | isPrimalObjectiveLimitReached () const
| Is the primal objective limit reached?
bool | isDualObjectiveLimitReached () const
| Is the dual objective limit reached?
Methods to set/get solver parameters
double | getInfinity () const
| Get dylp's value for infinity.
bool | setIntParam (OsiIntParam key, int value)
| Set an OSI integer parameter.
bool | setDblParam (OsiDblParam key, double value)
| Set an OSI double parameter.
bool | setStrParam (OsiStrParam key, const std::string &value)
| Set an OSI string parameter.
bool | setHintParam (OsiHintParam key, bool sense=true, OsiHintStrength strength=OsiHintTry, void *info=0)
| Set an OSI hint.
bool | getIntParam (OsiIntParam key, int &value) const
| Get an OSI integer parameter.
bool | getDblParam (OsiDblParam key, double &value) const
| Get an OSI double parameter.
bool | getStrParam (OsiStrParam key, std::string &value) const
| Get an OSI string parameter.
bool | getHintParam (OsiHintParam key, bool &sense, OsiHintStrength &strength, void *&info) const
| Get an OSI hint.
void | newLanguage (CoinMessages::Language language)
| Change the language for OsiDylp messages.
void | setLanguage (CoinMessages::Language language)
| An alias for OsiDylpSolverInterface::newLanguage.
Methods to obtain solution information
double | getObjValue () const
| Get the objective function value for the solution.
const double * | getColSolution () const
| Return the vector of primal variables for the solution.
const double * | getRowPrice () const
| Return the vector of dual variables for the solution.
const double * | getReducedCost () const
| Return the vector of reduced costs for the solution.
const double * | getRowActivity () const
| Return the vector of row activity for the solution.
std::vector< double * > | getDualRays (int maxNumRays, bool fullRay) const
| Get as many dual rays as the solver can provide.
std::vector< double * > | getPrimalRays (int maxNumRays) const
| Get as many primal rays as the solver can provide.
Simplex API methods
int | canDoSimplexInterface () const
| Return the simplex implementation level.
void | enableFactorization () const
| Prepare the solver for the use of tableau access methods.
void | disableFactorization () const
| Undo the effects of enableFactorization.
bool | basisIsAvailable () const
| Check if an optimal basis is available.
void | getBasisStatus (int *archStatus, int *logStatus) const
| Retrieve status information for architectural and logical variables.
int | setBasisStatus (const int *archStatus, const int *logStatus)
| Set a basis and update the factorization and solution.
virtual void | getReducedGradient (double *columnReducedCosts, double *duals, const double *c) const
| Calculate duals and reduced costs for the given objective coefficients.
virtual void | getBasics (int *index) const
| Get indices of basic variables.
virtual void | getBInvCol (int col, double *betak) const
| Get a column of the basis inverse.
virtual void | getBInvACol (int col, double *abarj) const
| Get a column of the tableau.
virtual void | getBInvRow (int row, double *betai) const
| Get a row of the basis inverse.
virtual void | getBInvARow (int row, double *abari, double *betai=0) const
| Get a row of the tableau.
Debugging Methods
void | activateRowCutDebugger (const char *modelName)
| Activate the row cut debugger.
void | activateRowCutDebugger (const double *solution, bool keepContinuous=false)
| Activate the row cut debugger.
void | indexCheck (int k, bool isCol, std::string rtnnme)
| Check that a row or column index is in range.
Dylp-specific methods
void | dylp_controlfile (const char *name, const bool silent, const bool mustexist=true)
| Process an options (.spc) file.
void | dylp_logfile (const char *name, bool echo=false)
| Establish a log file.
void | dylp_outfile (const char *name)
| Establish an output (solution and/or statistics) file.
void | dylp_printsoln (bool wantSoln, bool wantStats)
| Print the solution and/or statistics to the output file.
void | setOsiDylpMessages (CoinMessages::Language local_language)
| Set the language for messages.
Unsupported functions
void | branchAndBound ()
| Invoke the solver's built-in branch-and-bound algorithm.
## Private Member Functions
Helper functions for presolve
Functions used to access the CoinPresolve capabilities. There are no public functions associated with presolve --- the only control is the OsiDoPresolveInInitial and OsiDoPresolveInResolve hints. The functions declared here do the work. See OsiDylpPresolve.cpp for additional explanation.
CoinPresolveMatrix * | initialisePresolve (bool keepIntegers)
| Create and load a presolve object.
void | doPresolve ()
| Perform presolve transformations.
bool | evalPresolve ()
| Decide whether presolve was effective enough to use.
void | saveOriginalSys ()
| Save the original problem.
void | installPresolve ()
| Load the presolved problem into the ODSI object.
CoinPostsolveMatrix * | initialisePostsolve (CoinPresolveMatrix *&preObj)
| Create and load a postsolve object.
void | doPostsolve ()
| Apply the postsolve transforms from postActions_.
void | installPostsolve ()
| Reload the original constraint system with the postsolved basis.
void | destruct_presolve ()
| Delete presolve information.
Helper functions for the simplex API
bool | ensureOwnership () const
| Ensure that the solver is ready for simplex operations.
Helper functions for problem construction
void | construct_lpprob ()
void | construct_options ()
void | construct_consys (int cols, int rows)
void | dylp_ioinit ()
void | gen_rowparms (int rowcnt, double *rhs, double *rhslow, contyp_enum *ctyp, const double *rowlb, const double *rowub)
void | gen_rowparms (int rowcnt, double *rhs, double *rhslow, contyp_enum *ctyp, const char *sense, const double *rhsin, const double *range)
void | load_problem (const CoinMpsIO &mps)
void | load_problem (const CoinPackedMatrix &matrix, const double *col_lower, const double *col_upper, const double *obj, const contyp_enum *ctyp, const double *rhs, const double *rhslow)
void | load_problem (const int colcnt, const int rowcnt, const int *start, const int *lens, const int *index, const double *value, const double *col_lower, const double *col_upper, const double *obj, const contyp_enum *ctyp, const double *rhs, const double *rhslow)
Helper functions for invoking dylp
lpret_enum | do_lp (ODSI_start_enum start, bool echo)
| Common core method to invoke dylp.
void | setBasisInLpprob (const OsiDylpWarmStartBasis *wsb, lpprob_struct *lpprob) const
| Install a basis in the lp problem structure.
Destructor helpers
void | destruct_primal_cache ()
void | destruct_dual_cache ()
void | destruct_col_cache (bool structure)
void | destruct_row_cache (bool structure)
void | destruct_cache (bool rowStructure, bool colStructure)
void | destruct_problem (bool preserve_interface)
void | detach_dylp () const
## Static Private Member Functions
Copy helpers
Copy function templates for simple vectors and fixed-size objects, and specializations for various complex structures.
template<class T >
static void | copy (const T *src, T *dst, int n)
template<class T >
static T * | copy (const T *src, int n)
template<class T >
static T * | copy (const T *src)
static basis_struct * | copy_basis (const basis_struct *src, int dstsze)
static void | copy_basis (const basis_struct *src, basis_struct *dst)
static lpprob_struct * | copy_lpprob (const lpprob_struct *src)
Copy verification functions
Copy verification functions, to check that two structures are identical.
template<class T >
static void | assert_same (const T &t1, const T &t2, bool exact)
template<class T >
static void | assert_same (const T *t1, const T *t2, int n, bool exact)
static void | assert_same (double d1, double d2, bool exact)
static void | assert_same (const basis_struct &b1, const basis_struct &b2, bool exact)
static void | assert_same (const consys_struct &c1, const consys_struct &c2, bool exact)
static void | assert_same (const conbnd_struct &c1, const conbnd_struct &c2, bool exact)
static void | assert_same (const lpprob_struct &l1, const lpprob_struct &l2, bool exact)
static void | assert_same (const OsiDylpSolverInterface &o1, const OsiDylpSolverInterface &o2, bool exact)
Vector helper functions
The inline methods are documented here, because this is the only place they appear.
template<class T >
static T * | idx_vec (T *vec)
| Convert 0-based vector pointer to 1-based vector pointer.
static int | idx (int i)
| Convert 0-based index to 1-based index.
template<class T >
static T * | inv_vec (T *vec)
| Convert 1-based vector pointer to 0-based vector pointer.
static int | inv (int i)
| Convert 1-based index to 0-based index.
static pkvec_struct * | packed_vector (const CoinShallowPackedVector vector, int dimension)
static void | packed_vector (const CoinShallowPackedVector vector, int dimension, pkvec_struct *dst)
File i/o helper routines
static std::string | make_filename (const char *filename, const char *ext1, const char *ext2)
## Private Attributes
Cached problem information
Problem information is cached for efficiency, to avoid repeated reconstruction of OSI structures from dylp structures.
double | _objval
double * | _col_obj
double * | _col_x
double * | _col_cbar
double * | _row_rhs
double * | _row_lower
double * | _row_upper
char * | _row_sense
double * | _row_range
double * | _row_lhs
double * | _row_price
CoinPackedMatrix * | _matrix_by_col
CoinPackedMatrix * | _matrix_by_row
Data for presolve
Data related to the use of the CoinPresolve capabilities (which see for further information).
CoinPresolveMatrix * | preObj_
| The presolve object.
const CoinPresolveAction * | postActions_
| List of postsolve actions.
CoinPostsolveMatrix * | postObj_
| The postsolve object.
int | passLimit_
| Limit for iterations of the major presolve loop.
bool | keepIntegers_
| true if presolve should consider integrality
consys_struct * | savedConsys_
| Saved copy of original problem.
double * | saved_col_obj
| Saved pointers to cached structural vectors.
double * | saved_row_rhs
double * | saved_row_lower
double * | saved_row_upper
char * | saved_row_sense
double * | saved_row_range
CoinPackedMatrix * | saved_matrix_by_col
CoinPackedMatrix * | saved_matrix_by_row
## Static Private Attributes
Dylp residual control variables
static int | reference_count
| Number of outstanding ODSI objects.
static bool | basis_ready
| Basis maintenance package is initialised.
## Friends
void | OsiDylpSolverInterfaceUnitTest (const std::string &mpsDir, const std::string &netLibDir)
| Unit test for OsiDylpSolverInterface.
## Solver instance control variables
These variables maintain state for individual ODSI instances.
enum | basisCondition { basisNone = 0, basisFresh, basisModified, basisDamaged }
| Codes for basis condition. More...
ioid | local_outchn
| Output stream for this ODSI instance.
ioid | local_logchn
| Log stream for this ODSI instance.
bool | initial_gtxecho
| Controls output of log information to stdout during initialSolve().
bool | resolve_gtxecho
| Controls output of log information to stdout during resolve() and solveFromHotStart().
lpret_enum | lp_retval
| Result of last call to solver for this ODSI instance.
double | obj_sense
| Objective function sense for this ODSI instance.
double | odsiInfinity
| The value of infinity.
const std::string | solvername
| Solver name (dylp).
void * | info_ [OsiLastHintParam]
| Array for info blocks associated with hints.
bool | mps_debug
| Allow messages from CoinMpsIO package.
CoinWarmStart * | hotstart_fallback
| Warm start object used as a fallback for hot start.
struct {
CoinWarmStart * basis
basisCondition condition
int balance
} | activeBasis
| Active basis.
bool | solnIsFresh
| The most recent solution from dylp is valid.
struct {
int simplex
bool saved_fullsys
} | simplex_state
| State related to the OsiSimplex interface.
## Dylp data structures
These fields hold pointers to the data structures which are used to pass an lp problem to dylp.
lpopts_struct * | initialSolveOptions
| Solver options for an initial solve.
lpopts_struct * | resolveOptions
| Solver options for a resolve.
lptols_struct * | tolerances
| Solver numeric tolerances.
consys_struct * | consys
| The constraint system.
lpprob_struct * | lpprob
| The lp problem.
lpstats_struct * | statistics
| The statistics structure.
## Helper functions for problem modification
void | add_col (const CoinPackedVectorBase &coin_coli, vartyp_enum vtypi, double vlbi, double vubi, double obji, const std::string *nme)
void | add_row (const CoinPackedVectorBase &coin_rowi, char clazzi, contyp_enum ctypi, double rhsi, double rhslowi, const std::string *nme)
void | calc_objval ()
contyp_enum | bound_to_type (double lower, double upper)
void | gen_rowiparms (contyp_enum *ctypi, double *rhsi, double *rhslowi, char sensei, double rhsini, double rangei)
void | gen_rowiparms (contyp_enum *ctypi, double *rhsi, double *rhslowi, double rowlbi, double rowubi)
void | unimp_hint (bool dylpSense, bool hintSense, OsiHintStrength hintStrength, const char *msgString)
void | pessimal_primal ()
void | reduceActiveBasis ()
static contyp_enum | sense_to_type (char type)
static char | type_to_sense (contyp_enum type)

## Detailed Description

COIN OSI API for dylp.

The class OsiDylpSolverInterface (ODSI) implements the public functions defined for the COIN OsiSolverInterface (OSI) API.

### OsiDylpSolverInterface Principles for Users

In addition to the principles outlined for the OsiSolverInterface class, ODSI maintains the following:

Construction of a Constraint System: A constraint system can be batch loaded from a file (MPS format) or from a data structure, or it can be built incrementally. When building a constraint system incrementally, keep in mind that you must create a row or column (addRow or addCol, respectively) before you can adjust other properties (row or column bounds, objective, variable values, etc.)

Existence of a Solution: For proper operation, OSI requires that a SI maintain a basic primal solution at all times after a problem has been loaded.

When a problem is loaded, ODSI generates a basic primal solution (primal variable values and a matching basis). The solution is not necessarily primal or dual feasible. In terms of the objective function, this solution is pessimistic, but not necessarily worst-case. ODSI does not generate matching values for the dual variables (row prices).

Any successful call to dylp (i.e., a call that results in an optimal, infeasible, or unbounded result, or that terminates on iteration limit) will replace the existing solution with the result of the call to dylp.

It is possible to specify initial values for the primal and dual variables using setColSolution() and setRowPrice(). To specify an initial basis, see the documentation for the CoinWarmStartBasis and OsiDylpWarmStartBasis classes. When these functions are used, it is the responsibility of the client to ensure validity and consistency.

Maintenance of an LP Basis Skirting the edges of the principle that changing the problem invalidates the solution, OsiDylp will maintain a valid basis across two common operations used in branch-and-cut: deletion of a loose constraint and deletion of a nonbasic variable. Arguably the set of allowable modifications could be increased.

Assignment Assignment (operator=()) works pretty much as you'd expect, with one exception. Only one ODSI object can control the dylp solver at a time, so hot start information is not copied on assignment.

Detailed implementation comments are contained in OsiDylpSolverInterface.cpp, which is not normally scanned when generating COIN OSI API documentation.

Definition at line 107 of file OsiDylpSolverInterface.hpp.

## Member Enumeration Documentation

enum OsiDylpSolverInterface::basisCondition`[private]`

Codes for basis condition.

- basisNone: no basis exists
- basisFresh: the basis is in sync with the solver
- basisModified: `good' constraint system modifications have occurred
- basisDamaged: `bad' constraint system modifications have occurred

`Good' modifications are deletion of a loose constraint (specifically, a constraint with a basic logical) or a variable at bound (specifically, a nonbasic variable). `Bad' modifications are deletion of a tight constraint (specifically, a constraint with a nonbasic logical) or deletion of a variable not at bound (specifically, a basic variable). Bad modifications will in general cause the basis to be primal and/or dual infeasible after it's patched up.

A subtle point: basisModified will also be used in situations where ODSI has constructed a basis but not set it into an lpprob structure. This is the case when a solution is invented for a newly loaded problem.

Enumerator:

  basisNone |
  basisFresh |
  basisModified |
  basisDamaged |

Definition at line 918 of file OsiDylpSolverInterface.hpp.

## Constructor & Destructor Documentation

OsiDylpSolverInterface::OsiDylpSolverInterface | ( |  | ) |

Default constructor.

OsiDylpSolverInterface::OsiDylpSolverInterface | ( | const OsiDylpSolverInterface & | src | ) |

Copy constructor.

OsiDylpSolverInterface::~OsiDylpSolverInterface | ( |  | ) |

Destructor.

## Member Function Documentation

OsiSolverInterface* OsiDylpSolverInterface::clone | ( | bool | copyData = `true` | ) | const`[virtual]`

Clone the solver object.

Implements OsiSolverInterface.

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

Assignment.

Reimplemented from OsiSolverInterface.

void OsiDylpSolverInterface::reset | ( |  | ) | `[virtual]`

Reset the solver object to the state produced by the default constructor.

Reimplemented from OsiSolverInterface.

int OsiDylpSolverInterface::readMps | ( | const char * | filename,
|  | const char * | extension = `"mps"` |
| ) |  |  | `[virtual]`

Read a problem description in MPS format from a file.

Reimplemented from OsiSolverInterface.

int OsiDylpSolverInterface::readMps | ( | const char * | filename,
|  | const char * | extension,
|  | int & | numberSets,
|  | CoinSet **& | sets |
| ) |  |  | `[virtual]`

Read a problem description in MPS format from a file, including SOS information.

Reimplemented from OsiSolverInterface.

void OsiDylpSolverInterface::writeMps | ( | const char * | basename,
|  | const char * | extension = `"mps"`,
|  | double | objsense = `0.0` |
| ) |  |  | const`[virtual]`

Write the problem into the specified file in MPS format.

`objsense` == 1 forces the file to be written as a maximisation problem, while -1 forces a minimisation problem. The default of 0 writes the file as maximisation or minimisation using the solver's current setting.

Implements OsiSolverInterface.

void OsiDylpSolverInterface::loadProblem | ( | const CoinPackedMatrix & | matrix,
|  | const double * | collb,
|  | const double * | colub,
|  | const double * | obj,
|  | const char * | rowsen,
|  | const double * | rowrhs,
|  | const double * | rowrng |
| ) |  |  | `[virtual]`

Load a problem description (OSI packed matrix, row sense, parameters unaffected).

Implements OsiSolverInterface.

void OsiDylpSolverInterface::loadProblem | ( | const CoinPackedMatrix & | matrix,
|  | const double * | collb,
|  | const double * | colub,
|  | const double * | obj,
|  | const double * | rowlb,
|  | const double * | rowub |
| ) |  |  | `[virtual]`

Load a problem description (OSI packed matrix, row bounds, parameters unaffected).

Implements OsiSolverInterface.

void OsiDylpSolverInterface::loadProblem | ( | const int | colcnt,
|  | const int | rowcnt,
|  | const int * | start,
|  | const int * | index,
|  | const double * | value,
|  | const double * | collb,
|  | const double * | colub,
|  | const double * | obj,
|  | const char * | sense,
|  | const double * | rhsin,
|  | const double * | range |
| ) |  |  | `[virtual]`

Load a problem description (standard column-major packed matrix, row sense, parameters unaffected).

Implements OsiSolverInterface.

void OsiDylpSolverInterface::loadProblem | ( | const int | colcnt,
|  | const int | rowcnt,
|  | const int * | start,
|  | const int * | index,
|  | const double * | value,
|  | const double * | collb,
|  | const double * | colub,
|  | const double * | obj,
|  | const double * | row_lower,
|  | const double * | row_upper |
| ) |  |  | `[virtual]`

Load a problem description (standard column-major packed matrix, row bounds, parameters unaffected).

Implements OsiSolverInterface.

void OsiDylpSolverInterface::assignProblem | ( | CoinPackedMatrix *& | matrix,
|  | double *& | collb,
|  | double *& | colub,
|  | double *& | obj,
|  | char *& | rowsen,
|  | double *& | rowrhs,
|  | double *& | rowrng |
| ) |  |  | `[virtual]`

Load a problem description (OSI packed matrix, row sense, parameters destroyed).

Implements OsiSolverInterface.

void OsiDylpSolverInterface::assignProblem | ( | CoinPackedMatrix *& | matrix,
|  | double *& | collb,
|  | double *& | colub,
|  | double *& | obj,
|  | double *& | rowlb,
|  | double *& | rowub |
| ) |  |  | `[virtual]`

Load a problem description (OSI packed matrix, row bounds, parameters destroyed).

Implements OsiSolverInterface.

int OsiDylpSolverInterface::getNumCols | ( |  | ) | const`[virtual]`

Get the number of columns (variables).

Implements OsiSolverInterface.

int OsiDylpSolverInterface::getNumRows | ( |  | ) | const`[virtual]`

Get the number of rows (constraints).

Implements OsiSolverInterface.

int OsiDylpSolverInterface::getNumElements | ( |  | ) | const`[virtual]`

Get the number of non-zero coefficients.

Implements OsiSolverInterface.

int OsiDylpSolverInterface::getNumIntegers | ( |  | ) | const`[virtual]`

Get the number of integer variables.

Counts both binary and general integer variables.

Reimplemented from OsiSolverInterface.

const double* OsiDylpSolverInterface::getColLower | ( |  | ) | const`[virtual]`

Get the column (variable) lower bound vector.

Implements OsiSolverInterface.

const double* OsiDylpSolverInterface::getColUpper | ( |  | ) | const`[virtual]`

Get the column (variable) upper bound vector.

Implements OsiSolverInterface.

bool OsiDylpSolverInterface::isContinuous | ( | int | colIndex | ) | const`[virtual]`

Return true if the variable is continuous.

Implements OsiSolverInterface.

bool OsiDylpSolverInterface::isBinary | ( | int | colIndex | ) | const`[virtual]`

Return true if the variable is binary.

Reimplemented from OsiSolverInterface.

bool OsiDylpSolverInterface::isIntegerNonBinary | ( | int | colIndex | ) | const`[virtual]`

Return true if the variable is general integer.

Reimplemented from OsiSolverInterface.

bool OsiDylpSolverInterface::isInteger | ( | int | colIndex | ) | const`[virtual]`

Return true if the variable is integer (general or binary).

Reimplemented from OsiSolverInterface.

const char* OsiDylpSolverInterface::getRowSense | ( |  | ) | const`[virtual]`

Get the row sense (constraint type) vector.

Implements OsiSolverInterface.

const double* OsiDylpSolverInterface::getRightHandSide | ( |  | ) | const`[virtual]`

Get the row (constraint) right-hand-side vector.

Implements OsiSolverInterface.

const double* OsiDylpSolverInterface::getRowRange | ( |  | ) | const`[virtual]`

Get the row (constraint) range vector.

Implements OsiSolverInterface.

const double* OsiDylpSolverInterface::getRowLower | ( |  | ) | const`[virtual]`

Get the row (constraint) lower bound vector.

Implements OsiSolverInterface.

const double* OsiDylpSolverInterface::getRowUpper | ( |  | ) | const`[virtual]`

Get the row (constraint) upper bound vector.

Implements OsiSolverInterface.

const double* OsiDylpSolverInterface::getObjCoefficients | ( |  | ) | const`[virtual]`

Get the objective function coefficient vector.

Implements OsiSolverInterface.

double OsiDylpSolverInterface::getObjSense | ( |  | ) | const`[virtual]`

Get the objective function sense (min/max).

A value of 1 indicates minimisation; -1 indicates maximisation.

Implements OsiSolverInterface.

const CoinPackedMatrix* OsiDylpSolverInterface::getMatrixByRow | ( |  | ) | const`[virtual]`

Get a pointer to a row-major copy of the constraint matrix.

Implements OsiSolverInterface.

const CoinPackedMatrix* OsiDylpSolverInterface::getMatrixByCol | ( |  | ) | const`[virtual]`

Get a pointer to a column-major copy of the constraint matrix.

Implements OsiSolverInterface.

void OsiDylpSolverInterface::setObjName | ( | std::string | name | ) | `[virtual]`

Set the objective function name.

Reimplemented from OsiSolverInterface.

void OsiDylpSolverInterface::setRowName | ( | int | ndx,
|  | std::string | name |
| ) |  |  | `[virtual]`

Set a row name.

Quietly does nothing if the name discipline (OsiNameDiscipline) is auto. Quietly fails if the row index is invalid.

Reimplemented from OsiSolverInterface.

void OsiDylpSolverInterface::setColName | ( | int | ndx,
|  | std::string | name |
| ) |  |  | `[virtual]`

Set a column name.

Quietly does nothing if the name discipline (OsiNameDiscipline) is auto. Quietly fails if the column index is invalid.

Reimplemented from OsiSolverInterface.

void OsiDylpSolverInterface::setContinuous | ( | int | index | ) | `[virtual]`

Set a single variable to be continuous.

Implements OsiSolverInterface.

void OsiDylpSolverInterface::setInteger | ( | int | index | ) | `[virtual]`

Set a single variable to be integer.

Implements OsiSolverInterface.

void OsiDylpSolverInterface::setColLower | ( | int | index,
|  | double | value |
| ) |  |  | `[virtual]`

Set the lower bound on a column (variable).

Implements OsiSolverInterface.

void OsiDylpSolverInterface::setColUpper | ( | int | index,
|  | double | value |
| ) |  |  | `[virtual]`

Set the upper bound on a column (variable).

Implements OsiSolverInterface.

void OsiDylpSolverInterface::setRowLower | ( | int | index,
|  | double | value |
| ) |  |  | `[virtual]`

Set the lower bound on a row (constraint).

Implements OsiSolverInterface.

void OsiDylpSolverInterface::setRowUpper | ( | int | index,
|  | double | value |
| ) |  |  | `[virtual]`

Set the upper bound on a row (constraint).

Implements OsiSolverInterface.

void OsiDylpSolverInterface::setRowType | ( | int | index,
|  | char | rowsen,
|  | double | rowrhs,
|  | double | rowrng |
| ) |  |  | `[virtual]`

Set the type of a row (constraint).

Implements OsiSolverInterface.

void OsiDylpSolverInterface::setObjCoeff | ( | int | index,
|  | double | value |
| ) |  |  | `[virtual]`

Set an objective function coefficient.

Implements OsiSolverInterface.

void OsiDylpSolverInterface::setObjective | ( | const double * | array | ) | `[virtual]`

Set the objective coefficients for all columns.

Reimplemented from OsiSolverInterface.

void OsiDylpSolverInterface::setObjSense | ( | double | sense | ) | `[virtual]`

Set the sense (min/max) of the objective.

Use 1 for minimisation, -1 for maximisation. (The default is minimisation; the objective is multiplied by -1 to maximise.)

Implements OsiSolverInterface.

void OsiDylpSolverInterface::setColSolution | ( | const double * | colsol | ) | `[virtual]`

Set the value of the primal variables in the problem solution.

Implements OsiSolverInterface.

void OsiDylpSolverInterface::setRowPrice | ( | const double * |  | ) | `[virtual]`

Set the value of the dual variables in the problem solution.

Implements OsiSolverInterface.

void OsiDylpSolverInterface::addCol | ( | const CoinPackedVectorBase & | vec,
|  | const double | collb,
|  | const double | colub,
|  | const double | obj |
| ) |  |  | `[virtual]`

Add a column (variable) to the problem.

Implements OsiSolverInterface.

void OsiDylpSolverInterface::deleteCols | ( | const int | num,
|  | const int * | colIndices |
| ) |  |  | `[virtual]`

Remove column(s) (variable(s)) from the problem.

Implements OsiSolverInterface.

void OsiDylpSolverInterface::addRow | ( | const CoinPackedVectorBase & | row,
|  | const double | rowlb,
|  | const double | rowub |
| ) |  |  | `[virtual]`

Add a row (constraint) to the problem.

Implements OsiSolverInterface.

void OsiDylpSolverInterface::addRow | ( | const CoinPackedVectorBase & | row,
|  | const char | rowsen,
|  | const double | rowrhs,
|  | const double | rowrng |
| ) |  |  | `[virtual]`

Add a row (constraint) to the problem.

Implements OsiSolverInterface.

void OsiDylpSolverInterface::deleteRows | ( | const int | num,
|  | const int * | rowIndices |
| ) |  |  | `[virtual]`

Delete row(s) (constraint(s)) from the problem.

Implements OsiSolverInterface.

void OsiDylpSolverInterface::applyRowCut | ( | const OsiRowCut & | cut | ) | `[virtual]`

Apply a row (constraint) cut (add one constraint).

Implements OsiSolverInterface.

void OsiDylpSolverInterface::applyColCut | ( | const OsiColCut & | cut | ) | `[virtual]`

Apply a column (variable) cut (adjust one or more bounds).

Implements OsiSolverInterface.

void OsiDylpSolverInterface::initialSolve | ( |  | ) | `[virtual]`

Solve an lp from scratch.

Implements OsiSolverInterface.

CoinWarmStart* OsiDylpSolverInterface::getEmptyWarmStart | ( |  | ) | const`[virtual]`

Get an empty OsiDylpWarmStartBasis object.

Implements OsiSolverInterface.

CoinWarmStart* OsiDylpSolverInterface::getWarmStart | ( |  | ) | const`[virtual]`

Build a warm start object for the current lp solution.

Implements OsiSolverInterface.

bool OsiDylpSolverInterface::setWarmStart | ( | const CoinWarmStart * | warmStart | ) | `[virtual]`

Apply a warm start object.

By definition, a null parameter is a request to synch the warm start basis with the solver. ODSI interprets a 0x0 basis as a request to remove warm start information.

Implements OsiSolverInterface.

void OsiDylpSolverInterface::resolve | ( |  | ) | `[virtual]`

Call dylp to reoptimize (warm start).

Implements OsiSolverInterface.

void OsiDylpSolverInterface::markHotStart | ( |  | ) | `[virtual]`

Create a hot start snapshot.

Reimplemented from OsiSolverInterface.

void OsiDylpSolverInterface::solveFromHotStart | ( |  | ) | `[virtual]`

Call dylp to reoptimize (hot start).

Reimplemented from OsiSolverInterface.

void OsiDylpSolverInterface::unmarkHotStart | ( |  | ) | `[virtual]`

Delete the hot start snapshot.

Reimplemented from OsiSolverInterface.

bool OsiDylpSolverInterface::isAbandoned | ( |  | ) | const`[virtual]`

True if dylp abandoned the problem.

Implements OsiSolverInterface.

bool OsiDylpSolverInterface::isProvenOptimal | ( |  | ) | const`[virtual]`

True if dylp reported an optimal solution.

Implements OsiSolverInterface.

bool OsiDylpSolverInterface::isProvenPrimalInfeasible | ( |  | ) | const`[virtual]`

True if dylp reported the problem to be primal infeasible.

Implements OsiSolverInterface.

bool OsiDylpSolverInterface::isProvenDualInfeasible | ( |  | ) | const`[virtual]`

True if dylp reported the problem to be dual infeasible (primal unbounded).

Implements OsiSolverInterface.

bool OsiDylpSolverInterface::isIterationLimitReached | ( |  | ) | const`[virtual]`

True if dylp reached the iteration limit.

Implements OsiSolverInterface.

int OsiDylpSolverInterface::getIterationCount | ( |  | ) | const`[virtual]`

Get the number of iterations for the last lp.

Implements OsiSolverInterface.

bool OsiDylpSolverInterface::isPrimalObjectiveLimitReached | ( |  | ) | const`[virtual]`

Is the primal objective limit reached?

Put in different terms, quit when the objective value becomes better than the given limit for an acceptable value.

Reimplemented from OsiSolverInterface.

bool OsiDylpSolverInterface::isDualObjectiveLimitReached | ( |  | ) | const`[virtual]`

Is the dual objective limit reached?

Put in different terms, quit when the objective value becomes worse than the given limit for an acceptable value.

Reimplemented from OsiSolverInterface.

double OsiDylpSolverInterface::getInfinity | ( |  | ) | const`[virtual]`

Get dylp's value for infinity.

Implements OsiSolverInterface.

bool OsiDylpSolverInterface::setIntParam | ( | OsiIntParam | key,
|  | int | value |
| ) |  |  | `[virtual]`

Set an OSI integer parameter.

Reimplemented from OsiSolverInterface.

bool OsiDylpSolverInterface::setDblParam | ( | OsiDblParam | key,
|  | double | value |
| ) |  |  | `[virtual]`

Set an OSI double parameter.

Reimplemented from OsiSolverInterface.

bool OsiDylpSolverInterface::setStrParam | ( | OsiStrParam | key,
|  | const std::string & | value |
| ) |  |  | `[virtual]`

Set an OSI string parameter.

Reimplemented from OsiSolverInterface.

bool OsiDylpSolverInterface::setHintParam | ( | OsiHintParam | key,
|  | bool | sense = `true`,
|  | OsiHintStrength | strength = `OsiHintTry`,
|  | void * | info = `0` |
| ) |  |  | `[virtual]`

Set an OSI hint.

Reimplemented from OsiSolverInterface.

bool OsiDylpSolverInterface::getIntParam | ( | OsiIntParam | key,
|  | int & | value |
| ) |  |  | const`[virtual]`

Get an OSI integer parameter.

Reimplemented from OsiSolverInterface.

bool OsiDylpSolverInterface::getDblParam | ( | OsiDblParam | key,
|  | double & | value |
| ) |  |  | const`[virtual]`

Get an OSI double parameter.

Reimplemented from OsiSolverInterface.

bool OsiDylpSolverInterface::getStrParam | ( | OsiStrParam | key,
|  | std::string & | value |
| ) |  |  | const`[virtual]`

Get an OSI string parameter.

Reimplemented from OsiSolverInterface.

bool OsiDylpSolverInterface::getHintParam | ( | OsiHintParam | key,
|  | bool & | sense,
|  | OsiHintStrength & | strength,
|  | void *& | info |
| ) |  |  | const`[virtual]`

Get an OSI hint.

Reimplemented from OsiSolverInterface.

void OsiDylpSolverInterface::newLanguage | ( | CoinMessages::Language | language | ) | `[inline]`

Change the language for OsiDylp messages.

Reimplemented from OsiSolverInterface.

Definition at line 569 of file OsiDylpSolverInterface.hpp.

void OsiDylpSolverInterface::setLanguage | ( | CoinMessages::Language | language | ) | `[inline]`

An alias for OsiDylpSolverInterface::newLanguage.

Reimplemented from OsiSolverInterface.

Definition at line 574 of file OsiDylpSolverInterface.hpp.

double OsiDylpSolverInterface::getObjValue | ( |  | ) | const`[virtual]`

Get the objective function value for the solution.

Implements OsiSolverInterface.

const double* OsiDylpSolverInterface::getColSolution | ( |  | ) | const`[virtual]`

Return the vector of primal variables for the solution.

Implements OsiSolverInterface.

const double* OsiDylpSolverInterface::getRowPrice | ( |  | ) | const`[virtual]`

Return the vector of dual variables for the solution.

Implements OsiSolverInterface.

const double* OsiDylpSolverInterface::getReducedCost | ( |  | ) | const`[virtual]`

Return the vector of reduced costs for the solution.

Implements OsiSolverInterface.

const double* OsiDylpSolverInterface::getRowActivity | ( |  | ) | const`[virtual]`

Return the vector of row activity for the solution.

Implements OsiSolverInterface.

std::vector<double *> OsiDylpSolverInterface::getDualRays | ( | int | maxNumRays,
|  | bool | fullRay |
| ) |  |  | const`[virtual]`

Get as many dual rays as the solver can provide.

If `fullRay` is false (the default), the ray will contain only the components associated with the row duals. If `fullRay` is set to `true`, the ray will also contain the components associated with nonbasic variables.

Implements OsiSolverInterface.

std::vector<double *> OsiDylpSolverInterface::getPrimalRays | ( | int | maxNumRays | ) | const`[virtual]`

Get as many primal rays as the solver can provide.

Implements OsiSolverInterface.

int OsiDylpSolverInterface::canDoSimplexInterface | ( |  | ) | const`[virtual]`

Return the simplex implementation level.

Reimplemented from OsiSolverInterface.

void OsiDylpSolverInterface::enableFactorization | ( |  | ) | const`[virtual]`

Prepare the solver for the use of tableau access methods.

In order for the tableau methods to work, the ODSI object invoking them must own the solver; the most recent call to optimise the problem must have resulted in an optimal solution; and the solver must be holding retained data structures for that optimal solution. It's much more efficient if the solver is using the full system, but it's not mandatory.

Because this is a const method, we can't force any of this; we can only check.

Reimplemented from OsiSolverInterface.

void OsiDylpSolverInterface::disableFactorization | ( |  | ) | const`[virtual]`

Undo the effects of enableFactorization.

Even if resolve was invoked by enableFactorization, little needs to be done here. Ownership of the solver is transferred by invocation, so there's no need to explicitly give it back.

Reimplemented from OsiSolverInterface.

bool OsiDylpSolverInterface::basisIsAvailable | ( |  | ) | const`[virtual]`

Check if an optimal basis is available.

Reimplemented from OsiSolverInterface.

void OsiDylpSolverInterface::getBasisStatus | ( | int * | archStatus,
|  | int * | logStatus |
| ) |  |  | const`[virtual]`

Retrieve status information for architectural and logical variables.

Retrieve status vectors for architectural (also called structural or column) and logical (also called artificial or row) variables. Returns the same information as getWarmStart, but in a different format.

Reimplemented from OsiSolverInterface.

int OsiDylpSolverInterface::setBasisStatus | ( | const int * | archStatus,
|  | const int * | logStatus |
| ) |  |  | `[virtual]`

Set a basis and update the factorization and solution.

Provides the combined functionality of setWarmStart followed by resolve. As with getBasisStatus, the status vectors are coded as integers.

Reimplemented from OsiSolverInterface.

virtual void OsiDylpSolverInterface::getReducedGradient | ( | double * | columnReducedCosts,
|  | double * | duals,
|  | const double * | c |
| ) |  |  | const`[virtual]`

Calculate duals and reduced costs for the given objective coefficients.

The solver's objective coefficient vector is not changed (cf. setObjectiveAndRefresh)

Reimplemented from OsiSolverInterface.

virtual void OsiDylpSolverInterface::getBasics | ( | int * | index | ) | const`[virtual]`

Get indices of basic variables.

Reimplemented from OsiSolverInterface.

virtual void OsiDylpSolverInterface::getBInvCol | ( | int | col,
|  | double * | betak |
| ) |  |  | const`[virtual]`

Get a column of the basis inverse.

Reimplemented from OsiSolverInterface.

virtual void OsiDylpSolverInterface::getBInvACol | ( | int | col,
|  | double * | abarj |
| ) |  |  | const`[virtual]`

Get a column of the tableau.

Reimplemented from OsiSolverInterface.

virtual void OsiDylpSolverInterface::getBInvRow | ( | int | row,
|  | double * | betai |
| ) |  |  | const`[virtual]`

Get a row of the basis inverse.

Reimplemented from OsiSolverInterface.

virtual void OsiDylpSolverInterface::getBInvARow | ( | int | row,
|  | double * | abari,
|  | double * | betai = `0` |
| ) |  |  | const`[virtual]`

Get a row of the tableau.

Reimplemented from OsiSolverInterface.

void OsiDylpSolverInterface::activateRowCutDebugger | ( | const char * | modelName | ) | `[virtual]`

Activate the row cut debugger.

Activate the debugger for a model known to the debugger. The debugger will consult an internal database for an optimal solution vector.

Reimplemented from OsiSolverInterface.

void OsiDylpSolverInterface::activateRowCutDebugger | ( | const double * | solution,
|  | bool | keepContinuous = `false` |
| ) |  |  | `[virtual]`

Activate the row cut debugger.

Activate the debugger for a model not included in the debugger's internal database. `solution` must be a full solution vector, but only the integer variables need to be correct. The debugger will fill in the continuous variables by solving an lp relaxation with the integer variables fixed as specified. If the given values for the continuous variables should be preserved, set `keepContinuous` to true.

Reimplemented from OsiSolverInterface.

void OsiDylpSolverInterface::indexCheck | ( | int | k,
|  | bool | isCol,
|  | std::string | rtnnme |
| ) |  |  |

Check that a row or column index is in range.

Check that a row or column index is in range for the current constraint system. This routine will throw an error if there is no constraint system or if the index is out of range.

NOTE that ODSI_PARANOIA must be 1 or greater in order for OsiCbc(dylp) to pass the OsiCbc unit test.

void OsiDylpSolverInterface::dylp_controlfile | ( | const char * | name,
|  | const bool | silent,
|  | const bool | mustexist = `true` |
| ) |  |  |

Process an options (.spc) file.

void OsiDylpSolverInterface::dylp_logfile | ( | const char * | name,
|  | bool | echo = `false` |
| ) |  |  |

Establish a log file.

void OsiDylpSolverInterface::dylp_outfile | ( | const char * | name | ) |

Establish an output (solution and/or statistics) file.

void OsiDylpSolverInterface::dylp_printsoln | ( | bool | wantSoln,
|  | bool | wantStats |
| ) |  |  |

Print the solution and/or statistics to the output file.

void OsiDylpSolverInterface::setOsiDylpMessages | ( | CoinMessages::Language | local_language | ) |

Set the language for messages.

void OsiDylpSolverInterface::branchAndBound | ( |  | ) | `[virtual]`

Invoke the solver's built-in branch-and-bound algorithm.

Implements OsiSolverInterface.

CoinPresolveMatrix* OsiDylpSolverInterface::initialisePresolve | ( | bool | keepIntegers | ) | `[private]`

Create and load a presolve object.

void OsiDylpSolverInterface::doPresolve | ( |  | ) | `[private]`

Perform presolve transformations.

bool OsiDylpSolverInterface::evalPresolve | ( |  | ) | `[private]`

Decide whether presolve was effective enough to use.

void OsiDylpSolverInterface::saveOriginalSys | ( |  | ) | `[private]`

Save the original problem.

void OsiDylpSolverInterface::installPresolve | ( |  | ) | `[private]`

Load the presolved problem into the ODSI object.

CoinPostsolveMatrix* OsiDylpSolverInterface::initialisePostsolve | ( | CoinPresolveMatrix *& | preObj | ) | `[private]`

Create and load a postsolve object.

void OsiDylpSolverInterface::doPostsolve | ( |  | ) | `[private]`

Apply the postsolve transforms from postActions_.

void OsiDylpSolverInterface::installPostsolve | ( |  | ) | `[private]`

Reload the original constraint system with the postsolved basis.

void OsiDylpSolverInterface::destruct_presolve | ( |  | ) | `[private]`

Delete presolve information.

bool OsiDylpSolverInterface::ensureOwnership | ( |  | ) | const`[private]`

Ensure that the solver is ready for simplex operations.

void OsiDylpSolverInterface::construct_lpprob | ( |  | ) | `[private]`

void OsiDylpSolverInterface::construct_options | ( |  | ) | `[private]`

void OsiDylpSolverInterface::construct_consys | ( | int | cols,
|  | int | rows |
| ) |  |  | `[private]`

void OsiDylpSolverInterface::dylp_ioinit | ( |  | ) | `[private]`

void OsiDylpSolverInterface::gen_rowparms | ( | int | rowcnt,
|  | double * | rhs,
|  | double * | rhslow,
|  | contyp_enum * | ctyp,
|  | const double * | rowlb,
|  | const double * | rowub |
| ) |  |  | `[private]`

void OsiDylpSolverInterface::gen_rowparms | ( | int | rowcnt,
|  | double * | rhs,
|  | double * | rhslow,
|  | contyp_enum * | ctyp,
|  | const char * | sense,
|  | const double * | rhsin,
|  | const double * | range |
| ) |  |  | `[private]`

void OsiDylpSolverInterface::load_problem | ( | const CoinMpsIO & | mps | ) | `[private]`

void OsiDylpSolverInterface::load_problem | ( | const CoinPackedMatrix & | matrix,
|  | const double * | col_lower,
|  | const double * | col_upper,
|  | const double * | obj,
|  | const contyp_enum * | ctyp,
|  | const double * | rhs,
|  | const double * | rhslow |
| ) |  |  | `[private]`

void OsiDylpSolverInterface::load_problem | ( | const int | colcnt,
|  | const int | rowcnt,
|  | const int * | start,
|  | const int * | lens,
|  | const int * | index,
|  | const double * | value,
|  | const double * | col_lower,
|  | const double * | col_upper,
|  | const double * | obj,
|  | const contyp_enum * | ctyp,
|  | const double * | rhs,
|  | const double * | rhslow |
| ) |  |  | `[private]`

lpret_enum OsiDylpSolverInterface::do_lp | ( | ODSI_start_enum | start,
|  | bool | echo |
| ) |  |  | `[private]`

Common core method to invoke dylp.

void OsiDylpSolverInterface::setBasisInLpprob | ( | const OsiDylpWarmStartBasis * | wsb,
|  | lpprob_struct * | lpprob |
| ) |  |  | const`[private]`

Install a basis in the lp problem structure.

void OsiDylpSolverInterface::destruct_primal_cache | ( |  | ) | `[private]`

void OsiDylpSolverInterface::destruct_dual_cache | ( |  | ) | `[private]`

void OsiDylpSolverInterface::destruct_col_cache | ( | bool | structure | ) | `[private]`

void OsiDylpSolverInterface::destruct_row_cache | ( | bool | structure | ) | `[private]`

void OsiDylpSolverInterface::destruct_cache | ( | bool | rowStructure,
|  | bool | colStructure |
| ) |  |  | `[private]`

void OsiDylpSolverInterface::destruct_problem | ( | bool | preserve_interface | ) | `[private]`

void OsiDylpSolverInterface::detach_dylp | ( |  | ) | const`[private]`

void OsiDylpSolverInterface::add_col | ( | const CoinPackedVectorBase & | coin_coli,
|  | vartyp_enum | vtypi,
|  | double | vlbi,
|  | double | vubi,
|  | double | obji,
|  | const std::string * | nme |
| ) |  |  | `[private]`

void OsiDylpSolverInterface::add_row | ( | const CoinPackedVectorBase & | coin_rowi,
|  | char | clazzi,
|  | contyp_enum | ctypi,
|  | double | rhsi,
|  | double | rhslowi,
|  | const std::string * | nme |
| ) |  |  | `[private]`

void OsiDylpSolverInterface::calc_objval | ( |  | ) | `[private]`

contyp_enum OsiDylpSolverInterface::bound_to_type | ( | double | lower,
|  | double | upper |
| ) |  |  | `[private]`

void OsiDylpSolverInterface::gen_rowiparms | ( | contyp_enum * | ctypi,
|  | double * | rhsi,
|  | double * | rhslowi,
|  | char | sensei,
|  | double | rhsini,
|  | double | rangei |
| ) |  |  | `[private]`

void OsiDylpSolverInterface::gen_rowiparms | ( | contyp_enum * | ctypi,
|  | double * | rhsi,
|  | double * | rhslowi,
|  | double | rowlbi,
|  | double | rowubi |
| ) |  |  | `[private]`

void OsiDylpSolverInterface::unimp_hint | ( | bool | dylpSense,
|  | bool | hintSense,
|  | OsiHintStrength | hintStrength,
|  | const char * | msgString |
| ) |  |  | `[private]`

void OsiDylpSolverInterface::pessimal_primal | ( |  | ) | `[private]`

void OsiDylpSolverInterface::reduceActiveBasis | ( |  | ) | `[private]`

static contyp_enum OsiDylpSolverInterface::sense_to_type | ( | char | type | ) | `[static, private]`

static char OsiDylpSolverInterface::type_to_sense | ( | contyp_enum | type | ) | `[static, private]`

template<class T >

static void OsiDylpSolverInterface::copy | ( | const T * | src,
|  | T * | dst,
|  | int | n |
| ) |  |  | `[inline, static, private]`

template<class T >

static T* OsiDylpSolverInterface::copy | ( | const T * | src,
|  | int | n |
| ) |  |  | `[inline, static, private]`

template<class T >

static T* OsiDylpSolverInterface::copy | ( | const T * | src | ) | `[inline, static, private]`

static basis_struct* OsiDylpSolverInterface::copy_basis | ( | const basis_struct * | src,
|  | int | dstsze |
| ) |  |  | `[static, private]`

static void OsiDylpSolverInterface::copy_basis | ( | const basis_struct * | src,
|  | basis_struct * | dst |
| ) |  |  | `[static, private]`

static lpprob_struct* OsiDylpSolverInterface::copy_lpprob | ( | const lpprob_struct * | src | ) | `[static, private]`

template<class T >

static void OsiDylpSolverInterface::assert_same | ( | const T & | t1,
|  | const T & | t2,
|  | bool | exact |
| ) |  |  | `[inline, static, private]`

template<class T >

static void OsiDylpSolverInterface::assert_same | ( | const T * | t1,
|  | const T * | t2,
|  | int | n,
|  | bool | exact |
| ) |  |  | `[inline, static, private]`

static void OsiDylpSolverInterface::assert_same | ( | double | d1,
|  | double | d2,
|  | bool | exact |
| ) |  |  | `[static, private]`

static void OsiDylpSolverInterface::assert_same | ( | const basis_struct & | b1,
|  | const basis_struct & | b2,
|  | bool | exact |
| ) |  |  | `[static, private]`

static void OsiDylpSolverInterface::assert_same | ( | const consys_struct & | c1,
|  | const consys_struct & | c2,
|  | bool | exact |
| ) |  |  | `[static, private]`

static void OsiDylpSolverInterface::assert_same | ( | const conbnd_struct & | c1,
|  | const conbnd_struct & | c2,
|  | bool | exact |
| ) |  |  | `[static, private]`

static void OsiDylpSolverInterface::assert_same | ( | const lpprob_struct & | l1,
|  | const lpprob_struct & | l2,
|  | bool | exact |
| ) |  |  | `[static, private]`

static void OsiDylpSolverInterface::assert_same | ( | const OsiDylpSolverInterface & | o1,
|  | const OsiDylpSolverInterface & | o2,
|  | bool | exact |
| ) |  |  | `[static, private]`

template<class T >

static T* OsiDylpSolverInterface::idx_vec | ( | T * | vec | ) | `[inline, static, private]`

Convert 0-based vector pointer to 1-based vector pointer.

For cases where it's inconvenient to adjust indices, the alternative is to adjust the pointer to the vector so it points to vector[-1]. Be careful!

Definition at line 1221 of file OsiDylpSolverInterface.hpp.

static int OsiDylpSolverInterface::idx | ( | int | i | ) | `[inline, static, private]`

Convert 0-based index to 1-based index.

Definition at line 1224 of file OsiDylpSolverInterface.hpp.

template<class T >

static T* OsiDylpSolverInterface::inv_vec | ( | T * | vec | ) | `[inline, static, private]`

Convert 1-based vector pointer to 0-based vector pointer.

For cases where it's inconvenient to adjust indices, the alternative is to adjust the pointer to the vector so it points to vector[1].

Definition at line 1231 of file OsiDylpSolverInterface.hpp.

static int OsiDylpSolverInterface::inv | ( | int | i | ) | `[inline, static, private]`

Convert 1-based index to 0-based index.

Definition at line 1234 of file OsiDylpSolverInterface.hpp.

static pkvec_struct* OsiDylpSolverInterface::packed_vector | ( | const CoinShallowPackedVector | vector,
|  | int | dimension |
| ) |  |  | `[static, private]`

static void OsiDylpSolverInterface::packed_vector | ( | const CoinShallowPackedVector | vector,
|  | int | dimension,
|  | pkvec_struct * | dst |
| ) |  |  | `[static, private]`

static std::string OsiDylpSolverInterface::make_filename | ( | const char * | filename,
|  | const char * | ext1,
|  | const char * | ext2 |
| ) |  |  | `[static, private]`

## Friends And Related Function Documentation

void OsiDylpSolverInterfaceUnitTest | ( | const std::string & | mpsDir,
|  | const std::string & | netLibDir |
| ) |  |  | `[friend]`

Unit test for OsiDylpSolverInterface.

Performs various tests to see if ODSI is functioning correctly. Not an exhaustive test, but it'll (usually) catch gross problems.

## Member Data Documentation

lpopts_struct* OsiDylpSolverInterface::initialSolveOptions

Solver options for an initial solve.

Definition at line 778 of file OsiDylpSolverInterface.hpp.

lpopts_struct* OsiDylpSolverInterface::resolveOptions

Solver options for a resolve.

Definition at line 781 of file OsiDylpSolverInterface.hpp.

lptols_struct* OsiDylpSolverInterface::tolerances

Solver numeric tolerances.

Definition at line 784 of file OsiDylpSolverInterface.hpp.

consys_struct* OsiDylpSolverInterface::consys`[private]`

The constraint system.

Definition at line 803 of file OsiDylpSolverInterface.hpp.

lpprob_struct* OsiDylpSolverInterface::lpprob`[private]`

The lp problem.

Definition at line 805 of file OsiDylpSolverInterface.hpp.

lpstats_struct* OsiDylpSolverInterface::statistics`[private]`

The statistics structure.

Definition at line 807 of file OsiDylpSolverInterface.hpp.

int OsiDylpSolverInterface::reference_count`[static, private]`

Number of outstanding ODSI objects.

Definition at line 815 of file OsiDylpSolverInterface.hpp.

bool OsiDylpSolverInterface::basis_ready`[static, private]`

Basis maintenance package is initialised.

Definition at line 817 of file OsiDylpSolverInterface.hpp.

ioid OsiDylpSolverInterface::local_outchn`[private]`

Output stream for this ODSI instance.

Holds the ioid of the stream that will be used to write out the solution and statistics.

Definition at line 834 of file OsiDylpSolverInterface.hpp.

ioid OsiDylpSolverInterface::local_logchn`[private]`

Log stream for this ODSI instance.

Holds the ioid of the stream that will be used for dylp log information.

Definition at line 841 of file OsiDylpSolverInterface.hpp.

bool OsiDylpSolverInterface::initial_gtxecho`[private]`

Controls output of log information to stdout during initialSolve().

Definition at line 847 of file OsiDylpSolverInterface.hpp.

bool OsiDylpSolverInterface::resolve_gtxecho`[private]`

Controls output of log information to stdout during resolve() and solveFromHotStart().

Definition at line 853 of file OsiDylpSolverInterface.hpp.

lpret_enum OsiDylpSolverInterface::lp_retval`[private]`

Result of last call to solver for this ODSI instance.

The default value is lpINV (i.e., the code is not valid). A call to dylp will set lp_retval to the dylp return code. Errors in the interface's interaction with other dylp routines will set this value to the return code given by the routine, or lpFATAL if the routine does not return anything more specific.

Definition at line 864 of file OsiDylpSolverInterface.hpp.

double OsiDylpSolverInterface::obj_sense`[private]`

Objective function sense for this ODSI instance.

Coded 1.0 to minimize (default), -1.0 to maximize.

Definition at line 871 of file OsiDylpSolverInterface.hpp.

double OsiDylpSolverInterface::odsiInfinity`[private]`

The value of infinity.

Definition at line 875 of file OsiDylpSolverInterface.hpp.

const std::string OsiDylpSolverInterface::solvername`[private]`

Solver name (dylp).

Definition at line 879 of file OsiDylpSolverInterface.hpp.

void* OsiDylpSolverInterface::info_[OsiLastHintParam]`[mutable, private]`

Array for info blocks associated with hints.

Definition at line 883 of file OsiDylpSolverInterface.hpp.

bool OsiDylpSolverInterface::mps_debug`[private]`

Allow messages from CoinMpsIO package.

Definition at line 887 of file OsiDylpSolverInterface.hpp.

CoinWarmStart* OsiDylpSolverInterface::hotstart_fallback`[private]`

Warm start object used as a fallback for hot start.

If some other ODSI object uses the underlying solver between calls to solveFromHotStart(), the solver must be reloaded. This basis is kept for just such a situation.

Definition at line 896 of file OsiDylpSolverInterface.hpp.

CoinWarmStart* OsiDylpSolverInterface::basis

Definition at line 939 of file OsiDylpSolverInterface.hpp.

basisCondition OsiDylpSolverInterface::condition

Definition at line 940 of file OsiDylpSolverInterface.hpp.

int OsiDylpSolverInterface::balance

Definition at line 941 of file OsiDylpSolverInterface.hpp.

struct { ... } OsiDylpSolverInterface::activeBasis`[private]`

Active basis.

The active basis is set with each successful return from the solver (where successful means a result of optimal, infeasible, unbounded, or iterlim), or by an explicit call to setWarmStart() with a valid basis. By definition, calling setWarmStart() with a null parameter is a request to synch the active basis with the solver (a noop for ODSI). Calling setWarmStart() with an empty (0x0) basis is taken as a request to delete activeBasis.

Condition will take a value from the basisCondition enum (which see).

Balance records whether we have an excess or shortage of basic variables. Deletion of tight constraints will result in an excess. Deletion of basic variables will result in a shortage.

bool OsiDylpSolverInterface::solnIsFresh`[private]`

The most recent solution from dylp is valid.

True if the solution held in lpprob is valid. False if changes to the constraint system have rendered the solution invalid.

Definition at line 948 of file OsiDylpSolverInterface.hpp.

int OsiDylpSolverInterface::simplex

Definition at line 957 of file OsiDylpSolverInterface.hpp.

bool OsiDylpSolverInterface::saved_fullsys

Definition at line 958 of file OsiDylpSolverInterface.hpp.

struct { ... } OsiDylpSolverInterface::simplex_state`[private]`

State related to the OsiSimplex interface.

- simplex is set using the same coding as canDoSimplexInterface: 0 is off, 1 is tableau methods, 2 is pivot control.

double OsiDylpSolverInterface::_objval`[mutable, private]`

Definition at line 971 of file OsiDylpSolverInterface.hpp.

double* OsiDylpSolverInterface::_col_obj`[mutable, private]`

Definition at line 972 of file OsiDylpSolverInterface.hpp.

double* OsiDylpSolverInterface::_col_x`[mutable, private]`

Definition at line 973 of file OsiDylpSolverInterface.hpp.

double* OsiDylpSolverInterface::_col_cbar`[mutable, private]`

Definition at line 974 of file OsiDylpSolverInterface.hpp.

double* OsiDylpSolverInterface::_row_rhs`[mutable, private]`

Definition at line 976 of file OsiDylpSolverInterface.hpp.

double* OsiDylpSolverInterface::_row_lower`[mutable, private]`

Definition at line 977 of file OsiDylpSolverInterface.hpp.

double* OsiDylpSolverInterface::_row_upper`[mutable, private]`

Definition at line 978 of file OsiDylpSolverInterface.hpp.

char* OsiDylpSolverInterface::_row_sense`[mutable, private]`

Definition at line 979 of file OsiDylpSolverInterface.hpp.

double* OsiDylpSolverInterface::_row_range`[mutable, private]`

Definition at line 980 of file OsiDylpSolverInterface.hpp.

double* OsiDylpSolverInterface::_row_lhs`[mutable, private]`

Definition at line 981 of file OsiDylpSolverInterface.hpp.

double* OsiDylpSolverInterface::_row_price`[mutable, private]`

Definition at line 982 of file OsiDylpSolverInterface.hpp.

CoinPackedMatrix* OsiDylpSolverInterface::_matrix_by_col`[mutable, private]`

Definition at line 984 of file OsiDylpSolverInterface.hpp.

CoinPackedMatrix* OsiDylpSolverInterface::_matrix_by_row`[mutable, private]`

Definition at line 985 of file OsiDylpSolverInterface.hpp.

CoinPresolveMatrix* OsiDylpSolverInterface::preObj_`[private]`

The presolve object.

In more detail, preObj_ is loaded with the original system. Presolve transformations are applied to convert it to a presolved system.

Definition at line 1001 of file OsiDylpSolverInterface.hpp.

const CoinPresolveAction* OsiDylpSolverInterface::postActions_`[private]`

List of postsolve actions.

The list of postsolve (reverse) transformations required to convert the presolved system back to the original system. Built as presolve transformations are applied.

Definition at line 1009 of file OsiDylpSolverInterface.hpp.

CoinPostsolveMatrix* OsiDylpSolverInterface::postObj_`[private]`

The postsolve object.

In more detail, postObj_ is loaded with the presolved system and its optimal basis. The postsolve transformations held by postActions_ are applied to convert back to the original system. For ODSI, our only interest is the basis.

Definition at line 1018 of file OsiDylpSolverInterface.hpp.

int OsiDylpSolverInterface::passLimit_`[private]`

Limit for iterations of the major presolve loop.

Definition at line 1021 of file OsiDylpSolverInterface.hpp.

bool OsiDylpSolverInterface::keepIntegers_`[private]`

true if presolve should consider integrality

Definition at line 1024 of file OsiDylpSolverInterface.hpp.

consys_struct* OsiDylpSolverInterface::savedConsys_`[private]`

Saved copy of original problem.

Definition at line 1027 of file OsiDylpSolverInterface.hpp.

double* OsiDylpSolverInterface::saved_col_obj`[mutable, private]`

Saved pointers to cached structural vectors.

Definition at line 1030 of file OsiDylpSolverInterface.hpp.

double* OsiDylpSolverInterface::saved_row_rhs`[mutable, private]`

Definition at line 1031 of file OsiDylpSolverInterface.hpp.

double* OsiDylpSolverInterface::saved_row_lower`[mutable, private]`

Definition at line 1032 of file OsiDylpSolverInterface.hpp.

double* OsiDylpSolverInterface::saved_row_upper`[mutable, private]`

Definition at line 1033 of file OsiDylpSolverInterface.hpp.

char* OsiDylpSolverInterface::saved_row_sense`[mutable, private]`

Definition at line 1034 of file OsiDylpSolverInterface.hpp.

double* OsiDylpSolverInterface::saved_row_range`[mutable, private]`

Definition at line 1035 of file OsiDylpSolverInterface.hpp.

CoinPackedMatrix* OsiDylpSolverInterface::saved_matrix_by_col`[mutable, private]`

Definition at line 1036 of file OsiDylpSolverInterface.hpp.

CoinPackedMatrix* OsiDylpSolverInterface::saved_matrix_by_row`[mutable, private]`

Definition at line 1037 of file OsiDylpSolverInterface.hpp.

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

- /home/coin/svn-release/DyLP-1.9.5/DyLP/src/OsiDylp/OsiDylpSolverInterface.hpp

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines