COMOKIT / COMOKIT-Model

A GAMA (http://gama-platform.org) model on the assessment and comparisons of intervention policies against the CoVid19 pandemics
https://comokit.org
GNU General Public License v3.0
25 stars 18 forks source link

School and workplace shutdown.gaml : inversion school / working place closure ? #27

Closed benoitgaudou closed 4 years ago

benoitgaudou commented 4 years ago

When running the model School and workplace shutdown.gaml, I notice that the user_input window does not seem to behave as expected:

When working place closure is set to true, and school closure set to false:

Screenshot 2020-05-10 at 18 06 41

The simulation seems to show the converse behavior (as many individuals move to the working place in the bottom left of the picture)

Screenshot 2020-05-10 at 18 06 59
benoitgaudou commented 4 years ago

@chapuisk commit (inversing operand of the action createPolicy) seems to fix the issue:

    policy <- createPolicy(not(c[1]), not(c[0])); 

But, reading the code, we can see:

So (intuitively) the result for ask_closures should be a list with first a boolean for school and a second for work. So inversing the operand in the call of createPolicy is not coherent.

In fact, the issue seems to come from the fact that calling .values does not respect the order in which the map, produced by the user_input, has been created. So we should not rely on the order of the values.... and return the whole map.

AlexisDrogoul commented 4 years ago

See https://github.com/COMOKIT/COMOKIT-Model/commit/9d049cc66b43d75eaf7f28a3ff511c485b4271e2#commitcomment-39070255

chapuisk commented 4 years ago

Ok I change the management of user_input to take into account the fact that returned map is unordered !