Skip to content

Commit 064ba64

Browse files
authored
Merge pull request #16 from CMAP-REPOS:develop
Changes for sharing c24q4 standard data
2 parents 1f3c8b7 + 7de6215 commit 064ba64

File tree

7 files changed

+11
-10
lines changed

7 files changed

+11
-10
lines changed

Scripts/manage/env/emme-plus.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ channels:
55
- conda-forge
66
dependencies:
77
- jinja2
8-
- markdown=3.4 # markdown v3.5 dropped support for python v3.7
8+
- markdown
99
- myst-parser
1010
- pyarrow
11-
- python=3.7.6
11+
- python=3.11.6
1212
- pyyaml
13-
- sphinx=5.3
13+
- sphinx
1414
- sphinx_rtd_theme
1515
- tqdm

Scripts/manage/env/emme.pth

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# Copyright: (c) Bentley Systems, Incorporated. All rights reserved.
33
#
44

5-
import os, site; site.addsitedir(os.path.join(os.environ["EMMEPATH"], "Python37/Lib/site-packages"))
5+
import os, site; site.addsitedir(os.path.join(os.environ["EMMEPATH"], "Python311/Lib/site-packages"))

Scripts/share/standard_data/hand/data_user_guide_md.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ contain nodes and links for peak and off-peak. Itins_pk and itins_op are the
351351
transit route itineraries for peak and off-peak. Attribs_pk and attribs_op are
352352
segment variables for the transit itineraries for peak and off-peak. Within
353353
attribs_pk and attribs_op, @ltime is the current scheduled time on the link,
354-
@hwytm is the modeled period auto travel time on the same link, and @zfare is
354+
@hwytm is the modeled period auto travel time on the same link, and @zfare_link is
355355
an attribute describing points where extra fares are charged.
356356

357357
Transit Network Codes

Scripts/share/standard_data/src/standard_data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ def compress(zip_file_names, source_paths):
228228
mp_compress_args.append((file_name, source_paths[placeholder], _out_dir))
229229
# Compress model data for sharing.
230230
logging.info('Compressing outputs')
231-
with multiprocessing.Pool() as pool:
231+
with multiprocessing.Pool(processes=min(os.cpu_count(), 61)) as pool:
232232
# Display a progress bar while processing the tasks.
233233
for i in tqdm(iterable=pool.imap_unordered(func=sharing.mp_compress,
234234
iterable=mp_compress_args),

Scripts/tbmtools/results/person_trips.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from pathlib import Path
22
import multiprocessing
3+
import os
34
import pandas as pd
45

56
def export_matrix_from_roster(name, spec, outdir, roster, report):
@@ -146,7 +147,7 @@ def export_auto_matrices(projdir, outdir, trip_roster_path):
146147
args = []
147148
for name, spec in mtx_specs.items():
148149
args.append((name, spec, tripdir, roster, report))
149-
with multiprocessing.Pool() as pool:
150+
with multiprocessing.Pool(processes=min(os.cpu_count(), 61)) as pool:
150151
pool.starmap(export_matrix_from_roster, args)
151152
# Move HOV matrices to output directory.
152153
for p in sorted(tripdir.glob('*.csv')):

Scripts/tbmtools/results/sharing.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from pathlib import Path
2-
from zipfile import ZipFile, ZIP_LZMA
2+
from zipfile import ZipFile, ZIP_DEFLATED
33

44

55
def mp_compress(args):
@@ -33,7 +33,7 @@ def compress(out_file_name, source_path, out_dir):
3333
if isinstance(source_path, str):
3434
source_path = Path(source_path).resolve()
3535
# Compress content.
36-
with ZipFile(out_dir.joinpath(out_file_name), mode='w', compression=ZIP_LZMA) as zip:
36+
with ZipFile(out_dir.joinpath(out_file_name), mode='w', compression=ZIP_DEFLATED, compresslevel=9) as zip:
3737
if source_path.is_file():
3838
zip.write(source_path, arcname=source_path.name)
3939
elif source_path.is_dir():

Scripts/tbmtools/results/transit_network.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def export(outdir, scenario, format, modeller, emmebank, period=[0, 5]):
5858
scenario=s)
5959
# Write attribute transaction file.
6060
spec = {'type': 'NETWORK_CALCULATION',
61-
'expression': '@ltime + @hwytm + @zfare',
61+
'expression': '@ltime + @hwytm + @zfare_link',
6262
'selections': {'link': 'all',
6363
'transit_line': 'all'}}
6464
report = net_calc(specification=spec,

0 commit comments

Comments
 (0)