gama-platform / gama.old

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

Multiple simulation -> Single population download instead of multiple download #3021

Closed sriramab closed 3 years ago

sriramab commented 4 years ago

Hi

Currently, if you create multiple simulations (with different parameter values), and if you want to look at populations of each simulation, you have to open population tables individually and the download or view them.

I would like to request a feature, where .. in case of multiple simulations, if there can be a single download of populations from all simulations. This csv can then be used in other software for further analysis.

May be it is possible via GAML, but I was wondering if this is possible via a button to download all populations from all simulations.

thank you

AlexisDrogoul commented 3 years ago

I would suggest to do it in the experiment agent: a loop on all the simulations, asking each to save their population in the same file, without rewriting it... Shouldn't be complicated to do, and you can even turn it into an action called by a button in the parameters view.

Something like (I havent tested it):

experiment e {
     action save_populations {
        ask simulations {
           save pop_name to: "../results/agents.csv" type:"csv" rewrite: false;
        }
    }

    user_command "Save pops" category: "Saving" color:#darkblue  {do save_populations;}
}