03 / 07 WORK / PROJECT← All work

Simulation · Product Engineering · Frontend Architecture

Smart City Energy Simulation

A browser-based city simulation that aims to make local energy-policy decisions easier to understand.

Project period: 04/2026 – 09/2026

Context

Players build solar and wind generation, storage and subsidy programs while dealing with budget, demand, weather and citizen satisfaction.

Approach

I kept most simulation logic separate from React, the DOM and localStorage so rules could be tested and understood independently from the interface.

System

  • React + TypeScript: interface
  • Leaflet: map interaction
  • Separated domain and simulation logic
  • Python: independent comparison model
  • Playwright: browser tests
SYSTEM LAYERS
  • Backend
  • Interface
  • Operations

Engineering decisions

  • Keep domain rules out of UI components.
  • Use unit, integration and browser tests.
  • Document game rules and model boundaries.

What did not work

The application is intentionally not a real power-grid simulation. A model should not pretend to be more accurate than its assumptions.

Result

The project includes tests, an independent Python comparison model, CI on Linux and Windows, and Docker deployment.

A screenshot of the city simulation, showing energy indicators and a map of Bochum districts.
Smart City Energy SimulationThe interface makes energy decisions tangible through budgets, indicators, weather and city districts. Map © OpenStreetMap contributors, © CARTO.
Simulation result: success rate across consumption growth for solar-first, wind-first and other strategy variants.
A strategy sweep from the project repository compares outcomes under different assumptions.

What stayed with me

Separation does more than make testing easier. It also forces the model rules to be explained independently from their presentation.