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

🚀 Feature: Reduce Fidelity of the Roadway Network - Phase I #147

Closed
4 of 9 tasks
DavidOry opened this issue May 15, 2024 · 12 comments · Fixed by #158
Closed
4 of 9 tasks

🚀 Feature: Reduce Fidelity of the Roadway Network - Phase I #147

DavidOry opened this issue May 15, 2024 · 12 comments · Fixed by #158
Assignees
Labels
performance improving runtimes or other resource usage

Comments

@DavidOry
Copy link
Collaborator

DavidOry commented May 15, 2024

User Story

The TM2 roadway network is very detailed. This results in very long runtimes. To reduce the runtime, we will remove the "local" roads (facility type 7) from the TAZ-scale roadway assignment. These roads will be retained in the MAZ-scale roadway assignment.

Progress:

  • Sufficiently defined
  • Approach determined
  • Tests developed
  • User story satisfied
  • Doc strings
  • General documentation
  • Passing tests

Priority

High

Level of Effort

About 80 hours

Resolution Ideas

  1. In Lasso, remove the facility type 7 roads from the TAZ roadway network. When doing this, check for toll plazas that are coded with this facility type. Retain toll plazas. Also need to check if buses run on FT 7 roads. We need to retain links that buses traverse.
  2. In Lasso, create a separate MAZ-scale roadway network. Retain all roads in the MAZ assignment.
  3. In Lasso, rebuild the centroid connectors so that they connect to higher facility types
  4. Do a roadway assignment. Measure the difference in runtime.
  5. Create the Acceptance Criteria summaries. Compare the difference in validation performance (using the same demand).

Project

ActivitySim/Emme Conversion, Task Order 5

Who should be involved?

Users: @lmz
Reviewers: @gregerhardt, @AshishKuls

Risk

Yes, there may be some zones that have very long centroid connectors, resulting in unattractive assignment outcomes.

Tests

  • Runtime comparison for the full and reduced networks
  • Acceptance Criteria validation comparisons for the full and reduced networks
@i-am-sijia
Copy link
Collaborator

Related issue: #115

@DavidOry
Copy link
Collaborator Author

A few notes:

  1. Compare volumes before and after to see for outliers.
  2. Examine high volume links before trimming to see if FT is wrong.
  3. Reduce closing criteria so we can do an apples-to-apples assessment of reduced iterations.

@gregerhardt
Copy link

Fully support this task. Let's trim, and let's make some difference maps of assigned volumes in both just to make sure there is nothing weird that gets dropped and re-routed.

@DavidOry
Copy link
Collaborator Author

DavidOry commented Jul 3, 2024

Results:

Run Description Assignment Iterations[EA,AM,MD,PM,NT] TAZ Assign and Skim Run Time (hours)
3 assignable, relative_gap=0.05 3,10,9,19,4 5
8 drop FT7, relative_gap=0.05 3,21,19,51,4 7
11 keep FT7, relative_gap=0.05 3,15,14,32,4 11.5

The key takeaways are as follows:

  • The assignable network drops links that are not used in an assignment. This is attractive as it leads to an attractive assignment, but unattractive in that it is likely hiding network errors and results in inconsistent network fidelity.
  • Dropping the FT7 links results in a fairly sparse network. Though it has many fewer links than the assignable network, it takes more iterations to find a solution due to congestion on the smaller (FT 6) roads (which use the steep Akcelik curves).
  • Removing the assignable and just using the FT7 links results in a much more detailed network. It requires fewer iterations to solve than the FT7 network, but each iteration takes much longer due to the detail in the network.

In sum, this avenue of exploration did not bear fruit. Additional, manual network coding would be required to find a simpler network that does not result in substantial congestion on lower facility roadways.

@lachlan-git: can you please add a table with the number of links for each of these runs?

@DavidOry
Copy link
Collaborator Author

DavidOry commented Jul 3, 2024

Here's an image of the Sunset in SF with the FT 7 links in orange, which shows how sparse the network becomes when the links are removed.

Screenshot 2024-07-03 at 9 47 32 AM

@lachlan-git
Copy link
Collaborator

lachlan-git commented Jul 3, 2024

Hi, here are the link counts for runs 3, 8 and 11 broken down by ft.

@ft 3 8 11 15
1.0 3666 3666 3666 3666
2.0 3485 3485 3485 3485
3.0 6446 6447 6447 6448
4.0 39050 39050 39050 39050
5.0 58376 58254 58312 58376
6.0 77878 95219 95457 95681
7.0 171718 19828 405903 407444
8.0 32982 34166 39862 32984
99.0 29198 11729 12155 12909
Total 422799 271844 664337 660043

Edit:
Note: run 3 ft8 only TAZ connectors are included individual counts are (MAZ 175936, TAP 36438, TAZ 32982,TANA 2998)
Note: run 15 ft8 only TAZ connectors are included individual counts are (MAZ 351268, TAP 32984, TANA 2998)
In run 8-11 may differ more then expected due to dropping of isolated links when creating network.

@DavidOry DavidOry added the performance improving runtimes or other resource usage label Jul 5, 2024
@i-am-sijia i-am-sijia mentioned this issue Jul 8, 2024
5 tasks
@i-am-sijia
Copy link
Collaborator

@DavidOry do we still want to use the same network and emmebank for TAZ and MAZ assignment? In TM2.2.1.1, TAZ and MAZ are in the same network, the MAZ nodes and connectors are excluded in the TAZ assignment, and vise versa. When we planned to use FT<7 for TAZ and FT<=7 for MAZ, it makes sense to separate them as two emmebanks, but if we are deciding to use FT<=7 for both TAZ and MAZ, then we might as well keep them in the same emmebank as before.

The code changes needed if we want to separate them out: #158.

@DavidOry
Copy link
Collaborator Author

DavidOry commented Jul 8, 2024

@DavidOry do we still want to use the same network and emmebank for TAZ and MAZ assignment? In TM2.2.1.1, TAZ and MAZ are in the same network, the MAZ nodes and connectors are excluded in the TAZ assignment, and vise versa. When we planned to use FT<7 for TAZ and FT<=7 for MAZ, it makes sense to separate them as two emmebanks, but if we are deciding to use FT<=7 for both TAZ and MAZ, then we might as well keep them in the same emmebank as before.

The code changes needed if we want to separate them out: #158.

Sounds like keeping them the same makes the most sense.

@i-am-sijia i-am-sijia linked a pull request Jul 11, 2024 that will close this issue
5 tasks
@i-am-sijia i-am-sijia changed the title 🚀 Feature: Reduce Fidelity of the Roadway Network 🚀 Feature: Reduce Fidelity of the Roadway Network - Phase I Jul 22, 2024
@i-am-sijia
Copy link
Collaborator

Results:

Run Description Assignment Iterations[EA,AM,MD,PM,NT] TAZ Assign and Skim Run Time (hours)
3 assignable, relative_gap=0.05 3,10,9,19,4 5
8 drop FT7, relative_gap=0.05 3,21,19,51,4 7
11 keep FT7, relative_gap=0.05 3,15,14,32,4 11.5
The key takeaways are as follows:

  • The assignable network drops links that are not used in an assignment. This is attractive as it leads to an attractive assignment, but unattractive in that it is likely hiding network errors and results in inconsistent network fidelity.
  • Dropping the FT7 links results in a fairly sparse network. Though it has many fewer links than the assignable network, it takes more iterations to find a solution due to congestion on the smaller (FT 6) roads (which use the steep Akcelik curves).
  • Removing the assignable and just using the FT7 links results in a much more detailed network. It requires fewer iterations to solve than the FT7 network, but each iteration takes much longer due to the detail in the network.

In sum, this avenue of exploration did not bear fruit. Additional, manual network coding would be required to find a simpler network that does not result in substantial congestion on lower facility roadways.

Update:

Run Description Assignment Iterations[EA,AM,MD,PM,NT] TAZ Assign and Skim Run Time (hours)
3 assignable, relative_gap=0.05 3,10,9,19,4 5
8 drop FT7, rebuild connectors to FT6, relative_gap=0.05 3,21,19,51,4 7
11 keep FT7, rebuild connectors to FT7, relative_gap=0.05 3,15,14,32,4 11.5
15 keep FT7, use connectors from the assignable network, relative_gap=0.05 3,11,9,17,3 5

When looking at the assigned volume and travel time skims from run 11, we realized that connecting centroid connectors to FT 7 caused high congestion on the local roads (that use the steep Akcelik curves) that made the assignment harder to find a solution.
image

We then conducted another assignment run 15 with FT7 network using the connectors from the assignable network. Run 15 ended up having 5 hours of total run time, close to run 3, even though it has more links than run 3.

You can find the comparison of assigned volume on network and the TAZ-level congested skims below. They confirm that after modifying the network fidelity, the result did not change much.

@gregerhardt
Copy link

Thank you. Can we get a couple of screenshots of the network and centroid connectors like you showed today? That was helpful.

@gregerhardt
Copy link

Also, can we please do one more test that keeps the same network as run 11, but replaces the volume delay functions at least on locals and collectors with a BPR curve instead of an Akcelik curve? If you have VDFs that you have used in the past and liked, I am open to recommendations. If you don't, a logical starting point is the SFCTA functions, which are pasted below (with some simplifications to just show the shape of the curve). As I look at these, 8.5 is a high exponent, so maybe the 5.5 or 3.5 is more reasonable...I don't have a sense of it.

 ; Centroid Connector
 FUNCTION TC[6]  = T0 +(LI.TOLLTIME)

 ; Freeway
 FUNCTION TC[2]  = T0*1.0*(1 + 0.83*(V/C)^5.5)

 ; Rural arterial
 FUNCTION TC[3]  = T0*1.0*(1 + 0.71*(V/C)^2.1)

 ; Interchanges & ramps
 FUNCTION TC[1]  = T0*1.3*(1 + 0.88*(V/C)^5.5)
 FUNCTION TC[5]  = T0*1.3*(1 + 0.88*(V/C)^5.5)
 FUNCTION TC[8]  = T0*1.3*(1 + 0.88*(V/C)^5.5)

 ; Major/minor arterials
 FUNCTION TC[7]  = T0*1.8*(1 + 0.60*(V/C)^3.5)
 FUNCTION TC[12] = T0*1.8*(1 + 0.60*(V/C)^3.5)
 FUNCTION TC[15] = T0*1.8*(1 + 0.60*(V/C)^3.5)

 ; Collector & local
 FUNCTION TC[4]  = T0*1.8*(1 + 0.60*(V/C)^8.5)
 FUNCTION TC[9]  = T0*1.8*(1 + 0.60*(V/C)^8.5)
 FUNCTION TC[11] = T0*1.8*(1 + 0.60*(V/C)^8.5)
 FUNCTION TC[14] = T0*1.8*(1 + 0.60*(V/C)^8.5)

Note: I could see the case for also replacing the VDFs on major/minor arterials to get rid of the Akcelik curves completely. I assume some thought has been put into calibrating the freeway curves that MTC is currently using, but it's reasonable to ask if an Akcelik still applies with a much more detailed network than we've used in the past. I don't feel a strong attachment either way, or necessarily have a sense of the implications, so maybe this is a separate conversation.

@i-am-sijia
Copy link
Collaborator

Thank you. Can we get a couple of screenshots of the network and centroid connectors like you showed today? That was helpful.

Sure, below are maps from the runs. They are color-coded by facility type, labeled with the assigned volumes.

Run 3 & Run 12: Assignable = 1 network. The starting point of task order 5
image

Run 11: FT 7 network, rebuild connectors to load onto more local roads
image

Run 15: FT 7 network with connectors from the Assignable network
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance improving runtimes or other resource usage
Development

Successfully merging a pull request may close this issue.

4 participants