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

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

#include <OsiCplex.h>

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

Public Member Functions

 OsiCplex ()
 
 ~OsiCplex ()
 Destructor.
 
STATUS solve ()
 Solve the problem loaded with Cplex.
 
void readMps (const char *filename)
 Load a problem from a mps file.
 
const string * getVarNames ()
 Get the name of variables.
 
- 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.
 
virtual const double * getSolution ()
 Get the solution.
 
int getNumVars ()
 Get the number of variables.
 

Private Member Functions

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 Cplex.

Constructor & Destructor Documentation

OsiCplex::OsiCplex ( )
Exceptions
LICENSE_ERRORIf there are problems opening CPLEX (licensing problems)

Member Function Documentation

const string * OsiCplex::getVarNames ( )
virtual

Get the name of variables.

Returns
Name of variables

Reimplemented from OsiSolver.

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

Load the quadratic objective function cost.

Parameters
qobjQuadratic coefficients of the separable quadratic objective

Reimplemented from OsiSolver.


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