How can I avoid saving data after run in agent based model. I thought if we don’t give adata. It should automatically not save data and its not saving as in end dataframes are 0*0 in size but its taking same amount of time after run to create that empty dataframe i think. I want to avoid this. So, things can run faster as I need to run model in loop. I don’t want it to do this in every iteration.
currently function looks like this
run!(model, step_point; showprogress = true)
Thank you ![:slight_smile: :slight_smile:](https://emoji.discourse-cdn.com/twitter/slight_smile.png?v=12)
if you don’t want to save data use step!
instead of run!
…?
step!() is also taking similar amount of time. I feel my code need some optimisation. Will come back after some editing in my code. ![:slight_smile: :slight_smile:](https://emoji.discourse-cdn.com/twitter/slight_smile.png?v=12)
Well, yes, of course. For any realistic / reasonably complex ABM evolving it should take dramatically more time than just collecting the data. So run!
and step!
would take approximately the same time.
Do you have any suggestions to improve performance? It will be helpful.
it depends from the model in question. Without that, it is not possible to give very concrete suggestions. A possible venue is profiling your code, finding the bottlenecks and then report what you found. A simple advice could be to use ensemblerun!
to run simulations in parallel.
see the last section in Zero2Hero-JuliaWorkshop/1-JuliaIntro.ipynb at main · Datseris/Zero2Hero-JuliaWorkshop · GitHub for the basics. Then, benchmark every single function you have defined and optimize them one by one.