CityScope / CS_Simulation_GAMA

Agent Based Simulation platform for CityScope
GNU General Public License v3.0
31 stars 21 forks source link

To post multiple numeric indicators we need to post a list #142

Closed crisjf closed 4 years ago

crisjf commented 4 years ago

The way we are currently posting the numeric indicators uses save(json_file(string,map<string,unknown>)). This limits us to always post a map, but to add multiple numeric indicators we need to be able to post a list of maps. See corktown as an example.

I tried doing save(json_file(string,list<map>)) but it did not work well.

agrignard commented 4 years ago

We should build the right string instead in string myIndicator; and post it

crisjf commented 4 years ago

I can work on this.

What was the reason for saving the results of the indicators as an intermediate step?

crisjf commented 4 years ago

How do I post a string? I'm guessing save(json_file(string,map<string,unknown>)) won't work anymore

agrignard commented 4 years ago

What I am trying to say is that the string itself should embed the list of string

agrignard commented 4 years ago

I think we can consider it as closed no? Regarding what is now posted

[{"indicator_type":"numeric","name":"Mean Height","value":51.34952140692907,"viz_type":"bar"},{"indicator_type":"numeric","name":"Min Height","value":1.377802165684261,"viz_type":"bar"},{"indicator_type":"numeric","name":"Max Height","value":99.6854835751274,"viz_type":"bar"}]
crisjf commented 4 years ago

Just to document: The issue is that I was using an older version of GAMA.