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

Class for input problems in SML format to BlockIP. More...

#include <SMLBlockIP.h>

Collaboration diagram for SMLBlockIP:
Collaboration graph
[legend]

Classes

struct  objBlock
 
struct  objFunction
 
struct  Order_vector
 

Public Member Functions

 SMLBlockIP ()
 Constructor.
 
 ~SMLBlockIP ()
 Destructor.
 
void readAmpl (const char *modelFilename, const char *dataFilename)
 Load a problem from ampl files.
 
void amplToMps (const char *modelFilename, const char *dataFilename, const char *mpsFilename, bool convertToStd=false)
 Converts a problem in ampl format to mps format.
 
void amplToBlockIPFormat (const char *modelFilename, const char *dataFilename, const char *BlockIPFormatFilename, bool convertToStd=false)
 Converts a problem in ampl format to BlockIP format.
 
BlockIPgetBlockIPInterface ()
 Get BlockIP interface.
 
void printProblem ()
 Print the whole problem throw standard output.
 
bool isNonLinear ()
 Return true if the objective function is non-linear.
 
bool isQuadratic ()
 Return true if the objective function is quadratic.
 
const int * getVarsOrder ()
 Return the correct order of the variables, ampl change the order.
 

Private Member Functions

void loadProblemInBlockIP ()
 Load a problem from SML structure to BlockIP.
 

Static Private Member Functions

static void fobjnonlin (int n, double x[], double &fx, double Gx[], double Hx[], void *params)
 Function to get objective function information in a point when the objective function is non-linear.
 

Private Attributes

int numBlocks
 blocks number including slacks
 
int numVars
 number of variables including slacks
 
int numCons
 number of constraints including linking constraints
 
int numLinCons
 number of linking constraints
 
bool slacks
 exist slacks block in ampl model
 
bool nonLinear
 objective function is nonlinear
 
bool linear
 objective function is linear
 
ExpandedModelInterface * root
 root block
 
ExpandedModelInterface * slacksBlock
 slacks block
 
objFunctionobjF
 to compute nonlinear objective functions
 
BlockIPbip
 BlockIP environment.
 
string * blockNames
 block names
 
string * varNames
 variable names
 
int * varsOrder
 correct order for the variables, used for output, ampl orders the variables
 
string * consNames
 constraint names
 
MatrixBlockIPblocks
 main blocks
 
MatrixBlockIPlinking_constraints
 linking constraints blocks
 
double inf
 infinity
 

Detailed Description

Class for input problems in SML format to BlockIP.

Member Function Documentation

void SMLBlockIP::amplToBlockIPFormat ( const char *  modelFilename,
const char *  dataFilename,
const char *  BlockIPFormatFilename,
bool  convertToStd = false 
)

Converts a problem in ampl format to BlockIP format.

Parameters
convertToStdIf true the problem will be written in BlockIP standard form

Here is the call graph for this function:

void SMLBlockIP::amplToMps ( const char *  modelFilename,
const char *  dataFilename,
const char *  mpsFilename,
bool  convertToStd = false 
)

Converts a problem in ampl format to mps format.

Parameters
convertToStdIf true the problem will be written in BlockIP standard form
Note
The problem contained by BlockIP will be not modified

Here is the call graph for this function:

void SMLBlockIP::fobjnonlin ( int  n,
double  x[],
double &  fx,
double  Gx[],
double  Hx[],
void *  params 
)
staticprivate

Function to get objective function information in a point when the objective function is non-linear.

Parameters
nNumber of variables
xPoint
fxObjective function value in x
GxGradient in x
HxHessian in x
paramsUser parameters to perform objective function calculations
const int * SMLBlockIP::getVarsOrder ( )
inline

Return the correct order of the variables, ampl change the order.

Returns
The correct order of the variables
bool SMLBlockIP::isNonLinear ( )
inline

Return true if the objective function is non-linear.

Returns
true if the objective function is non-linear
bool SMLBlockIP::isQuadratic ( )
inline

Return true if the objective function is quadratic.

Returns
true if the objective function is quadratic

Member Data Documentation

MatrixBlockIP* SMLBlockIP::blocks
private

main blocks

These structures belong to BlockIP after its creation, then they are read-only


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