![]() Self set-default-shape _set-line-thickness setxy shapes show-turtle ( st) Move-to myself nobody no-turtles of other patch-ahead patch-at patch-at-heading-and-distance patch-here patch-left-and-ahead patch-right-and-ahead pen-down ( pd) Home inspect is- ? is-turtle? jump layout-circle left ( lt) at -here -on can-move? clear-turtles ( ct)Ĭreate- create-ordered- create-ordered-turtles ( cro)ĭie distance distancexy downhill downhill4 dx dy face facexy forward ( fd) To see which agents (turtles, patches, links, observer) canĪctually run a primitive, consult its dictionary entry. Primitive might still be used by patches or the observer, and vice Special: Variables - Keywords - Constants 1 ) 2Įnd to zoom-out set zoom min list 1.2 precision (zoom +. Set center-y center-y + ( mouse-ycor * gis-patch-size)Įnd to-report gis-patch-size note: assume width & height same let world gis:world-envelope report ( item 1 world - item 0 world) / ( max-pxcor - min-pxcor )Įnd to zoom-in set zoom max list. Set center-x center-x + ( mouse-xcor * gis-patch-size) Let W0 zoom * ( item 1 world - item 0 world) / 2 half-widths let H0 zoom * ( item 3 world - item 2 world) / 2 set world ( list (x0 - W0) (x0 + W0) (y0 - H0) (y0 + H0)) Let world gis:world-envelope let x0 ( item 0 world + item 1 world) / 2 + center-x center let y0 ( item 2 world + item 3 world) / 2 + center-y Gis:set-world-envelope gis:envelope-of torino Gis:set-drawing-color gray + 1 gis:draw torino 1 end to setup-world-envelope ![]() Set torino gis:load-dataset "torino/file.shp" Motion-time the amount of time with positive speed Wait-time the amount of time since the last time a turtle has moved Pollution amount of pollution on the patch Turtles-num number of turtles on the patch Street? true if the patch is part of a street. Mean-motion-time average time turtles stay in motion Mean-wait-time average time turtles stay at rest PROCEDURES LUCA ALASIO - Scuola di Studi Superiori dell'Università di Torino extensions The pollution growth caused by cars is represented by a normal probability distribution with parameters pollution-mean and deviation-mean Poll-dispersion, if positioned at 1.00 no pollution is dissipated, if positioned at 2.00 50% of pollution disappears Setup / display-streets-in-patches / draw-streets / setup-cars / go.Ĭost-of-working represents the average cost of an hour of work (in euros or dollars) It is advisable to follow this order in pressing buttons: Two switches allow to consider pollution and to show its concentration on the map notice that original colors can be brought back using cancel-colors.Ĭhange-street-color makes streets fade at car passage. Two buttons allow to follow one of the turtles and to change color to its path. Setup-cars creates the selected number of turtles and Go makes them move. Notice that it is possible to open or close parts of a street using close-street-here and open-street-here. Turtles are expected to "drive" on the right, speed is represented by the number of patches they go forward and it decreases if there are any other turtles ahead.Įach patch has an indicator of its pollution levels depending on the number of cars on it and pollution diffuses to other patches as time passes.Įach turtle shows speed, waiting time and motion time.įirst of all setup allows to import the GIS, then it is possible to move on the map and choose different areas of the city of Torino there is a zoom utility but it is recommended to set zoom between 0.05 and 0.08 before going on.ĭisplay-streets-in-patches (a bit slow) makes the distinction between streets and buildings, while draw-streets draws roadways. Patches not intersecting the GIS represent streets and, of course, turtles (cars) can only move on these patches. This model uses GIS extension in order to simulate traffic in the city of Torino (Italy) and it shows how traffic conditions influence pollution in the city in addition it is possible to approximate the amount of money lost due to traffic delays. Here and run it in your computer (NetLogo 4.1.3 suggested). ![]() The image below is a static picture of the simulator (GIS applets still do not work in remote), but you can find the code Here you have an introduction to the model. Traffic and pollution in Torino Traffic and pollution in Torino Luca Alasio SSST Project work on "Traffic and pollution in Torino."
0 Comments
Leave a Reply. |