Running a Simulation

Run from command-line tool

Work in progress

Run from source code

You can run the District Energy Model directly from the Python source code available on GitHub. Python and the required packages must be installed beforehand.

Step 1: Clone the Repository

Clone the GitHub repository to a local directory:

git clone https://github.com/HSLUDEM/District_Energy_Model.git

Keep the directory structure exactly as cloned. See Directory Structure for details.

Step 2: Create the Conda Environment

In the config directory, locate the file named dem_conda_environment.yml (or similar). Create a new Conda environment from this file. Refer to the Conda documentation for instructions. If you are unfamiliar with Conda, consult the user guide.

Step 3: Prepare Data Files

Place the required input data in the directories described in Model Input - Data Files.

Note

A complete Switzerland-wide data package for DEM simulations is currently in preparation and will be made available soon. This will eliminate the need for users to assemble their own datasets. In the meantime, please reach out to us (Contact) to request access to the data.

Step 3: Configuation Files

The model can run without configuration files, in which case default settings and parameter values are applied. The default scenario performs a basic simulation without optimisation or additional measures. To modify model parameters, create configuration files as described in Model Input - Configuration Files and place them in the config/input_files directory.

Step 4: Run the Simulation

Execute the Python script src/run_dem.py either:

  • from an IDE (e.g., Spyder, Visual Studio Code), or

  • from a terminal window.

Step 5: Retrieve Results

Simulation results are saved automatically to the output directory specified in the simulation.yaml configuration file (Model Input - Configuration Files). See Model Output for details on output files and structure.