gama-platform / gama.old

Main repository for developing the 1.x versions of GAMA
GNU General Public License v3.0
304 stars 99 forks source link

[Enhancement] Interface to change agents with extern algorithms #3522

Closed cvaraujo closed 1 year ago

cvaraujo commented 2 years ago

I'm starting to use GAMA to model a virus spread in OSM maps. This model generates, in each cycle, input data to an algorithm that defines control actions and could remove a subset of agents for the next cycle.

I'm currently saving the state and position of the individuals in CSV files at cycle end, executing my algorithm, rewriting the CSVs, and by command line calling GAMA headless to run again from the edited CSVs. This approach is not very efficient if I need to run it several times, since the GAMA needs to load all the information again, including the map.

There is a more efficient way to do this communication? For example, run headless GAMA and insert a function that makes the simulation save the state and pause when the cycle ends, waiting for an input signal to use a Die/Create function for some inputted agents, and run the next cycle.

benoitgaudou commented 1 year ago

Dear,

You could think about several other ways to do what you need:

Cheers

Benoit

Le lun. 31 oct. 2022 à 12:14, Carlos Araújo @.***> a écrit :

I'm starting to use GAMA to model a virus spread in OSM maps. This model generates, in each cycle, input data to an algorithm that defines control actions and could remove a subset of agents for the next cycle.

I'm currently saving the state and position of the individuals in CSV files at cycle end, executing my algorithm, rewriting the CSVs, and by command line calling GAMA headless to run again from the edited CSVs. This approach is not very efficient if I need to run it several times, since the GAMA needs to load all the information again, including the map.

There is a more efficient way to do this communication? For example, run headless GAMA and insert a function that makes the simulation save the state and pause when the cycle ends, waiting for an input signal to use a Die/Create function for some inputted agents, and run the next cycle.

— Reply to this email directly, view it on GitHub https://github.com/gama-platform/gama/issues/3522, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAL3WSUXKTS4AKYJNLVO73DWF6S2NANCNFSM6AAAAAARS7AIYM . You are receiving this because you are subscribed to this thread.Message ID: @.***>

AlexisDrogoul commented 1 year ago

I guess that the new headless modes of GAMA will probably answer your question (@hqnghi88 @RoiArthurB @lesquoyb, I let you elaborate).

lesquoyb commented 1 year ago

closing as it's not an issue, feel free to open a discussion about it or ask more detailed implementation questions on the mailing list in case of problem