Class CarPoolingAlgorithm
- java.lang.Object
-
- org.insa.graphs.algorithm.AbstractAlgorithm<CarPoolingObserver>
-
- org.insa.graphs.algorithm.carpooling.CarPoolingAlgorithm
-
public abstract class CarPoolingAlgorithm extends AbstractAlgorithm<CarPoolingObserver>
-
-
Field Summary
-
Fields inherited from class org.insa.graphs.algorithm.AbstractAlgorithm
data, observers
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
CarPoolingAlgorithm(CarPoolingData data)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract CarPoolingSolution
doRun()
Abstract method that should be implemented by child class.CarPoolingData
getInputData()
CarPoolingSolution
run()
Run the algorithm and return the solution.-
Methods inherited from class org.insa.graphs.algorithm.AbstractAlgorithm
addObserver, getObservers
-
-
-
-
Constructor Detail
-
CarPoolingAlgorithm
protected CarPoolingAlgorithm(CarPoolingData data)
-
-
Method Detail
-
run
public CarPoolingSolution run()
Description copied from class:AbstractAlgorithm
Run the algorithm and return the solution. This methods internally time the call to doRun() and update the result of the call with the computed solving time.- Overrides:
run
in classAbstractAlgorithm<CarPoolingObserver>
- Returns:
- The solution found by the algorithm (may not be a feasible solution).
-
doRun
protected abstract CarPoolingSolution doRun()
Description copied from class:AbstractAlgorithm
Abstract method that should be implemented by child class.- Specified by:
doRun
in classAbstractAlgorithm<CarPoolingObserver>
- Returns:
- The solution found, must not be null (use an infeasible or unknown status if necessary).
-
getInputData
public CarPoolingData getInputData()
- Overrides:
getInputData
in classAbstractAlgorithm<CarPoolingObserver>
- Returns:
- Input for this algorithm.
-
-