public abstract class ProblemSaver<V extends Variable<V,T>,T extends Value<V,T>,M extends Model<V,T>> extends Object implements Runnable
Constructor and Description |
---|
ProblemSaver(Solver<V,T> solver)
Constructor
|
Modifier and Type | Method and Description |
---|---|
Assignment<V,T> |
getAssignment()
Current assignment
|
M |
getModel()
Model of the solution
|
protected Solution<V,T> |
getSolution()
Solution to be saved
|
Solver<V,T> |
getSolver()
Solver
|
TerminationCondition<V,T> |
getTerminationCondition()
Return termination condition so that the save process can be stopped if needed.
|
void |
run() |
abstract void |
save()
Save the solution
|
void |
setCallback(Callback callback)
Sets callback class
|
void |
setTerminationCondition(TerminationCondition<V,T> termination)
Provide termination condition so that the save process can be stopped if needed (optional).
|
public ProblemSaver(Solver<V,T> solver)
solver
- current solverprotected Solution<V,T> getSolution()
public Assignment<V,T> getAssignment()
public abstract void save() throws Exception
Exception
- thrown when save failspublic void setCallback(Callback callback)
callback
- method Callback.execute()
is executed when save is
donepublic void setTerminationCondition(TerminationCondition<V,T> termination)
public TerminationCondition<V,T> getTerminationCondition()