+ if (max == 0) {
+ out_on_zero++;
+ switch (out_on_zero) {
+ case 1:
+ if (out_ready == 0) {
+ actual_flow = max_flow;
+ }
+ break;
+ case 2:
+ actual_flow = 0.0;
+ }
+ } else {
+ if (max < actual_flow) actual_flow = max;
+ if (max_flow < actual_flow) actual_flow = max_flow;
+ }
+ out_ready++;