CityScope / CSL_Guadalajara

Repository for the CityScope project related to Guadalajara Collaboration
GNU General Public License v3.0
2 stars 4 forks source link

Model stops every(n) steps to recompute indicators #17

Closed gamalielpalomo closed 4 years ago

gamalielpalomo commented 4 years ago

Every n steps, each agent recomputes its perception value. This makes the simulation to freeze at that point when we use a considerable number of agents. How can I update indicators values for each agent and not to have these pauses? I tried with paralelization, but it didnt make difference.

reflex update_indicators_values when:every(10#minute)

agrignard commented 4 years ago

Is something you need to do for everyone every 10 minutes? One solution could be to do this update not for everyone evry 10 minutes but for just a certain amont like doing this

reflex update_indicators_values when:every(10#minute) and flip(0.1)
gamalielpalomo commented 4 years ago

Ok, done!

gamalielpalomo commented 4 years ago

This reflex is executed by each agent to update its perception according to the indicators. This is needed as they move and that value may change depending on the location.

agrignard commented 4 years ago

Great!