SEMCOG / semcog_urbansim

7 stars 6 forks source link

Step `random_demolition_events` produced No buildings to be demolished #30

Closed tianxie1995 closed 2 years ago

tianxie1995 commented 2 years ago

When running the random_demolition_events step, in the initial iteration, there is no building that is allowed to be demolished.

b.parcel_id doesn't have the intersection with allowed. This caused b to be empty.

    allowed = variables.parcel_is_allowed()
    b = b[b.parcel_id.isin(allowed[allowed].index)] # this is resulting empty table

Error message:

Exception has occurred: ValueError
No objects to concatenate
  File "/home/da/semcog_urbansim/models.py", line 1056, in random_demolition_events
    drop_buildings = pd.concat(buildings_idx).copy()[buildings_columns]
  File "/home/da/semcog_urbansim/test_forecast_2050.py", line 71, in <module>
    compress=True)
tianxie1995 commented 2 years ago

Data may not be compatible when running with old data