OpenWaterAnalytics / EPyT

EPyT: An EPANET-Python Toolkit for Smart Water Network Simulations
https://epanet-python-toolkit-epyt.readthedocs.io
European Union Public License 1.2
39 stars 26 forks source link

getRuleID() cannot get the last rule ID #21

Closed sdlj2008 closed 1 year ago

sdlj2008 commented 1 year ago

For this example: d.getRuleID()

It can not get the last rule ID because the following code does not contain the index of last rule:

    if len(argv) == 0:
        index = list(range(1, self.getRuleCount()))

The correct code should be as follows:

    if len(argv) == 0:
        index = list(range(1, self.getRuleCount() + 1))