Forest fires emit millions of cubic metres of CO2 and are one of the largest contributors to the greenhouse gas effect. They can be detrimental to animal habitats, air quality, homes, and the atmosphere. One of the primary factors why forest fires are so damaging to the environment is the factor of unpredictability. Our team wanted to create a program that can be used to further understand a modern environmental crisis that damages millions of ecosystems. 

The Challenge We Are Responding To

The Forest Fires simulator calculates the realistic and accurate daily growth of a forest fire, given values such as the wind speed, direction, and type of wood. It will tell the user how many days it will take for the fire to reach each perimeter. Then, it will show what the fire will look like in a certain number of days. Instead of relying solely on thermal sensors to analyze where the fire will move, our program uses real-life variables such as the climate and weather to calculate the projection of the fire.

Goals - How Our Project Addresses The Challenge

  1. Create a program that uses accurate and reliable calculations that can be applied in real life.
  2. Warn the user of when the forest fire will spread to their community, allowing governments to instate evacuation orders.

Specifications - What Technologies We Used

The program is made using Java. The code was written using the IDE of DrJava. The code is uploaded using GitHub. The write-up was made on Google Docs.

Variable Inputs

  • Dimensions of forest (int length (km), width (km))
  • Starting point of fire (int x, int y)
  • Speed of wind (int km/h)
  • Direction of wind (eight cardinal points)
  • Type of trees/wood (Douglas-fir, Loblolly Pine, Ponderosa PIne, Red Maple, Western Hemlock, Lodgepole Pine, White Oak, Sugar Maple, Yellow-Poplar, Northern Red Oak). The menu is based on the most common hardwood trees in North America.
  • Humidity index (double, 0% - 100%)
  • Days to proceed (int)

Usable Public Methods

  • advanceDay() //Simulates a day of forest fire
  • drawForest() //Returns the current state of the forest
  • reachSides()   //Returns how long it takes the fire to reach each side (N, S, E, W)
  • getForest()      // get/set methods (variable encapsulation)
  • getDays()        // get/set methods (variable encapsulation)
  • setWind()       // get/set methods (variable encapsulation)

Program Flow

  1. Ask the user to input all required variables (See list above).
  2. Outputs what the fire looks like on Day 0.
  3. Based on the burnability of the tree in the forest, the surrounding trees will either spread the fire, or burn out. Each option has its own method.
  4. a)The spread() method calculates the direction of growth (if applicable) based on the wind direction, and the size of the growth based on the wind speed, humidity, and burnability.
  5. b)The burn() method will stop a tree from spreading more fire. This will only occur if the tree has been completely engulfed in flames, leaving nothing but ashes.
  6.  Output the number of days it will take for the fire to reach all four perimeters.
  7.  Displays what the forest will look like at the number of days the user wishes to progress.
  8.  Ask the user to increase days or stop the simulation.

Milestones - What We Learned

Collaborative Coding

Participating in this hackathon has taught our group how to code together. We initially started by sharing our code via Google Docs, but we then found a more efficient way of sharing code via GitHub.

How to actively participate in a Hackathon

This is the first hackathon our team has participated in. Prior to joining this hackathon, our team members all took a course together to learn how to code in Java. The hackathon has taught us how to use a variety of languages, how to work collaboratively, and how to use technology to tackle real-world problems. Through the process, we participated in fun activities and met new people.

Accomplishments - Features We Are Super Proud Of!

The spread() method

The fire spreads differently depending on the angle of the wind relative to the centre of the fire. In order to have an accurate growth of the fire's radius, we initially thought we would have to write the same code four times (North, South, East, West) and change the numbers to keep the values accurate.

To make our program more efficient, we took the direction the wind was facing and rotated it so that the direction in which the fire would grow the most would always be North.

In order for this to occur, we took the degrees of the original angle and subtracted it from North, then took the answer and divided it by modulus 360°. As a result, the code only needs to be written once (instead of four times). Then, we reverted back to the original angle to see which squares were affected.

The reachSides() method

This method tells the user how many days it will take for the fire to reach the North, South, East, and West perimeters. This is arguably the most important feature of our program as it transforms our code from bits and numbers into actual, real life data. This information can be used by government officials, fire marshals, and homeowners to see when they will be directly affected by the fire. Our program can predict the unpredictable.

Uploading our project

Our team is only accustomed to working with Drjava. In order to reach out of our comfort zone, we decided to share our program using the GitHub track. Now, we are more familiar with collaborative coding, a very useful skill to have given modern circumstances.

Next Iteration - How Our Team Can Improve Our Current Model

Mixed Forests

Unfortunately, our program does not take into account the possibility that a forest may be composed of various types of trees. As of right now, the user is only able to select one type of tree, which is not an accurate representation of all forests.

To improve our program, we could take the ratio of the secondary tree(s) to the primary tree (ex: 0.1) and for each tree in the array, we would add a counter to the ratio. Then, every time the ratio hit one, we would make the tree the second type of tree and subtract one from the ratio, restarting the loop again. For example, after 10 Pine trees the total would be 1, then we would replace a Pine tree with a Maple tree. Then we would subtract 1 from the counter, bringing the total back to zero. That way, every 10th tree would be the secondary type, as 0.1 = 1/10.

Smaller Units

The smallest unit our program works with is currently the Kilometre. We chose to work with km because of the large area a forest can occupy. While looking at the spread-ability on a large scale, the km is a good unit, yet when applying the program in real-life situations, a km2 may be too large of a unit to visualize.

To scale down our units, we could convert the display feature to show where the fire would be in square metres. This would be more precise, yet also more time consuming to see the overall growth of the fire.

Inaccurate Formulas

Our program currently uses FINAL values of humidity, wind speed, and burnability. However, we have not conducted scientific experiments to determine the actual impact each factor has on the spread-ability of the fire.

To find an even more accurate calculation of burning trees, several scientific experiments would have to be performed. Then, we could adjust the formula use so that it would take into account the real-life impact of each arbitrary value.

About Us - Who We Are

Our Team

Madeline Pinto, Lucas Jacobs, and Christina Lan are all high school students from Mississauga, Ontario. After taking a Grade 11 Computer Science course together in 2019, we decided to work together to create an innovative project to further understand the impact of forest fires.

Each team member has unique skills and insights that helped us create the best Fire Simulator we could. Lucas specializes in coding and is responsible for the core functionality of our program. Christina develops useful features that expand the application of our program to real life situations. Madeline translates the code into intriguing presentations and write-ups that grasp the attention of potential business partners and app developers.

Our Story

The current climate crisis in relation to forest fires is at an all-time high. Places like the Amazon Rainforest, Australia, the United States, South America, and Indonesia are being burnt to ashes due to forest fires. Millions of people, including our families have lost their homes and communities due to wildfires.

Our Solution

We decided to create an realistic and accurate digital program that can be used by government officials, fire marshals, and home owners to predict the movement and damage of forest fires. Instead of relying solely on thermal sensors to analyze where the fire will move, our program uses real-life variables such as the climate and weather to calculate the projection of the fire.

Built With

Share this project: