| Abstract: |
Accurately modeling city-scale electricity demand is fundamental to the design of data-driven forecasting, demand-response (DR), and grid-control solutions. This paper introduces an open-source simulator that recreates city-wide electricity demand by linking four key models in one sub-hourly loop: (1) a weather generator that produces temperature, solar, wind, humidity, and price signals; (2) a building-load model that converts these time series into residential, commercial, and industrial demand; (3) a demand-response (DR) aggregator that trims or shifts loads when prices are high or feeder limits are reached; and (4) a distribution-network power-flow solver that checks voltages and line ratings on a feeder. To this aim we adopted the pandapower tool. All outputs like weather, sector loads, curtailed demand, and grid states are streamed to disk in compressed chunks, so multi-year studies run without exhausting memory. A built-in test suite strengthens scientific rigour: it (i) verifies bit-for-bit reproducibility under fixed random seeds, (ii) confirms that temperature and wind residuals follow the intended Normal and Weibull laws, (iii) uses Ljung–Box tests to show the expected time-correlation, (iv) computes steady-state confidence intervals with the batch-means method, and (v) checks model sensitivity by sweeping key parameters. Together, these features give planners, utilities, and researchers a reliable tool for exploring how weather, occupant behaviour, DR rules, and network limits interact. |