* Get schrimpf with threshold accepting
* Note that Priority.LOW is a way to priorize AlgorithmListeners
*/
VehicleRoutingAlgorithm vra_withThreshold = new SchrimpfFactory().createAlgorithm(vrp);
vra_withThreshold.getAlgorithmListeners().addListener(new AlgorithmSearchProgressChartListener("output/schrimpfThreshold_progress.png"), Priority.LOW);
vra_withThreshold.getAlgorithmListeners().addListener(new StopWatch(), Priority.HIGH);
/*
* Get greedy schrimpf
*/
VehicleRoutingAlgorithm vra_greedy = new GreedySchrimpfFactory().createAlgorithm(vrp);
vra_greedy.getAlgorithmListeners().addListener(new AlgorithmSearchProgressChartListener("output/schrimpfGreedy_progress.png"), Priority.LOW);
vra_greedy.getAlgorithmListeners().addListener(new StopWatch(), Priority.HIGH);
/*
* run both
*/
vra_withThreshold.searchSolutions();