All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.opentripplanner.routing.algorithm.filterchain.comparator.SortOnGeneralizedCost Maven / Gradle / Ivy

There is a newer version: 2.5.0
Show newest version
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
        );
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy