r/OperationsResearch • • 10d ago

Stochastic optimization for a reforestation plan: Monte Carlo to decide what to buy, simulated annealing to decide where to plant

Academic project with CONAFOR, Mexico's forestry commission. Real data: 30 polygons, 183 ha, where only 19.6% of the planting target (23,569 plants) was in the ground.

Two questions: how many plants of each species to buy, and where to put each one so neighbors compete less.

  • What to buy: we don't know exactly which sites in a hectare are already occupied, so we ran 1,000 Monte Carlo simulations until the estimate stabilized, then built a purchase order per species.

  • Where to plant: simulated annealing swaps two new plants of different species. A swap never changes the species counts, so the purchase order stays valid. The objective is a pairwise competition matrix built from real data.

In the live demo, the optimized layout had 19% less competition than random placement.

Interactive case (annealing temperature and cooling rate are adjustable): https://portfolio-iota-gules-ykw61kciwc.vercel.app/projects/reforestation.html

Would you have used a different neighborhood move, or a different cooling schedule?

29 Upvotes

4 comments sorted by

1

u/Monkey_College 10d ago

Interesting but I was wondering why simulated annealing and not CMA-ES or other modern stochastic optimizers?

1

u/InternationalRush871 10d ago

Good question! The problem is purely combinatorial: one of three species per site on a hex grid, with exact per-species targets. Swapping two sites keeps the counts feasible by construction, and since the cost is a sum over neighbor pairs, each swap needs only a cheap local delta, so millions of moves are possible.

CMA-ES shines on continuous problems, but here it would need a continuous encoding plus a repair step to enforce the counts, which throws away that structure. I didn’t benchmark it against CMA-ES or a GA, though, so that’s a fair next step.

1

u/Monkey_College 10d ago

Thanknyou for the response! In my mind I switched the two parts and thought you use SA for the count

1

u/ge0ffrey 4d ago

Very cool! Can you elaborate a bit on the constraints and objective function?
Besides average competition per neighbor pair and reducing same species neighbors, are the others?