Skip to content

Wjplatformer/immc2026

Repository files navigation

International Mathematics Modelling Competition 2026 Code

F. Wen Jun & Team

What this codebase contains

  1. Shapefiles of Individual selected parks (extracted using QGIS)
  2. Important codefiles that are submitted
  3. Test Ideas "Test slop" folder

Explanation behind IMMC 2026

IMMC 2026 is a competition designed around Mathematical Modelling. For IMMC 2026, the context was around the protection of Wildlife at scale.

Key design principles

  1. A map of the park was to split into 10kmx10km grids, and gridified data is assumed to be provided upon request as they can be done via data collection and observation. A simple program to convert 1kmx1km grid data and aggregate it into 10kmx10km grids can be found in reshape_to_grids.py

  2. 3 considerations were put for Etosha national park, the main case study:

    1. Poaching Risks
    2. Forest Fire Risks
    3. Human-Wildlife Conflict Risks

Methodology

There are 2 main methodologies employed for 2 different purposes. The first methodology is the contour graph methodology used to measure severity of the risk at hand. The second methodology is the heatmap and reallocation model, used to reallocate resources based on staffing need.

Methodology 1: Contour Graph

Found at contour_graph.py , the code merely plots the graph based on provided axes and manual modelling. However, the overarching equation is M * N, in which the 2 axes are multiplied for the given result.

Methodology 2: Heatmap and Reallocation

Found in 3 files. etosha_simulation.py, kruger_simulation.py and virunga_simulation.py

These 3 files do the exact same thing basically. The first few lines are data layers, or numpy arrays that contain gridified data. Afterwards they are masked to the shape of the national park. There are 2 main automation steps.

  1. The calculation of Staffing need, done under C/R, where C = Risk level and R = Ranger count (in the context of national parks).
  2. The automation of reallocation.

Afterwards, 5 heatmaps would be plotted. The first and second are the 2 variables at hand, the 3rd would be the risk, 4th the ranger count and 5th the staffing need. For example, forest fires require temperature and vegetation count as the 2 variables. Thus the spread of these 2 variables would be plotted in heatmaps 1 and 2. The 3rd heatmap is the weighted risk that includes ranger count (assumption that an increase in manpower can mitigate/fight the risks when it arrives). The 4th is the actual ranger count, in which we can see the before and after of allocation and reallocation. The 5th is staffing need, calculated as per point 1. The automation runs until staffing need is at the most optimal, as in the curretn staff can only do this much. In order to make the staffing need more optimal (or decrease the staffing need), more staff would thus have to be added into the system.

Main Learning Points

  1. Use AI, a bunch. With the help of Anthropic Claude, the dataset which otherwise would be impossible to be found could be generated independently within my code. Claude also sped up learning curves surrounding Numpy and other important modules that relates to Geopandas and Matplotlib. However, it still stands that original ideas and formulaes should not be derived from AI, as that would go against the competition's entire idea.

  2. Plan simple. At first, the reallocation system didn't work as I did not lay out a simple plan. Wasted 8 hours fully and only had 6 more to finish the entire project, time that could've been utilised to perfect the code and optimise it for every use case. Instead of crashing and bouncing around the same thing over and over, lay out exactly what your project needs. For this project:

    1. Find location of max staffing need
    2. Search through entire ranger map
    3. If 0, skip to next
    4. If Ranger >0, Staffing need < max staffing need, replace, Redo staffing need graph
    5. If Ranger >0, Staffing need >= max staffing need, skip to next
    6. Reloop until maximum staffing need can no longer be decreased (once checked again, it would increase)

    Resultingly, you can use it as a checkbox to see if you are progressing in the right direction or not.

About

IMMC 2026 Singapore Regionals

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors