Class SolverDispatcher
java.lang.Object
solvers.dispatchers.SolverDispatcher
Server side of the solver interface.
This object takes a model, instantiates the correct solver, and solves it.
Should probably be rewritten using a different data structure to hold model information
This object takes a model, instantiates the correct solver, and solves it.
Should probably be rewritten using a different data structure to hold model information
- Author:
- unknown, Bertoli Marco (what-if analysis)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceListener used to notify when computation of a model is terminated. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a solver listener to be notified when computation of an iteration terminates.voidfinalDispatch(ExactModel model, int iteration) getModel()booleanvoidsolve(ExactModel model) Solves input model.voidSolves the model in file.voidstop()Stops What-if analysis and invalidates results
-
Constructor Details
-
SolverDispatcher
public SolverDispatcher()
-
-
Method Details
-
solve
Solves the model in file.- Parameters:
file- the file- Throws:
InputDataException- if some input data are malformedSolverException- if something goes wrong during solution
-
stop
public void stop()Stops What-if analysis and invalidates results -
hasStopped
public boolean hasStopped() -
solve
Solves input model. This method will look for what-if analysis data and perform a what-if analysis if requested.
Author: Bertoli Marco- Parameters:
model- model to be solved- Throws:
InputDataException- if some input data are malformedSolverException- if something goes wrong during solution
-
finalDispatch
public void finalDispatch(ExactModel model, int iteration) throws InputDataException, SolverException - Throws:
InputDataExceptionSolverException
-
addSolverListener
Adds a solver listener to be notified when computation of an iteration terminates. This is useful for notification of a progress window. Only one listener is allowed.- Parameters:
listener- listener to be added or null to remove previous one.
-
getModel
-