473,386 Members | 1,815 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Bushfire spread simulation

Anyone have idea on this...Please help and explain to me...



In this option you need to model a forest as a square point lattice in which each lattice point
represents either a tree or a treeless location. This can be done by using a two-dimensional
array in which each dimension has the same size. A tree occupies a given lattice point with
probability P. The ignition of all trees in the first row and the spread of the fire through the
remaining rows can be simulated. A tree in row R ignites if any of its neighbours in row R – 1
is already burning. A tree has at most three immediate neighbours. A neighbour is always in a
preceding row and occupies either the same column as the tree, or one column to the left of
the tree, or one column to the right of the tree. The following figure shows a tree and its
immediate neighbours.
R - 1 • • • N1 N2 N3 • • •
R • • • T • • •
Example:
Bushfire spread simulation
--------------------------
Density (range is 1 thru 100): 40
Initial state ...(see the example start up code for option 5)
Final state ... (after fire spread, state should be changed)
Actual density: 40
Trees at start: 250
Trees at end: 230
Again? (y/n):
Apr 7 '10 #1
2 2347
newb16
687 512MB
As the fire is spread only forward, it's possible to do it with only two arrays - for the current and the previous row, and count the number of remaining trees in the previous row before discarding it.
Apr 7 '10 #2
Studlyami
464 Expert 256MB
This just sounds like a cellular automata program. The array of trees sounds like it is going to need to have 3 states (tree, no tree, burning tree). I would probably use a char array for this. When setting up your initial array a given point has probability of P of it being a tree. Do some sort of random function for each point to see if it should be a tree or not. Next should be the simulation part. When doing CA programs I create a second array of the same size, this array will hold your new generation. Go through your first array and check each location to see if the state needs to change or not. generation or not. Copy the results of each location to the new array. Hope that gives you a start.
Apr 7 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Steaming Balturd | last post by:
are there any php based economic simulations out there - not trading games per se, but more like simulating an economy, be it running a business or running a government? All i've been able to...
0
by: Constandinos Mavromoustakis | last post by:
Dear all, first we apologize if you receive multiple copies of this announcement. please see below if you are interested. Thank you in advance....
2
by: lamb2000 | last post by:
No one in the world knows the answer to my question! " Is it possible to emulate in Python for Linux the mouse and/or the keyboard?" I am coming from XP, where I have plenty of methods (AutoIt,...
0
by: Constandinos Mavromoustakis | last post by:
http://agent.csd.auth.gr/~cmavrom -------------------------------------------------- ============================================================================ = 37th Annual Simulation...
0
by: Gus | last post by:
---------------------------------------------------------------------------- ------------------------------------ Call for Papers: 38th Annual Simulation Symposium Part of the 2005 Spring...
19
by: Nicolas Pernetty | last post by:
Hello, I'm looking for any work/paper/ressource about continuous system simulation using Python or any similar object oriented languages (or even UML theory !). I'm aware of SimPy for...
0
by: Karatza Helen | last post by:
Our apologies if you have received multiple copies -------------------------------------------------- Call for Papers: 38th Annual Simulation Symposium Part of the 2005 Spring Simulation...
1
by: Tim Silva | last post by:
SDX Modeling, Simulation and Numerical Computing Environment for science and engineering has now been released. Major features include: * A unified simulation environment for modeling virtually...
4
by: Richard Blackwood | last post by:
Hello all. I have a few questions about simulation programming. One, do all programmers know to how to code a simulation? By simulation I mean a model of real world relationships (i.e. like...
2
by: Brendon Towle | last post by:
I need to simulate scenarios like the following: "You have a deck of 3 orange cards, 5 yellow cards, and 2 blue cards. You draw a card, replace it, and repeat N times." So, I wrote the...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.