Open s-u-m-a-n-t-h opened 1 year ago
Any response to this please ?
I'm sorry, I totally thought I had responded, and it looks like it never sent.
Can you provide us with just the [PATTERNS] section (or the part of it that is causing issues) that your .inp file is using? We are having trouble replicating the error, and that would probably help us get there quicker. We definitely don't want the whole file or proprietary data, but if you can give some of the patterns section lines, it would be very helpful. Thanks
@s-u-m-a-n-t-h can I see the options section of the .inp file that you got out of EPANET that has the default pattern? Thanks!
@dbhart Please find below the [OPTIONS] section of the .inp file when opened with a text editor :
[OPTIONS] Units LPS Headloss H-W Specific Gravity 1 Viscosity 1 Trials 500 Accuracy 0.001 Unbalanced Continue 10 Pattern time Demand Multiplier 1.0 Emitter Exponent 0.5 Quality Cloro mg/L Diffusivity 1 Tolerance 0.01
Please note that it says time against Pattern.
Hi @dbhart , were you able to look at the options section of my input file ?
Summary
In epanet, under project defaults>Hydraulics>Pattern , if the value is a string like 'time' or if it is a number that's not '1' , the wntr io does not allow importing the file. I found the following lines in wntr io relevant to this issue :
ln no 235 : class InpFile(object): """ EPANET INP file reader and writer class. This class provides read and write functionality for EPANET INP files. The EPANET Users Manual provides full documentation for the INP file format. """ . . . .
ln no 342 : self._read_patterns() . . . . ln no 973: def _read_patterns(self): _patterns = OrderedDict() for lnum, line in self.sections['[PATTERNS]']:
Environment
Python version, WNTR version, operating system
Example