Fire(greek version)
No preview image
Model was written in NetLogo 6.3.0
•
Viewed 126 times
•
Downloaded 9 times
•
Run 0 times
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
Info tab cannot be displayed because of an encoding error
Comments and Questions
Please start the discussion about this model!
(You'll first need to log in.)
Click to Run Model
globals [ initial-trees burned-trees ;; how many trees (green patches) we started with ] breed [fires fire] ;; bright red turtles -- the leading edge of the fire breed [embers ember] to setup clear-all ;; make some green trees ask patches with [(random-float 100) < ΠΥΚΝΟΤΗΤΑ] [ set pcolor green ] ;; make a column of burning trees at the left-edge if ΑΦΕΤΗΡΙΑ_ΦΩΤΙΑΣ = "ΚΕΝΤΡΟ" [ask patches [ if pxcor = 0 and pycor < 5 and pycor > 1 [ set pcolor red ] ] ] if ΑΦΕΤΗΡΙΑ_ΦΩΤΙΑΣ = "ΑΡΙΣΤΕΡΗ ΠΛΕΥΡΑ" [ask patches with [pxcor = min-pxcor] [ set pcolor red ]] ;; keep track of how many trees there are set initial-trees count patches with [pcolor = green] reset-ticks end to go ;; stop the model when done if all? patches [pcolor != red] [ stop ] ;; each burning tree (red patch) checks its 4 neighbors. ;; If any are unburned trees (green patches), change their probability ;; of igniting based on the wind direction ask patches with [pcolor = red] [ ;; ask the unburned trees neighboring the burning tree ask neighbors4 with [pcolor = green] [ let probability ΠΙΘΑΝΟΤΗΤΑ_ΕΞΑΠΛΩΣΗΣ ;; compute the direction from you (the green tree) to the burning tree ;; (NOTE: “myself” is the burning tree (the red patch) that asked you ;; to execute commands) let direction towards myself ;; the burning tree is north of you ;; so the south wind impedes the fire spreading to you ;; so reduce the probability of spread if (direction = 0 ) [ set probability probability - ΤΑΧΥΤΗΤΑ_ΝΟΤΙΟΥ_ΑΝΕΜΟΥ ] ;; the burning tree is east of you ;; so the west wind impedes the fire spreading to you ;; so reduce the probability of spread if (direction = 90 ) [ set probability probability - ΤΑΧΥΤΗΤΑ_ΔΥΤΙΚΟΥ_ΑΝΕΜΟΥ ] ;; the burning tree is south of you ;; so the south wind aids the fire spreading to you ;; so increase the probability of spread if (direction = 180 ) [ set probability probability + ΤΑΧΥΤΗΤΑ_ΝΟΤΙΟΥ_ΑΝΕΜΟΥ ] ;; the burning tree is west of you ;; so the west wind aids the fire spreading to you ;; so increase the probability of spread if (direction = 270 ) [ set probability probability + ΤΑΧΥΤΗΤΑ_ΔΥΤΙΚΟΥ_ΑΝΕΜΟΥ ] if random 100 < probability [ set pcolor red ;; to catch on fire ;; if big jumps is on, then sparks can fly farther if ΧΑΜΗΛΑ_ΠΟΣΟΣΤΑ_ΥΓΡΑΣΙΑΣ? [ let target patch-at (ΤΑΧΥΤΗΤΑ_ΔΥΤΙΚΟΥ_ΑΝΕΜΟΥ / 5) (ΤΑΧΥΤΗΤΑ_ΝΟΤΙΟΥ_ΑΝΕΜΟΥ / 5) if target != nobody and [ pcolor ] of target = green [ ask target [ set pcolor red ;; to ignite the target patch ] ] ] ] ] set pcolor red - 3.5;; once the tree is burned, darken its color ] tick ;; advance the clock by one “tick” end to ΜΕΤΑΔΩΣΕ_ΦΩΤΙΑ_ΜΕ_ΠΟΝΤΙΚΙ if mouse-down? [ ask patch mouse-xcor mouse-ycor [ set pcolor red ] display ] end ; Copyright 2006 Uri Wilensky. ; See Info tab for full copyright and license.
There is only one version of this model, created almost 2 years ago by Katerina Benisi.
Attached files
No files
Parent: ΦΩΤΙΑ ΣΤΟ ΔΑΣΟΣ
This model does not have any descendants.