Skip to content

District-to-district transit flows #13

@yueshuaing

Description

@yueshuaing

This issue is open to discuss/explain the issue noticed in BayAreaMetro/tm2py#174 comments:

item3: acceptance-other.twb/6 - Transit District: The acceptance-transit summaries show that we are low on transit. So why are the simulated outcomes so much higher than observed on this sheet? Please check the calculations.

This is because the simulated flow in this tab is calculated as OD demand × number of boardings × share of in-vehicle time. The results can be much higher than OD demand, because for some OD pairs, the number of boardings are greater than once.

# Calculate technology-specific flows using formula:
# tech_flow = total_flow * boards * tech_ivt / total_ivt
# This allocates trips to technologies based on their share of in-vehicle time
for tech in self.canonical.transit_technology_abbreviation_dict.keys():
column_name = f"simulated_{tech.lower()}_flow"
summary_pldf = summary_pldf.with_columns(
(
pl.col("simulated_flow")
* pl.col("boards")
* pl.col("{}".format(tech.lower()))
/ pl.col("ivt")
).alias(column_name)
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions