@Test
public void testBaseGraphMultipleVehicles() {
AlgorithmOptions footOptions = AlgorithmOptions.start().
weighting(new FastestWeighting(footEncoder)).build();
AlgorithmOptions carOptions = AlgorithmOptions.start().
weighting(new FastestWeighting(carEncoder)).build();
GraphHopperStorage g = createGHStorage(encodingManager,
Arrays.asList(footOptions.getWeighting(), carOptions.getWeighting()), false);
initFootVsCar(g);
RoutingAlgorithmFactory contractedFactory = createFactory(g, carOptions);
Path p1 = contractedFactory.createAlgo(getGraph(g, carOptions.getWeighting()), carOptions).calcPath(0, 7);
assertEquals(IntArrayList.from(0, 4, 6, 7), p1.calcNodes());
assertEquals(p1.toString(), 15000, p1.getDistance(), 1e-6);
Path p2 = new RoutingAlgorithmFactorySimple().createAlgo(g, carOptions).calcPath(0, 7);
assertEquals(IntArrayList.from(0, 4, 6, 7), p2.calcNodes());
assertEquals(p2.toString(), 15000, p2.getDistance(), 1e-6);
assertEquals(p2.toString(), 2700 * 1000, p2.getTime());
Path p3 = new RoutingAlgorithmFactorySimple().createAlgo(g, footOptions).calcPath(0, 7);
assertEquals(p3.toString(), 17000, p3.getDistance(), 1e-6);
assertEquals(p3.toString(), 12240 * 1000, p3.getTime());
assertEquals(IntArrayList.from(0, 4, 5, 7), p3.calcNodes());
}