Presentation is loading. Please wait.

Presentation is loading. Please wait.

Linear Programming Water Resources Planning and Management Daene McKinney.

Similar presentations


Presentation on theme: "Linear Programming Water Resources Planning and Management Daene McKinney."— Presentation transcript:

1 Linear Programming Water Resources Planning and Management Daene McKinney

2 General Constrained Optimization Model n decision-variables x j and m constraints Maximize (or minimize) F(X) subject to g i (X) = b i, i = 1, 2, 3, …, m X is the vector of all x j

3 Linear Programming Model If the objective function F(X) is linear and If all the constraints g i (X) are linear Then the model becomes a linear programming model The general structure of a linear programming model is: Maximize (or minimize) Σ j n P j x j Subject to: Σ j n a ij x j ≤ b i for i = 1, 2, 3, …, m x j ≥ 0 for all j = 1, 2, 3, …, n

4 Yield Yield - amount of water that can be supplied during some time interval Firm yield - amount of water that can be supplied in a critical period – Without storage: firm yield is lowest streamflow on record, – With storage: firm yield can be increased to approximately the mean annual flow of stream

5 Regulation and Storage Critical period - period of lowest flow on record – “ having observed an event in past, it is possible to experience it again in future ” Storage must be provided to deliver additional water over total streamflow record Given target yield, required capacity depends on risk that yield will not be delivered, i.e., the reliability of the system

6 Storage Capacity – Yield Function Maximum constant ‘dependable’ reservoir release or yield available during each period of operation, as a function of the active storage volume capacity The yield from any reservoir depends on the active storage capacity and the inflow Two storage–yield functions for a single reservoir defining the maximum minimum dependable release. These functions can be defined for varying levels of yield reliability.

7 Increasing Yield – Add Storage Consider a sequence of 5 annual flows, say 2, 4, 1, 5 and 3, at a site in an unregulated stream. The minimum ‘dependable’ annual flow yield of the stream at that site is 1, the minimum observed flow. A discharge of 1 can be ‘guaranteed’ in each of the five time-periods of record. If a reservoir with an active storage capacity of 1 is built, it could store 1 unit of flow when the flow ≥ 2, and then release it when the flow is 1, increasing the minimum dependable flow to 2 units Similarly, a yield of 3 could be attained in each time period with 2 units of active capacity The maximum annual yield cannot exceed the mean annual flow, which in this example is 3.

8 Linear Programming for Deriving Storage – Yield Functions Consider a single reservoir that must provide a minimum release or yield Y in each period t. Assume a record of known streamflows at the reservoir site is available. The problem is to find the maximum uniform yield Y obtainable from a given active storage capacity, K Maximize Y Subject to S t + Q t - Y - R t = S t+1 t = 1, 2, 3, …, T; T+1 = 1 S t ≤ K t = 1, 2, 3, …, T The model must be solved for various assumed values of capacity K. Only the inflow values Q t and reservoir active storage capacity K are known. All other storage, release and yield variables are unknown. The upper bound on the yield, regardless of reservoir capacity, will be the mean inflow QtQt K StSt Y RtRt

9 Max Y GAMS Code

10 Max Y Result

11 Capacity – Yield Function

12 Given a yield Y, what is the minimium capacity K we need? QtQt RtRt K StSt Y YK 1.0 1.5 2.0 2.5 3.0 4.0 Given Find

13 Water Quality Management Critical component of overall water management in a basin Water bodies serve many uses, including – Transport and assimilation of wastes – Assimilative capacities of water bodies can be exceeded WRT intended uses Water quality management measures – Standards Minimum acceptable levels of ambient water quality – Actions Insure pollutant load does not exceed assimilative capacity while maintaining quality standards – Treatment

14 Water Quality Management Process Identify – Problem – Indicators – Target Values Assess source(s) Determine linkages – Sources  Targets Allocate permissible loads Monitor and evaluate Implement

15 Water Quality Model Calibration Example The stream receives wastewater effluent from two point sources (Sites 1 and 2) Without some treatment at these sites, the concentration of some pollutant, P j mg/l, at sites j = 2 and 3, will continue to exceed the maximum allowed concentration Pj Max The problem is to find the level of wastewater treatment (waste removed) at sites i = 1 and 2 that will achieve the required concentrations at sites j = 2 and 3 at minimum cost

16 Simple model to predict concentrations in a stream P = concentration at site j (M/L 3 ) Q j = streamflow at site j (L 3 /T) Mass in the stream will decrease as it travels downstream The fraction a ij of the mass at Site i that reaches Site j is: a ij = exp(kt ij ) where k is a rate constant (1/T) t ij is the travel time (T) from Site i to Site j So P 2 (just upstream of Site 2) = P 1 a 12 P 3 (just upstream of Site 3) = P 2 + a 23

17 Model Calibration SP1 s SP2 s = concentration of sample s in reaches 1 and 2 E s = error SP2 s + E s = SP1 s a 12 (Q 1 /Q 2 ) Objective - Minimize sum of absolute values of error terms E s Minimize Σ s | E s | Software can’t handle absolute values, so convert Minimize Σ s (PE s + NE s ) That is E s = PE s – NE s, where PE s ≥ 0, and Ne s ≥ 0 If E s < 0, PE s = 0 and -NE s = E s If E s > 0, PE s = E s and NE s = 0

18 Model Minimize Σ s (PE s + NE s ) Subject to SP 2s + E s = SP 1s a 12 (Q 1 /Q 2 ), s = 1, 2, 3, …, S E s = PE s – NE s s = 1, 2, 3, …, S PE s ≥ 0, NE s ≥ 0 s = 1, 2, 3, …, S

19 Model GAMS Code Solution

20 Water Quality Management Model Example W 1, W 2 = Pollutant loads (kg/day) x 1, x 2 = Waste removal efficiencies (%) P 2 max, P 3 max = Water quality standards (mg/l) P 2, P 3 = Concentrations (mg/l) Q 1, Q 2, Q 3 = Flows (m 3 /sec) a 12, a 13, a 23, = Transfer coefficients

21 Water Quality Example

22 Paramet er UnitsValue Q1Q1 m 3 /s10 Q2Q2 m 3 /s12 Q3Q3 m 3 /s13 W1W1 kg/day250,000 W2W2 kg/day80,000 P1P1 mg/l32 P 2 max mg/l20 P 3 max mg/l20 a 12 -0.25 a 13 -0.15 a 23 -0.60

23 Water Quality Example

24 Cost of treatment at 1 >= cost at 2 marginal cost at 1, c 1, >= marginal cost at 2, c 1, for the same amount of treatment.

25 Water Quality Example

26 Example Irrigation project –1800 acre-feet of water per year Decision variables –x A = acres of Crop A to plant? –x B = acres of Crop B to plant? 1,800 acre feet = 2,220,267 m 3 400 acre = 1,618,742 m 2 Crop ACrop B Water requirement (Acre feet/acre)32 Profit ($/acre)300500 Max area (acres)400600

27 Example 2 4 6 8 10 2468 x A (hundreds acres) x B (hundreds acres) x B < 600 x A > 0 x A < 400 3x A +2 x B < 1800 x B > 0

28 Example 2 4 6 8 10 2468 x A (hundreds acres) x B (hundreds acres) x B < 600 x A > 0 x A < 400 x B > 0 Z=3600=300x A +500x B Z=2000=300x A +500x B Z=1000=300x A +500x B (200, 600)

29 GAMS Code POSITIVE VARIABLES xA, xB; VARIABLES Z; EQUATIONS objective, xAup, xBup, limit; objective.. Z =E= 300*xA+500*xB; xAup.. xA =L= 400.; xBup.. xB =L= 600.; limit.. 3*xA+2*xB =L= 1800; MODEL Farm / ALL /; SOLVE Farm USING LP MAXIMIZING obj; Display xA.l; Display xB.l;

30 GAMS Output LOWER LEVEL UPPER MARGINAL ---- EQU objective... 1.000 ---- EQU xAup -INF 200.000 400.000. ---- EQU xBup -INF 600.000 600.000 300.000 ---- EQU limit -INF 1800.000 1800.000 100.000 LOWER LEVEL UPPER MARGINAL ---- VAR xA. 200.000 +INF. ---- VAR xB. 600.000 +INF. ---- VAR obj -INF 3.6000E+5 +INF. Marginal

31 Marginals Marginal for a constraint = Change in the objective per unit increase in RHS of that constraint. –i.e., change x B –Objective = 360,000 –Marginal for constraint = 300 –Expect new objective value = 360,300

32 New Solution LOWER LEVEL UPPER MARGINAL ---- EQU objective... 1.000 ---- EQU xAup -INF 199.333 400.000. ---- EQU xBup -INF 601.000 601.000 300.000 ---- EQU limit -INF 1800.000 1800.000 100.000 LOWER LEVEL UPPER MARGINAL ---- VAR xA. 199.333 +INF. ---- VAR xB. 601.000 +INF. ---- VAR obj -INF 3.6030E+5 +INF. Note: Adding 1 unit to x B adds 300 to the objective, but constraint 3 says and this constraint is “tight” (no slack) so it holds as an equality, therefore x A must decrease by 1/3 unit for x B to increase by a unit.

33 Unbounded Solution 2 4 6 8 10 2468 x A (hundreds acres) x B (hundreds acres) x A > 0 x A < 400 x B > 0 unbounded Take out constraints 3 and 4, objective can Increase without bound

34 Infeasibility 2 4 6 8 10 2468 x A (hundreds acres) x B (hundreds acres) x B < 600 x A > 0 x A < 400 3x A +2 x B > 3000 x B > 0 Change constraint 4 to >= 3000, then no intersection of constraints exists and no feasible solution can be found

35 Multiple Optima Change objective coefficient to 200, then objective has same slope as constraint and infinite solutions exist 2 4 6 8 10 2468 x A (hundreds acres) x B (hundreds acres) x B < 600 x A > 0 x A < 400 x B > 0 Z=1800=300x A +200x B Infinite solutions on this edge 3x A +2 x B < 1800


Download ppt "Linear Programming Water Resources Planning and Management Daene McKinney."

Similar presentations


Ads by Google