optObj-class: Class '"optObj"'

Description Details Objects from the Class Slots Methods Further usefull Functions Additional methods used by classes extending class optObj Note Author(s) See Also Examples

Description

Structure of the class "optObj". Objects extending optObj returned by the constructor function optObj. These objects are used as part of class sysBiolAlg.

Details

The intention of class optObj is, to provide a flexible user interface to several optimization software products. The methods here working on the slot oobj are interface functions to low level functions invoking corresponding C functions. Basically, the user has not to care about the nature of the solver, or solver-specific functions. That is done by the class.

Objects from the Class

A virtual Class: No objects may be created from it.

Slots

oobj:

Object of class "pointerToProb" containing a pointer to a problem object (see section Note).

solver:

Object of class "character" containing the name of the solver software (see SYBIL_SETTINGS for suitable values).

method:

Object of class "character" containing the method (algorithm) used by the solver software (see SYBIL_SETTINGS for suitable values).

probType:

Object of class "character" giving the problem type (see optObj argument pType for suitable values).

Methods

dim

signature(x = "optObj"): returns a vector d of length two with d[1] and d[2] containing the number of rows and columns of the constraint matrix.

method

signature(object = "optObj"): gets the method slot.

probType

signature(object = "optObj"): gets the probType slot.

solver

signature(object = "optObj"): gets the solver slot.

Further usefull Functions

checkSolStat:

checkSolStat(stat, solver = SYBIL_SETTINGS("SOLVER"))
Returns the indices of problems with a non-optimal solution status, or NA if it is not possible to retrieve a solution status.

stat

Vector of integer values containing the solution status.

solver

Single character string specifying the used solver (see SYBIL_SETTINGS).

getMeanReturn:

getMeanReturn(code, solver = SYBIL_SETTINGS("SOLVER"))
Translates the return value (code) of a solver in a human readable string. Returns NA if hte translation is not possible.

getMeanStatus:

getMeanStatus(code, solver = SYBIL_SETTINGS("SOLVER"), env = NULL)
Translates the soluton status value (code) of a solver in a human readable string. Returns NA if hte translation is not possible. Argument env is for use with IBM ILOG CPLEX holding an object of class cplexPtr pointing to a IBM ILOG CPLEX environment.

wrong_type_msg:

wrong_type_msg(lp)
prints a warning message, if slot oobj from lp (an instance of class optObj) does not contain a pointer to a valid solver. See also SYBIL_SETTINGS for possible solvers.

wrong_solver_msg:

wrong_solver_msg(lp, method, printOut = TRUE)
if printOut == TRUE, it will print a warning message, if method is not available for solver in lp.

Additional methods used by classes extending class optObj

addCols:

add columns to the problem object.

addRows:

add rows to the problem object.

addRowsCols:

add rows and columns to the problem object.

addColsToProb:

add new columns (variables) to the problem object.

addRowsToProb:

add new rows (constraints) to the problem object.

backupProb:

copies a problem object into a new problem object.

changeColsBnds:

change column (variable) bounds in the problem object.

changeColsBndsObjCoefs:

change column (variable) bounds and objective coefficients in the problem object.

changeMatrixRow:

change a row in the constraint matrix of the problem object.

changeObjCoefs:

change objective coefficients in the problem object.

changeRowsBnds:

change row bounds in the problem object.

delProb:

delete (free) memory associated to the pointer to the problem object.

getColPrim:

get primal value of variables after optimization.

getColsLowBnds:

get lower bounds of variables.

getColsUppBnds:

get upper bounds of variables.

getFluxDist:

get all primal values of variables after optimization (resulting flux distribution).

getNumCols:

get number of columns in the problem object.

getNumNnz:

get number of non zero elements in the constraint matrix of the problem object.

getNumRows:

get number of rows in the problem object.

getObjCoefs:

get objective coefficients in the problem object.

getObjDir:

get direction of optimization.

getObjVal:

get value of the objective function after optimization.

getRedCosts:

get reduced costs of all variables after optimization.

getRowsLowBnds:

get lower row bounds of the problem object.

getRowsUppBnds:

get lower bounds of the rows (constraints) of the problem object.

getSolStat:

get solution status after optimization.

getSolverParm:

get current parameter settings of the used solver.

initProb:

initialize problem object.

loadLPprob:

load data to the problem object. Use this method to generate problem objects.

loadQobj:

load quadratic part of the objective function to the problem object.

readProb:

read problem object from file (e.g. lp formated).

scaleProb:

scaling of the constraint matrix.

sensitivityAnalysis:

perform sensitivity analysis.

setObjDir:

set direction of optimization.

setRhsZero:

set right hand side of the problem object to zero: Sv = 0.

setSolverParm:

set parameters for the used solver.

solveLp:

run optimization with the solver mentioned in slot solver and with the method given by slot method.

writeProb:

write problem object to file (e.g. in lp format).

Note

The class pointerToProb contains an external pointer to a problem object (usually a C/C++ pointer). This is for glpkAPI an object of class glpkPtr, for clpAPI an object of class externalptr, for lpSolveAPI an object of class lpExtPtr and for cplexAPI an object of class cplexPointer.

The class cplexPointer has two slots env and lp, each of class cplexPtr. To access for example the environment pointer from an object of class optObj, one can write lp@oobj@env.

Author(s)

Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de>

Maintainer: Mayo Roettger <mayo.roettger@hhu.de>

See Also

The constructor function sysBiolAlg for objects extending class sysBiolAlg; The constructor function optObj; SYBIL_SETTINGS and checkDefaultMethod.

Examples

1
  showClass("optObj")

sybil documentation built on May 31, 2021, 5:08 p.m.