6.19 ABA_OSIIF Class Reference

#include <osiif.h>

Inheritance diagram for ABA_OSIIF::


PIC


Public Types

Public Member Functions

Private Member Functions

Private Attributes

6.19.1 Detailed Description

Definition at line 43 of file osiif.h.

6.19.2 Member Enumeration Documentation

6.19.2.1 enum ABA_OSIIF::SOLVERTYPE

The enumeration of possible solver types

Enumerator:

Exact
Approx

Definition at line 85 of file osiif.h.

6.19.3 Constructor & Destructor Documentation

6.19.3.1 ABA_OSIIF::ABA_OSIIF (ABA_MASTER * master)

This constructor does not initialize the problem data of the linear program. It must be loaded later with the function initialize().

Parameters:

master
A pointer to the corresponding master of the optimization.

6.19.3.2 ABA_OSIIF::ABA_OSIIF (ABA_MASTER * master, ABA_OPTSENSE sense, int nRow, int maxRow, int nCol, int maxCol, ABA_ARRAY< double > & obj, ABA_ARRAY< double > & lb, ABA_ARRAY< double > & ub, ABA_ARRAY< ABA_ROW * > & rows)

A constructor with initialization.

Parameters:

master
A pointer to the corresponding master of the optimization.
sense
The sense of the objective function.
nCol
The number of columns (variables).
maxCol
The maximal number of columns.
nRow
The number of rows.
maxRow
The maximal number of rows.
obj
An array with the objective function coefficients.
lb
An array with the lower bounds of the columns.
ub
An array with the upper bounds of the columns.
rows
An array storing the rows of the problem.

6.19.3.3 virtual ABA_OSIIF::~ABA_OSIIF () [virtual]

The destructor.

6.19.3.4 ABA_OSIIF::ABA_OSIIF (const ABA_OSIIF & rhs) [private]

6.19.4 Member Function Documentation

6.19.4.1 SOLVERTYPE ABA_OSIIF::currentSolverType () [inline]

Definition at line 87 of file osiif.h.

6.19.4.2 OsiSolverInterface * ABA_OSIIF::osiLP () [inline]

Definition at line 559 of file osiif.h.

6.19.4.3 void ABA_OSIIF::freeDouble (const double *&) [private]

6.19.4.4 void ABA_OSIIF::freeDouble (double *&) [private]

6.19.4.5 void ABA_OSIIF::freeInt (int *&) [private]

6.19.4.6 void ABA_OSIIF::freeChar (char *&) [private]

6.19.4.7 void ABA_OSIIF::freeChar (const char *&) [private]

6.19.4.8 void ABA_OSIIF::freeStatus (CoinWarmStartBasis::Status *&) [private]

6.19.4.9 virtual void ABA_OSIIF::_initialize (ABA_OPTSENSE sense, int nRow, int maxRow, int nCol, int maxCol, ABA_ARRAY< double > & obj, ABA_ARRAY< double > & lBound, ABA_ARRAY< double > & uBound, ABA_ARRAY< ABA_ROW * > & rows) [private, virtual]

Implements the corresponding pure virtual function of the base class LP and loads the linear program defined by the following arguments to the solver.

Parameters:

sense
The sense of the objective function.
nCol
The number of columns (variables).
maxCol
The maximal number of columns.
nRow
The number of rows.
maxRow
The maximal number of rows.
obj
An array with the objective function coefficients.
lb
An array with the lower bounds of the columns.
ub
An array with the upper bounds of the columns.
rows
An array storing the rows of the problem.

Implements ABA_LP.

6.19.4.10 virtual void ABA_OSIIF::_loadBasis (ABA_ARRAY< ABA_LPVARSTAT::STATUS > & lpVarStat, ABA_ARRAY< ABA_SLACKSTAT::STATUS > & slackStat) [private, virtual]

Loads a basis to the solver

Parameters:

lpVarStat
An array storing the status of the columns.
lpVarStat
An array storing the status of the slack variables.

Implements ABA_LP.

6.19.4.11 virtual ABA_OPTSENSE ABA_OSIIF::_sense () const [private, virtual]

Returns the sense of the optimization.

It implements the pure virtual function of the base class LP.

Implements ABA_LP.

6.19.4.12 virtual void ABA_OSIIF::_sense (const ABA_OPTSENSE & newSense) [private, virtual]

This version of the function _sense() changes the sense of the optimization.

It implements the pure virtual function of the base class LP.

Implements ABA_LP.

6.19.4.13 virtual int ABA_OSIIF::_nRow () const [private, virtual]

Returns the number of rows of the linear program.

It implements the pure virtual function of the base class LP.

Implements ABA_LP.

6.19.4.14 virtual int ABA_OSIIF::_maxRow () const [private, virtual]

Returns the maximal number of rows of the linear program.

It implements the pure virtual function of the base class LP.

Implements ABA_LP.

6.19.4.15 virtual int ABA_OSIIF::_nCol () const [private, virtual]

Returns the number of columns of the linear program.

It implements the pure virtual function of the base class LP.

Implements ABA_LP.

6.19.4.16 virtual int ABA_OSIIF::_maxCol () const [private, virtual]

Returns the maximal number of columns of the linear program.

It implements the pure virtual function of the base class LP.

Implements ABA_LP.

6.19.4.17 virtual double ABA_OSIIF::_obj (int i) const [private, virtual]

Returns the objective function coefficient of column i.

It implements the pure virtual function of the base class LP.

Implements ABA_LP.

6.19.4.18 virtual double ABA_OSIIF::_lBound (int i) const [private, virtual]

Returns the lower bound of column i.

It implements the pure virtual function of the base class LP.

Implements ABA_LP.

6.19.4.19 virtual double ABA_OSIIF::_uBound (int i) const [private, virtual]

Returns the upper bound of column i.

It implements the pure virtual function of the base class LP.

Implements ABA_LP.

6.19.4.20 virtual double ABA_OSIIF::_rhs (int i) const [private, virtual]

Returns the right hand side of row i.

It implements the pure virtual function of the base class LP.

Implements ABA_LP.

6.19.4.21 virtual void ABA_OSIIF::_row (int i, ABA_ROW & r) const [private, virtual]

Stores a copy of row i in r.

It implements the pure virtual function of the base class LP.

Implements ABA_LP.

6.19.4.22 virtual int ABA_OSIIF::_nnz () const [private, virtual]

Returns the number of nonzero elements in the constraint matrix (not including the right hand side).

It implements the pure virtual function of the base class LP.

Implements ABA_LP.

6.19.4.23 virtual OPTSTAT ABA_OSIIF::_primalSimplex () [private, virtual]

Calls the primal simplex method.

It implements the pure virtual function of the base class LP.

Implements ABA_LP.

6.19.4.24 virtual OPTSTAT ABA_OSIIF::_dualSimplex () [private, virtual]

Calls the dual simplex method.

It implements the pure virtual function of the base class LP.

Implements ABA_LP.

6.19.4.25 virtual OPTSTAT ABA_OSIIF::_barrier (bool doCrossover) [private, virtual]

Calls the barrier method.

It implements the pure virtual function of the base class LP.

Implements ABA_LP.

6.19.4.26 virtual OPTSTAT ABA_OSIIF::_approx () [private, virtual]

Calls an approximate method.

It implements the pure virtual function of the base class LP.

Implements ABA_LP.

6.19.4.27 virtual double ABA_OSIIF::_value () const [private, virtual]

Returns the optimum value of the linear program.

It implements the pure virtual function of the base class LP.

Implements ABA_LP.

6.19.4.28 virtual double ABA_OSIIF::_xVal (int i) [private, virtual]

Returns the value of the column i.

It implements the pure virtual function of the base class LP.

Implements ABA_LP.

6.19.4.29 virtual double ABA_OSIIF::_barXVal (int i) [private, virtual]

Returns the value of the column i.

It implements the pure virtual function of the base class LP.

Implements ABA_LP.

6.19.4.30 virtual double ABA_OSIIF::_reco (int i) [private, virtual]

Returns the reduced cost of the column i.

It implements the pure virtual function of the base class LP.

Implements ABA_LP.

6.19.4.31 virtual double ABA_OSIIF::_slack (int i) [private, virtual]

Returns the value of the slack column of the row i.

It implements the pure virtual function of the base class LP.

Implements ABA_LP.

6.19.4.32 virtual double ABA_OSIIF::_yVal (int i) [private, virtual]

Returns the value of the dual column of the row i.

It implements the pure virtual function of the base class LP.

Implements ABA_LP.

6.19.4.33 virtual ABA_LPVARSTAT::STATUS ABA_OSIIF::_lpVarStat (int i) [private, virtual]

Returns the status of the column i.

It implements the pure virtual function of the base class LP.

Implements ABA_LP.

6.19.4.34 virtual ABA_SLACKSTAT::STATUS ABA_OSIIF::_slackStat (int i) [private, virtual]

Returns the status of the slack column i.

It implements the pure virtual function of the base class LP.

Implements ABA_LP.

6.19.4.35 virtual int ABA_OSIIF::_getInfeas (int & infeasRow, int & infeasCol, double * bInvRow) [private, virtual]

Can be called if the last linear program has been solved with the dual simplex method and is infeasible. This function is currently not supported by the interface.

In this case it computes the infeasible basic variable or constraint and the corresponding row nInvRow of the basis inverse. Either infeasRow or infeasCol is nonnegative. Then this number refers to an infeasible variable or slack variable, respectively. The function returns 0 if it is successful, 1 otherwise.

Currently this featureis not supported by the Open Solver Interface, therefore a call to this function always returns an error status.

It implements the pure virtual function of the base class LP.

Implements ABA_LP.

6.19.4.36 virtual void ABA_OSIIF::_remRows (ABA_BUFFER< int > & ind) [private, virtual]

Removes the rows listed in ind.

It implements the pure virtual function of the base class LP.

Implements ABA_LP.

6.19.4.37 virtual void ABA_OSIIF::_addRows (ABA_BUFFER< ABA_ROW * > & newRows) [private, virtual]

Adds the rows to the linear program.

It implements the pure virtual function of the base class LP.

Implements ABA_LP.

6.19.4.38 virtual void ABA_OSIIF::_remCols (ABA_BUFFER< int > & vars) [private, virtual]

Removes the columns listed in vars.

It implements the pure virtual function of the base class LP.

Implements ABA_LP.

6.19.4.39 virtual void ABA_OSIIF::_addCols (ABA_BUFFER< ABA_COLUMN * > & newVars) [private, virtual]

Adds the columns newCols to the linear program.

It implements the pure virtual function of the base class LP.

Implements ABA_LP.

6.19.4.40 virtual void ABA_OSIIF::_changeRhs (ABA_ARRAY< double > & newRhs) [private, virtual]

Sets the right hand side of the linear program to newRhs.

This array must have at least length of the number of rows. This function implements the pure virtual function of the base class LP.

Implements ABA_LP.

6.19.4.41 virtual void ABA_OSIIF::_changeLBound (int i, double newLb) [private, virtual]

Sets the lower bound of column i to newLb.

It implements the pure virtual function of the base class LP.

Implements ABA_LP.

6.19.4.42 virtual void ABA_OSIIF::_changeUBound (int i, double newUb) [private, virtual]

Sets the upper bound of column i to newLb.

It implements the pure virtual function of the base class LP.

Implements ABA_LP.

6.19.4.43 virtual int ABA_OSIIF::_pivotSlackVariableIn (ABA_BUFFER< int > & rows) [private, virtual]

Pivots the slack variables stored in the buffer rows into the basis. This function defines the pure virtual function of the base class LP. This function is currently not supported by the interface.

Returns:

0 All variables could be pivoted in,

1 otherwise.

Parameters:

rows
The numbers of the slack variables that should be pivoted in.

Implements ABA_LP.

6.19.4.44 void ABA_OSIIF::getSol () [private]

Extracts the solution, i.e., the value, the status, the values of the variables, slack variables, and dual variables, the reduced costs, and the statuses of the variables and slack variables form the internal solver data structure.

6.19.4.45 char ABA_OSIIF::csense2osi (ABA_CSENSE * sense) const [private]

Converts the ABACUS representation of the row sense to the Osi representation.

6.19.4.46 ABA_CSENSE::SENSE ABA_OSIIF::osi2csense (char sense) const [private]

Converts the OSI representation of the row sense to the ABACUS representation.

6.19.4.47 CoinWarmStartBasis::Status ABA_OSIIF::lpVarStat2osi (ABA_LPVARSTAT::STATUS stat) const [private]

Converts the ABACUS variable status to OSI format.

6.19.4.48 ABA_LPVARSTAT::STATUS ABA_OSIIF::osi2lpVarStat (CoinWarmStartBasis::Status stat) const [private]

Converts the OSI variable status to ABACUS format.

6.19.4.49 CoinWarmStartBasis::Status ABA_OSIIF::slackStat2osi (ABA_SLACKSTAT::STATUS stat) const [private]

Converts the ABACUS slack status to OSI format.

6.19.4.50 ABA_SLACKSTAT::STATUS ABA_OSIIF::osi2slackStat (CoinWarmStartBasis::Status stat) const [private]

Converts the OSI slack status to ABACUS format.

6.19.4.51 OsiSolverInterface* ABA_OSIIF::getDefaultInterface () [private]

Allocates an Open Solver Interface of type defaultOsiSolver.

6.19.4.52 OsiSolverInterface* ABA_OSIIF::switchInterfaces (SOLVERTYPE newMethod) [private]

Switches between exact and approximate solvers.

6.19.4.53 void ABA_OSIIF::loadDummyRow (OsiSolverInterface * s2, const double * lbounds, const double * ubounds, const double * objectives) [private]

Initializes the problem with a dummy row To be used with CPLEX if there are no rows.

6.19.4.54 void ABA_OSIIF::_rowRealloc (int newSize) [private, virtual]

Reallocates the internal memory such that newSize rows can be stored. This function is obsolete, as memory management is completely handled by Osi.

It implements the corresponding pure virtual function of the base class LP. If a reallocation is performed in the base class LP, we reinitialize the internal data structure. Actually this reinitialization is redundant since it would be performed automatically if addRows() or addCols() fail. However, to be consistent, and if a reallocation is performed to decrease the size of the arrays we call reinitialize().

Implements ABA_LP.

6.19.4.55 void ABA_OSIIF::_colRealloc (int newSize) [private, virtual]

Reallocates the internal memory such that newSize columns can be stored. This function is obsolete, as memory management is completely handled by Osi.

It implements the corresponding pure virtual function of the base class LP.

Implements ABA_LP.

6.19.4.56 virtual int ABA_OSIIF::_setSimplexIterationLimit (int limit) [private, virtual]

Changes the iteration limit of the Simplex algorithm.

This function defines a pure virtual function of the base class LP.

Returns:

0 If the iteration limit could be set,

1 otherwise.

Parameters:

limit
The new value of the iteration limit.

Implements ABA_LP.

6.19.4.57 virtual int ABA_OSIIF::_getSimplexIterationLimit (int & limit) [private, virtual]

Defines a pure virtual function of the base class LP.

Returns:

0 If the iteration limit could be retrieved,

1 otherwise.

Parameters:

limit
Stores the iteration limit if the return value is 0.

Implements ABA_LP.

6.19.4.58 const ABA_OSIIF& ABA_OSIIF::operator= (const ABA_OSIIF & rhs) [private]

6.19.4.59 void ABA_OSIIF::convertSenseToBound (double inf, const char sense, const double right, const double range, double & lower, double & upper) const [inline, private]

Definition at line 530 of file osiif.h.

6.19.5 Member Data Documentation

6.19.5.1 OsiSolverInterface*ABA_OSIIF::osiLP_ [private]

Definition at line 100 of file osiif.h.

6.19.5.2 ABA_LPMASTEROSI*ABA_OSIIF::lpMasterOsi_ [private]

Definition at line 454 of file osiif.h.

6.19.5.3 double ABA_OSIIF::value_ [private]

The value of the optimal solution.

Definition at line 458 of file osiif.h.

6.19.5.4 const double*ABA_OSIIF::xVal_ [private]

An array storing the values of the variables after the linear program has been optimized.

Definition at line 463 of file osiif.h.

6.19.5.5 const double*ABA_OSIIF::barXVal_ [private]

Definition at line 464 of file osiif.h.

6.19.5.6 const double*ABA_OSIIF::reco_ [private]

An array storing the values of the reduced costs after the linear program has been optimized.

Definition at line 469 of file osiif.h.

6.19.5.7 const double*ABA_OSIIF::yVal_ [private]

An array storing the values of the dual variables after the linear program has been optimized.

Definition at line 474 of file osiif.h.

6.19.5.8 const char*ABA_OSIIF::cStat_ [private]

An array storing the statuses of the variables after the linear program has been optimized.

Definition at line 479 of file osiif.h.

6.19.5.9 int ABA_OSIIF::numCols_ [private]

The number of columns currently used in the LP.

Definition at line 483 of file osiif.h.

6.19.5.10 int ABA_OSIIF::numRows_ [private]

The number of rows currently used in the LP.

Definition at line 487 of file osiif.h.

6.19.5.11 const char*ABA_OSIIF::rStat_ [private]

An array storing the statuses of the slack variables after the linear program has been optimized.

Definition at line 492 of file osiif.h.

6.19.5.12 const double*ABA_OSIIF::rhs_ [private]

An array storing the right hand sides of the linear program.

Definition at line 496 of file osiif.h.

6.19.5.13 const double*ABA_OSIIF::rowactivity_ [private]

An array storing the row activity of the linear program.

Definition at line 500 of file osiif.h.

6.19.5.14 const char*ABA_OSIIF::rowsense_ [private]

An array storing the row senses of the linear program.

Definition at line 504 of file osiif.h.

6.19.5.15 const double*ABA_OSIIF::colupper_ [private]

An array storing the column upper bounds of the linear program.

Definition at line 508 of file osiif.h.

6.19.5.16 const double*ABA_OSIIF::collower_ [private]

An array storing the column lower bounds of the linear program.

Definition at line 512 of file osiif.h.

6.19.5.17 const double*ABA_OSIIF::objcoeff_ [private]

An array storing the objective function coefficients of the linear program.

Definition at line 516 of file osiif.h.

6.19.5.18 CoinWarmStartBasis*ABA_OSIIF::ws_ [private]

A warm start object storing information about a basis of the linear program.

Definition at line 520 of file osiif.h.

6.19.5.19 SOLVERTYPE ABA_OSIIF::currentSolverType_ [private]

The type of the current solver interface.

Definition at line 524 of file osiif.h.

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