RSGInc / bca4abm

Benefit Cost Analysis for Travel Demand Models
http://rsginc.github.io/bca4abm/
Other
7 stars 5 forks source link

read zone csvs in addition to omx matrices for the aggregate od processor #91

Closed bstabler closed 5 years ago

bstabler commented 5 years ago

Sometimes we need to read a zone vector into the od processors as well. For example, parking cost at the destination. We should add the ability to also read in the zone data and specify if the zone vector is replicated to a full matrix by row or by column. For now you can pre-process the zone vector to create a matrix.

toliwaga commented 5 years ago

Do we have any sample data to add to the example to exercise this feature?

bstabler commented 5 years ago

Here is an example implementation. Read the zone vectors in as zone data files and add the columns to aggregate_od.xml using the origin_zone_matrices or dest_zone_matrices setting:

origin_zone_matrices:
  - ltpkg
  - stpkg
dest_zone_matrices:
  - ltpkg
  - stpkg

Then reference these zone vectors in the aggregate_od expressions, for example:

dest_zone['ltpkg_build'] - dest_zone['ltpkg_base']