Closed abhiramm7 closed 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.
Tests are passing. Upgrade is patched in tutorials branch.
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.