public class Solution extends Object implements Serializable
Constructor and Description |
---|
Solution() |
Modifier and Type | Method and Description |
---|---|
Integer |
getIntVal(IntVar v)
Get the value of variable v in this solution
|
double[] |
getRealBounds(RealVar r)
Get the bounds of r in this solution
|
int[] |
getSetVal(SetVar s)
Get the value of variable s in this solution
|
boolean |
hasBeenFound() |
void |
record(Solver solver)
Records the current solution of the solver
clears all previous recordings
|
void |
restore()
Set all variables to their respective value in the solution
Throws an exception is this empties a domain (i.e. this domain does not contain
the solution value)
BEWARE: A restart might be required so that domains contain the solution values
|
String |
toString() |
public void record(Solver solver)
solver
- a solverpublic void restore() throws ContradictionException
BEWARE: A restart might be required so that domains contain the solution values
ContradictionException
public Integer getIntVal(IntVar v)
v
- IntVar (or BoolVar)public int[] getSetVal(SetVar s)
s
- SetVarpublic double[] getRealBounds(RealVar r)
r
- RealVarpublic boolean hasBeenFound()
Copyright © 2015. All rights reserved.