|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Solution
This interface defines a solution of a Problem. It includes values for all constrained variables that were added to the problem and were instantiated using a Solver.
| Method Summary | |
|---|---|
int |
getAt(java.lang.String name)
A synonym for getValue(name). |
int |
getMax(int i)
Returns the maximum value in the domain of the solution variable with index i. |
int |
getMax(java.lang.String name)
Returns the maximum value in the domain of the solution variable with the given name. |
int |
getMin(int i)
Returns the minimum value in the domain of the solution variable with the index i. |
int |
getMin(java.lang.String name)
Returns the minimum value in the domain of the solution variable with the given name. |
int |
getNumberOfVarReals()
Returns the number of decision real variables in the solution |
int |
getNumberOfVars()
Returns the number of decision integer variables in the solution |
int |
getNumberOfVarSets()
Returns the number of decision set variables in the solution |
Problem |
getProblem()
Returns the problem that this Solution is a solution to. |
double |
getRealValue(int i)
Returns the value of the solution real variable with the index i, throws a RuntimeException if the real variable is not bound. |
double |
getRealValue(java.lang.String name)
Returns the value of the solution real variable with the given name, throws a RuntimeException if the real variable is not bound. |
int |
getSolutionNumber()
Returns the number identifying this Solution. |
Solver |
getSolver()
Returns the solver that created this Solution. |
int |
getValue(int i)
Returns the value of the solution variable with the index i, throws a RuntimeException if the variable is not bound. |
int |
getValue(java.lang.String name)
Returns the value of the solution variable with the given name, throws a RuntimeException if the variable is not bound. |
boolean |
isBound()
Returns true if all the solution variables are bound, i.e. |
boolean |
isBound(int i)
Returns true if the domain of the solution variable with the index i is a single value, i.e. |
boolean |
isBound(java.lang.String name)
Returns true if the domain of the solution variable with the given name is a single value, i.e. |
void |
log()
Logs the solution in the information log |
void |
log(int varPerLine)
Logs the solution in the information log. |
void |
setSolutionNumber(int number)
Sets the number identifying this Solution. |
| Method Detail |
|---|
int getAt(java.lang.String name)
name -
java.lang.RuntimeException - if the solution variable is not bound.int getMax(int i)
i - the index of the desired solution variable.
int getMax(java.lang.String name)
name - the name of the desired solution variable.
int getMin(int i)
i - the index of the desired solution variable.
int getMin(java.lang.String name)
name - the name of the desired solution variable.
int getNumberOfVarReals()
int getNumberOfVars()
int getNumberOfVarSets()
Problem getProblem()
double getRealValue(int i)
i - the index of the desired solution real variable .
java.lang.RuntimeException - if the solution real variable is not bound.double getRealValue(java.lang.String name)
name - the name of the desired solution real variable .
java.lang.RuntimeException - if the solution real variable is not bound.int getSolutionNumber()
Solver getSolver()
int getValue(int i)
i - the index of the desired solution variable .
java.lang.RuntimeException - if the solution variable is not bound.int getValue(java.lang.String name)
name - the name of the desired solution variable .
java.lang.RuntimeException - if the solution variable is not bound.boolean isBound()
isBound(String)boolean isBound(int i)
i - the index of the desired solution variable.
boolean isBound(java.lang.String name)
name - the name of the desired solution variable.
void log()
void log(int varPerLine)
void setSolutionNumber(int number)
number - the number identifying this Solution.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||