org.opentripplanner.routing.algorithm.filterchain.comparator.SortOnGeneralizedCost Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of otp Show documentation
Show all versions of otp Show documentation
The OpenTripPlanner multimodal journey planning system
package org.opentripplanner.routing.algorithm.filterchain.comparator;
import org.opentripplanner.model.plan.Itinerary;
import org.opentripplanner.util.CompositeComparator;
/**
* This comparator sorts itineraries based on the generalized-cost. If the cost is the same then
* the filter pick the itinerary with the lowest number-of-transfers.
*/
public class SortOnGeneralizedCost extends CompositeComparator {
public SortOnGeneralizedCost() {
super(
SortOrderComparator.GENERALIZED_COST_COMP,
SortOrderComparator.NUM_OF_TRANSFERS_COMP
);
}
}