optimization review
TRANSCRIPT
ية دراسة تجنب اآلثار السلبية لمشروعات تنمحوض النيل الشرقي على مصر
أحمد عادل. ممعھد بحوث الموارد المائية
جز دور اإلدارة المثلى لنظام متعدد الخزانات في تقليل العالمائي لدول المصب
Contents
• Introduction• Review some optimization techniques• Review some publications• Simple application using Excel• Conclusions
INTRODUCTION
Why Optimization?
Allah says in the Quran, "He gives wisdom to whom He wills, and whoever is given wisdom is certainly given a lot of good. Only the people of understanding observe the advice.”
(Al‐Baqara:269).
Introduction
Optimization
Objective functions• Cost minimization• Benefit Maximization• Technical objectives• Increase power. Minimize loss, maximize release etc…
Constraints• Physical • Economical• Sociological• Technical
Conventional Optimization Model • Linear programming• Non‐linear programming• Dynamic programming
Soft Computing Techniques• Genetic Algorithms• Neural Networks• Fuzzy logic
REVIEW SOME OPTIMIZATION TECHNIQUES
Linear programming (LP)
Leonid Kantorovich (1939)
The general form of an LP model:MAX (or MIN): c1X1 + c2X2 + … + cnXn
Subject to: a11X1 + a12X2 + … + a1nXn <= b1:
ak1X1 + ak2X2 + … + aknXn >= bk:
am1X1 + am2X2 + … + amnXn = bm
Xi >= 0 i=1,n
•Most popular optimization technique Readily available solution methodology Easy availabilities of software packages Suitable for large scale water resources
systems•Applied when the objective function and constraints are linear
LP ‐ Graphical solution approachX2
X1
250
200
150
100
50
00 50 100 150 200 250
240
Feasible Region
boundary line of tubing constraint 12X1 + 16X2 = 2880
boundary line of pump constraint X1 + X2 = 200
boundary line of labor constraint 9X1 + 6X2 = 1566
261
174
180
MAX: 350X1 + 300X2S.T.: 1X1 + 1X2 <= 200
9X1 + 6X2 <= 156612X1 + 16X2 <= 2880Xi >= 0 i=1, 2
LP ‐ Enumerating the corner points
X2
X1
250
200
150
100
50
00 50 100 150 200 250
o.f.v. = $54,000
(0, 180)
o.f.v. = $64,000
(80, 120)
o.f.v. = $66,100
(122, 78)
o.f.v. = $60,900
(174, 0)o.f.v. = $0(0, 0)
$15,000
Non‐linear programming
1950
Albert W. Tucker Harold W. Kuhn
• An NLP problem has a nonlinear objective function and/or one or more nonlinear constraints.
• NLP problems are formulated and implemented in virtually the same way as linear problems.
• The mathematics (calculus) involved in solving NLPs is quite different than for LPs.
Possible Optimal Solutions
objective function level curve
optimal solution
Feasible Region
linear objective,nonlinear constraints
objective function level curve
optimal solution
Feasible Region
nonlinear objective,nonlinear constraints
objective function level curve
optimal solution
Feasible Region
nonlinear objective,linear constraints
objective function level curves
optimal solution
Feasible Region
nonlinear objective,linear constraints
Dynamic programming
Richard E. Bellman (1940)
Genetic Algorithms
Nils Aall Barricelli (1954)
GA prosedure• Analyze the problem and determine O.F., decision
variables, Search space and constrains• Generate initial population (possible solutions)• Encode the population (Binary, Value, Permutation
and Tree) • Evaluate the fitness of each individual in population• Repeat until termination condition satisfied:
– Selection: Select the individuals with greater fitness for reproduction
– Crossover: Breed new individuals through crossover– Mutation: Apply probabilistic mutation on new individuals– Form a new population with these offspring.
• Terminate: when goal condition achieved
(cont.)Algorithms Genetic Generated population
1
2
••
•
•
•
•
Encoding
Evaluating the fitness and selection
25%58%93%65%
25%58%7%
93%65%1%
Crossover
Mutation
Repeat until success condition achieved
Encoding, Evaluating, Selecting, Crossover, Mutation…
REVIEW SOME PUBLICATIONS
• 10 reservoirs in different river basins• water supply, flood protection, hydropower generation
• 33 demand centers• Objective function
• Filling rules (M) that minimize hydropower shortage in (R) ?
• Link MIKE BASIN and NSGA‐II• Hydrological Data
(Inflow, irrigation demands, evaporation, water levels at both reservoirs and Roseiresrating curves.)
•
SIMPLE APPLICATION USING EXCEL
زانات التكاليف الشھرية لنقل المياه من الخ)٣م./م.ج(للمدن اإلحتياجات الشھرية
)٣م(لكل مدينة ١خزان ٢خزان ٣خزان
١مدينة ٠٫٠٥ ٠٫٠٨ ٠٫٠٥ ٢،٠٠٠،٠٠٠ ٢مدينة ٠٫٠٧ ٠٫٠٦ ٠٫٠٤ ٢،٠٠٠،٠٠٠ ٣مدينة ٠٫٠٩ ٠٫٠٤ ٠٫٠٣ ٨٠٠،٠٠٠
)٣م(التصرفات القصوى ١،٠٠٠،٠٠٠ ١،٥٠٠،٠٠٠ ٢،٥٠٠،٠٠٠
ات أمثل تصرفات شھرية للمياه من الخزان)٣م(
١خزان ٢خزان ٣خزان )٣م(الكميات الواصلة ١مدينة ؟ ؟ ؟ - ٢مدينة ؟ ؟ ؟ - ٣مدينة ؟ ؟ ؟ -
)٣م(المنصرف من الخزانات - - -
ات أمثل تصرفات شھرية للمياه من الخزان)٣م(
١خزان ٢خزان ٣خزان )٣م(الكميات الواصلة ١مدينة ١،٠٠٠،٠٠٠ - ١،٠٠٠،٠٠٠ ٢،٠٠٠،٠٠٠ ٢مدينة - ٥٠٠،٠٠٠ ١،٥٠٠،٠٠٠ ٢،٠٠٠،٠٠٠ ٣مدينة - ٨٠٠،٠٠٠ - ٨٠٠،٠٠٠
)٣م(المنصرف من الخزانات ١،٠٠٠،٠٠٠ ١،٣٠٠،٠٠٠ ٢،٥٠٠،٠٠٠
أقل تكلفة كلية
٢٢٢،٠٠٠٫٠
Spreadsheet Optimization with Excel
CONCLUSIONS