BlockIPPlatform
 All Classes Files Functions Variables
Public Member Functions | Private Member Functions | List of all members
OsiXpress Class Reference

Class to solve problems through Osi with Xpress. More...

#include <OsiXpress.h>

Inheritance diagram for OsiXpress:
Inheritance graph
[legend]
Collaboration diagram for OsiXpress:
Collaboration graph
[legend]

Public Member Functions

 OsiXpress ()
 
 ~OsiXpress ()
 Destructor.
 
STATUS solve ()
 Solve the problem loaded with Xpress.
 
void readMps (const char *filename)
 Load a problem from a mps file.
 
const string * getVarNames ()
 Get the name of variables.
 
const double * getSolution ()
 Get the solution.
 
- Public Member Functions inherited from OsiSolver
 OsiSolver ()
 Constructor.
 
 ~OsiSolver ()
 Destructor.
 
void setMaxTime (double time)
 Set maximum time allowed to solve the problem.
 
double getMaxTime ()
 Get maximum time allowed to solve the problem.
 
void setNumThreads (int numThreads)
 Set the maximum number of threads that the solver can use to solve the problem.
 
int getNumThreads ()
 Get the maximum number of threads that the solver can use to solve the problem.
 
void setFirstFeasible (bool stopAtFirstFeasible)
 Set if the execution must be stopped at first feasible solution.
 
bool getFirstFeasible ()
 Get if the execution must be stopped at first feasible solution.
 
void setLogFileName (char *filename)
 Set the name of the log file.
 
const char * getLogFileName ()
 Get the name of the log file.
 
OsiSolverInterface * getSolverInterface ()
 Get solver interface.
 
void loadProblem (int numRows, int numColumns, int nz, double obj[], double qobj[], double lb[], double ub[], double lhs[], double rhs[], int begRows[], int indCols[], double values[], bool copy_vectors=true)
 Load a problem.
 
double getObjValue ()
 Get the objective function value.
 
int getNumVars ()
 Get the number of variables.
 

Private Member Functions

void showXprsErrormsg (const char *sSubName, int nLineNo, int nErrCode)
 Display error information about Xpress errors.
 
void loadQuadraticObj (double qobj[])
 Load the quadratic objective function cost.
 

Additional Inherited Members

- Protected Member Functions inherited from OsiSolver
void freeMemory ()
 Free all allocated memory.
 
- Protected Attributes inherited from OsiSolver
double maxTime
 Maximum time allowed to solve the problem.
 
bool stopAtFirstFeasible
 True if the execution must be stopped at first feasible solution.
 
bool solved
 True if at least a initial solve has been done.
 
int numThreads
 Number of threads to use.
 
OsiSolverInterface * si
 Osi environment.
 
CoinMessageHandler * cmh
 To redirect the output.
 
FILE * f
 Output file.
 
char * filename
 Name of file.
 
double fobj
 Objective function value.
 

Detailed Description

Class to solve problems through Osi with Xpress.

Constructor & Destructor Documentation

OsiXpress::OsiXpress ( )
Exceptions
LICENSE_ERRORIf there are problems opening XPRESS (licensing problems)

Member Function Documentation

const double * OsiXpress::getSolution ( )
virtual

Get the solution.

Returns
Solution

Reimplemented from OsiSolver.

const string * OsiXpress::getVarNames ( )
virtual

Get the name of variables.

Returns
Name of variables

Reimplemented from OsiSolver.

void OsiXpress::loadQuadraticObj ( double  qobj[])
privatevirtual

Load the quadratic objective function cost.

Parameters
qobjQuadratic coefficients of the separable quadratic objective

Reimplemented from OsiSolver.

void OsiXpress::showXprsErrormsg ( const char *  sSubName,
int  nLineNo,
int  nErrCode 
)
private

Display error information about Xpress errors.

Parameters
sSubNameSubroutine name
nLineNoLine number
nErrCodeError code

Here is the caller graph for this function:


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