qgisred / QGISRed

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

Serious trouble on rule-based controls #65

Closed hyperprogram2 closed 2 years ago

hyperprogram2 commented 2 years ago

Hello,

In the "Create/Edit Controls Simples and Rules" window, the conditions of the rules are not displayed and are not working. It happens after importing an .inp file or after manually entering the condition.

For example, with the rule "P_CARROS_P5_1_OFF who works fine en Epanet 2.0 : image

the conditions does not appear in the Qgisred window and is not taken into account in the simulation: image

There the same issue with rule based on clocktime : image

image

However, the conditions of a few rare rules are taken into account and only these rules are kept following the import from Epanet (after opening and closing the Edit / Control rules window). All other Epanet rules disappear the second time you open the Edit / Control rules window (incomplete rules appear the first time after import then disappear on the second opening of the Edit / Control rules window).

image

Without rules, qgisred is unfortunatly unusable...

Thank you for examining this problem

neslerel commented 2 years ago

Thanks @hyperprogram2 for the detailed description of the issue.

I tried to reproduce the bug, but I can't. Could you attach the INP or send me it to nestorlerma@waterpi.com?

hyperprogram2 commented 2 years ago

Hello,

The INP file is attached (and .net).

It has been created with EPANET build 2.00.12.01.

I used it with QGISred 0.14 and QGis 3.16.1

I notices another issue with this file : whith the import of .inp with default parameters in the "Import data" window, the conditions of some rules are not displayed. But, when a directory is defined in the "Import data" (local directory), rules and other objects from inp are imported in the .DBF files in the directory but cannot be read by QGISred and error messages are displayed ("El campo Attribute no existe en el DBF de Rules", "El campo Clause no existe en el DBF de Rules", "El id 'CANAL' para la curva de modulación del nudo CAN_103 no existe", "El id 'CARROS_CLOS_RIPERT' para la curva de modulación del nudo CAR_CRI_140 no existe", etc.) when trying to access to this data with QGISred.

Best Regards

----- Mail original ----- De: "neslerel" @.> À: "neslerel/QGISRed" @.> Cc: "hyperprogram2" @.>, "Mention" @.> Envoyé: Lundi 18 Octobre 2021 17:56:11 Objet: Re: [neslerel/QGISRed] Serious trouble on rule-based controls (Issue #65)

Thanks @hyperprogram2 for the detailed description of the issue.

I tried to reproduce the bug, but I can't. Could you attach the INP or send me it to @.*** ?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub , or unsubscribe . Triage notifications on the go with GitHub Mobile for iOS or Android .

neslerel commented 2 years ago

Sorry @hyperprogram2, I can't see the attached file. Maybe you have to attach it on GitHub or send me an email.

About the other issues, I'll try to reproduce them. And for your info, the Spanish messages will be replaced by English messages in the next version of the plugin.

Thanks again!

hyperprogram2 commented 2 years ago

Hello,

Files were attached to the mail.

You can download a zip file with this link : https://we.tl/t-RMcdGkBmwr

Question : Do you plan to add a function in QGISred to plot time series : flow results for a link, pressure for nodes ?

Thank you

----- Mail original ----- De: "neslerel" @.> À: "neslerel/QGISRed" @.> Cc: "hyperprogram2" @.>, "Mention" @.> Envoyé: Mardi 19 Octobre 2021 18:28:38 Objet: Re: [neslerel/QGISRed] Serious trouble on rule-based controls (Issue #65)

Sorry @hyperprogram2 , I can't see the attached file. Maybe you have to attach it on GitHub or send me an email.

About the other issues, I'll try to reproduce them. And for your info, the Spanish messages will be replaced by English messages in the next version of the plugin.

Thanks again!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub , or unsubscribe . Triage notifications on the go with GitHub Mobile for iOS or Android .

neslerel commented 2 years ago

Thanks @hyperprogram2!

I could reproduce the issue. As it is suggested in previous issue (#64 ) it is caused by rules with clocktimes. I'm going to identify the cause andtry to fix it.

About your question, yes, we have that feature in our list. However, we want to implement before other ones that are not in Epanet.

neslerel commented 2 years ago

It is already fixed (at least with the tests I have done). In this link you can download an unofficial version (0.14.2) to test it. http://www.redhisp.webs.upv.es/files/QGISRed/QGISRed_v0.14.2.zip

To use it, you have to:

  1. Uninstall the QGISRed plugin from the QGis plugin manager.
  2. Close QGis
  3. Go to Windows Applications and Features and uninstall the program called QGISRed (I guess version 1.0.14.0).
  4. Open QGis and go to the plugin manager.
  5. Install from file (with the zip downloaded from the previous link)
  6. When using it, it will ask to install the new dependencies.

I hope everything works correctly. Regards

neslerel commented 2 years ago

Moreover, I improved the way to edit times and clocktimes of rules. I hope it works better. image

hyperprogram2 commented 2 years ago

Hello,

I tried v0.14.2 and the 6 rules with clocktime are OK but conditions of most of the others rules based on tank level are ignored. Only 5 rules with level are complete.

image

After accepting the rules and re-opening the controls window, only few rules are remained

image

For example, rule P_GAUDASSE_1_ON has been kept but not rule P_GAUDASSE_1_OFF

image

Best regards

neslerel commented 2 years ago

Hi @hyperprogram2,

Did you reimported the INP file after installing the new version? I tried to reproduce your issue and I coudn't. I show you how all the rules are imported correctly and saving and after load it again, all the rules are available. 4v7i3NZNJj

Something I noticed is that the order of the rules is not the same that original INP and I fixed it (available in next version).

hyperprogram2 commented 2 years ago

Hi, I tried again with v0.14.2 and the same inp file (TEST_Rules.inp) but only 11 rules were complete... :-(

neslerel commented 2 years ago

Could you record a gif or video to show me the process from the time you import the INP file until you get these incomplete rules?

hyperprogram2 commented 2 years ago

Here is the GIF

Animation

neslerel commented 2 years ago

Hi @hyperprogram2,

I found the problem and I'm going to fix it.

I'll tell you when I release a new version.

neslerel commented 2 years ago

In this link you can download an unofficial version (0.14.3) to test it. http://www.redhisp.webs.upv.es/files/QGISRed/QGISRed_v0.14.3.zip

To use it, you have to:

  1. Uninstall the QGISRed plugin from the QGis plugin manager.
  2. Close QGis
  3. Go to Windows Applications and Features and uninstall the program called QGISRed (I guess version 1.0.14.0 or 1.0.14.2)).
  4. Open QGis and go to the plugin manager.
  5. Install from file (with the zip downloaded from the previous link)
  6. When using it, it will ask to install the new dependencies.

I hope everything works correctly. Regards

hyperprogram2 commented 2 years ago

Hello,

I tested the new version and it works fine .

Thank you