DSIMA
 All Classes Namespaces Files Functions Variables
Solver Class Reference

Skeleton of a solver interface. More...

Inheritance diagram for Solver:
Collaboration diagram for Solver:

Public Member Functions

def __init__
 
def solve
 Solve a problem. More...
 
def checkOptimal
 Raise an exception if method isOptimal returns false. More...
 
def checkFeasible
 Raise an exception if method isFeasible returns false. More...
 
def isFeasible
 Return true if the solution is optimal. More...
 
def isOptimal
 Return true if the solution is optimal. More...
 
def objectiveValue
 Get the objective value. More...
 
def variableValue
 Get the value of a variable. More...
 
def variableVectorValue
 Get a vector of variable values. More...
 
def silentCall
 Call a commend without display. More...
 

Public Attributes

 lastModel
 Last model used by the solve method. More...
 
 lastSolution
 Last solution obtained by the solve method. More...
 
 debugInfo
 Additional debug informations to display. More...
 

Detailed Description

Skeleton of a solver interface.

Constructor & Destructor Documentation

def __init__ (   self)

Member Function Documentation

def checkFeasible (   self)

Raise an exception if method isFeasible returns false.

def checkOptimal (   self)

Raise an exception if method isOptimal returns false.

def isFeasible (   self)

Return true if the solution is optimal.

Returns
True if the solution is optimal.
def isOptimal (   self)

Return true if the solution is optimal.

Returns
True if the solution is optimal.
def objectiveValue (   self)

Get the objective value.

Returns
Objective value.
def silentCall (   self,
  command,
  cwd = "" 
)

Call a commend without display.

Parameters
commandCommand to execute
cwdWorking directory.
Returns
The return status of the command.
def solve (   self,
  model,
  solution 
)

Solve a problem.

Parameters
modelModel file.
solutionTarget solution file.
def variableValue (   self,
  variableName = 'x' 
)

Get the value of a variable.

Parameters
variableNameName of the variable.
Returns
Value, 0 if not found.
def variableVectorValue (   self,
  maxIndex,
  variablePrefix = 'x#',
  minIndex = 0,
  variableSuffix = '' 
)

Get a vector of variable values.

Parameters
maxIndexMaximum index.
variablePrefixPrefix of the variables to get. For instance : 'x#' becomes 'x#0','x#1',...
minIndexMinimum index.
variableSuffixSuffix of the variables to get. Appended after the index number.
Returns
Vector of values.

Member Data Documentation

debugInfo

Additional debug informations to display.

lastModel

Last model used by the solve method.

lastSolution

Last solution obtained by the solve method.


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