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

KeyError when EPR simulation is not sufficiently populated #282

Open
SmolakK opened this issue Feb 9, 2024 · 0 comments
Open

KeyError when EPR simulation is not sufficiently populated #282

SmolakK opened this issue Feb 9, 2024 · 0 comments

Comments

@SmolakK
Copy link

SmolakK commented Feb 9, 2024

In the EPR class in the models.epr module, the preferential_exploration() method returns a KeyError when performing a location search on the precomputed od_matrix. It is related to the case, when _starting_loc of agents are randomly generated. In some cases, the starting position of an agent might be chosen to be in a location where there were no data points, hence it is not present in the precomputed od_matrix.

Potential solutions are to:

  1. Generate agent positions only for locations where any data in the precomputed od_matrix are present.
  2. Limit spatial_tesselation to the locations where any data are available.
  3. Force the user to provide starting locations on her own.
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

No branches or pull requests

1 participant