Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link21 Transit Improvements #127

Merged
merged 33 commits into from
Feb 8, 2024
Merged

Link21 Transit Improvements #127

merged 33 commits into from
Feb 8, 2024

Conversation

DavidOry
Copy link
Collaborator

What existing problem does the pull request solve and why should we include it?

Bring in the Link21 transit improvements, which need to be merged with the new tm2py architecture

What is the testing plan?

This will impact all tests

Demonstrate the code is solid by discussing how results are verified and covered by tests

  • Code for this PR is covered in tests
  • Code passes all existing tests

Code formatting

Code should be PEP8 compliant before merging by running a package like black

  • Code linted

Applicable Issues

Please do not create a Pull Request without creating an issue first.

Closes #125

Issues List

  • closes...
  • closes...

yueshuaing and others added 30 commits May 18, 2023 15:08
 multiply skim by 100, Fix OMX (double to float), add extra skims to _skim_properties, update current skim names, drive perception factors, walk time calculation
this got mixed up in resolving the conflicts when trying to bring the bart changes into develop.
this is to keep the resulting number of modes less than 30 (EMME restriction).
Copy link
Collaborator Author

@DavidOry DavidOry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sync with @yueshuaing and get all the placeholders reconciled.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved the working config to the config folder.

transit_demand_file = "demand_matrices/transit/TAP_Demand_{set}_{period}_{iter}.omx"
# transit_demand_file = "demand_matrices/transit/TAP_Demand_{set}_{period}_{iter}.omx"
active_demand_file = "demand_matrices/active/nm_demand_{period}.omx"
transit_demand_file = "demand_matrices/transit/trn_demand_{period}.omx" #temp name format, add iteration?
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed naming convention.

highway_taz_ctramp_output_file = "ctramp_output/{mode_agg}_{period}_{mode}_{period}.omx"
highway_maz_ctramp_output_file = "ctramp_output/auto_{period}_MAZ_AUTO_{number}_{period}.omx"
transit_tap_ctramp_output_file = "ctramp_output/{mode_agg}_{period}_{mode}_TRN_{set}_{period}.omx"
transit_taz_ctramp_output_file = "ctramp_output/{mode_agg}_{period}_{mode}_TRN_{period}.omx"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added reading in the trip lists to create the demand matrices in tm2py rather than the Java code.

@@ -61,7 +81,46 @@
[[household.mode_agg]]
name = "transit"
modes = ["KNRPRV", "KNRTNC", "PNR", "WLK"]

[household.rideshare_mode_split]
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need all this to convert the CT-RAMP demand to vehicle trips

effective_headway_source = "hdw"
initial_wait_perception_factor = 1.5
transfer_wait_perception_factor = 3.0
walk_perception_factor = 2.0
initial_boarding_penalty = 10
transfer_boarding_penalty = 10
walk_perception_factor_cbd = 1.0
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expose perception factors, add ability to have spatially-different perception factors

if use_ccr:
with self.controller.emme_manager.logbook_trace("CCR related skims"):
self.skim_reliability_crowding_capacity(time_period, transit_class)
self.mask_above_max_transfers(time_period, transit_class)
self.mask_if_not_required_modes(time_period, transit_class)
#if congested_transit_assignment:
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arashasadabadi: delete old code

"result": f'mf"{_tp_tclass}_XFERS"',
"expression": f'(mf"{_tp_tclass}_XFERS" - 1).max.0',
}
if ("PNR_TRN_WLK" in _tp_tclass) or ("WLK_TRN_PNR"in _tp_tclass):
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arashasadabadi: check that the UEC changes are not reducing the number of boardings twice.

@@ -507,6 +536,161 @@ def _calc_total_ivt(
num_processors=self.controller.num_processors,
)

def skim_drive_walk(
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Skim access/egress (TAP to TAZ)

num_processors=self.controller.num_processors,
)

def skim_penalty_toll(
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Allow for skimming of a boarding time penalty, that can be set to zero for transfers.

@@ -76,6 +79,28 @@ class ScenarioConfig(ConfigItem):
]
EmptyString = Literal[""]

@dataclass(frozen=True)
class WarmStartConfig(ConfigItem):
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warm start infrastructure

@AshishKuls AshishKuls merged commit a638b9c into develop Feb 8, 2024
0 of 2 checks passed
@AshishKuls AshishKuls deleted the bart_transit_improvements branch February 12, 2024 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants