-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Labels
bugSomething isn't workingSomething isn't working
Description
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.
tm2py/tm2py/components/network/highway/highway_assign.py
Lines 331 to 338 in 68c1836
| 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.
tm2py/tm2py/components/network/highway/highway_assign.py
Lines 426 to 436 in 68c1836
| 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:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- 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):
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working