|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
R
- the row variable type.C
- the column variable type.public interface ProgramSolver<R,C>
This interface is used to represent program solvers, as in linear or quadratic program solvers.
Method Summary | ||
---|---|---|
void |
clear()
Clears all information contained in this program solver. |
|
double |
getObjectiveValue()
Returns the most recently computed objective value. |
|
java.util.Map<C,java.lang.Double> |
getSolutionVector()
Returns the most recently computed solution vector. |
|
ProgramSolverStatus |
getStatus()
Returns the status of the most recently attempted optimization. |
|
boolean |
isColumnVar(java.lang.Object obj)
Indicates if the provided object is a column variable in the matrix of this program solver. |
|
boolean |
isRowVar(java.lang.Object obj)
Indicates if the provided object is a row variable in the matrix of this program solver. |
|
boolean |
optimize()
Computes the optimal value of the current objective function in the direction of the current optimization sense. |
|
|
setColumnConstraint(Y column,
Interval c)
Sets the constraint on the provided column variable. |
|
void |
setColumnConstraints(java.util.Map<? extends C,Interval> columnConstraints)
Sets the constraints for the provided column variables. |
|
void |
setConstraint(MathExpr<? extends C> expression,
Interval c)
Sets a constraint on the provided mathematical expression of column variables. |
|
void |
setConstraints(java.util.Map<? extends MathExpr<? extends C>,Interval> expressionConstraints)
Sets constraints on the provided mathematical expressions of column variables. |
|
|
setMatrixElement(X row,
Y column,
double value)
Sets the element of the program matrix at the provided row and column variables to the one provided. |
|
void |
setObjectiveFunction(MathExpr<? extends C> expression)
Sets the objective function to the provided mathematical expression of column variables. |
|
void |
setObjectiveFunction(MathExpr<? extends C> expression,
OptSense sense)
Sets the objective function and optimization sense to the provided values. |
|
void |
setOptimizationSense(OptSense sense)
Sets the optimization sense. |
|
void |
setParamFile(java.lang.String fileName)
Reads the program solver parameter file with the provided name. |
|
|
setRowConstraint(X row,
Interval c)
Sets the constraint for the provided row variable. |
|
void |
setRowConstraints(java.util.Map<? extends R,Interval> rowConstraints)
Sets the constraints for the provided row variables. |
Method Detail |
---|
void clear()
<X extends R,Y extends C> void setMatrixElement(X row, Y column, double value)
X
- a type extending the primary row variable type.Y
- a type extending the primary column variable type.row
- the row variable.column
- the column variable.value
- the double precision element value.<Y extends C> void setColumnConstraint(Y column, Interval c)
Y
- a type extending the primary column variable type.column
- the column variable for which the constraint is set.c
- the constraint.void setColumnConstraints(java.util.Map<? extends C,Interval> columnConstraints)
columnConstraints
- column variables mapped to their corresponding
constraint.<X extends R> void setRowConstraint(X row, Interval c)
X
- a type extending the primary row variable type.row
- the row variable for which the constraint is set.c
- the constraint.void setRowConstraints(java.util.Map<? extends R,Interval> rowConstraints)
rowConstraints
- row variables mapped to their corresponding
constraint.void setConstraint(MathExpr<? extends C> expression, Interval c)
expression
- a mathematical expression of column variables for
which the constraint is set.c
- the constraint.void setConstraints(java.util.Map<? extends MathExpr<? extends C>,Interval> expressionConstraints)
expressionConstraints
- mathematical expressions of column variables
mapped to their corresponding constraint.void setObjectiveFunction(MathExpr<? extends C> expression, OptSense sense)
expression
- a mathematical expression of column variables from
this program solver.sense
- the optimization sense.setObjectiveFunction(MathExpr)
,
setOptimizationSense(OptSense)
void setObjectiveFunction(MathExpr<? extends C> expression)
expression
- a mathematical expression of column variables from
this program solver.void setOptimizationSense(OptSense sense)
sense
- the optimization sense.boolean optimize()
true
if an optimal solution was found;
false
otherwise.getObjectiveValue()
,
getSolutionVector()
double getObjectiveValue()
optimize()
boolean isColumnVar(java.lang.Object obj)
obj
- the potential column variable.
true
if the provided object is a column variable in the
matrix of this program solver; false
otherwise.boolean isRowVar(java.lang.Object obj)
obj
- the potential row variable.
true
if the provided object is a row variable in the
matrix of this program solver; false
otherwise.java.util.Map<C,java.lang.Double> getSolutionVector()
optimize()
ProgramSolverStatus getStatus()
optimize()
void setParamFile(java.lang.String fileName)
fileName
- the name of the file containing parameter values.
java.lang.UnsupportedOperationException
- if this program solver does
offer this functionality.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |