Code Monkey home page Code Monkey logo

Comments (5)

fscottfoti avatar fscottfoti commented on July 19, 2024

Also, I notice there's a DestinationChoiceAlternatives.csv file which lists alternatives as the cross product of TAZs and walkmarkets in [0, 1, 2] but I don't see any variables specific to the walkmarkets in the models. Am I missing the walkmarket info or are the alternatives TAZs?

from activitysim.

DavidOry avatar DavidOry commented on July 19, 2024

The MTC destination choice models are executed in two steps. In the first step, a simple destination choice model is applied to the full choice set. The model is simplified by excluding the mode choice logsum. The model is multi-nomial logit.

Next, a sample of 30 destinations is sampled from the simple destination choice model results. The probability (from the simple destination choice model) is retained. Now, a second destination choice model is applied for these thirty destinations. This second model includes both the mode choice logsum as well a correction factor (to account for the probability of the alternative being selected as one of the thirty).

This is done because computing the mode choice logsum is expensive (particularly given the relatively minor role the variable plays in the prediction). Absent a super efficient way to compute mode choice logsums, we'll very likely need to retain some type of sampling functionality in activity-sim.

In the current MTC model, we have very large zones, which we segment into up to three walk markets. The destination choice models are applied to alternatives fully defined by the TAZ and the walk market. So, there's about 4360 alternatives (not all the 1454 zones have three walk markets -- some just have one). The mode choice logsum variables differ by walk market.

We should confirm with the other partners, but I do not think we'll need to retain the walk market functionality in activity-sim -- it's really a temporary fix for having large zones and the "problem" goes away with smaller zones. We will like to apply these destination choice models to spatial systems with a large number of zones, e.g., MTC's Travel Model Two has ~40,000 MAZs.

from activitysim.

fscottfoti avatar fscottfoti commented on July 19, 2024

OK - good information. To be sure, DestinationChoiceAlternativeSample.xls is the simple destination model you describe? And the probabilities from this model are retained for the second pass because the correction factor in the second pass depends on these probabilities, or for some other reason?

For now, I think I will proceed as if the simple version is the actual choice, and we can come back to the second pass, which integrates the mode choice logsums, once we have the mode choice model implemented.

Oh, and one more question occurred to me. The distance variables in the model are based on the distance to what exactly? Since we haven't scheduled yet, do we somehow know exactly what order various mandatory and non-mandatory trips are occurring in and therefore can use the distance to the current location, or are these just the distance to the person's home taz?

from activitysim.

DavidOry avatar DavidOry commented on July 19, 2024

Yes, DestinationChoiceAlternativeSample.xls is the simple model. The probabilities are retained for computing the correction factor (I'd need to check, but I think the final probability is just the conditional probability, i.e. the sampling probability (from the simple model) * alternative probability (from the full model)).

I think it wise to skip the mode choice logsums for now.

In this step (non-mandatory tour destination choice) we are selecting destinations for non-mandatory tours. All non-mandatory tours except at-work tours, by definition, start and begin at home. At-work sub-tours start and begin at work. So, the distance is either home to alternative or work to alternative (for at-work sub-tours).

MTC's Travel Model One generates tours; then stops on tours; then locates stops on tours. This last step, which we are skipping in our first activity-sim pass, requires the model to be aware of the sequence of activities, as you allude to.

from activitysim.

fscottfoti avatar fscottfoti commented on July 19, 2024

Right now I'm not sampling, and not using the sample spec. It doesn't appear to be the bottleneck in the model pipeline at this point either, but we can do some profiling and bring back sampling if it's the bottleneck at some point..

from activitysim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.