farhanrahman / kyoto

18 stars 7 forks source link

Mongo DB connector for simulation output data #44

Closed oliviervg1 closed 12 years ago

oliviervg1 commented 12 years ago

Can @maxrev17 and @webbo89 come up with a list of data that they want to be able to represent?

Farhan can then implement a DataToMongoDB function which will be called at the end of every year/session in Abstract Country?

webbo89 commented 12 years ago

This sounds ideal to me - i've written a provisional wiki on the KyotoUI page of what we'd find useful and tried my best to closely match the functionality of AbstractCountry.

https://github.com/kyotoprotocol/KyotoUI/wiki/SimulationOutput

Thoughts/Suggestions welcome of course!

farhanrahman commented 12 years ago

I realised that Presage provides API for individual agents to store their data. It will appear in agents collection in the mongodb i think. So the way to solve this would be to add functions in AbstractCountry that sets properties every tick or year i.e. dumps the countries data into mongo. These values will be the true values that countries have every tick. I think this should be added after the behaviour() function is called.

oliviervg1 commented 12 years ago

Sounds good to me. Do you have time to do it Farhan ? Otherwise, I don't mind doing it.

farhanrahman commented 12 years ago

Hey Olivier...i don't think I can do it now as in I can do it in the evening/at night. I can finish it by today though..

oliviervg1 commented 12 years ago

Ok: here is some initial stuff https://github.com/farhanrahman/kyoto/commit/adb59ebe4b52267bbb915dc4a5b88c4108c2791e

I don't have time tonight to continue, so could you have a look at it Farhan?

Thanks

farhanrahman commented 12 years ago

Awesome man!! Mbut i was thinking if we could keep a history of data i.e. maps getting updated and so when we store we just do setproperty("dave",blah map)..should be good...because currently only stuff will get overwritten so we will only have the last tick's data..

farhanrahman commented 12 years ago

Cheers man..i will finish it off...

oliviervg1 commented 12 years ago

Damn I didn't know it overwrote the data every tick. That doesn't make a lot of sense to be honest...

On 17 Jun 2012, at 19:29, "Farhan Rahman" reply@reply.github.com wrote:

Cheers man..i will finish it off...


Reply to this email directly or view it on GitHub: https://github.com/farhanrahman/kyoto/issues/44#issuecomment-6383463

farhanrahman commented 12 years ago

Added the dumping facility. However the onSimulationComplete() function is no longer called now. I am closing this issue as the functionality is there. Its just an issue with Presage i guess....