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

org.opentripplanner.routing.core.intersection_model.IntersectionTraversalCostModel Maven / Gradle / Ivy

There is a newer version: 2.5.0
Show newest version
package org.opentripplanner.routing.core.intersection_model;

import org.opentripplanner.routing.core.TraverseMode;
import org.opentripplanner.routing.edgetype.StreetEdge;
import org.opentripplanner.routing.api.request.RoutingRequest;
import org.opentripplanner.routing.vertextype.IntersectionVertex;

/**
 * An interface to a model that computes the costs of turns.
 * 
 * Turn costs are in units of seconds - they represent the expected amount of time it would take to make a turn.
 * 
 * @author avi
 */
public interface IntersectionTraversalCostModel {
    
    /**
     * Compute the cost of turning onto "to" from "from".
     * 
     * @return expected number of seconds the traversal is expected to take.
     */
    public double computeTraversalCost(IntersectionVertex v, StreetEdge from,
            StreetEdge to, TraverseMode mode, RoutingRequest options, float fromSpeed,
            float toSpeed);

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy