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 protectedCarPoolingAlgorithm(CarPoolingData data)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract CarPoolingSolutiondoRun()Abstract method that should be implemented by child class.CarPoolingDatagetInputData()CarPoolingSolutionrun()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:AbstractAlgorithmRun 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:
runin classAbstractAlgorithm<CarPoolingObserver>- Returns:
- The solution found by the algorithm (may not be a feasible solution).
-
doRun
protected abstract CarPoolingSolution doRun()
Description copied from class:AbstractAlgorithmAbstract method that should be implemented by child class.- Specified by:
doRunin classAbstractAlgorithm<CarPoolingObserver>- Returns:
- The solution found, must not be null (use an infeasible or unknown status if necessary).
-
getInputData
public CarPoolingData getInputData()
- Overrides:
getInputDatain classAbstractAlgorithm<CarPoolingObserver>- Returns:
- Input for this algorithm.
-
-