Skip to content

Commit 4255f03

Browse files
bstablertoliwagaBlake Rosenthal
authored andcommitted
Tncs (#14)
* add tncs * lognormal_for_df broadcasts duplicate indexes * lognormal_for_df broadcasts duplicate indexes code * correct lognormal calculations and add functions to calculation lognormal location and scale * clean-up tnc wait time expressions * set taxi, tnc wait time standard deviations to zero until we have better data * add scaled option to random.lognormal_for_df * add mobility-as-a-service modes to docs * updated tnc mode constants * rename maas to ridehail Co-authored-by: Jeff Doyle <[email protected]> Co-authored-by: Blake Rosenthal <[email protected]>
1 parent f3955ec commit 4255f03

23 files changed

+1065
-716
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
sandbox/
2-
example/data/*
32
.idea
43
.ipynb_checkpoints
54
.coverage*

.travis.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,15 @@ python:
55
- '3.7'
66
- '3.8'
77
install:
8-
- wget http://repo.continuum.io/miniconda/Miniconda-3.7.0-Linux-x86_64.sh -O miniconda.sh
8+
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
99
- bash miniconda.sh -b -p $HOME/miniconda
10-
- export PATH="$HOME/miniconda/bin:$PATH"
10+
- source "$HOME/miniconda/etc/profile.d/conda.sh"
1111
- hash -r
1212
- conda config --set always_yes yes --set changeps1 no
1313
- conda update -q conda
1414
- conda info -a
15-
- |
16-
conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION
17-
- source activate test-environment
15+
- conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION
16+
- conda activate test-environment
1817
- conda install pytest pytest-cov coveralls pycodestyle
1918
- pip install .
2019
- pip freeze
@@ -41,6 +40,8 @@ deploy:
4140

4241
notifications:
4342
slack:
43+
on_success: never # default: change
44+
on_failure: always # default: always
4445
secure: Dpp+zBrnPGBHXrYWjwHy/bnHvhINfepSIiViwKfBZizBvTDvzSJfu6gCH+/lQ3squF3D4qTWwxB+LQ9V6KTYhuma8vQVisyneI6ARjUI/qgX6aJjuvmDDGPk6DVeDow7+aCLZ8VEHRhSjwy+dv0Ij0rxI6I94xPVwXUkk7ZjcK0=
4546
env:
4647
global:

activitysim/abm/models/atwork_subtour_destination.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def atwork_subtour_destination_logsums(
123123
tour_purpose,
124124
logsum_settings, model_settings,
125125
skim_dict, skim_stack,
126-
chunk_size, trace_hh_id,
126+
chunk_size,
127127
trace_label)
128128

129129
destination_sample['mode_choice_logsum'] = logsums

activitysim/abm/models/joint_tour_destination.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ def joint_tour_destination_logsums(
224224
tour_purpose,
225225
logsum_settings, model_settings,
226226
skim_dict, skim_stack,
227-
chunk_size, trace_hh_id,
227+
chunk_size,
228228
trace_label=tracing.extend_trace_label(trace_label, tour_type))
229229

230230
logsums_list.append(logsums)

activitysim/abm/models/location_choice.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ def run_location_logsums(
224224
tour_purpose,
225225
logsum_settings, model_settings,
226226
skim_dict, skim_stack,
227-
chunk_size, trace_hh_id,
227+
chunk_size,
228228
trace_label)
229229

230230
# "add_column series should have an index matching the table to which it is being added"

activitysim/abm/models/trip_destination.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ def compute_logsums(
151151
tours_merged,
152152
model_settings,
153153
skims,
154-
chunk_size, trace_hh_id,
154+
chunk_size,
155155
trace_label):
156156
"""
157157
Calculate mode choice logsums using the same recipe as for trip_mode_choice, but do it twice
@@ -332,7 +332,7 @@ def choose_trip_destination(
332332
tours_merged=tours_merged,
333333
model_settings=model_settings,
334334
skims=skims,
335-
chunk_size=chunk_size, trace_hh_id=trace_hh_id,
335+
chunk_size=chunk_size,
336336
trace_label=trace_label)
337337

338338
t0 = print_elapsed_time("%s.compute_logsums" % trace_label, t0)

activitysim/abm/models/util/logsums.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def compute_logsums(choosers,
4949
tour_purpose,
5050
logsum_settings, model_settings,
5151
skim_dict, skim_stack,
52-
chunk_size, trace_hh_id, trace_label):
52+
chunk_size, trace_label):
5353
"""
5454
5555
Parameters

activitysim/abm/models/util/tour_destination.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def run_destination_logsums(
149149
tour_purpose,
150150
logsum_settings, model_settings,
151151
skim_dict, skim_stack,
152-
chunk_size, trace_hh_id,
152+
chunk_size,
153153
trace_label)
154154

155155
destination_sample['mode_choice_logsum'] = logsums

activitysim/abm/tables/table_dict.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
@inject.injectable()
2121
def rng_channels():
2222

23-
# bug
2423
return RANDOM_CHANNELS
2524

2625

activitysim/abm/test/test_pipeline.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ def get_trace_csv(file_name):
335335
return df
336336

337337

338-
EXPECT_TOUR_COUNT = 205
338+
EXPECT_TOUR_COUNT = 201
339339

340340

341341
def regress_tour_modes(tours_df):
@@ -372,19 +372,19 @@ def regress_tour_modes(tours_df):
372372
'othdiscr',
373373
'work',
374374
'work',
375-
'maint',
375+
'business',
376376
'work',
377-
'eatout',
378-
]
377+
'othmaint'
378+
]
379379

380380
EXPECT_MODES = [
381381
'SHARED3FREE',
382382
'WALK',
383-
'DRIVEALONEFREE',
384-
'WALK',
385-
'WALK',
383+
'SHARED3FREE',
386384
'WALK',
387-
]
385+
'WALK_LOC',
386+
'WALK'
387+
]
388388

389389
assert len(tours_df) == len(EXPECT_PERSON_IDS)
390390
assert (tours_df.person_id.values == EXPECT_PERSON_IDS).all()

0 commit comments

Comments
 (0)