Skip to content

Commit

Permalink
Merge branch 'ABM3_develop' of https://github.com/sandag/abm into ABM…
Browse files Browse the repository at this point in the history
…3_develop
  • Loading branch information
JoeJimFlood committed May 6, 2024
2 parents ec3a750 + 402b151 commit 318f482
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/emme/toolbox/import/import_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
import fiona as _fiona

from math import ceil as _ceiling
from math import floor as _floor
from copy import deepcopy as _copy
import numpy as _np
import heapq as _heapq
Expand Down Expand Up @@ -1062,8 +1063,9 @@ def calc_transit_attributes(self, network):
elif period == "ev":
num_hours_period = 8 # Caution hard-coded number of hours in period
if period in ["ea", "ev"]:
num_runs = line["@hours_" + period]*60/line["@headway_" + period]
line["@headway_" + period] = floor(num_hours_period*60/num_runs)
if line["@headway_" + period] > 0:
num_runs = line["@hours_" + period]*60/line["@headway_" + period]
line["@headway_" + period] = _floor(num_hours_period*60/num_runs)
line["@headway_rev_" + period] = revised_headway(line["@headway_" + period])

self._log.append({"type": "text", "content": "Revised headway calculation complete"})
Expand Down

0 comments on commit 318f482

Please sign in to comment.