Ferramentas do usuário

Ferramentas do site


geopro:pedro:netlogo

Diferenças

Aqui você vê as diferenças entre duas revisões dessa página.

Link para esta página de comparações

Ambos lados da revisão anteriorRevisão anterior
Próxima revisão
Revisão anterior
geopro:pedro:netlogo [2007/07/06 22:47] pedrogeopro:pedro:netlogo [2011/08/18 20:25] (atual) pedro
Linha 34: Linha 34:
   * BehaviorSpace tool used to collect data from multiple runs of a model   * BehaviorSpace tool used to collect data from multiple runs of a model
  
-=====Models===== 
  
 +===== GIS =====
  
 +http://ccl.northwestern.edu/netlogo/docs/gis.html
 +
 +load vector GIS data (points, lines, and polygons), and raster GIS data (grids) into NetLogo. The extension supports vector data in the form of ESRI shapefiles. The shapefile (.shp) format is the most common format for storing and exchanging vector GIS data. The extension supports raster data in the form of ESRI ascii Grid files. The ascii grid file (.asc or .grd) is not as common as the shapefile, but is supported as an interchange format by most GIS platforms. 
 +
 +
 +=====Models=====
  
 ====Wolf Sheep Model==== ====Wolf Sheep Model====
Linha 52: Linha 58:
   setxy random-xcor random-ycor   setxy random-xcor random-ycor
  
-The second function moves it from the actual spatial position. Netlogo has a definition  +The second function moves it from the actual spatial position. Turtles move according to 
-of a direction the turtle is pointing, and it moves according to this status. The function+a direction where they are pointing to. The function
 for moving is called fd (forward), and the exemple shows a function of random movement for moving is called fd (forward), and the exemple shows a function of random movement
 to one of four neighbours. to one of four neighbours.
Linha 64: Linha 70:
  
 The next function stops a turtle and removes it from the model. Note that the definition  The next function stops a turtle and removes it from the model. Note that the definition 
-of this function (as well as "move" above) does not especifies wether or not it is related  +of this function (as well as "move" above) does not especifies that it is related  
-to agents.+to agents, breaking the oo concept.
  
   to death  ;; turtle procedure   to death  ;; turtle procedure
Linha 71: Linha 77:
     if energy < 0 [ die ]     if energy < 0 [ die ]
   end   end
- 
  
 One wolf catches sheeps that stand in the same cell that it is. Note the predicate "ask",  One wolf catches sheeps that stand in the same cell that it is. Note the predicate "ask", 
-the way that agents can exchange information:+the way that agents can communicate:
  
   to catch-sheep  ;; wolf procedure   to catch-sheep  ;; wolf procedure
Linha 83: Linha 88:
   end   end
  
-It is interesting the idea of ask, because it means that the agent is sending an information to another,  +It is interesting the idea of an "ask,because it means that the agent is sending an information  
-but in terms of implementation it is executing the code using another agent. +to another, but in terms of implementation it is executing the code using another agent. 
  
   ask turtles [set sex (random 2)]   ask turtles [set sex (random 2)]
Linha 90: Linha 95:
 __TerraME:__ this function could be implemented using __TerraME:__ this function could be implemented using
  
-  ForEachAgent(cs, function(agent)+  ForEachAgent(cellularSpace, function(agent)
     agent.sex = math.random(2)     agent.sex = math.random(2)
   end)   end)
  
-Question: can an agent get the result of an ask? (I didn't find any example.) Is that useful?+(or something like agent.setSex(...)). Question: can an agent get the result of an ask?  
 +(I didn't find any example.) Is that useful?
  
 Agents are not free to reason. The main function "to go" dictates all the agenda Agents are not free to reason. The main function "to go" dictates all the agenda
-of each class of agents. At least "move" can be applied to both sheep and wolf.+of each class of agents. 
  
   to go   to go
Linha 170: Linha 176:
 work, and perhaps it would be necessary to have a third agent, a "controller". work, and perhaps it would be necessary to have a third agent, a "controller".
  
 +
 +
 +====Car Cruising model: A GIS Example====
 +
 +{{  http://leg.ufpr.br/~pedro/figures/netlogo-gis-cars.jpg?400}}
 +\\
 +
 +Presented [[http://gisagents.blogspot.com/2006/02/car-cruising-model-gis-example.html|here]].
 +
 +A good example of where GIS can be introduced into a model, is for dynamic car cruising within the Santa Fe downtown area.
 +
 +The background map of the model is the result of converting GIS data into an image, initially a jpeg file. It was then converted into a text format image file: PPM (portable pix map) consisting of three RGB values for each pixel. These were converted into NetLogo color values using the import-ppm procedure. The data was cleaned up a bit within Netlogo itself with the cleanup-map procedure, then written to an external data file via the export-dat procedure. Finally, for this version of the model, the data written out in the preceeding step was cut & paste into the model as an array of integer values.
 +
 +The model itself simply manages automobiles driving on the map staying on the "streets" by using the patch colors as guide. The cars randomly choose side streets as they see them, choosing to turn roughly 1/3 of the time in the move-forward procedure.  
 +
 +__TerraME__: It could import raster data as well as vectorial data to cellular spaces, to support this kind of application.
  
 ===== Papers ===== ===== Papers =====
Linha 176: Linha 198:
 |U. Wilensky, 2001| Proceedings of EuroLogo|[[http://leg.ufpr.br/~pedro/papers/netlogo_emergent_patterns.pdf|pdf]]| [[http://scholar.google.com.br/scholar?hl=pt-BR&lr=&cites=3702359739057909901| 23 citations in Scholar]]| |U. Wilensky, 2001| Proceedings of EuroLogo|[[http://leg.ufpr.br/~pedro/papers/netlogo_emergent_patterns.pdf|pdf]]| [[http://scholar.google.com.br/scholar?hl=pt-BR&lr=&cites=3702359739057909901| 23 citations in Scholar]]|
  
-{{  http://leg.ufpr.br/~pedro/figures/netlogo-gas.jpg}}+{{http://leg.ufpr.br/~pedro/figures/netlogo-gas.jpg  }}
 \\ \\
  
Linha 187: Linha 209:
  
 The paper describes two models. The first is the model of predator/pray using wolf/sheep/grass agents The paper describes two models. The first is the model of predator/pray using wolf/sheep/grass agents
-(the same example used in a paper that describes [[geopro:pedro:repast|repast]]). +(the one cited above, and the same example used in a paper that describes [[geopro:pedro:repast|repast]]).
 The second model studies the trajectory of gas particles in a box, as shown in the figure. The second model studies the trajectory of gas particles in a box, as shown in the figure.
 //The yellow zig-zag line traces the movement of a single particle.// //The yellow zig-zag line traces the movement of a single particle.//
 +
  
  
Linha 213: Linha 235:
 //Finished models can be published on the web as Java applets.// //Finished models can be published on the web as Java applets.//
  
-//NetLogo includes a still evolving tool called BehaviorSpace that allows “parameter sweeping,” that is, systematically testing the behavior of a model across +//NetLogo includes a still evolving tool called BehaviorSpace that allows “parameter sweeping,” that is, systematically testing the behavior of a model across a range of parameter settings.//
-a range of parameter settings.//+
  
-The space is not fixed to a cellular space, one can use the turtles to represent nodes and edges in a network, +The space is not fixed to a grid, one can use the turtles to represent nodes and edges in a network, 
 as shown in the graph on the right. as shown in the graph on the right.
 +Networks can be read from external text files.
  
 //There are many language elements for talking about space and spatial relations: towards, distance, neighbors, forward and back, left and right, //There are many language elements for talking about space and spatial relations: towards, distance, neighbors, forward and back, left and right,
geopro/pedro/netlogo.1183762075.txt.gz · Última modificação: 2007/07/06 22:47 por pedro