Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚀 [feat] vehicle type model #486

Merged
merged 44 commits into from
Jun 6, 2022
Merged

Conversation

mxndrwgrdnr
Copy link
Contributor

@mxndrwgrdnr mxndrwgrdnr commented Sep 21, 2021

User Story

As a planner, I would like to understand the effects of vehicle type choice on travel behavior in order to support more detailed emissions analysis and more refined travel costs.

Requirements

Per https://github.com/ActivitySim/activitysim/wiki/Phase-6b-Scope-of-Work#task-2-vehicle-type-model

After applying this submodel, household vehicles should have the following properties:

  • vehicle type (e.g. auto, light-truck, etc)
  • capacity (# of people it can carry)
  • power train (ICE, hybrid, phev, etc)
  • range
  • age

In addition, each auto tour should be assigned the most likely household vehicles based on:

  • household
  • tour-characteristics
  • household vehicle attributes

*Note: For this task, vehicle allocation to auto tours should not consider the availability of each individual vehicles. *

The implementation should have the following usability features:

  • ability to read an input vehicle table, as opposed to create one during a model run, an initialize_vehicles submodel will be added that can read a vehicle table from CSV file, annotate it with custom expressions, ensure table keys are consistent with household IDs, and add it to the pipeline.
  • detailed technical documentation of all vehicle type and allocation models or methods.
  • updated users guide
  • tests covering the new methods
  • examples covering new methods

Approach

Model Estimation

  • estimate vehicle type model based on 5,000 household Bay Area TNC survey data
  • run the submodel with the existing example model
  • reasonably verify goodness-of-fit across key dimensions such as:
    • socio-demographics and
    • geography

Implementation

  • integrate method into the ActivitySim run stream.
  • develop method for allocating household-generated VMT to household vehicles
  • sensitivity tests

Issues

Fixes #438

@mxndrwgrdnr mxndrwgrdnr marked this pull request as draft September 21, 2021 05:24
@bstabler
Copy link
Contributor

#438

@coveralls
Copy link

coveralls commented Sep 21, 2021

Coverage Status

Coverage decreased (-0.5%) to 53.603% when pulling d556239 on mxndrwgrdnr:vehicle into 91930b5 on ActivitySim:develop.

@bstabler
Copy link
Contributor

bstabler commented Nov 8, 2021

@mxndrwgrdnr - can you adjust this PR to merge to develop? Thanks.

@mxndrwgrdnr mxndrwgrdnr changed the base branch from master to develop November 9, 2021 00:05
@mxndrwgrdnr mxndrwgrdnr marked this pull request as ready for review November 12, 2021 22:52
@e-lo e-lo added the Feature New feature or request label Dec 7, 2021
@e-lo e-lo changed the title vehicle type model 🚀 [feat] vehicle type model Dec 7, 2021
@e-lo e-lo linked an issue Dec 7, 2021 that may be closed by this pull request
Copy link
Collaborator

@e-lo e-lo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally I found the code easy to read and it flowed well. There is a general lack of documentation including:

  • docstrings appropriately formatted for autodoc-ing
  • typehints
  • origin of model coefficients, what estimation are they from, etc
  • general documentation about capabilities
  • intra-activity sim links to documentation about general activitysim "things" (i.e. various formats, etc)

There is also a lack of tests for the specific unit of the vehicle type choice.

I also found it odd when running the MTC test example locally, that it didn't pick up the config? I suspect I'm doing something wrong but if I'm doing it wrong others might too (maybe?)

activitysim/abm/models/vehicle_type_choice.py Show resolved Hide resolved
activitysim/abm/models/vehicle_type_choice.py Outdated Show resolved Hide resolved
activitysim/abm/models/vehicle_type_choice.py Outdated Show resolved Hide resolved
activitysim/abm/models/vehicle_type_choice.py Outdated Show resolved Hide resolved
activitysim/abm/models/vehicle_type_choice.py Outdated Show resolved Hide resolved
activitysim/abm/tables/vehicles.py Show resolved Hide resolved
activitysim/abm/tables/vehicles.py Show resolved Hide resolved
activitysim/abm/tables/vehicles.py Show resolved Hide resolved
activitysim/examples/example_mtc/configs/free_parking.csv Outdated Show resolved Hide resolved
activitysim/examples/example_mtc/configs/settings.yaml Outdated Show resolved Hide resolved
@e-lo
Copy link
Collaborator

e-lo commented Dec 8, 2021

BTW I'll probably have more questions once I get the MTC example working on my local machine - i.e. is it annotating tours etc.

@jpn-- jpn-- requested a review from i-am-sijia May 5, 2022 13:53
activitysim/abm/models/vehicle_type_choice.py Outdated Show resolved Hide resolved
activitysim/abm/models/vehicle_type_choice.py Outdated Show resolved Hide resolved
activitysim/abm/models/vehicle_type_choice.py Outdated Show resolved Hide resolved
Car_8,.9541,0.0096,0.0355,0.0007,0.0000
Car_9,.9548,0.0037,0.0409,0.0004,0.0001
Car_10,0.9530,0.0015,0.0451,0.0003,0.0001
Car_11,0.9676,0.0096,0.0225,0.0003,0.0000
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems as though some amount of "smoothing" would make sense here between the years. Many of the numbers for the lower-probability options go back and forth between 0 and >0 several times.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, these probabilities are "lumpy". This is due to the fact that they came directly from the National Household Travel Survey data. A comment about the "lumpy-ness" was added to the models.rst vehicle type choice documentation encouraging the user to change the probabilities to their region and smooth them as they see fit. Additional links in the documentation point to the presented results and sensitivity studies.

So, I suggest we leave the probabilities as is in the context of this pull request for the purpose of simplicity and transparency.

config.config_file_path(vehicle_type_data_file), comment='#')
fleet_year = model_settings.get('FLEET_YEAR')

vehicle_type_data['age'] = (1 + fleet_year - vehicle_type_data['vehicle_year']).astype(str)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems to make sense that we would be able to imply a variation in fuel type based on vehicle age. However, in this case age isn't necessarily relative. A 10 year old car in a 2030 scenario should be equal to a 2 year old car in 2022.

I'm trying to figure out how this is accommodated within the probabilities but can't seem to find anywhere that this is done?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this wasn't done very consistently... I changed the probabilities file to include this same calculation -- the probabilities file now includes body_type and vehicle_year columns just like the vehicle_type_data.csv file and age is explicitly calculated based on the user input fleet_year.

activitysim/abm/models/vehicle_allocation.py Outdated Show resolved Hide resolved
activitysim/abm/models/vehicle_type_choice.py Outdated Show resolved Hide resolved
activitysim/abm/models/vehicle_type_choice.py Outdated Show resolved Hide resolved
logger = logging.getLogger(__name__)


def get_combinatorial_vehicle_alternatives(alts_cats_dict, model_settings):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest adding a unit test for this function.

Copy link
Contributor

@dhensle dhensle May 24, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done. See the abm/test/test_misc/test_vehicle_type_alternatives.py script. Also cleaned up the function to remove model settings and make it better for a stand-alone unit test.

choosers=choosers,
alternatives=alts_wide,
spec=model_spec,
log_alt_losers=log_alt_losers,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something to consider more holistically in activitysim: most of these function calls seem to require 5-10 parameters.

Many best practices call for <= 3.

All the parameters which relate to run settings (e.g. chunk size, trace label, trace choice name) and not "substance" (e.g. alternatives, estimator, chooser) get in the way of legibility of what is happening.

Don't get me wrong - I love being explicit about things - but I would consider bundling some of these things in a config class that gets passed around or something similar.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is something we have been actively discussing as a consortium. I think making changes to this affect is outside the scope of this pull request though.

vehicles['vehicle_id'] = vehicles.household_id * 10 + vehicles.vehicle_num
vehicles.set_index('vehicle_id', inplace = True)

# I do not understand why this line is necessary, it seems circular
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should figure this out before merging

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the purpose of this line is to replace the "table" function with the dataframe. Added comment to reflect this just like in persons and households. This is just a consequence of how the inject table decorator and add_table functions were constructed.

@e-lo
Copy link
Collaborator

e-lo commented May 13, 2022

I'm getting a numpy comparison error when running test_mtc_extended.py (note that test_mtc.py seems to run just find)

Erroring at:

File "/Users/elizabeth/Documents/Websites/activitysim/activitysim/core/assign.py", line 286, in assign_variables
    expr_values = to_series(eval(expression, globals_dict, _locals_dict))
  File "<string>", line 1, in <module>
FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison

Numpy version: v1.21

Note I scanned the code where it seems like somebody was trying to get this to just warn not error - but it doesn't seem to be working as run for some reason. I haven't troubleshot too much yet - thought I'd post in case it is a known issue.

Full Trace

--------------------------------------------------------------- Captured stdout call ----------------------------------------------------------------
Configured logging using basicConfig
INFO:activitysim:Configured logging using basicConfig
INFO - Read logging configuration from: /Users/elizabeth/Documents/Websites/activitysim/activitysim/examples/example_mtc/configs/logging.yaml
INFO - SETTING configs_dir: ['/Users/elizabeth/Documents/Websites/activitysim/activitysim/examples/example_mtc_extended/test/configs', '/Users/elizabeth/Documents/Websites/activitysim/activitysim/examples/example_mtc_extended/configs', '/Users/elizabeth/Documents/Websites/activitysim/activitysim/examples/example_mtc/configs']
INFO - SETTING settings_file_name: settings.yaml
INFO - SETTING data_dir: ['/Users/elizabeth/Documents/Websites/activitysim/activitysim/examples/example_mtc/data']
INFO - SETTING output_dir: /Users/elizabeth/Documents/Websites/activitysim/activitysim/examples/example_mtc_extended/test/output
INFO - SETTING households_sample_size: 10
INFO - SETTING chunk_size: 0
INFO - SETTING chunk_method: hybrid_uss
INFO - SETTING chunk_training_mode: disabled
INFO - SETTING multiprocess: None
INFO - SETTING num_processes: None
INFO - SETTING resume_after: None
INFO - SETTING trace_hh_id: None
INFO - ENV MKL_NUM_THREADS: None
INFO - ENV OMP_NUM_THREADS: None
INFO - ENV OPENBLAS_NUM_THREADS: None
INFO - NUMPY blas_info libraries: ['cblas', 'blas', 'cblas', 'blas']
INFO - NUMPY blas_opt_info libraries: ['cblas', 'blas', 'cblas', 'blas']
INFO - NUMPY lapack_info libraries: ['lapack', 'blas', 'lapack', 'blas']
INFO - NUMPY lapack_opt_info libraries: ['lapack', 'blas', 'lapack', 'blas', 'cblas', 'blas', 'cblas', 'blas']
INFO - run single process simulation
INFO - Time to execute open_pipeline : 0.062 seconds (0.0 minutes)
INFO - preload_injectables
INFO - Time to execute preload_injectables : 0.014 seconds (0.0 minutes)
INFO - #run_model running step initialize_landuse
Running step 'initialize_landuse'
INFO - Reading CSV file /Users/elizabeth/Documents/Websites/activitysim/activitysim/examples/example_mtc/data/land_use.csv
INFO - loaded land_use (25, 24)
INFO - initialize_landuse.annotate_tables - annotating land_use SPEC annotate_landuse
INFO - Network_LOS using skim_dict_factory: NumpyArraySkimFactory
INFO - allocate_skim_buffer shared False taz shape (826, 25, 25) total size: 2_065_000 (2.1 MB)
INFO - _read_skims_from_omx /Users/elizabeth/Documents/Websites/activitysim/activitysim/examples/example_mtc/data/skims.omx
INFO - _read_skims_from_omx loaded 826 skims from /Users/elizabeth/Documents/Websites/activitysim/activitysim/examples/example_mtc/data/skims.omx
INFO - writing skim cache taz (826, 25, 25) to /Users/elizabeth/Documents/Websites/activitysim/activitysim/examples/example_mtc_extended/test/output/cache/cached_taz.mmap
INFO - load_skims_to_buffer taz shape (826, 25, 25)
INFO - get_skim_data taz SkimData shape (826, 25, 25)
INFO - SkimDict init taz
INFO - SkimDict.build_3d_skim_block_offset_table registered 167 3d keys
Time to execute step 'initialize_landuse': 1.82 s
Total time to execute iteration 1 with iteration value None: 1.82 s
INFO - #run_model running step initialize_households
Running step 'initialize_households'
INFO - Reading CSV file /Users/elizabeth/Documents/Websites/activitysim/activitysim/examples/example_mtc/data/households.csv
INFO - full household list contains 5000 households
INFO - sampling 10 of 5000 households
INFO - loaded households (10, 7)
INFO - Reading CSV file /Users/elizabeth/Documents/Websites/activitysim/activitysim/examples/example_mtc/data/persons.csv
INFO - loaded persons (28, 7)
INFO - initialize_households.annotate_tables - annotating persons SPEC annotate_persons
INFO - initialize_households.annotate_tables - annotating households SPEC annotate_households
INFO - initialize_households.annotate_tables - annotating persons SPEC annotate_persons_after_hh
Time to execute step 'initialize_households': 0.37 s
Total time to execute iteration 1 with iteration value None: 0.37 s
INFO - #run_model running step compute_accessibility
Running step 'compute_accessibility'
INFO - Running compute_accessibility with 25 orig zones 25 dest zones
INFO - compute_accessibility Running adaptive_chunked_choosers with 25 choosers
INFO - Running chunk 1 of 1 with 25 of 25 choosers
INFO - Running compute_accessibility with 25 orig zones 25 dest zones
INFO - compute_accessibility computed accessibilities (25, 10)
Time to execute step 'compute_accessibility': 0.06 s
Total time to execute iteration 1 with iteration value None: 0.06 s
INFO - #run_model running step school_location
Running step 'school_location'
INFO - Running school_location.i1.sample.university with 4 persons
INFO - school_location.i1.sample.university.interaction_sample Running adaptive_chunked_choosers with 4 choosers
INFO - Running chunk 1 of 1 with 4 of 4 choosers
INFO - Running eval_interaction_utilities on 24 rows
INFO - Running school_location.i1.logsums.university with 11 rows
ERROR - assign_variables - FutureWarning (elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison) evaluating: np.where(sov_auto_op_cost.isna() | (sov_veh_option == 'non_hh_veh'), costPerMile, sov_auto_op_cost)
numpy.core._exceptions._UFuncInputCastingError: Cannot cast ufunc 'equal' input 1 from dtype('<U10') to dtype('float64') with casting rule 'same_kind'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/elizabeth/Documents/Websites/activitysim/activitysim/core/assign.py", line 286, in assign_variables
    expr_values = to_series(eval(expression, globals_dict, _locals_dict))
  File "<string>", line 1, in <module>
FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
INFO - Time to execute all models until this error : 2.814 seconds (0.0 minutes)
ERROR - activitysim run encountered an unrecoverable error
numpy.core._exceptions._UFuncInputCastingError: Cannot cast ufunc 'equal' input 1 from dtype('<U10') to dtype('float64') with casting rule 'same_kind'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/elizabeth/Documents/Websites/activitysim/activitysim/cli/run.py", line 260, in run
    pipeline.run(models=config.setting('models'), resume_after=resume_after)
  File "/Users/elizabeth/Documents/Websites/activitysim/activitysim/core/pipeline.py", line 617, in run
    run_model(model)
  File "/Users/elizabeth/Documents/Websites/activitysim/activitysim/core/pipeline.py", line 476, in run_model
    orca.run([step_name])
  File "/Users/elizabeth/opt/miniconda3/envs/asim/lib/python3.9/site-packages/orca/orca.py", line 2168, in run
    step()
  File "/Users/elizabeth/opt/miniconda3/envs/asim/lib/python3.9/site-packages/orca/orca.py", line 973, in __call__
    return self._func(**kwargs)
  File "/Users/elizabeth/Documents/Websites/activitysim/activitysim/abm/models/location_choice.py", line 920, in school_location
    iterate_location_choice(
  File "/Users/elizabeth/Documents/Websites/activitysim/activitysim/abm/models/location_choice.py", line 774, in iterate_location_choice
    choices_df, save_sample_df = run_location_choice(
  File "/Users/elizabeth/Documents/Websites/activitysim/activitysim/abm/models/location_choice.py", line 619, in run_location_choice
    run_location_logsums(
  File "/Users/elizabeth/Documents/Websites/activitysim/activitysim/abm/models/location_choice.py", line 438, in run_location_logsums
    logsums = logsum.compute_logsums(
  File "/Users/elizabeth/Documents/Websites/activitysim/activitysim/abm/models/util/logsums.py", line 142, in compute_logsums
    expressions.assign_columns(
  File "/Users/elizabeth/Documents/Websites/activitysim/activitysim/core/expressions.py", line 124, in assign_columns
    results = compute_columns(df, model_settings, locals_dict, trace_label)
  File "/Users/elizabeth/Documents/Websites/activitysim/activitysim/core/expressions.py", line 95, in compute_columns
    = assign.assign_variables(expressions_spec,
  File "/Users/elizabeth/Documents/Websites/activitysim/activitysim/core/assign.py", line 298, in assign_variables
    raise err
  File "/Users/elizabeth/Documents/Websites/activitysim/activitysim/core/assign.py", line 286, in assign_variables
    expr_values = to_series(eval(expression, globals_dict, _locals_dict))
  File "<string>", line 1, in <module>
FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
--------------------------------------------------------------- Captured stderr call ----------------------------------------------------------------
numpy.core._exceptions._UFuncInputCastingError: Cannot cast ufunc 'equal' input 1 from dtype('<U10') to dtype('float64') with casting rule 'same_kind'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/elizabeth/Documents/Websites/activitysim/activitysim/examples/example_mtc_extended/test/simulation.py", line 15, in <module>
    sys.exit(run(args))
  File "/Users/elizabeth/Documents/Websites/activitysim/activitysim/cli/run.py", line 260, in run
    pipeline.run(models=config.setting('models'), resume_after=resume_after)
  File "/Users/elizabeth/Documents/Websites/activitysim/activitysim/core/pipeline.py", line 617, in run
    run_model(model)
  File "/Users/elizabeth/Documents/Websites/activitysim/activitysim/core/pipeline.py", line 476, in run_model
    orca.run([step_name])
  File "/Users/elizabeth/opt/miniconda3/envs/asim/lib/python3.9/site-packages/orca/orca.py", line 2168, in run
    step()
  File "/Users/elizabeth/opt/miniconda3/envs/asim/lib/python3.9/site-packages/orca/orca.py", line 973, in __call__
    return self._func(**kwargs)
  File "/Users/elizabeth/Documents/Websites/activitysim/activitysim/abm/models/location_choice.py", line 920, in school_location
    iterate_location_choice(
  File "/Users/elizabeth/Documents/Websites/activitysim/activitysim/abm/models/location_choice.py", line 774, in iterate_location_choice
    choices_df, save_sample_df = run_location_choice(
  File "/Users/elizabeth/Documents/Websites/activitysim/activitysim/abm/models/location_choice.py", line 619, in run_location_choice
    run_location_logsums(
  File "/Users/elizabeth/Documents/Websites/activitysim/activitysim/abm/models/location_choice.py", line 438, in run_location_logsums
    logsums = logsum.compute_logsums(
  File "/Users/elizabeth/Documents/Websites/activitysim/activitysim/abm/models/util/logsums.py", line 142, in compute_logsums
    expressions.assign_columns(
  File "/Users/elizabeth/Documents/Websites/activitysim/activitysim/core/expressions.py", line 124, in assign_columns
    results = compute_columns(df, model_settings, locals_dict, trace_label)
  File "/Users/elizabeth/Documents/Websites/activitysim/activitysim/core/expressions.py", line 95, in compute_columns
    = assign.assign_variables(expressions_spec,
  File "/Users/elizabeth/Documents/Websites/activitysim/activitysim/core/assign.py", line 298, in assign_variables
    raise err
  File "/Users/elizabeth/Documents/Websites/activitysim/activitysim/core/assign.py", line 286, in assign_variables
    expr_values = to_series(eval(expression, globals_dict, _locals_dict))
  File "<string>", line 1, in <module>
FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison

Conda List

# packages in environment at /Users/elizabeth/opt/miniconda3/envs/asim:
#
# Name                    Version                   Build  Channel
abseil-cpp                20210324.2           he49afe7_0    conda-forge
activitysim               1.0.3                     dev_0    <develop>
appnope                   0.1.3              pyhd8ed1ab_0    conda-forge
argon2-cffi               21.3.0             pyhd8ed1ab_0    conda-forge
argon2-cffi-bindings      21.2.0           py39h63b48b0_2    conda-forge
arrow-cpp                 8.0.0           py39hfe23411_0_cpu    conda-forge
asttokens                 2.0.5              pyhd8ed1ab_0    conda-forge
attrs                     21.4.0             pyhd8ed1ab_0    conda-forge
aws-c-cal                 0.5.11               hd2e2f4b_0    conda-forge
aws-c-common              0.6.2                h0d85af4_0    conda-forge
aws-c-event-stream        0.2.7               hb9330a7_13    conda-forge
aws-c-io                  0.10.5               h35aa462_0    conda-forge
aws-checksums             0.1.11               h0010a65_7    conda-forge
aws-sdk-cpp               1.8.186              h766a74d_3    conda-forge
backcall                  0.2.0              pyh9f0ad1d_0    conda-forge
backports                 1.0                        py_2    conda-forge
backports.functools_lru_cache 1.6.4              pyhd8ed1ab_0    conda-forge
beautifulsoup4            4.11.1             pyha770c72_0    conda-forge
bleach                    5.0.0              pyhd8ed1ab_0    conda-forge
blosc                     1.21.1               h97e831e_2    conda-forge
boost-cpp                 1.74.0               hdbf7018_7    conda-forge
branca                    0.5.0              pyhd8ed1ab_0    conda-forge
brotli                    1.0.9                h5eb16cf_7    conda-forge
brotli-bin                1.0.9                h5eb16cf_7    conda-forge
brotlipy                  0.7.0           py39h63b48b0_1004    conda-forge
bump2version              1.0.1              pyh9f0ad1d_0    conda-forge
bzip2                     1.0.8                h0d85af4_4    conda-forge
c-ares                    1.18.1               h0d85af4_0    conda-forge
ca-certificates           2021.10.8            h033912b_0    conda-forge
cairo                     1.16.0            h9e0e54b_1010    conda-forge
certifi                   2021.10.8        py39h6e9494a_2    conda-forge
cffi                      1.15.0           py39he338e87_0    conda-forge
cfitsio                   4.1.0                h2c97ad1_0    conda-forge
charset-normalizer        2.0.12             pyhd8ed1ab_0    conda-forge
click                     8.1.3            py39h6e9494a_0    conda-forge
click-plugins             1.1.1                      py_0    conda-forge
cligj                     0.7.2              pyhd8ed1ab_1    conda-forge
coverage                  6.3.2            py39h63b48b0_2    conda-forge
coveralls                 3.3.1              pyhd8ed1ab_0    conda-forge
cryptography              36.0.2           py39h1644bb1_1    conda-forge
curl                      7.83.1               h372c54d_0    conda-forge
cycler                    0.11.0             pyhd8ed1ab_0    conda-forge
cytoolz                   0.11.2           py39h63b48b0_2    conda-forge
dbus                      1.13.6               h811a1a6_3    conda-forge
debugpy                   1.6.0            py39hfd1d529_0    conda-forge
decorator                 5.1.1              pyhd8ed1ab_0    conda-forge
defusedxml                0.7.1              pyhd8ed1ab_0    conda-forge
descartes                 1.1.0                      py_4    conda-forge
docopt                    0.6.2                      py_1    conda-forge
entrypoints               0.4                pyhd8ed1ab_0    conda-forge
executing                 0.8.3              pyhd8ed1ab_0    conda-forge
expat                     2.4.8                h96cf925_0    conda-forge
fiona                     1.8.21           py39h6d65ddd_1    conda-forge
flask                     2.1.2              pyhd8ed1ab_1    conda-forge
flit-core                 3.7.1              pyhd8ed1ab_0    conda-forge
folium                    0.12.1.post1       pyhd8ed1ab_1    conda-forge
font-ttf-dejavu-sans-mono 2.37                 hab24e00_0    conda-forge
font-ttf-inconsolata      3.000                h77eed37_0    conda-forge
font-ttf-source-code-pro  2.038                h77eed37_0    conda-forge
font-ttf-ubuntu           0.83                 hab24e00_0    conda-forge
fontconfig                2.14.0               h676cef8_0    conda-forge
fonts-conda-ecosystem     1                             0    conda-forge
fonts-conda-forge         1                             0    conda-forge
fonttools                 4.33.3           py39h701faf5_0    conda-forge
freetype                  2.10.4               h4cff582_1    conda-forge
freexl                    1.0.6                h0d85af4_0    conda-forge
gdal                      3.4.2            py39h97b4846_7    conda-forge
geopandas                 0.10.2             pyhd8ed1ab_1    conda-forge
geopandas-base            0.10.2             pyha770c72_1    conda-forge
geos                      3.10.2               he49afe7_0    conda-forge
geotiff                   1.7.1                had63758_1    conda-forge
gettext                   0.19.8.1          hd1a6beb_1008    conda-forge
gflags                    2.2.2             hb1e8313_1004    conda-forge
gh                        2.10.1               h990441c_0    conda-forge
giflib                    5.2.1                hbcb3906_2    conda-forge
git                       2.35.3          pl5321h33a4a8a_0    conda-forge
glog                      0.6.0                h8ac2a54_0    conda-forge
grpc-cpp                  1.43.2               ha04666b_3    conda-forge
hdf4                      4.2.15               hefd3b78_3    conda-forge
hdf5                      1.12.1          nompi_ha60fbc9_104    conda-forge
icu                       69.1                 he49afe7_0    conda-forge
idna                      3.3                pyhd8ed1ab_0    conda-forge
importlib-metadata        4.11.3           py39h6e9494a_1    conda-forge
importlib_resources       5.7.1              pyhd8ed1ab_0    conda-forge
iniconfig                 1.1.1              pyh9f0ad1d_0    conda-forge
ipykernel                 6.13.0           py39h71a6800_0    conda-forge
ipython                   8.3.0            py39h6e9494a_0    conda-forge
ipython_genutils          0.2.0                      py_1    conda-forge
ipywidgets                7.7.0              pyhd8ed1ab_0    conda-forge
itsdangerous              2.1.2              pyhd8ed1ab_0    conda-forge
jbig                      2.1               h0d85af4_2003    conda-forge
jedi                      0.18.1           py39h6e9494a_1    conda-forge
jinja2                    3.1.2              pyhd8ed1ab_0    conda-forge
joblib                    1.1.0              pyhd8ed1ab_0    conda-forge
jpeg                      9e                   h5eb16cf_1    conda-forge
json-c                    0.16                 h01d06f9_0    conda-forge
jsonschema                4.5.1              pyhd8ed1ab_0    conda-forge
jupyter                   1.0.0            py39h6e9494a_7    conda-forge
jupyter_client            7.3.1              pyhd8ed1ab_0    conda-forge
jupyter_console           6.4.3              pyhd8ed1ab_0    conda-forge
jupyter_core              4.10.0           py39h6e9494a_0    conda-forge
jupyterlab_pygments       0.2.2              pyhd8ed1ab_0    conda-forge
jupyterlab_widgets        1.1.0              pyhd8ed1ab_0    conda-forge
kealib                    1.4.14               ha22a8b1_3    conda-forge
kiwisolver                1.4.2            py39h7248d28_1    conda-forge
krb5                      1.19.3               hb49756b_0    conda-forge
lcms2                     2.12                 h577c468_0    conda-forge
lerc                      3.0                  he49afe7_0    conda-forge
libblas                   3.9.0           14_osx64_openblas    conda-forge
libbrotlicommon           1.0.9                h5eb16cf_7    conda-forge
libbrotlidec              1.0.9                h5eb16cf_7    conda-forge
libbrotlienc              1.0.9                h5eb16cf_7    conda-forge
libcblas                  3.9.0           14_osx64_openblas    conda-forge
libclang                  13.0.1          default_he082bbe_0    conda-forge
libcrc32c                 1.1.2                he49afe7_0    conda-forge
libcurl                   7.83.1               h372c54d_0    conda-forge
libcxx                    14.0.3               hc203e6f_0    conda-forge
libdap4                   3.20.6               h3e144a0_2    conda-forge
libdeflate                1.10                 h0d85af4_0    conda-forge
libedit                   3.1.20191231         h0678c8f_2    conda-forge
libev                     4.33                 haf1e3a3_1    conda-forge
libevent                  2.1.10               h815e4d9_4    conda-forge
libffi                    3.4.2                h0d85af4_5    conda-forge
libgdal                   3.4.2                h6474519_7    conda-forge
libgfortran               5.0.0           9_3_0_h6c81a4c_23    conda-forge
libgfortran5              9.3.0               h6c81a4c_23    conda-forge
libglib                   2.70.2               hf1fb8c0_4    conda-forge
libgoogle-cloud           1.36.0               h52a585b_0    conda-forge
libiconv                  1.16                 haf1e3a3_0    conda-forge
libkml                    1.3.0             h8fd9edb_1014    conda-forge
liblapack                 3.9.0           14_osx64_openblas    conda-forge
libllvm11                 11.1.0               hd011deb_3    conda-forge
libllvm13                 13.0.1               h64f94b2_2    conda-forge
libnetcdf                 4.8.1           nompi_h6609ca0_102    conda-forge
libnghttp2                1.47.0               h942079c_0    conda-forge
libopenblas               0.3.20          openmp_hb3cd9ec_0    conda-forge
libpng                    1.6.37               h7cec526_2    conda-forge
libpq                     14.2                 hea3049e_0    conda-forge
libprotobuf               3.19.4               hcf210ce_0    conda-forge
librttopo                 1.1.0                hec60dd8_9    conda-forge
libsodium                 1.0.18               hbcb3906_1    conda-forge
libspatialindex           1.9.3                he49afe7_4    conda-forge
libspatialite             5.0.1               hadde3e2_15    conda-forge
libssh2                   1.10.0               h52ee1ee_2    conda-forge
libthrift                 0.16.0               h9702cd6_1    conda-forge
libtiff                   4.3.0                h17f2ce3_3    conda-forge
libutf8proc               2.7.0                h0d85af4_0    conda-forge
libwebp                   1.2.2                h28dabe5_0    conda-forge
libwebp-base              1.2.2                h0d85af4_1    conda-forge
libxcb                    1.13              h0d85af4_1004    conda-forge
libxml2                   2.9.12               h7e28ab6_1    conda-forge
libzip                    1.8.0                h8b0c345_1    conda-forge
libzlib                   1.2.11            h6c3fc93_1014    conda-forge
llvm-openmp               14.0.3               ha654fa7_0    conda-forge
llvmlite                  0.38.0           py39ha9d9895_1    conda-forge
lz4-c                     1.9.3                he49afe7_1    conda-forge
mapclassify               2.4.3              pyhd8ed1ab_0    conda-forge
markupsafe                2.1.1            py39h63b48b0_1    conda-forge
matplotlib                3.5.2            py39h6e9494a_0    conda-forge
matplotlib-base           3.5.2            py39h64a0072_0    conda-forge
matplotlib-inline         0.1.3              pyhd8ed1ab_0    conda-forge
mistune                   0.8.4           py39h89e85a6_1005    conda-forge
munch                     2.5.0                      py_0    conda-forge
munkres                   1.1.4              pyh9f0ad1d_0    conda-forge
mysql-common              8.0.29               h924029e_0    conda-forge
mysql-libs                8.0.29               h3cab752_0    conda-forge
nbclient                  0.6.3              pyhd8ed1ab_0    conda-forge
nbconvert                 6.5.0              pyhd8ed1ab_0    conda-forge
nbconvert-core            6.5.0              pyhd8ed1ab_0    conda-forge
nbconvert-pandoc          6.5.0              pyhd8ed1ab_0    conda-forge
nbformat                  5.4.0              pyhd8ed1ab_0    conda-forge
ncurses                   6.3                  h96cf925_1    conda-forge
nest-asyncio              1.5.5              pyhd8ed1ab_0    conda-forge
networkx                  2.8                pyhd8ed1ab_0    conda-forge
notebook                  6.4.11             pyha770c72_0    conda-forge
nspr                      4.32                 hcd9eead_1    conda-forge
nss                       3.77                 hfce436b_0    conda-forge
numba                     0.55.1           py39hc37845d_1    conda-forge
numexpr                   2.8.0            py39hbd61c47_2    conda-forge
numpy                     1.21.6           py39hf56e92f_0    conda-forge
openjpeg                  2.4.0                h6e7aa92_1    conda-forge
openmatrix                0.3.5.0            pyhd8ed1ab_0    conda-forge
openssl                   1.1.1o               hfe4f2af_0    conda-forge
orc                       1.7.3                h84518c8_0    conda-forge
orca                      1.6                pyhd8ed1ab_0    conda-forge
packaging                 21.3               pyhd8ed1ab_0    conda-forge
pandas                    1.4.2            py39hbd61c47_1    conda-forge
pandoc                    2.18                 h694c41f_0    conda-forge
pandocfilters             1.5.0              pyhd8ed1ab_0    conda-forge
parquet-cpp               1.5.1                         2    conda-forge
parso                     0.8.3              pyhd8ed1ab_0    conda-forge
pcre                      8.45                 he49afe7_0    conda-forge
pcre2                     10.37                ha16e1b2_0    conda-forge
perl                      5.32.1          2_h0d85af4_perl5    conda-forge
pexpect                   4.8.0              pyh9f0ad1d_2    conda-forge
pickleshare               0.7.5                   py_1003    conda-forge
pillow                    9.1.0            py39hd2c7aa1_2    conda-forge
pip                       22.1               pyhd8ed1ab_0    conda-forge
pixman                    0.40.0               hbcb3906_0    conda-forge
pluggy                    1.0.0            py39h6e9494a_3    conda-forge
poppler                   22.04.0              h39497b0_0    conda-forge
poppler-data              0.4.11               hd8ed1ab_0    conda-forge
postgresql                14.2                 he8fe76e_0    conda-forge
proj                      9.0.0                h2364a93_1    conda-forge
prometheus_client         0.14.1             pyhd8ed1ab_0    conda-forge
prompt-toolkit            3.0.29             pyha770c72_0    conda-forge
prompt_toolkit            3.0.29               hd8ed1ab_0    conda-forge
psutil                    5.9.0            py39h63b48b0_1    conda-forge
pthread-stubs             0.4               hc929b4f_1001    conda-forge
ptyprocess                0.7.0              pyhd3deb0d_0    conda-forge
pure_eval                 0.2.2              pyhd8ed1ab_0    conda-forge
py                        1.11.0             pyh6c4a22f_0    conda-forge
pyarrow                   8.0.0           py39hb9688c1_0_cpu    conda-forge
pycodestyle               2.8.0              pyhd8ed1ab_0    conda-forge
pycparser                 2.21               pyhd8ed1ab_0    conda-forge
pygments                  2.12.0             pyhd8ed1ab_0    conda-forge
pyopenssl                 22.0.0             pyhd8ed1ab_0    conda-forge
pyparsing                 3.0.9              pyhd8ed1ab_0    conda-forge
pyproj                    3.3.1            py39hfe197cf_0    conda-forge
pyqt                      5.12.3           py39h9d385e7_4    conda-forge
pyqt5-sip                 4.19.18                  pypi_0    pypi
pyqtchart                 5.12                     pypi_0    pypi
pyqtwebengine             5.12.1                   pypi_0    pypi
pyrsistent                0.18.1           py39h63b48b0_1    conda-forge
pysocks                   1.7.1            py39h6e9494a_5    conda-forge
pytest                    7.1.2            py39h6e9494a_0    conda-forge
pytest-cov                3.0.0              pyhd8ed1ab_0    conda-forge
pytest-datadir            1.3.1                      py_0    conda-forge
pytest-regressions        2.3.1              pyhd8ed1ab_0    conda-forge
python                    3.9.12          h8b4d769_1_cpython    conda-forge
python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
python-fastjsonschema     2.15.3             pyhd8ed1ab_0    conda-forge
python_abi                3.9                      2_cp39    conda-forge
pytz                      2022.1             pyhd8ed1ab_0    conda-forge
pyyaml                    6.0              py39h63b48b0_4    conda-forge
pyzmq                     22.3.0           py39hc2dc7ec_2    conda-forge
qt                        5.12.9               h2a607e2_5    conda-forge
qtconsole                 5.3.0              pyhd8ed1ab_0    conda-forge
qtconsole-base            5.3.0              pyhd8ed1ab_0    conda-forge
qtpy                      2.1.0              pyhd8ed1ab_0    conda-forge
re2                       2022.02.01           he49afe7_0    conda-forge
readline                  8.1                  h05e3726_0    conda-forge
requests                  2.27.1             pyhd8ed1ab_0    conda-forge
rtree                     1.0.0            py39h7d0d40a_1    conda-forge
scikit-learn              1.0.2            py39hd4eea88_0    conda-forge
scipy                     1.8.0            py39h056f1c0_1    conda-forge
send2trash                1.8.0              pyhd8ed1ab_0    conda-forge
setuptools                62.2.0           py39h6e9494a_0    conda-forge
shapely                   1.8.2            py39hd471b09_1    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
snappy                    1.1.9                h6e38e02_0    conda-forge
soupsieve                 2.3.1              pyhd8ed1ab_0    conda-forge
sqlite                    3.38.5               hd9f0692_0    conda-forge
stack_data                0.2.0              pyhd8ed1ab_0    conda-forge
tables                    3.6.1                    pypi_0    pypi
terminado                 0.13.3           py39h6e9494a_1    conda-forge
threadpoolctl             3.1.0              pyh8a188c0_0    conda-forge
tiledb                    2.8.2                hf17dc58_0    conda-forge
tinycss2                  1.1.1              pyhd8ed1ab_0    conda-forge
tk                        8.6.12               h5dbffcc_0    conda-forge
toml                      0.10.2             pyhd8ed1ab_0    conda-forge
tomli                     2.0.1              pyhd8ed1ab_0    conda-forge
toolz                     0.11.2             pyhd8ed1ab_0    conda-forge
tornado                   6.1              py39h63b48b0_3    conda-forge
traitlets                 5.2.0              pyhd8ed1ab_0    conda-forge
tzcode                    2022a                h5eb16cf_0    conda-forge
tzdata                    2022a                h191b570_0    conda-forge
unicodedata2              14.0.0           py39h63b48b0_1    conda-forge
urllib3                   1.26.9             pyhd8ed1ab_0    conda-forge
wcwidth                   0.2.5              pyh9f0ad1d_2    conda-forge
webencodings              0.5.1                      py_1    conda-forge
werkzeug                  2.1.2              pyhd8ed1ab_1    conda-forge
wheel                     0.37.1             pyhd8ed1ab_0    conda-forge
widgetsnbextension        3.6.0            py39h6e9494a_0    conda-forge
xerces-c                  3.2.3                h6564042_4    conda-forge
xorg-libxau               1.0.9                h35c211d_0    conda-forge
xorg-libxdmcp             1.1.3                h35c211d_0    conda-forge
xyzservices               2022.4.0           pyhd8ed1ab_0    conda-forge
xz                        5.2.5                haf1e3a3_1    conda-forge
yaml                      0.2.5                h0d85af4_2    conda-forge
zeromq                    4.3.4                he49afe7_1    conda-forge
zipp                      3.8.0              pyhd8ed1ab_0    conda-forge
zlib                      1.2.11            h6c3fc93_1014    conda-forge
zstd                      1.5.2                h582d3a0_0    conda-forge

@dhensle
Copy link
Contributor

dhensle commented May 24, 2022

I'm getting a numpy comparison error when running test_mtc_extended.py (note that test_mtc.py seems to run just find)

Sorry about that, the setup I had was pointing to some other configs. This test should be passing now.

@dhensle
Copy link
Contributor

dhensle commented May 25, 2022

@e-lo I believe I have addressed all of your comments. I left a couple conversations open for you to sign off on. Thanks for your helpful comments and please let me know if there's anything else I missed.

@jfdman
Copy link

jfdman commented Jun 3, 2022

Have all comments been addressed? Please advise, we have several regions waiting to pull this model into their implementation. Thanks!

@guyrousseau
Copy link

@jfdman Since all vehicle make/model coding for the NHTS (since inception) maps to NHTSA’s FARS vehicle make/mode coding scheme [https://www.nhtsa.gov/research-data/fatality-analysis-reporting-system-fars], can you confirm that our vehicle type model conforms with NHTSA’s FARS?

@i-am-sijia
Copy link
Contributor

i-am-sijia commented Jun 6, 2022

Have all comments been addressed? Please advise, we have several regions waiting to pull this model into their implementation. Thanks!

Confirmed all previous comments are addressed. Guy's question is the only one left. Thanks.

@jpn-- jpn-- merged commit 367cbac into ActivitySim:develop Jun 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

create vehicle type model and add vehicle table to pipeline
10 participants