TripTempro

public class TripTempro extends Trip

This class stores information about a performed trip (when using the Tempro zoning system).

Author:Milan Lovric

Fields

zoning

public static Zoning zoning

Constructors

TripTempro

public TripTempro(VehicleType vehicle, EngineType engine, Route route, TimeOfDay hour, Integer originTemproZoneID, Integer destinationTemproZoneID, Zoning zoning)

Constructor for a passenger car trip using the Tempro zoning system. Origin and destination are integer IDs of Tempro zones.

Parameters:
  • vehicle – Vehicle type.
  • engine – Engine type.
  • route – Route.
  • hour – Time of day.
  • originTemproZoneID – Origin tempro zone ID.
  • destinationTemproZoneID – Destination tempro zone ID.
  • zoning – Zoning system.

TripTempro

public TripTempro(VehicleType vehicle, EngineType engine, Route route, TimeOfDay hour, Integer originTemproZoneID, Integer destinationTemproZoneID, Zoning zoning, int multiplier)

Constructor for a passenger car trip using the Tempro zoning system. Origin and destination are integer IDs of Tempro zones. Multiplier is used to store multiple instances of the same trip (vs creating multiple objects), thus reducing the memory footprint.

Parameters:
  • vehicle – Vehicle type.
  • engine – Engine type.
  • route – Route.
  • hour – Time of day.
  • originTemproZoneID – Origin tempro zone ID.
  • destinationTemproZoneID – Destination tempro zone ID.
  • zoning – Zoning system.
  • multiplier – Multiplies the same trip.

Methods

getAccessEgressConsumption

protected Map<EnergyType, Double> getAccessEgressConsumption(double[] linkTravelTime, double[] distanceFromTemproZoneToNearestNode, double averageAccessEgressSpeed, Map<VehicleType, Map<EngineType, Map<WebTAG, Double>>> energyConsumptionParameters, Map<VehicleType, Map<EngineType, Double>> relativeFuelEfficiency)

getCO2emission

public Double getCO2emission(double[] linkTravelTime, double[] distanceFromTemproZoneToNearestNode, double averageAccessEgressSpeed, Map<VehicleType, Map<EngineType, Map<WebTAG, Double>>> energyConsumptionParameters, Map<VehicleType, Map<EngineType, Double>> relativeFuelEfficiency, Map<EnergyType, Double> unitCO2Emissions, boolean flagIncludeAccessEgress)

getConsumption

public Map<EnergyType, Double> getConsumption(double[] linkTravelTime, double[] distanceFromTemproZoneToNearestNode, double averageAccessEgressSpeed, Map<VehicleType, Map<EngineType, Map<WebTAG, Double>>> energyConsumptionParameters, Map<VehicleType, Map<EngineType, Double>> relativeFuelEfficiency, boolean flagIncludeAccessEgress)

getCost

public double getCost(double[] linkTravelTime, double[] distanceFromTemproZoneToNearestNode, double averageAccessEgressSpeed, Map<EnergyType, Double> energyUnitCosts, Map<VehicleType, Map<EngineType, Map<WebTAG, Double>>> energyConsumptionParameters, Map<VehicleType, Map<EngineType, Double>> relativeFuelEfficiency, List<PricingPolicy> congestionCharges, boolean flagIncludeAccessEgress)

getDestinationLAD

public String getDestinationLAD()

Gets trip destination zone (LAD), from Tempro to LAD mapping (not from route nodes).

Returns:Trip destination zone.

getDestinationLAD

public String getDestinationLAD(Map<Integer, String> nodeToZoneMap)

Gets trip destination zone (LAD), from tempro to LAD mapping (not from route nodes).

Parameters:
  • nodeToZoneMap – Mapping from nodes to zones.
Returns:

Trip destination zone.

getDestinationLadID

public int getDestinationLadID()

Gets trip destination LAD zone ID.

Returns:Trip destination zone LAD ID.

getDestinationTemproZone

public String getDestinationTemproZone()

Gets trip destination tempro zone.

Returns:Trip destination tempro zone.

getLength

public double getLength()

Gets trip length including access/egress (from Tempro centroid to node).

Returns:Trip length [in km].

getOriginLAD

public String getOriginLAD()

Gets trip origin zone (LAD), from Tempro to LAD mapping (not from route nodes).

Returns:Trip origin zone.

getOriginLAD

public String getOriginLAD(Map<Integer, String> nodeToZoneMap)

Gets trip origin zone (LAD), from tempro to LAD mapping (not from route nodes).

Parameters:
  • nodeToZoneMap – Mapping from nodes to zones.
Returns:

Trip origin zone.

getOriginLadID

public int getOriginLadID()

Gets trip origin LAD zone ID.

Returns:Origin zone LAD ID.

getOriginTemproZone

public String getOriginTemproZone()

Gets trip origin tempro zone code.

Returns:Trip origin tempro zone code.

getTravelTime

public double getTravelTime(double[] linkTravelTime, double avgIntersectionDelay, double[] distanceFromTemproZoneToNearestNode, double averageAccessEgressSpeed, boolean flagIncludeAccessEgress)

getZoning

public Zoning getZoning()

Getter for the zoning system.

Returns:Zoning.