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

Implement commute on Multi-Engine simulations #15

Open
akshaydewan opened this issue Jun 4, 2020 · 0 comments
Open

Implement commute on Multi-Engine simulations #15

akshaydewan opened this issue Jun 4, 2020 · 0 comments

Comments

@akshaydewan
Copy link
Collaborator

Background:

In multi-engine simulations, each engine can represent a city (or village, or region). However, in some cases, large cities like Mumbai need to be split up across engines. This can be done by assigning each ward (or administrative region) of the city to an engine. But the model currently only supports daily commute to work within an engine - which would mean that an agent working in Ward A can only commute to work in Ward A. The travel matrix supports travel every 24 hours, and is primarily meant to model inter-city travel, and not commute. We need a way to implement the routine commute across engines.

Thoughts to implement:

IMG_1015

Each agent currently has a home_location and work_location. These locations should be updated to include the engine_id along with the area. These locations can be randomly generated, or read from synthetic population.

The routine function currently returns a Point, which is the new intended location of the agent. This should now return an struct such as MoveIntent which will include the engine_id and point at which the agent intends to move. (The agent may not actually be able to move, depending on factors such as lockdown, or if the desintation is already occupied, which is why I propose we call it an Intent).

The actual process of moving an agent should now be abstracted out (into a move function, or a router object), which can either send a message to the destination engine via kafka, or perform a local move on the HashMap.

For agents using public transport, we can randomly choose to use the public transport area of the source engine or the destination engine.

If we want to simulate two or more large cities simultaneously (e.g. Pune and Mumbai, dividied into wards), we need to keep in mind that a typical commute will be within the engines of a city and not across cities. This is important during the setup phase, and we may have to maintain a "commute group" within the configuration, which is a cluster of commutable engines.

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