localsolver
public class LSSolution extends java.lang.Object
LSSolutionStatus| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clear the solution and set all decisions to zero.
|
boolean |
equals(java.lang.Object obj) |
LSCollection |
getCollectionValue(LSExpression expr)
Returns the value of the given expression in this solution.
|
double |
getDoubleValue(LSExpression expr)
Returns the value of the given expression in this solution.
|
long |
getIntValue(LSExpression expr)
Returns the value of the given expression in this solution.
|
LocalSolver |
getLocalSolver()
Returns the LocalSolver object associated to this solution.
|
LSSolutionStatus |
getStatus()
Returns the status of the solution.
|
long |
getValue(LSExpression expr)
Returns the value of the given expression in this solution.
|
int |
hashCode() |
boolean |
isViolated(LSExpression expr)
Returns true if the given expression is violated in this solution.
|
void |
setDoubleValue(LSExpression expr,
double value)
Sets the value of the given expression in this solution.
|
void |
setIntValue(LSExpression expr,
long value)
Sets the value of the given expression in this solution.
|
void |
setValue(LSExpression expr,
double value)
Sets the value of the given expression in this solution.
|
void |
setValue(LSExpression expr,
long value)
Sets the value of the given expression in this solution.
|
public LocalSolver getLocalSolver()
public void setValue(LSExpression expr, long value)
LSState.Paused or
LSState.Stopped. Only allowed if this expression is an integer or
a boolean. If the solver was not launched, this value will be used as an
initial value for the decision. This method has the same behavior as
setIntValue(localsolver.LSExpression, long).expr - Decision.value - Value assigned to the decision in this solution.LSExpression.isDecision(),
LSExpression.isInt(),
LSExpression.isBool()public void setValue(LSExpression expr, double value)
LSState.Paused or
LSState.Stopped. Only allowed if this expression is a double. If
the solver was not launched, this value will be used as an initial value
for the decision. This method has the same behavior as
setDoubleValue(localsolver.LSExpression, double).expr - Decision.value - Value assigned to the decision in this solution.LSExpression.isDecision(),
LSExpression.isDouble()public void setIntValue(LSExpression expr, long value)
LSState.Paused or
LSState.Stopped. Only allowed if this expression is an integer or
a boolean. If the solver was not launched, this value will be used as an
initial value for the decision.expr - Decision.value - Value assigned to the decision in this solution.LSExpression.isDecision(),
LSExpression.isInt()public void setDoubleValue(LSExpression expr, double value)
LSState.Paused or
LSState.Stopped. If the solver was not launched, this value will
be used as an initial value for the decision. Only allowed if this
expression is a double.expr - Decision.value - Value assigned to the decision in this solution.LSExpression.isDecision(),
LSExpression.isDouble()public long getValue(LSExpression expr)
LSState.Paused or LSState.Stopped. Only allowed
if this expression is an integer or a boolean.expr - Expression.LSExpression.isInt(),
LSExpression.isBool()public double getDoubleValue(LSExpression expr)
LSState.Paused or LSState.Stopped. Only allowed
if this expression is a double.expr - Expression.LSExpression.isDouble()public long getIntValue(LSExpression expr)
LSState.Paused or LSState.Stopped. Only allowed
if this expression is an integer or a boolean.expr - Expression.LSExpression.isInt(),
LSExpression.isBool()public LSCollection getCollectionValue(LSExpression expr)
LSState.Paused or LSState.Stopped. Only allowed
if this expression is an collection (list).expr - Expression.LSExpression.isCollection()public boolean isViolated(LSExpression expr)
LSState.Paused or LSState.Stopped.expr - Expression.public LSSolutionStatus getStatus()
LSState.Paused or LSState.Stopped.LSSolutionStatuspublic void clear()
LSState.Stopped.public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object