lsmatott / ostrich-swmm

A toolset for connecting the OSTRICH optimization software toolkit with the SWMM simulation model.
GNU General Public License v2.0
29 stars 19 forks source link

Problem of running Ostrich-SWMM #24

Open OlePetterOvergaard opened 2 years ago

OlePetterOvergaard commented 2 years ago

I found the article "OSTRICH-SWMM: A new multi-objective optimization tool for green infrastructure planning with SWMM" quite interesting and really want to run and test Ostrich-SWMM. As a start I want to run the examples that is posted with the scripts.

During a periode now I have been trying to understand this program trought this channel. But it seems to me that there something missing. The program is asking for the file: ostrich-swmm.sh throught the ModelExecutable in the ostln.txt file. I've read trought the tutorial and the ostrich-swmm.sh seems to be a part of the input. Do any of you know where I can find this file or explain how its created?

add on: I am running it on a Windows computer

kmmacro commented 2 years ago

Hi @OlePetterOvergaard, the ostrich-swmm.sh can be used to set appropriate paths to SWMM and ostrich_swmm, but if those are already on your PATH, you could run from the command line.

This is what my ostrich-swmm.sh file contains:

#!/bin/bash
export PATH="C:\..\EPA SWMM 5.1.013":$PATH
export PATH="C:\..\ostrich_swmm":$PATH

ostrich-swmm run -c model-ostrich-swmm-config.json

I agree that we need to add this example to the repo in case others need it.

Narine-mtc commented 2 years ago

Hi @OlePetterOvergaard, As @kmmacro points out, the .sh file contains the path to ostrich-swmm and swmm. The last line of code executes ostrich-swmm with the parameters set on the model-ostrich-swmm-config.json file.

Just copying and pasting the code that Kristina shared above, and adjusting the PATHs should suffice if you are using Linux. Unfortunately, as you are using Windows, this commands wont work. In this case you have to convert the “bash” syntax to “DOS” syntax.

The following link can help with that: https://stackoverflow.com/questions/3200018/how-do-i-convert-a-bash-shell-script-to-a-bat-file

Hope it helps.