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

Air travel #77

Merged
merged 25 commits into from
Oct 4, 2024
Merged

Air travel #77

merged 25 commits into from
Oct 4, 2024

Conversation

tannguyen153
Copy link
Collaborator

The new update allows travel agents and their travel paths to be justified by air travel statistical data. The code to move particles around is the same as in random travel. Both air and random travel agents share the same travel particle container (on_travel_pc) and bin (m_bins_travel).

@tannguyen153
Copy link
Collaborator Author

I'm thinking of multiplying the travel probability with the travel model frequency. If we run the travel model every 2 days as opposed to once per day, the number of travel agents should be 2x. This is to make sure that the annual number of travelers is consistent with the input data. The probabilities of travel path should be independent of travel model frequency.

@tannguyen153
Copy link
Collaborator Author

I just resolved the conflicts and merged latest codes in development to the airTravel branch. This PR is no longer behind.

Comment on lines 207 to 189

Redistribute();
Copy link
Collaborator

@debog debog Sep 7, 2024

Choose a reason for hiding this comment

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

@stevenhofmeyr specifically added the Redistribute() in this PR. Can it really be removed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hi @stevenhofmeyr, Redistribute() operation is costly so Andrew created a small particle container for travel agents and only redistribute agents in this container. For work and home activities, we have a static communication pattern which can be handled by the arrangement of bins.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@tannguyen153 (and @atmyers), I tagged you both on a thread in the ExaEpi channel on the EMERGE Slack - @stevenhofmeyr explained there why he add these Redistribute() calls. Can you take a look?

Comment on lines 254 to 237

Redistribute();
Copy link
Collaborator

@debog debog Sep 7, 2024

Choose a reason for hiding this comment

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

@stevenhofmeyr specifically added the Redistribute() in this PR. Can it really be removed?

src/AgentContainer.cpp Outdated Show resolved Hide resolved
src/AgentContainer.cpp Outdated Show resolved Hide resolved
src/AgentContainer.cpp Outdated Show resolved Hide resolved
@debog
Copy link
Collaborator

debog commented Sep 7, 2024

@tannguyen153 I may be missing something here but it seems to me that:

  • The main difference between random travel and air travel is that the travel location is random in the former and computed from actual air travel data in the latter.
  • The actual interaction between agents that are on travel with themselves and those that reside/work there seems to be exactly the same for both these cases.

Is it possible to unify the two and reduce duplicated code? For example, rename InteractionModRandom to InteractionModTravel and have it called from both? Maybe it should be called only once because the on_travel_pc contains agents that are on both random and air travel, right?

@tannguyen153
Copy link
Collaborator Author

Hi Debo, I kept the data movement and interaction code of random and air travel the same is just for now. This is like a place holder which makes the code validation easier. In future versions, air travel agents can have a different interaction behavior compared to others who take another type of transportation. Keeping a separate code will allow me to modify the interaction behavior without dealing with code conflicts.

@tannguyen153 tannguyen153 merged commit 5101d6d into development Oct 4, 2024
26 checks passed
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