Tutorial 1: Swiss Municipality

Note

UNDER CONSTRUCTION

This example creates a simulation for the Swiss municipality of Allschwil, which is a village in the canton of Basel-Landschaft in Switzerland. We simulate two scenarios. In the first scenario we model the current demand and energy system (i.e., “as-is”). In the second scenario we model heating sector electrification, solar PV integration, and thermal energy storage. No optimisation is applied.

First, install DEM as described in the installation instructions. Create a directory structure as described in Running a Simulation: Your project directory project_dir (can have any name) must contain the subdirectories data and config/config_files.

Next you need data files and configuration files. Download the data files package for Switzerland from Zenodo. Unzip the archive and place the files in the data directory, keeping the folder structure as downloaded from Zenodo.

Next, we prepare the configuration files. For the first simulation (“as-is”) we adopt all the standard parameters. Therefore, only the simulation.yml configuration file must be provided to DEM:

number_of_days: 365
district_number: 2762
generate_plots: true
save_results: true

We simulate 365 days for the municipality with district_number 2762, which refers to the BFS number for Allschwil. We want the model to generate plots at the end of the simulation (generate_plots: true) and also save the resulting values (save_results: true). Place this file (simulation.yml) in the config_files directory.

Open the Anaconda prompt and navigate to the project_dir. Activate the environment you installed for DEM (environment name might vary based on the installed DEM version):

conda activate dem_0_1_0_rc0

Start the simulation from the Anaconda prompt:

district_energy_model

Once the simulation is completed, you can find the new directory dem_output which was created by DEM in project_dir containing plots and results files.