ActivitySim / activitysim

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

alternatives files have inconsistent formatting #846

Open jpn-- opened 3 months ago

jpn-- commented 3 months ago
     # FIXME setting index as "Alt" causes crash in estimation mode...
     # happens in joint_tour_frequency_composition too!
     # alts = simulate.read_model_alts(state, model_settings.ALTS, set_index="Alt")
     alts = simulate.read_model_alts(state, model_settings.ALTS, set_index=None)
     alts.index = alts["Alt"].values

I noticed all other models' alternatives files have the alternative column named and hardcoded in source code as alt, but for school escorting, it is Alt. It's probably better to keep the column name consistent as alt, even though we are not addressing the "hardcoded" part at this moment.

_Originally posted by @i-am-sijia in https://github.com/ActivitySim/activitysim/pull/777#discussion_r1546518616_

I think we should treat this issue separately from this PR. If we change it here, it will have implications for people who are already using the model (i.e. they would have to change their alternatives file). This is larger than simply changing it here as the Alt name is coded in a couple of places in this file and I would like to keep this PR focused on the BayDAG contributions. Thus, I think we should track it in a separate and stand-alone issue. Thoughts?

_Originally posted by @dhensle in https://github.com/ActivitySim/activitysim/pull/777#discussion_r1550927471_

i-am-sijia commented 3 months ago

@jpn-- Would it be a good idea to have an AlternativeSettings class, that checks alt file?