lizardsystem/lizard-waterbalance — Issue #14: Implementation of method LoadComputer.compute appears incorrect.
Author: swinkels
Created: 2011-11-07 15:28:09+00:00
State: open

I found a bug in the code to compute the load on the incoming water flows, which I more or less fixed in commit efe57ff1471a5c6976649a55830e306dc101dc47. However, as the comments show, not all is well with this code:

for key, value in events.items():
# key never seems to be equal to 'intakes'
if key in ['intakes', 'defined_input']:
for key_intake, value_intake in value.items():
if key_intake == 'intake_wl_control':
# if key is indeed never equal to 'intakes',
# key_intake will never be equal to
# 'intake_wl_control'

To me, such comments are a sign that the implementation solves a different problem than the one that has to be solves. We need to repair the implementation.