qgisred / QGISRed

GNU General Public License v2.0
23 stars 8 forks source link

Controls being changed after simulation run #81

Closed Lolaento closed 2 years ago

Lolaento commented 2 years ago

Hello,

I've been entering some rule-based controls to a model that I am building, it seems that for some controls it is changing by itself? E.g for the control given below, it splits my Naleen PS ON into 1 and 2 image Ideally, I would like to keep it in 1 control rule.

Also for a different set of controls, it was entered as: image image

but after a run it turns into: image

Any ideas?

Also, how would you guys go about modelling booster pumps that operate based on whether another booster pump is running or not?

neslerel commented 2 years ago

Hi @Lolaento,

It is so weird. Could you send me the project (with the original rule-based controls) to nestorlerma@waterpi.com? Are you sure it only happens when running a simulation or if you save the controls and go back to edit them, does it already happen? If you have time and want to, you can record a video showing the problem. Thank you!

neslerel commented 2 years ago

Hi @Lolaento

I have checked the data you sent me by email. I have been able to reproduce the first problem you mention: A rule is automatically split in two. This is because in Epanet, when you have some conditions connected with an "AND" operator, you have to split them into different rules. Maybe we use the same method to export to epanet to save the data in DBF files. I noted it to review it and try to save the rule as one rule.

neslerel commented 2 years ago

Sorry, about the second problem, I coudn't reproduce... Can you detail the steps to reproduce it? What QGISRed version are you using?

About your last question, @fmartine could you answer you.

fmartine commented 2 years ago

Concerning last question, you can add a rule with the following syntaxis: RULE 1 IF PUMP xxx STATUS IS OPEN THEN PUMP yyyy STATUS IS OPEN ELSE PUMP yyyy STATUS IS CLOSED

Lolaento commented 2 years ago

Thank you, gents!

Appreciate all of your help.