Skip to main content

DWD Suite Local Setup Instructions

Goal

The goal of this document is to setup a computer to be able to run EPANETConsoleCore. By the end of the document, you should be able to press F5 and watch it run. Specifically, the EPANETConsoleCore project will be the startup project (i.e. we shouldn’t need to do the Network Manager).

Get Latest Source Code

Either perform a fresh clone of the repos or update an existing copy of the repos.

Fresh Clone Repositories

git clone --recurse-submodules -j8 git@github.com:gqc/hydrotrek-dwd-suite.git
cd hydrotrek-dwd-suite
git checkout master
git submodule init
git submodule update
git submodule foreach --recursive "git checkout master || :"
git submodule foreach --recursive "git checkout main || :"

Update Existing Repositories

git checkout master
git pull
git submodule init
git submodule update
git submodule foreach --recursive "git pull || :"
git submodule foreach --recursive "git checkout master || :"
git submodule foreach --recursive "git checkout main || :"

Prepare to Run

Restore the Latest Database

  1. Navigate to Sharepoint: Documents/OH/HydroTrek/DWD/db_dumps
  2. Go into the subdirectory for the desired network, i.e. dnv, iitd, or mtw and download the latest dump file.
  3. In PSQL, create a new empty database matching the name of the dump file, i.e. mtw_5_7_2025
  4. Restore the dump into the database with either
    1. PG Admin
    2. or PSQL with the command pg_restore -U postgres -d mtw_5_7_2025 mtw_5_7_2025.backup

Create a Local Publish of EpanetConsoleCore

If you want to run EpanetConsoleCore locally via the Frontend website/API, then you will need to publish the EpanetConsoleCore solution to your local file system:

  1. Open the EpanetConsoleCore solution in Visual Studio Professional (2022 or later)
  2. Right click on the solution and select "Publish"
  3. Make note of the publish output directory and confirm the publish

Update DwdApiAspnet/appsettings.json

Update the API's local appsettings.json file to...

  1. Point at the proper epanetconsolecore.exe definition based on the publish output directory you obtained in the previous section.
  2. Point at the proper (newly restored) database