Hi neo4j community, I post my problem here (and a less recent copy on stackoverflow http://stackoverflow.com/questions/9750454/neo4j-graph-database-helping-to-store-several-time-based-data-values-result-of)
*Peter Neubauer* give me some information (like this template of time based structure for neo4j : http://blog.neo4j.org/2012/02/modeling-multilevel-index-in-neoj4.html) about time index construct, and now, i try to represent this complex problem with neo4j formalism. I think, if i can implement this formalism, this is a good use case (first ?) for future other simulation data storage with neo4j, *i can make a real tutorial for other which have same type of problem* .. *A) THE DATA * After simulation, we need to *export and visualize the data by time, by city, by space**, by city attribute* *or by other object collection *(innovations creates by city, exchange between city, etc). a) City are represented with ABM ( one city = one agent in our model) in a spatial context (so one city = one node). Each city communicate only with near neighbors (radius limit), at each step of simulation. b) City have a pool of innovation in their own market, other cities can get this innovation, one by step by city connected. c) At each step, one city try to copy one innovation of each neighboors with probability function of their distance, and after that, they try to innovate/ create new innovation. *B) THE PROBLEM* a) I want to store all properties/data change at each step of my simulation because at each step we can observe multiple city event like : growing population, exchange or create new innovation, create new link with other city, etc Is it better *to copy and recopy all of my spatial nodes tree* with new properties values (population, new link with other cities, etc) at each step (1 .. 2 .. 3.. etc) ? Or is it better to have* one static tree with spatial representation of the cities*, and store only in other tree the city events and attributes change : EXCHANGE, GROWING, etc. *I think the second option is better*, but i don't know how i can store in my tree this type of events "population change into city A" or "new link between A and B at step 3 of simulation" ?? b) I want to store the graph of innovation, because i want to view the result of diffusion of any innovation in time (step of our simulation). I make a draft image of my solution at bottom of this mail, do you think this is the good solution to store relationship like this ? c) It's complicated by the fact than innovation can disapear because each of them contain a life property after what we desactivate the possibility of diffusion. d) A lot of data for each experimentation : 100.000 innovations, 4000 step of time, 100 city ... * C) DRAFT OF MY NEO4J TREE CONCEPTION* [image: Inline image 3] *D) THE DRAFT OF SOURCE CODE* I make a first program in scala which store all cities with neo4j-spatial layer. It works well, i can represent my graph of cities into gephi. Source code of my model is here : https://forge.iscpif.fr/projects/simpoplocal/repository/show/model-scala/src/main/scala/fr/geocite/simpoplocal?rev=feature%2FSLocalScala</> *Launcher.scala* ( https://forge.iscpif.fr/projects/simpoplocal/repository/entry/model-scala/src/main/scala/fr/geocite/simpoplocal/Launcher.scala?rev=feature%2FSLocalScala</>) and *Simulation.scala* ( https://forge.iscpif.fr/projects/simpoplocal/repository/entry/model-scala/src/main/scala/fr/geocite/simpoplocal/Simulation.scala?rev=feature%2FSLocalScala</>) contain the methodes which write into neo4j embedded database. Now i try to integrate all events of my simulation : exchange, growing into this graph, but i need your experience to make a good conception representation of this problem. The draft link for modification is here, if you have an idea to help me : https://docs.google.com/drawings/d/1oW65bXJ-Z-B-vMzVwJb_qUmQvaunoEsajJm-QLRHB9Y/edit * Thanks a lot, * Sebastien Rey. _______________________________________________ NOTICE: THIS MAILING LIST IS BEING SWITCHED TO GOOGLE GROUPS, please register and consider posting at https://groups.google.com/forum/#!forum/neo4j Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user