ActivitySim / activitysim

An Open Platform for Activity-Based Travel Modeling
https://activitysim.github.io
BSD 3-Clause "New" or "Revised" License
194 stars 99 forks source link

placeholder_sandag_2_zone_full failing in v1.2.1 #684

Closed JoeJimFlood closed 1 month ago

JoeJimFlood commented 1 year ago

I've tried running the placeholder_sandag_2_zone_full example with release 1.2.1 by following the directions given in the example manifest (I named the directory something different but that shouldn't matter), and got the following error message:

mp_tasks - mp_accessibility_26 - TypeError exception caught in mp_run_simulation: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Traceback (most recent call last):
  File "C:\Users\jflo\.conda\envs\asim121\lib\site-packages\activitysim\core\mp_tasks.py", line 930, in mp_run_simulation
    run_simulation(queue, step_info, resume_after, shared_data_buffer)
  File "C:\Users\jflo\.conda\envs\asim121\lib\site-packages\activitysim\core\mp_tasks.py", line 882, in run_simulation
    raise e
  File "C:\Users\jflo\.conda\envs\asim121\lib\site-packages\activitysim\core\mp_tasks.py", line 879, in run_simulation
    pipeline.run_model(model)
  File "C:\Users\jflo\.conda\envs\asim121\lib\site-packages\activitysim\core\pipeline.py", line 529, in run_model
    orca.run([step_name])
  File "C:\Users\jflo\.conda\envs\asim121\lib\site-packages\orca\orca.py", line 2177, in run
    step()
  File "C:\Users\jflo\.conda\envs\asim121\lib\site-packages\orca\orca.py", line 971, in __call__
    kwargs = _collect_variables(names=self._argspec.args,
  File "C:\Users\jflo\.conda\envs\asim121\lib\site-packages\orca\orca.py", line 1134, in _collect_variables
    variables[label] = thing()
  File "C:\Users\jflo\.conda\envs\asim121\lib\site-packages\orca\orca.py", line 930, in __call__
    result = self._func(**kwargs)
  File "C:\Users\jflo\.conda\envs\asim121\lib\site-packages\activitysim\abm\tables\skims.py", line 31, in network_los
    network_los_preload.load_data()
  File "C:\Users\jflo\.conda\envs\asim121\lib\site-packages\activitysim\core\los.py", line 278, in load_data
    self.maz_taz_df["MAZ"] = recode_based_on_table(
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'

It looks to be something with how the land use table's index is encoded. I noticed that the lines that set the zero-indexed encoding required for Sharrow were in the settings file (even though Sharrow isn't set to be used by default), so I commented those out. It got past this step, but crashed fairly early on in the model:

Traceback (most recent call last):
  File "C:\Users\jflo\.conda\envs\asim121\lib\site-packages\activitysim\core\mp_tasks.py", line 930, in mp_run_simulation
    run_simulation(queue, step_info, resume_after, shared_data_buffer)
  File "C:\Users\jflo\.conda\envs\asim121\lib\site-packages\activitysim\core\mp_tasks.py", line 882, in run_simulation
    raise e
  File "C:\Users\jflo\.conda\envs\asim121\lib\site-packages\activitysim\core\mp_tasks.py", line 879, in run_simulation
    pipeline.run_model(model)
  File "C:\Users\jflo\.conda\envs\asim121\lib\site-packages\activitysim\core\pipeline.py", line 529, in run_model
    orca.run([step_name])
  File "C:\Users\jflo\.conda\envs\asim121\lib\site-packages\orca\orca.py", line 2177, in run
    step()
  File "C:\Users\jflo\.conda\envs\asim121\lib\site-packages\orca\orca.py", line 973, in __call__
    return self._func(**kwargs)
  File "C:\Users\jflo\.conda\envs\asim121\lib\site-packages\activitysim\abm\models\location_choice.py", line 1122, in school_location
    iterate_location_choice(
  File "C:\Users\jflo\.conda\envs\asim121\lib\site-packages\activitysim\abm\models\location_choice.py", line 928, in iterate_location_choice
    choices_df_, save_sample_df = run_location_choice(
  File "C:\Users\jflo\.conda\envs\asim121\lib\site-packages\activitysim\abm\models\location_choice.py", line 716, in run_location_choice
    location_sample_df = run_location_sample(
  File "C:\Users\jflo\.conda\envs\asim121\lib\site-packages\activitysim\abm\models\location_choice.py", line 447, in run_location_sample
    choices = location_presample(
  File "C:\Users\jflo\.conda\envs\asim121\lib\site-packages\activitysim\abm\models\location_choice.py", line 361, in location_presample
    taz_sample = _location_sample(
  File "C:\Users\jflo\.conda\envs\asim121\lib\site-packages\activitysim\abm\models\location_choice.py", line 171, in _location_sample
    choices = interaction_sample(
  File "C:\Users\jflo\.conda\envs\asim121\lib\site-packages\activitysim\core\interaction_sample.py", line 568, in interaction_sample
    choices = _interaction_sample(
  File "C:\Users\jflo\.conda\envs\asim121\lib\site-packages\activitysim\core\interaction_sample.py", line 273, in _interaction_sample
    ) = interaction_simulate.eval_interaction_utilities(
  File "C:\Users\jflo\.conda\envs\asim121\lib\site-packages\activitysim\core\interaction_simulate.py", line 351, in eval_interaction_utilities
    raise err
  File "C:\Users\jflo\.conda\envs\asim121\lib\site-packages\activitysim\core\interaction_simulate.py", line 261, in eval_interaction_utilities
    v = to_series(eval(rhs, globals(), locals_d))
  File "<string>", line 1, in <module>
  File "C:\Users\jflo\.conda\envs\asim121\lib\site-packages\activitysim\core\skim_dictionary.py", line 514, in __getitem__
    return self.lookup(key)
  File "C:\Users\jflo\.conda\envs\asim121\lib\site-packages\activitysim\core\skim_dictionary.py", line 474, in lookup
    s = self.skim_dict.lookup(
  File "C:\Users\jflo\.conda\envs\asim121\lib\site-packages\activitysim\core\skim_dictionary.py", line 317, in lookup
    raise err
  File "C:\Users\jflo\.conda\envs\asim121\lib\site-packages\activitysim\core\skim_dictionary.py", line 311, in lookup
    result = self._lookup(orig, dest, block_offset)
  File "C:\Users\jflo\.conda\envs\asim121\lib\site-packages\activitysim\core\skim_dictionary.py", line 281, in _lookup
    raise AssertionError(
AssertionError: 261393 od pairs not in skim including [[3407 3407 3407 3407 3407]]->[[1 2 3 4 5]]

I tried running it in v1.1.3 and neither of these errors occured.

JoeJimFlood commented 1 month ago

This issue is no longer relevant due to the creation of sandag-abm3-example.