Skip to content

Commit 9dd2ca3

Browse files
committed
update docstring for evaluate_equity()
1 parent 528b6ed commit 9dd2ca3

File tree

2 files changed

+65
-3
lines changed

2 files changed

+65
-3
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ If you need a specific version of Path4GMNS, say, 0.8.3,
2525
$ pip install path4gmns==0.8.3
2626
```
2727

28-
v0.8.3 comes with accessibility evaluation enhancement and equity evaluation. All previous releases shall be **deprecated**.
28+
v0.8.3 comes with equity evaluation and enhancement in accessibility evaluation. All previous releases shall be **deprecated**.
2929

3030
### Dependency
3131
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 in the following section.
@@ -475,7 +475,7 @@ You are encouraged to join our Slack workspace for more discussions and collabor
475475

476476
## How to Cite
477477

478-
Li, P. and Zhou, X. (2022, July 11). *Path4GMNS*. Retrieved from https://github.com/jdlph/Path4GMNS
478+
Li, P. and Zhou, X. (2022, July 12). *Path4GMNS*. Retrieved from https://github.com/jdlph/Path4GMNS
479479

480480
## References
481481
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.

path4gmns/accessibility.py

Lines changed: 63 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,69 @@ def evaluate_accessibility(ui,
259259

260260
def evaluate_equity(ui, multimodal=True, mode='p', time_dependent=False,
261261
demand_period_id=0, time_budget=60, output_dir='.'):
262-
""" evaluate equity for each zone under a time budget """
262+
""" evaluate equity for each zone under a time budget
263+
264+
Parameters
265+
----------
266+
ui
267+
network object generated by pg.read_network()
268+
269+
multimodal
270+
True or False. Its default value is True. It will only affect the
271+
output to accessibility_aggregated.csv.
272+
273+
If True, the accessibility evaluation will be conducted
274+
for all the modes defined in settings.yml. The number of accessible
275+
zones from each zone under each defined mode given a budget time (up
276+
to 240 minutes) will be outputted to accessibility_aggregated.csv.
277+
278+
If False, the accessibility evaluation will be only conducted against the
279+
target mode. The number of accessible zones from each zone under the
280+
target mode given a budget time (up to 240 minutes) will be outputted
281+
to accessibility_aggregated.csv.
282+
283+
mode
284+
target mode with its default value as 'p' (i.e., mode auto). It can be
285+
either agent type or its name. For example, 'w' and 'walk' are
286+
equivalent inputs.
287+
288+
time_dependent
289+
True or False. Its default value is False.
290+
291+
If True, the accessibility will be evaluated using the period link
292+
free-flow travel time (i.e., VDF_fftt). In other words, the
293+
accessibility is time-dependent.
294+
295+
If False, the accessibility will be evaluated using the link length and
296+
the free flow travel speed of each mode.
297+
298+
demand_period_id
299+
The sequence number of demand period listed in demand_periods in
300+
settings.yml. demand_period_id of the first demand_period is 0.
301+
302+
Use it with time_dependent when there are multiple demand periods. Its
303+
default value is 0.
304+
305+
time_budget
306+
the amount of time to travel in minutes
307+
308+
output_dir
309+
The directory path where accessibility_aggregated.csv and
310+
accessibility.csv are output. The default is the current working
311+
directory (CDW).
312+
313+
314+
Outputs
315+
-------
316+
equity_str.csv
317+
equity statistics including minimum accessibility (and the corresponding
318+
zone), maximum accessibility (and the corresponding zone), and mean
319+
accessibility for each bin_index. The accessible zones will be output
320+
as well.
321+
322+
str in the file name refers to the time budget, e.g., it will be
323+
equity_60min.csv if the time budget is 60 min.
324+
"""
263325
with open(output_dir+'/equity_'+str(time_budget)+'min.csv', 'w', newline='') as f:
264326
headers = ['bin_index', 'mode', 'zones',
265327
'min_accessibility', 'zone_id',

0 commit comments

Comments
 (0)