bradleyjeck / epanetReader

Read text files in Epanet's .inp and .rpt formats into R
Other
17 stars 13 forks source link

write.inp function write Unbalanced STOP by default #37

Closed mgomezgoiri closed 6 years ago

mgomezgoiri commented 7 years ago

Dear Bradley,

We are trying to genete different ".inp" files authomaticaly. But we realize that, when we run them in Epanet collapse before finishing. We have been finding out why and we realize that "write.inp" function writes in [OPTIONS] "Unbalanced STOP" by default. And we would like to choose the other option: "Unbalanced Continue10". Is this possible in someway?

We are generating 100 individuals (inps) and it is a tedious work if we should do it one by one.

Thank you in advance,

bradleyjeck commented 7 years ago

Hi @mgomezgoiri,

The value of the unbalanced option can be changed before you write the inp file. For example

# see existing value of the option
Net1$Options$UNBALANCED
# change the value of the option
Net1$Options$UNBALANCED <- "Continue 10"
# see new value of the option
Net1$Options$UNBALANCED

Hope this helps,

Brad

PS Did you see that there is a new package for running EPANET simulations directly in R? https://github.com/bradleyjeck/epanet2toolkit