Skip to content

Commit 8dcdbef

Browse files
committed
add MAX_TIME_BUDGET to accessibility evaluation
- to avoid potential extremely long row/calulation - remove walk from settings.yml in Lima_Network
1 parent b33b941 commit 8dcdbef

File tree

4 files changed

+9
-11
lines changed

4 files changed

+9
-11
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Path4GMNS
22

3-
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 the static and time-dependent shortest path for simple analyses, its main functionality is to provide an efficient and flexible framework for column(path)-based modeling and applications in transportations (e.g., activity-based demand modeling). Path4GMNS supports, in short,
3+
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 the static and time-dependent shortest path for simple analyses, its main functionality is to provide an efficient and flexible framework for column(path)-based modeling and applications in transportation (e.g., activity-based demand modeling). Path4GMNS supports, in short,
44

55
1. finding (static) shortest path between two nodes;
66
2. constructing shortest paths for all individual agents;
@@ -128,7 +128,7 @@ import path4gmns as pg
128128

129129
network = pg.read_network()
130130
# you can specify the input directory
131-
# like pg.load_columns(nework, 'data/Chicago_Sketch')
131+
# like pg.load_columns(network, 'data/Chicago_Sketch')
132132
pg.load_columns(network)
133133

134134
# path-based UE
@@ -174,7 +174,7 @@ pg.perform_network_assignment_DTALite(1, assignment_num, column_update_num)
174174
print('\npath finding results can be found in agent.csv')
175175
```
176176

177-
The OpenMP Run-Time Library must be installed to utilize the built-in parallel computing feature in DTALite (and DTALite would not be able to run if the run-time support is absent). Installation of the OpenMP run-time library varies by operating systems.
177+
The OpenMP run-time library must be installed to utilize the built-in parallel computing feature in DTALite (and DTALite would not be able to run if the run-time support is absent). Its installation varies by operating systems.
178178

179179
***Windows Users***
180180

data/Lima_Network/settings.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,7 @@ agents:
77
flow_type: 0
88
pce: 1
99
free_speed: 60
10-
- type: w
11-
name: walk
12-
vot: 10
13-
flow_type: 0
14-
pce: 1
15-
free_speed: 10
16-
10+
1711
demand_periods:
1812
- period: AM
1913
time_period: 0700_0800

path4gmns/accessibility.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
from .classes import Assignment
55
from .colgen import _assignment
6-
from .consts import MIN_TIME_BUDGET, BUDGET_TIME_INTVL
6+
from .consts import MAX_TIME_BUDGET, MIN_TIME_BUDGET, BUDGET_TIME_INTVL
77

88

99
__all__ = ['evaluate_accessiblity']
@@ -204,6 +204,9 @@ def evaluate_accessiblity(ui, multimodal=True, output_dir='.'):
204204
_assignment(A.get_spnetworks(), column_pool, 0)
205205
# update minimum travel time between O and D for each agent type
206206
max_min = _update_min_travel_time(column_pool)
207+
if max_min > MAX_TIME_BUDGET:
208+
# manual cutoff to avoid potential long computation time
209+
max_min = MAX_TIME_BUDGET
207210
interval_num = _get_interval_id(max_min) + 1
208211

209212
multitheading = True

path4gmns/consts.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
MIN_OD_VOL = 0.000001
66
# for accessibility evaluation
77
MIN_TIME_BUDGET = 10
8+
MAX_TIME_BUDGET = 240
89
BUDGET_TIME_INTVL = 5
910
# reserved for simulation
1011
NUM_OF_SECS_PER_SIMU_INTERVAL = 6

0 commit comments

Comments
 (0)