Class to solve problems through Osi with Xpress. More...
#include <OsiXpress.h>
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. | |
Class to solve problems through Osi with Xpress.
OsiXpress::OsiXpress | ( | ) |
LICENSE_ERROR | If there are problems opening XPRESS (licensing problems) |
|
virtual |
|
virtual |
|
privatevirtual |
Load the quadratic objective function cost.
qobj | Quadratic coefficients of the separable quadratic objective |
Reimplemented from OsiSolver.
|
private |
Display error information about Xpress errors.
sSubName | Subroutine name |
nLineNo | Line number |
nErrCode | Error code |