Closed benoitgaudou closed 7 years ago
just to add that it occurs with a map<int, int> instead of map<int, map<int,float>>... As an example, this simpler model also shows the bug:
global {
reflex dddl {
map<int,int> notPrunedTrees <- ([0::5, 1::2, 2::3]);
list<int> lkey <- notPrunedTrees collect each;
write lkey;
if(lkey != [5,2,3]) {
do pause;
}
}
}
Steps to reproduce
In a model, a map<int, pair<int, float>> is used. When we want to get all the key of the value of the map (the pairs), we get randomly value that are not correct.
As an example, look at the following model:
global { init { create home number:1 ; ask home { notPrunedTrees <- ([0::(5::0.0), 1::(2::0.0), 2::(3::0.0)]); }
} }
species home { map<int, pair<int,float>> notPrunedTrees <- []; }
experiment testAccu type: gui { output {} }