Project Meeting 2017.08.04 - ActivitySim/activitysim GitHub Wiki

Logsums

  • Removed duplication of sampled alternatives from downstream processing in order to save computation time
    • Previously, if an alternative was oversampled by the sampler, then we left all occurrences of it in the alternative set, and then, for the final choice, set the utility of duplicates to NA. The first occurrence has the real utility, whereas the 2nd, 3rd, etc. gets an additional NA added to it in order to turn it off. All the alternatives also have their sample correction factor.
    • This prior approach - "with duplication" - meant we could keep the assumed X number of samples per chooser code design/pattern
    • Now, the code has been refactored to allow for ragged alternative arrays - i.e. no duplication and different number of alternatives per chooser. If an alternative is oversampled, then the duplicates are removed from the alternative set.
    • This means we don't calculate expensive logsums for duplicates and for final choice utilities either
    • This save a bunch of time for these modules, ~30% in our tests
    • Both work and school location choice have been "de-duplicated" (see school and work commits)
  • @We still need to test with the full scale example (all zones, all hhs, all skims)
  • @We still need to update documentation for the logsums revision

Project management