Water Quality Constraints

If maximum water quality concentrations on demand site inflow from supplies have been set, then additional water quality constraints are created. The basic relationship states that the weighted average mixed concentration from all supplies must not exceed the maximum allowed concentration.

(Q1C1 + Q2C2 + ...) / (Q1 + Q2 + ... ) <= CmaxEqn. 1

which can be transformed into

Q1 (1 - C1 / Cmax) + Q2 (1 - C2 / Cmax) + ... >= 0Eqn. 2

where Qi is the flow into the demand site from source i, Ci is the concentration of source i in the previous timestep, and Cmax is the maximum allowed concentration. Because the water quality calculations in the river are inherently non-linear, the concentrations used in the equation above must come from the previous time step. Thus, the (1 - Ci / Cmax) terms are constants, and this equation (Eqn. 2) is a suitable form for a LP constraint.

Example

As an example, consider a Demand Site that is connected to both surface water and groundwater sources. The demand site has no treatment facilities, and requires the concentration of BOD to be 3 mg/l or less. The concentrations of BOD in the previous time step are 10 mg/l in the river and 1 mg/l in the groundwater. The demand is 50; the river supply is 10, the groundwater supply (considering pumping capacity) is 30, and the reservoir has 50 units available for release. The reservoir's top of conservation pool (TOC) is 200.

WEAP will need to choose a mix from the two sources such that the average BOD concentration does not exceed 3 mg/l.

Substituting into the above equations, where Q1 is the supply from groundwater (QG), C1 is the groundwater BOD concentration (1 mg/l), Q2 is the supply from the river (QR), C2 is the river BOD concentration (10 mg/l), and Cmax is the demand site's maximum BOD concentration (3 mg/l):

(1Q3 + 10Q4) / (Q3 + Q4) <= 3 (from Eqn. 1)Eqn. 3

Q3 (1 - 1/3 ) + Q4 (1 - 10/3) >= 0 (from Eqn. 2)Eqn. 4

(2/3) Q3 - (7/3) QR >= 0Eqn. 5

(2/3) Q3 >= (7/3) Q4Eqn. 6

Q3 >= (7/2) Q4Eqn. 7

This equation gives the minimum ratio of river water to groundwater that will satisfy the demand site's water quality constraint.

The demand (50) will come from the two sources:

Q3 + Q4 = 50Eqn. 8

Q3 = 50 - Q4Eqn. 9

Substituting into Eqn. 7:

50 - Q4 >= (7/2) Q4Eqn. 10

50 >= (9/2) Q4Eqn. 11

Q4 <= 11.11Eqn. 12

therefore,

Q3 = 50 - 11.11 = 38.89Eqn. 13

Substituting into Eqn. 3:

(38.89 * 1 + 11.11 * 10) / (38.89 + 11.11) <= 3Eqn. 14

(38.89 * 1 + 11.11 * 10) / (38.89 + 11.11) <= 3Eqn. 15

149.99 / 50 <= 3Eqn. 16

We see that the maximum water quality constraint is satisfied.

The water quality constraint will be added as a new constraint to the LP. WEAP will solve first for the allocations to the demand site, and second to fill up the reservoir. Here is the LP formulation for the first:

Q1 = Add1 + Q2

Q2 = Q4 + Q5

Q3 + Q4 = 50 C1

S1 = 200 C2

S1 = 50 + Add1

C1 + E1 >= FC

(1 - 1/3 ) * Q3 + (1 - 10/3) * Q4 >= 0 (Water quality constraint)

 Obj fn: FC - 0.33 E1 - 0.33 E2

Upper and lower bounds:

Q1 = 10

Q2 >= 0

C3 >= 0

Q4 >= 0

Q5 >= 0

Add1 >= -50

0 <= S1 <= 200

0 <= C1 <= 1

0 <= C2 <= 1

0 <= E1 <= 0.0001

0 <= E2 <= 0.0001

0 <= FC <= 1

 Where:

Add1 = addition to reservoir 1 storage (negative "additions" represent releases, which cannot exceed the initial storage)

S1 = final storage in reservoir 1

C1 = D1 coverage

C2 = Coverage for "demand" to fill reservoir 1 to top of conservation (TOC) pool

E1 = D1 epsilon

E2 = Res 1 TOC epsilon

FC = Final Coverage

Here is the solution:

Q1 = 10

Q2 = 10

Q3 = 30

Q4 = 8.57

Q5 = 1.43

Add1 = 0

S1 = 50

C1 = 0.77

C2 = 0

E1 = E2 = 0.0001

FC = 0.7701

Note that Reservoir 1 has plenty of storage to satisfy the demand, but because of the water quality constraint for D1 and the low water quality of the river, only 8.57 units of water can be supplied from the river. For the second LP iteration, to filling the reservoir, here is the LP formulation:

Q1 = Add1 + Q2

Q2 = Q4 + Q5

S1 = 200 C2

S1 = 50 + Add1

C2 + E2 >= FC

(1 - 1/3 ) * Q3 + (1 - 10/3) * Q4 >= 0

 Obj fn: FC - 0.33 E1 - 0.33 E2

Upper and lower bounds:

Q1 = 10

Q2 >= 0

Q3 = 30 (set after first LP iteration)

Q4 = 8.57 (set after first LP iteration)

Q5 >= 0

Add1 >= -50

0 <= S1 <= 200

0 <= C1 <= 1

0 <= C2 <= 1

0 <= E1 <= 0.0001

0 <= E2 <= 0.0001

0 <= FC <= 1

 Where:

Add1 = addition to reservoir 1 storage (negative "additions" represent releases, which cannot exceed the initial storage)

S1 = final storage in reservoir 1

C1 = D1 coverage

C2 = Coverage for "demand" to fill reservoir 1 to top of conservation (TOC) pool

E1 = D1 epsilon

E2 = Res 1 TOC epsilon

FC = Final Coverage

Here is the solution:

Q1 = 10

Q2 = 8.57

Q3 = 30

Q4 = 8.57

Q5 = 0

Add1 = 1.43

S1 = 51.43

C1 = 0.77

C2 = 0.01

E1 = E2 = 0.0001

FC = 0.0101

The reservoir can add 1.43 to storage, because the demand site can only use 8.57 of the poor quality river water.