TripMinor

public class TripMinor extends Trip

This class stores information about a performed trip on minor roads (for which the network is not modelled).

Author:Milan Lovric

Fields

zoning

public static Zoning zoning

Constructors

TripMinor

public TripMinor(VehicleType vehicle, EngineType engine, TimeOfDay hour, Integer originTemproZoneID, Integer destinationTemproZoneID, double length, Zoning zoning)

Constructor for a trip. Origin and destination are used for freight trips (according to DfT’s BYFM zonal coding). Origin and destination for passenger car/AV trips are 0 as their correct origin and destination zone can be obtained using the first and the last node of the route.

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

TripMinor

public TripMinor(VehicleType vehicle, EngineType engine, TimeOfDay hour, Integer originTemproZoneID, Integer destinationTemproZoneID, double length, Zoning zoning, int multiplier)

Constructor for a trip. Origin and destination are used for freight trips (according to DfT’s BYFM zonal coding). Origin and destination for passenger car/AV trips are 0 as their correct origin and destination zone can be obtained using the first and the last node of the route.

Parameters:
  • vehicle – Vehicle type.
  • engine – Engine type.
  • route – Route.
  • hour – Time of day.
  • originTemproZoneID – Origin tempro zone ID.
  • destinationTemproZoneID – Destination tempro zone ID.
  • length – Trip length;
  • 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 averageSpeed, Map<VehicleType, Map<EngineType, Map<WebTAG, Double>>> energyConsumptionParameters, Map<VehicleType, Map<EngineType, Double>> relativeFuelEfficiency, Map<EnergyType, Double> unitCO2Emissions)

Gets CO2 emission for the minor trip.

Parameters:
  • averageSpeed – Average speed for a minor trip.
  • energyConsumptionParameters – Energy consumption parameters.
  • relativeFuelEfficiency – Relative fuel efficiency.
Returns:

CO2 emission for the trip.

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 averageSpeed, Map<VehicleType, Map<EngineType, Map<WebTAG, Double>>> energyConsumptionParameters, Map<VehicleType, Map<EngineType, Double>> relativeFuelEfficiency)

Gets energy consumptions for the minor trip.

Parameters:
  • averageSpeed – Average speed for a minor trip.
  • energyConsumptionParameters – Energy consumption parameters.
  • relativeFuelEfficiency – Relative fuel efficiency.
Returns:

Energy consumptions for the trip.

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 averageSpeed, Map<EnergyType, Double> energyUnitCosts, Map<VehicleType, Map<EngineType, Map<WebTAG, Double>>> energyConsumptionParameters, Map<VehicleType, Map<EngineType, Double>> relativeFuelEfficiency)

Gets fuel cost for the minor trip.

Parameters:
  • averageSpeed – Average speed for a minor trip.
  • energyUnitCosts – Energy unit costs.
  • energyConsumptionParameters – Energy consumption parameters.
  • relativeFuelEfficiency – Relative fuel efficiency.
Returns:

Energy consumptions for the trip.

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 (no separate access/egress for minor road trips).

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 averageSpeed)

Gets travel time for the minor trip.

Parameters:
  • averageSpeed – Average speed for a minor trip.
Returns:

Travel time.

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.

toString

public String toString()