public abstract class ProblemLoader<V extends Variable<V,T>,T extends Value<V,T>,M extends Model<V,T>> extends Object implements Runnable
Constructor and Description |
---|
ProblemLoader(M model,
Assignment<V,T> assignment)
Constructor
|
Modifier and Type | Method and Description |
---|---|
Assignment<V,T> |
getAssignment()
Returns provided assignment
|
M |
getModel()
Returns provided model.
|
TerminationCondition<V,T> |
getTerminationCondition()
Return termination condition so that the save process can be stopped if needed.
|
abstract void |
load()
Load the model.
|
void |
run() |
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 ProblemLoader(M model, Assignment<V,T> assignment)
model
- an empty instance of timetable modelassignment
- current assignmentpublic Assignment<V,T> getAssignment()
public abstract void load() throws Exception
Exception
- thrown when the load failspublic void setCallback(Callback callback)
callback
- method Callback.execute()
is executed when load is
donepublic void setTerminationCondition(TerminationCondition<V,T> termination)
public TerminationCondition<V,T> getTerminationCondition()