Skip to content

Commit e7881dc

Browse files
committed
update README for release
- deprecate test_find_shortest_path_for_agents() in demo.py; - remove read_zones() and load_demand() from code snippet illustrating loading columns.
1 parent 14c79c9 commit e7881dc

File tree

3 files changed

+52
-48
lines changed

3 files changed

+52
-48
lines changed

README.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
# Path4GMNS
22
[![platform](https://img.shields.io/badge/platform-Windows%20%7C%20macOS%20%7C%20Linux-red)](https://img.shields.io/badge/platform-Windows%20%7C%20macOS%20%7C%20Linux-red)
3-
[![Downloads](https://pepy.tech/badge/path4gmns)](https://pepy.tech/project/path4gmns) [![GitHub release](https://img.shields.io/badge/release-v0.9.2-brightgreen)](https://img.shields.io/badge/release-v0.8.2-brightgreen) ![Read the Docs](https://img.shields.io/readthedocs/path4gmns)
3+
[![Downloads](https://pepy.tech/badge/path4gmns)](https://pepy.tech/project/path4gmns) [![GitHub release](https://img.shields.io/badge/release-v0.9.3-brightgreen)](https://img.shields.io/badge/release-v0.8.2-brightgreen) ![Read the Docs](https://img.shields.io/readthedocs/path4gmns)
44

55
Path4GMNS is an open-source, cross-platform, lightweight, and fast Python path engine for networks encoded in [GMNS](https://github.com/zephyr-data-specs/GMNS). Besides finding static shortest paths for simple analyses, its main functionality is to provide an efficient and flexible framework for column-based (path-based) modeling and applications in transportation (e.g., activity-based demand modeling). Path4GMNS supports, in short,
66

77
1. finding (static) shortest path between two nodes,
8-
2. constructing shortest paths for all individual agents,
9-
3. performing path-based User-Equilibrium (UE) traffic assignment,
10-
4. conducting dynamic traffic assignment (DTA) after UE.
11-
5. evaluating multimodal accessibility and equity,
12-
6. synthesizing zones and Origin-Destination (OD) demand for a given network.
8+
2. performing path-based User-Equilibrium (UE) traffic assignment,
9+
3. conducting dynamic traffic assignment (DTA) after UE.
10+
4. evaluating multimodal accessibility and equity,
11+
5. synthesizing zones and Origin-Destination (OD) demand for a given network.
1312

1413
Path4GMNS also serves as an API to the C++-based [DTALite](https://github.com/jdlph/DTALite) to conduct various multimodal traffic assignments including,
1514
* Link-based UE,
@@ -20,16 +19,16 @@ Path4GMNS also serves as an API to the C++-based [DTALite](https://github.com/jd
2019
![Architecture](/docs/source/imgs/architecture.png)
2120

2221
## Installation
23-
Path4GMNS has been published on [PyPI](https://pypi.org/project/path4gmns/0.9.2/), and can be installed using
22+
Path4GMNS has been published on [PyPI](https://pypi.org/project/path4gmns/0.9.3/), and can be installed using
2423
```
2524
$ pip install path4gmns
2625
```
27-
If you need a specific version of Path4GMNS, say, 0.9.2,
26+
If you need a specific version of Path4GMNS, say, 0.9.3,
2827
```
29-
$ pip install path4gmns==0.9.2
28+
$ pip install path4gmns==0.9.3
3029
```
3130

32-
v0.9.2 improves the performance with faster and better UE convergency along with bug fix on loading columns. Please **update to or install the latest version** and **discard all old versions**.
31+
v0.9.3 fixes the bug on handling link capacity reduction in traffic assignment and remove dependency on read_demand() for loading columns. Please **update to or install the latest version** and **discard all old versions**.
3332

3433
### Dependency
3534
The Python modules are written in **Python 3.x**, which is the minimum requirement to explore the most of Path4GMNS. Some of its functions require further run-time support, which we will go through along with the corresponding **[Use Cases](https://path4gmns.readthedocs.io/en/latest/)**.
@@ -91,6 +90,9 @@ DTALite uses arrays rather than STL containers to store columns. These arrays ar
9190
35. Fix the bug on updating the total system travel time (v0.9.2)
9291
36. Resolve the potential issue on traversing the last through node in path engine (v0.9.2)
9392
37. Fix the bug on loading columns where link path and node paths are not in the proper order (v0.9.2)
93+
38. FiX the bug on handling link capacity reduction in traffic assignment (v0.9.3)
94+
39. Remove dependency on demand.csv for loading columns (v0.9.3)
95+
40. Deprecate find_path_for_agents() (v0.9.3)
9496

9597
Detailed update information can be found in [Releases](https://github.com/jdlph/Path4GMNS/releases).
9698

@@ -104,7 +106,7 @@ You are encouraged to join our [Discord Channel](https://discord.gg/JGFMta7kxZ)
104106

105107
## How to Cite
106108

107-
Li, P. and Zhou, X. (2023, March 14). *Path4GMNS*. Retrieved from https://github.com/jdlph/Path4GMNS
109+
Li, P. and Zhou, X. (2023, April 8). *Path4GMNS*. Retrieved from https://github.com/jdlph/Path4GMNS
108110

109111
## References
110112
Lu, C. C., Mahmassani, H. S., Zhou, X. (2009). Equivalent gap function-based reformulation and solution algorithm for the dynamic user equilibrium problem. Transportation Research Part B: Methodological, 43, 345-364.

docs/source/usecases.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,6 @@ Starting from v0.7.0a1, Path4GMNS supports loading columns/paths from existing f
144144
import path4gmns as pg
145145

146146
network = pg.read_network()
147-
pg.read_zones(network)
148-
pg.load_demand(network)
149147
# you can specify the input directory
150148
# e.g., pg.load_columns(network, 'data/Chicago_Sketch')
151149
pg.load_columns(network)

tests/demo.py

Lines changed: 39 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -23,40 +23,44 @@ def test_find_shortest_path():
2323

2424

2525
def test_find_shortest_path_for_agents():
26-
network = pg.read_network(load_demand=True)
27-
28-
st = time()
29-
# find agent paths under a specific mode defined in settings.yaml,
30-
# say, a (i.e., auto)
31-
# network.find_path_for_agents('a') or network.find_path_for_agents('auto')
32-
network.find_path_for_agents()
33-
print('\nprocessing time of finding shortest paths for all agents: '
34-
f'{time()-st:.2f} s')
35-
36-
agent_id = 300
37-
print('\norigin node id of agent is '
38-
f'{network.get_agent_orig_node_id(agent_id)}')
39-
print('destination node id of agent is '
40-
f'{network.get_agent_dest_node_id(agent_id)}')
41-
print('shortest path (node id) of agent, '
42-
f'{network.get_agent_node_path(agent_id)}')
43-
print('shortest path (link id) of agent, '
44-
f'{network.get_agent_link_path(agent_id)}')
45-
46-
agent_id = 1000
47-
print('\norigin node id of agent is '
48-
f'{network.get_agent_orig_node_id(agent_id)}')
49-
print('destination node id of agent is '
50-
f'{network.get_agent_dest_node_id(agent_id)}')
51-
print('shortest path (node id) of agent, '
52-
f'{network.get_agent_node_path(agent_id)}')
53-
print('shortest path (link id) of agent, '
54-
f'{network.get_agent_link_path(agent_id)}')
55-
56-
# output unique agent paths to a csv file
57-
# if you do not want to include geometry info in the output file,
58-
# you can do pg.output_agent_paths(network, False)
59-
pg.output_agent_paths(network)
26+
""" DEPRECATED """
27+
28+
print("DEPRECATED")
29+
30+
# network = pg.read_network(load_demand=True)
31+
32+
# st = time()
33+
# # find agent paths under a specific mode defined in settings.yaml,
34+
# # say, a (i.e., auto)
35+
# # network.find_path_for_agents('a') or network.find_path_for_agents('auto')
36+
# network.find_path_for_agents()
37+
# print('\nprocessing time of finding shortest paths for all agents: '
38+
# f'{time()-st:.2f} s')
39+
40+
# agent_id = 300
41+
# print('\norigin node id of agent is '
42+
# f'{network.get_agent_orig_node_id(agent_id)}')
43+
# print('destination node id of agent is '
44+
# f'{network.get_agent_dest_node_id(agent_id)}')
45+
# print('shortest path (node id) of agent, '
46+
# f'{network.get_agent_node_path(agent_id)}')
47+
# print('shortest path (link id) of agent, '
48+
# f'{network.get_agent_link_path(agent_id)}')
49+
50+
# agent_id = 1000
51+
# print('\norigin node id of agent is '
52+
# f'{network.get_agent_orig_node_id(agent_id)}')
53+
# print('destination node id of agent is '
54+
# f'{network.get_agent_dest_node_id(agent_id)}')
55+
# print('shortest path (node id) of agent, '
56+
# f'{network.get_agent_node_path(agent_id)}')
57+
# print('shortest path (link id) of agent, '
58+
# f'{network.get_agent_link_path(agent_id)}')
59+
60+
# # output unique agent paths to a csv file
61+
# # if you do not want to include geometry info in the output file,
62+
# # you can do pg.output_agent_paths(network, False)
63+
# pg.output_agent_paths(network)
6064

6165

6266
def test_column_generation_py():
@@ -281,4 +285,4 @@ def demo_mode(mode):
281285

282286
if __name__=="__main__":
283287

284-
demo_mode(5)
288+
demo_mode(3)

0 commit comments

Comments
 (0)