Skip to content

馃悰 Bug: Setting MAZ Auto Flow as Background Traffic#212

Description

@i-am-sijia

Describe the bug

Starting from global iteration 1, MAZ auto assignment runs before TAZ auto assignment. We can set MAZ assigned flow @maz_flow as background traffic for TAZ auto assignment. For global iteration 0, we can set the background traffic to 0.

def run(self):
"Run time period highway assignment"
with self._setup():
if self.iteration > 0:
self._copy_maz_flow()
else:
self._reset_background_traffic()
for matrix_name in self.demand_matrix_ids:

However, the network calculation of _copy_maz_flow() and _reset_background_traffic() in the code snippet below seem to be switched.

def _copy_maz_flow(self):
"""Copy maz_flow from MAZ demand assignment to ul1 for background traffic."""
self._network_calculator("ul1", "0")
def _reset_background_traffic(self):
"""Set ul1 for background traffic to 0 (no maz-maz flow)."""
self.logger.log(
"Set ul1 to 0 for background traffic", indent=True, level="DETAIL"
)
self._network_calculator("ul1", "@maz_flow")

Progress:

  • Sufficient information provided
  • Cause identified/found
  • Test developed/identified
  • Approach determined
  • Test passes

To Reproduce

Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Failing tests

  • No applicable test failed, need to create.
  • other...specify

Triggering line of code

Thoughts on resolution

Full stack trace

Environment

Operating system:
Context (conda, jupyter, etc):
Environment (e.g. output from conda list):

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions