kLabUM / pystorms

Simulation Sandbox for the Design and Evaluation of Stormwater Control Algorithms
https://pystorms.netlify.app
GNU General Public License v3.0
30 stars 16 forks source link

Update pyswmm to 1.0 #28

Closed abhiramm7 closed 2 years ago

abhiramm7 commented 2 years ago

Just bumping up the version number works for most part. There is an issue with how pollutants are being handled. That needs to be addressed.

abhiramm7 commented 2 years ago
        """
        Get the pollutant concentration in a node
        :param str ID: Node ID
        :param int NUMPOLLUTANT: Number of pollutants
        :return: Pollutant as list
        """
        pollut_quantity = self._model.getNodePollut(ID, tkai.NodePollut.nodeQual)
        pollut_id = self._model.getObjectIDList(tkai.ObjectType.POLLUT.value)
        return {pollut_id[i]: pollut_quantity[i] for i in range(0, len(pollut_id))}

Updated it with pyswmm 1.0.1 pollutant typing.

abhiramm7 commented 2 years ago

Tests are passing. Upgrade is patched in tutorials branch.