RSGInc / bca4abm

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

read multiple files for link_daily #74

Closed bstabler closed 7 years ago

bstabler commented 7 years ago

need to be able to read multiple link files to sum up to daily

bstabler commented 7 years ago

link_daily_file_name: linksMD1.csv

is now:

link_daily_file_names:

link_daily_index_fields:

and if one file is specified then a join is not required, but if more than one is, then the join fields are required and the additional table column names have the filename as the column name suffix

bstabler commented 7 years ago

@toliwaga - I think maybe the test data for the ABM example is incorrect for the mce branch? Feel free to clean-up what I added as well before we merge all this into the master. Thanks.

bstabler commented 7 years ago

We need to specify a name to use for the file when we append the tables

link_daily_file_names:

becomes

link_daily_file_names: md1 : linksMD1.csv pm2 : linksPM2.csv

and link expressions go from:

links.svol + links.svol_linksPM2

to

either:

links.svol_md1 + links.svol_pm2

or

links.svol + links.svol_pm2 (only the 2nd and subsequent files get the appended file name)

toliwaga commented 7 years ago

We can allow both behaviors by doing this:

# this version has no suffix for linksMD1.csv
link_daily_file_names:
   "" : linksMD1.csv
    pm2 : linksPM2.csv

# this version assigns suffixes to both files
link_daily_file_names:
    md1 : linksMD1.csv
    pm2 : linksPM2.csv

but I think it might be clearer if the example used explicit suffixes for both

bstabler commented 7 years ago

I think we should use explicit suffixes for both

toliwaga commented 7 years ago

resolved by pull request 80