Water Resources System Analysis
Chapter 1. Water Resources Planning and Management: An Overview
Introduction
Planning and Management Issues: Some Case Studies
So, Why Plan, Why Manage?
System Components, Planning Scales and Sustainability
Planning and Management
Meeting the Planning and Management Challenges:
A Summary
Chapter 2.Water Resource Systems Modelling: Its Role in Planning and Management
Introduction
Modelling of Water Resources Systems
Challenges in Water Resources Systems Modelling
Challenges of Planners and Managers
Challenges of Modelling
Challenges of Applying Models in Practice
Developments in Modelling
Modelling Technology
Decision Support Systems
Conclusions
Water Resources Systems Modeling
Simulation:
Optimization:
WATER RESOURCE SYSTEM
System Inputs
System Design and Operating Policy
System Outputs
WATER RESOURCE SYSTEM
System Inputs
System Design and Operating Policy
System Outputs
Conceptual discussion
General Systems Theory
System’s Concept
Def. A System is a set of components that interact with one another and serve for a common purpose or goal.
Systems may be: (1) abstract or (2) physical
• An abstract system is conceptual, a product of a human mind. That is, it cannot be seen or pointed to as an existing entity. Social, theological, cultural systems are abstract systems. None of them can be photographed, drawn or otherwise physically pictured.
However, they do exist and can be discussed, studied and analyzed.
• A physical system, in contrast, has a material nature. It is based on material basis rather than on ideas or theoretical notions.
Concept of a system
System:
Set of objects which interact in a regular, interdependent manner
A collection of various factors arranged in an ordered form with some purpose or goal
A system is characterized by:
A system boundary: Rule that determines whether an element is a part of the system or the environment
Statement of input and output interactions with the environment
Statement of interrelationships between various elements of the system called feedback
State of the system:
Conditions or indicates the activity in the system at a given time e.g..
water level in a reservoir, depth of flow.
System analysis :
Arriving at the management decisions based on the systematic and efficient organization and analysis of relevant information
Classification of systems
Physical system: One that exists in the real world
Sequential system: A physical system with input, working medium and output
Static system: Output depends only on current input
Dynamical system: Output depends only on current and previous inputs
Time-varying system: Kernel changes with time
Time-invariant system: Kernel does not change
Deterministic system: Kernel and inputs are known
Stochastic system: Kernel and inputs are not exactly known
Continuous-time systems: Inputs, outputs and kernel vary continuously with time
Discrete time systems: Inputs, outputs and kernel are known at discrete times
System Components
Water resources management involves the interaction of three interdependent subsystems:
Natural river subsystem : Physical, chemical and biological processes takes place
Socio-economic subsystem: Human activities related to the use of the natural river system
Administrative and institutional subsystem: Administration, legislation and regulation, where the decision, planning and management processes take place
Inadequate attention to one subsystem can reduce the effect of any work done to improve the performance of the others
Water Resources Systems Modeling
Modeling Example
Problem.
Need a water tank of capacity V.
Performance Criterion.
Cost minimization.
Numerous alternatives.
Shape, dimensions, materials.
Best design not obvious.
H R
Water Resources Systems Modeling
Modeling Example
Consider a cylindrical tank V.
having radius R and height H.
Average costs per unit area:
Ctop Cside Cbase
Water Resources Systems Modeling
Modeling Example Model:
Minimize Total_cost (Objective) subject to: (Constraints)
Volume = (R2H) V.
Total_cost =
$_Side+$_Base+$_Top
$_Side = Cside(2RH)
$_Base = Cbase(R2)
$_Top = Ctop(R2)
Water Resources Systems Modeling
Solution: a tradeoff between cost and volume.
Total Cost
Tank Volume
Water resource management problem…
Objective
System
Constraints
Easy Optimization Problem I
A farmer’s rectangular yard is to be built next to the house. To make the three sides of the barriers, twenty- four feet of fencing are available. What should be the dimensions of the sides to make a maximum area?
The symmetry around x = 6 leads us to suspect that
that the optimum is at x = 6, where A = 72 ft2
We could verify that
assumption with trials at x = 5.9 and 6.1. The maximum is at x = 6 and y = 12 ft.
Easy Optimization Problem II
An open-top cylindrical tank with a volume of ten cubic feet is to be made from a sheet of steel. Find the
dimensions of the tank that will require as little material used in the tank as possible.
Application : Solution by Numerical Search
One can start anywhere, but starting with r=1seems a reasonable place. After the third trial, it is apparent that the minimum A is between r=1 and r=3. Thus we plan to try r=1.5 and r=2.5. However, the result of r=1.5 reveals that the minimum A will be between r=1 and r=2. We continue with this process as shown.
Search for Two Variables
Find the values of x and z (both > 0) that maximize
Solve this using calculus
To solve the problem graphically requires three dimensions (x, z, U).
There are methods for doing this but they are beyond our interest
Water Resources Systems
Water Resources Systems
Water Resources Systems Engineering
Topics:
Modeling Approaches & Applications
System Performance Criteria
Water Resources Systems Modeling
A Model:
A mathematical description of some system.
Model Components:
Variables, parameters, functions, inputs, outputs.
A Model Solution Algorithm:
A mathematical / computational procedure for performing operations on the model – for getting outputs from inputs.
Water Resources Systems Modeling
Model Types:
Descriptive (Simulation)
Prescriptive (Optimization)
Deterministic
Probabilistic or Stochastic
Static
Dynamic
Mixed
Water Resources Systems Modeling
Algorithm Types:
Descriptive (Simulation)
Prescriptive (Constrained Optimization)
Mathematical Programming
Lagrange Multipliers
Linear Programming
Non-linear Programming
Dynamic Programming
Evolutionary Search Procedures
Genetic Algorithms, Genetic Programming
Water Resources Systems Modeling
Other Modeling Examples
Water Pollution Control
Water Allocations to Competing Uses
Tradeoffs!
Water Resources Systems Modeling
Other Modeling Examples
Water Quality – Aquatic Ecosystems
Silt
Acid Mine Drainage
Point-Source Pollution
Fish Kill Ecosystem
Enhancement
Modeling of Water Resources Systems…
Accuracy of the model depends on the skill of the
modeller and his/ her understanding of the real system and decision making process and also on the time and money available
Models produce information - but not decisions.
They aid planners and managers to improve their
understanding and provide various alternatives that help in the decision making process
Modeling of Water Resources Systems…
The main challenges for any planners and managers are to:
identify creative alternative solutions
find out the interest of each group involved in order to reach an understanding of the issues and a consensus on what to do
develop and use models and reach a common or shared understanding and agreement that is consistent with the individual values by presenting the results
make decisions and implement them duly taking care of the differences in opinions, social values and objectives
System Decomposition…
Four major decompositions
Temporal:
Planning horizon of WRS projects span large periods
System conditions drastically change with time
Planning is done by segmenting the time periods
Plans should be compatible and coordinated with each other
Physical – hydrological:
Water resources program may consider several river basins
Each basin can be divided into sub-basins
System Decomposition…
Political - geographical:
Basin may cover two or more national territories
Different political or administrative units
Decomposed considering either political or natural boundaries
Goal oriented or functional:
Analysis with respect to economic and functional goals is done
E.g.: Demand – Supply models, Irrigation, hydroelectric models
Water Resource Systems Engineering Planning & Management Objectives
Broad Goals ->Aims->Objectives->Specific Strategies:
National Security and Welfare.
Self Sufficiency.
Regional Economic Development.
Public and Environmental Health.
Economic Efficiency and Equity.
Environmental Quality.
Ecosystem Biodiversity and Health.
System Reliability, Resilience, Robustness.
Water supply: quantity, quality, reliability, cost.
Flood protection, flood plain zoning.
Energy and food production.
Recreation, navigation, wildlife habitat.
Water and wastewater treatment.
Why?
How?
Challenges in Water Sector
The major challenges in water sector as per World Water Forum and are listed below:
Meeting basic needs
Protecting ecosystems
Securing the food supply
Sharing water resources
Dealing with hazards
Valuing water
Governing water wisely
Stakeholder Participation:
Shared Vision Modeling
A multi-purpose river basin planning example:
Irrigation
Urban area
Levee protection
Pumped storage hydropower Recreation Flood storage
Gage
•
Water Resource Systems Engineering Planning & Management Objectives
Types of Objectives or Measures of Performance:
Physical
Statistical
Economic
Environmental – Ecological
Social
Combinations
Multi-objective analyses.
Water Resource Systems Engineering Planning & Management Objectives
Overall measures of system performance:
Mean – average or expected value.
Variance – average of squared deviations from the mean value.
Reliability – Prob(satisfactory state).
Resilience – Prob(sat. state following unsat. state).
Robustness – adaptability to other than design input conditions.
Vulnerability – expected magnitude or extent of failure when unsatisfactory state occurs.
Water Resource Systems Engineering Planning & Management Objectives
Time series of system performance values:
Mean
Time
Failure threshold System
Performance Measure
Water Resource Systems Engineering Planning & Management Objectives
Mean
Time
Failure threshold System
Performance Measure
Same: Mean and Variance
Different: Reliability, Resilience and Vulnerability
Water Resource Systems Engineering Planning & Management Objectives
Mean
Mean Failure threshold
System
Performance Measure
Time
Failure threshold System
Performance Measure
Compare Reliabilities, Resiliences, Vulnerabilities.
Water Resource Systems Engineering Planning & Management Objectives
Objectives
expressed as functions to be maximized or minimized or as constraints that have to satisfied.
Economic objectives:
• Maximize benefits:
improvement in income, welfare, or willingness to pay.
• Minimize costs:
benefits forgone, opportunity costs, adverse externalities.
• Maximize net benefits: benefits less losses and
costs.
• Minimize inequity:
differences in distributions
of net benefit among stakeholders.
What is function?
Weierstrass’ Theorem
Every function which is continuous in a closed domain possesses a maximum and minimum value either in the interior or on the boundary of the domain.
How to find the extreme value of
y=2x
2+2x+1
There is another theorem, (necessary condition)
A continuous function of n variables attains a maximum or a minimum in the interior of a region, only at those values of the variables for which the n partial derivatives either vanish simultaneously (stationary points) or at
which one or more of these derivatives cease to exist (i.e., are discontinuous)
So what means derivatives either vanish=> stationary points
Sufficient Conditions for One Independent Variable
Taylor series expansion about the stationary point xo.
y(x) = y(xo) + y'(xo) (x - xo) + ½ y''(xo) (x - xo)2 + higher order terms
If at a stationary point the first and possibly some of the higher derivatives vanish, then the point is or is not an extreme point, according as the first non-vanishing
derivative is of even or odd order. If it is even, there is a maximum or minimum according as the derivative is negative or positive
Example
y(x) = x
4/4 - x
2/2
Sufficient Conditions for Two or More
Independent Variables?
General Optimization Concepts
General Optimization Concepts
Problem Formulation:
Feasible region
Solving Optimization Problems
An iterative search algorithm needs
Types of search procedures
Global vs. Local Maxima for Continuous
Problems
Optimization Software
Optimization Programming Languages
GAMS - General Algebraic Modeling System
LINDO - Widely used in business applications
AMPL - A Mathematical Programming Language
Others: MPL, ILOG
optimization program is written in the form of an optimization problem
optimize: y(x) economic model subject to: fi(x) = 0 constraints
Software with Optimization Capabilities
Excel – Solver
MATLAB
MathCAD
Mathematica
Maple
Others
Mathematical Programming
Using Excel – Solver
Using GAMS
Using Matlab
What is Solver?
Solver is an Add-In for Microsoft Excel which can solve optimization problems, including multiple constraint problems.
You can maximize, minimize, or set a target value to achieve.
Installing Solver for Use
The Solver Add-in is an Excel add-in program that is available when you install Microsoft Office or Excel.
To use it in Excel, however, you need to load it first (Excel 2007)
Click the Microsoft Office Button , and then click Excel Options.
Click Add-Ins, and then in the Manage box, select Excel Add-ins.
Click Go.In the Add-Ins available box, select the Solver Add-in check box, and then click OK.
If you get prompted that the Solver Add-in is not currently installed on your computer, click Yes to install it.
After you load the Solver Add-in, the Solver command is available in theAnalysis group on the Data tab
Using Solver
On Excel Menu, choose
Data->Solver
This brings up the Solver Parameters box which will be discussed next.
GAMS: Basic Info
The General Algebraic Modeling System (GAMS) is specifically designed for modeling linear, nonlinear and mixed integer optimization problems.
The system is especially useful with large, complex problems.
GAMS is available for use on personal computers, workstations, mainframes and supercomputers.
GAMS allows the user to concentrate on the modeling problem by making the setup simple.
The system takes care of the time-consuming details of the specific machine and system software implementation.
GAMS is especially useful for handling large, complex, one-of-a-kind problems which may require many revisions to establish an accurate model.
The system models problems in a highly compact and natural way. The user can
change the formulation quickly and easily, can change from one solver to another, and can even convert from linear to nonlinear with little trouble
GAMS
Description:
models and solves complex linear, nonlinear and integer programming problems.
automates the process of going from a mathematical statement of the problem to the solution.
GAMS transforms the mathematical representation to representations required by specific Solver engines like OSL,CPLEX,..
lets you build your model in a natural, logical structure using compact algebraic statements.
Typical use:
Optimization
GAMS IDE
What is GAMS IDE
GAMS -- Generalized Algebraic Modeling System
+
IDE -- Integrated Development Environment
=
A Windows graphical interface to run GAMS
Website
http://www.gams.com/default.htm
Download GAMS Distribution
Windows, linux & Mac version are available
Limited function for student version
.GAMS file
MATLAB Optimization Toolbox
Presentation Outline
Introduction
Function Optimization
Optimization Toolbox
Routines / Algorithms available
Minimization Problems
Unconstrained
Constrained
▪ Is a collection of functions that extend the capability of MATLAB.
▪ The toolbox includes routines for:
• Unconstrained optimization
• Constrained nonlinear optimization, including goal attainment problems, minimax problems, and semi-infinite minimization problems
• Quadratic and linear programming
• Nonlinear least squares and curve fitting
• Nonlinear systems of equations solving
• Constrained linear least squares
• Specialized algorithms for large scale problems
Optimization Toolbox
Minimization Algorithm
Minimization Algorithm (Cont.)
Equation Solving Algorithms
Least-Squares Algorithms
Optimization Software
Example 1: "Finding a Local Minimum Using the Excel Solver"
Our first example is to going to be very basic, but it will introduce common terms used in optimization in excel, such as objective function, design variables,
and constraints. Let's say we have the following equation, and we want to find the value
of x that minimizes f subject to -1 <= x <= 5.
Example 1: "Finding a Local Minimum Using the Excel Solver"
Our objective function is the value that we are going to minimize (f).
The design variables are the variables that we are going to allow the Solver to change (just x in this example).
We have two constraints: -1 <= x and x <= 5
Example 2: "Solving a System of Non- Linear Equations"
Notice that these equations are in implicit form (equal to zero).
To solve the system, we will create an objective function that when minimized, drives both equations to zero.
Minimizing the sum of the squares of each implicit equation will accomplish this.
Example 2: "Solving a System of Non-
Linear Equations"
Simple Chemical Process
minimize: C = 1,000P +4*10^9/P*R + 2.5*10^5R subject to: P*R = 9000
P – reactor pressure R – recycle ratio
Excel Solver Example
C =1000*D5+4*10^9/(D5*D4)+2.5*10^5*D4
P*R =D5*D4
P 1
R 1
Example 2-6 p. 30 OES A Nonlinear Problem C 3.44E+06 minimize: C = 1,000P +4*10^9/P*R + 2.5*10^5R P*R 9000.0 subject to: P*R = 9000
P 6.0 Solution
R 1500.0 C = 3.44X10^6
P = 1500 psi R = 6
Showing the equations in the Excel cells with initial values for P and R Solver optimal solution
Excel Solver Example
Excel Solver Example
N o t Not the minimum
for C
Excel Solver Example
Use Solver with these values of P and R
Excel Solver Example
optimum Click to highlight to
generate reports
Excel Solver Example
Information from Solver Help is of limited value
Excel Solver Answer Report
management report formatconstraint status
slack variable values at the
optimum
Excel Sensitivity Report
Solver uses the generalized reduced gradient
optimization algorithm
Lagrange multipliers used for sensitivity analysis
Shadow prices ($ per unit)
Excel Solver Limits Report
Sensitivity Analysis provides limits on variables for the optimal
solution to remain optimal
Sample Transportation Problem
Satisfy market demand, but with minimal costs of
transporting the goods from producers to the markets
we are given the supplies at several plants and the
demands at several markets for a single commodity, and we are given the unit costs of shipping the commodity from plants to markets. The economic question is: how much shipment should there be between each plant and each market so as to minimize total transport cost?
Sample Transportation Problem
Distances
Markets
Plants New York Chicago Topeka Supply
Seattle 2.5 1.7 1.8 350
San Diego 2.5 1.8 1.4 600
Demand 325 300 275
Indices:
i = plants
j = markets
Given Data:
ai = supply of commodity of plant i (in cases)
bj = demand for commodity at market j (cases)
cij = cost per unit shipment between plant i and market j ($/case)
Variables:
costs
xij = amount of commodity to ship from plant i to market j (cases),
where xij >= 0, for all i, j