OpenWaterAnalytics / EPANET

The Water Distribution System Hydraulic and Water Quality Analysis Toolkit
MIT License
279 stars 204 forks source link

Ignore errors in coords. read from file #702

Closed LRossman closed 1 year ago

LRossman commented 1 year ago

Ignores errors when reading node & link vertex coordinates from an input file. Also when saving a project to an input file, the [DEMANDS] section only includes non-zero demands. See issues #603 and #174 .

eladsal commented 1 year ago

@LRossman, this applies to the first base demand only, right? If there is a second demand category with zero demand, it will be written.

Mariosmsk commented 1 year ago

I made some tests and looks ok for all demand categories (non-zero demands).

LRossman commented 1 year ago

Thanks @Mariosmsk . For @eladsal , here is the result of a test I made: The original input file had the following [DEMANDS] section:

;Junction        Demand    Pattern   Category
;--------------------------------------------   
J1               0                   ;Domestic

J2               0                   ;Domestic
J2               10                  ;School

J3               2                   ;Domestic
J3               0                   ;Factory

J4               0                   ;Domestic
J4               0                   ;School
J4               0                   ;Factory

The [DEMANDS] section in the file created by calling ENsaveinpfile looks as follows:

[DEMANDS]
 J2              10.000000        ;School
 J3               2.000000        ;Domestic
eladsal commented 1 year ago

Thanks @LRossman , I think we are good to go.