Class PackageSwitchAlgorithm
- java.lang.Object
-
- org.insa.graphs.algorithm.AbstractAlgorithm<PackageSwitchObserver>
-
- org.insa.graphs.algorithm.packageswitch.PackageSwitchAlgorithm
-
public abstract class PackageSwitchAlgorithm extends AbstractAlgorithm<PackageSwitchObserver>
-
-
Field Summary
-
Fields inherited from class org.insa.graphs.algorithm.AbstractAlgorithm
data, observers
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
PackageSwitchAlgorithm(PackageSwitchData data)
Create a new PackageSwitchAlgorithm with the given data.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract PackageSwitchSolution
doRun()
Abstract method that should be implemented by child class.PackageSwitchData
getInputData()
PackageSwitchSolution
run()
Run the algorithm and return the solution.-
Methods inherited from class org.insa.graphs.algorithm.AbstractAlgorithm
addObserver, getObservers
-
-
-
-
Constructor Detail
-
PackageSwitchAlgorithm
protected PackageSwitchAlgorithm(PackageSwitchData data)
Create a new PackageSwitchAlgorithm with the given data.- Parameters:
data
-
-
-
Method Detail
-
run
public PackageSwitchSolution 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<PackageSwitchObserver>
- Returns:
- The solution found by the algorithm (may not be a feasible solution).
-
doRun
protected abstract PackageSwitchSolution doRun()
Description copied from class:AbstractAlgorithm
Abstract method that should be implemented by child class.- Specified by:
doRun
in classAbstractAlgorithm<PackageSwitchObserver>
- Returns:
- The solution found, must not be null (use an infeasible or unknown status if necessary).
-
getInputData
public PackageSwitchData getInputData()
- Overrides:
getInputData
in classAbstractAlgorithm<PackageSwitchObserver>
- Returns:
- Input for this algorithm.
-
-