Reservoir operating rules to sustain environmental flows in regulated rivers