20 Vehicle Generation

20.1 Vehicle Entry Headway Distribution

Two types of vehicle entry distributions can be specified: Uniform or Random.

For a uniform distribution, each vehicle will enter at the same headway, i.e., 3600 s/h divided by the entry volume (in veh/h). For example, an entry volume will result in a vehicle entering the network every 2 seconds. If the ‘Random’ distribution type is selected, two different distributions will be used, as follows:

  • Entry flow rate < 900 veh/h/ln -> Negative Exponential distribution
  • Entry flow rate ≥ 900 veh/h/ln -> Normal distribution
    • The standard deviation for the Normal distribution is calculated as: (Average Headway × Number of Lanes - MinArrivalHeadway) / 2.5
    • The minimum arrival headway is calculated as: DesiredHeadwayMultiplier × 1.1 + (StopGap + MinVehLength) / DesiredSpeed

20.2 Set Vehicle Entry Lane

Iterate through each lane in the link

  • If the lane is of type ‘Regular’, increment the number of candidate lanes

Initially set the vehicle’s desired lane to lane ID ‘1’ (the outer-most lane of the link)

Check the entry link type, if it is of type ‘Two-Lane Highway Entry’, set the desired lane ID to ‘1’ and exit

Commercial trucks are biased to outer lanes. Thus, if the vehicle fleet type is either small truck or large truck:

  • If the number of entry link lanes > 2
    • Set the number of candidate lanes = number of entry link lanes - 1
  • Otherwise
    • Set the number of candidate lanes = number of entry link lanes

Identify the vehicle on each lane that is closest to the entry node (i.e., no other vehicle is between this vehicle and the entry node on the given lane)

Get the time at which this vehicle entered the system. If there is no vehicle on this lane, the time will be set to zero.

Compare the system entry times for each of the vehicles nearest to the entry node (one per lane)

The lane that contains the vehicle with the earliest system entry time (or zero for a lane with no vehicle) will be selected as the entry lane. In the unlikely case that more than one lane has the same value for earliest system entry time, the outer most lane of those options will be selected.

20.3 Set Vehicle Driver Type

This method sets the driver type for a vehicle that has been assigned to a given lane ID (referred to below as LaneNum)

Set the number of driver types for the subject vehicle

  • NumDriverTypes = MaxDriverType – MinDriverType + 1 (these driver type values are specified in the Vehicle Settings screen)

Set the number of driver types per lane

  • NumDriverTypesPerLane = NumDriverTypes divided by total number of lanes on the link
    • The result of this calculation is stored as an integer value. If the actual result is a fractional value the result, the remainder is stored separately. For example…
      • if the number of driver types is 10 and the number of link lanes is 2, the result of this calculation is 5 and the remainder = 0,
      • if the number of driver types is 10 and the number of link lanes is 3, the result of this calculation is 3 and the remainder = 1.

Set the minimum driver type for the assigned LaneNum

  • MinDriverTypeForLaneId = (LaneNum - 1) \(\times\) number of driver types per lane + MinDriverType

Set the maximum driver type for the assigned LaneNum

If (LaneNum < Total Lanes on Link)

  • MaxDriverTypeForLaneId for LaneNum = LaneNum \(\times\) number of driver types per lane + (MinDriverType - 1)
    Otherwise
  • MaxDriverTypeForLaneId for LaneNum = LaneNum \(\times\) number of driver types per lane + (MinDriverType - 1) + remainder

For the example of 10 driver types and 3 link lanes, the result will be as follows:

  • For LaneNum = 1; MinDriverType = 1, MaxDriverType = 3
  • For LaneNum = 2; MinDriverType = 4, MaxDriverType = 6
  • For LaneNum = 3; MinDriverType = 7, MaxDriverType = 10

If the ‘Bias slower vehicles to right’ has NOT been selected, or the number of driver types per lane < 1

  • Generate a uniform random number, between 0-1 and convert to a percentage (i.e., multiply by 100)
  • Iterate from MinDriverType to MaxDriverType
    • Compare generated random percentage value to the cumulative driver type percentages (based on percentage from Driver Settings screen)
      • If (random percentage value ≤ Cumulative Driver Type Percentage for given driver type
        • return current driver type
      • Otherwise
        • Increment current driver type and repeat above check
          Otherwise
  • Generate a uniform random number, between 0-1 and assign to ChanceForRandomDriverType
    • If (ChanceForRandomDriverType <= Probability of Random Lane Assignment (from Traffic Data inputs)
      • Iterate from MinDriverType to MaxDriverType and assign driver type per same process described above (i.e., compare random number to cumulative driver type percentages)
    • Otherwise
      • DriverType = Generate a uniform random number between MinDriverType and MaxDriverType for the given lane number (Note that for this situation the assigned driver types will not follow the distribution specified in the driver settings)