Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid Inf Loop in Joint Tour Participation #62

Open
wants to merge 4 commits into
base: BayDAG
Choose a base branch
from
Open

Conversation

dhensle
Copy link
Collaborator

@dhensle dhensle commented Mar 21, 2023

The joint tour participation model works by assigning probabilities for each person in the household as to whether they participate in a joint tour. The model then tries to satisfy the composition of the joint tour by iteratively drawing random numbers and seeing if each person participates. Sometimes the probabilities are very small, and the joint tour participation model runs out of iterations. The user has an option to specify to force participation after the specified number of iterations for anyone with a non-zero probability.

However, if forced participation still does not satisfy tour composition, the model is stuck in an infinite loop trying to force satisfaction even though its impossible. (Only ran into this in fringe cases in estimation mode.)

This PR will throw a runtime error if the forced participation is still unsuccessful at satisfying all joint tours.

@dhensle
Copy link
Collaborator Author

dhensle commented Mar 30, 2023

@i-am-sijia, ready for your review. Thanks!

Copy link

@i-am-sijia i-am-sijia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When the added runtime error occurs, is the solution that user needs to revisit specs and input data? What if we just discard those tours if there is not a large number of them?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants