internship ppt on smartinternz platform as salesforce developer
ย
Opt Assgnment #-1 PPTX.pptx
1. HARAMAYA UNIVERSITY
POST GRADUATE PROGRAM DIRECTORATE
COLLEGE OF NATURALAND COMPUTATIONAL SCIENCE
MSC PROGRAM IN MATHEMATICAL MODELING
Prepared by: -
1. Abdella Kereme Ahmed ID No: PGP/646/14
2. Alemseged Kifle ID No: PGP/646/14
Presentation Assignment of Optimization and Optimal Control
Submitted to: - Getinet A. (Ph.D.)
June, 2021 GC.
Haramaya University, Ethiopia
2. 1. FIBONACCI AND GOLDEN SECTION METHOD
1.1 INTRODUCTION
๏Optimization problem involves the objective function and/or constraints that are not stated as
explicit functions of the design variables or which are too complicated to manipulate, we cannot
solve it by using the classical analytical methods.
๏So, we consider now algorithms for locating a local minimum in the nonlinear optimization
problem with no constraints. In such cases we need to use the numerical methods of
optimization for solution.
๏Like that Fibonacci method, golden section method
3. 1.2 Fibonacci method
Fibonacci method can be used to find the minimum of a function of one variable even if the
function is not continuous. This method, like many other elimination methods, has the following
limitations:
๏The initial interval of uncertainty, in which the optimum lies, has to be known.
๏The function being optimized has to be unimodal in the initial interval of uncertainty.
๏The exact optimum cannot be located in this method
๏The number of function evaluations to be used in the search or the resolution required has to be
specified beforehand.
4. Cont.โฆ
๏This method makes use of the sequence of Fibonacci numbers, ๐น๐ for placing the experiments.
These numbers are defined as
๐น0 = ๐น1 = 1.
๐น๐ = ๐น๐โ1 + ๐น๐โ2 , ๐ = 2,3,4 โฆ
๏which yield the sequence 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, โฆ
๏Procedure. Let L0 be the initial interval of uncertainty defined by ๐ โค ๐ฅ โค ๐ and n be the total
number of experiments to be conducted. Define
๐ฟ2
โ
=
๐น๐โ2
๐น๐
๐ฟ0 โฆโฆโฆโฆโฆโฆโฆโฆ (1)
5. CONT.โฆ
and place the first two experiments at points x1 and x2, which are located at a
distance of ๐ฟ2
โ
from each end of L0. This gives
๐1 = ๐ + ๐ฟ2
โ
= ๐ +
๐น๐โ2
๐น๐
๐ฟ0 โฆโฆโฆโฆโฆโฆ (2)
๐2 = ๐ โ ๐ฟ2
โ
= ๐ โ
๐น๐โ2
๐น๐
๐ฟ0 = ๐ +
๐น๐โ1
๐น๐
๐ฟ0 โฆโฆโฆโฆโฆโฆโฆ.. (3)
๏Discard part of the interval by using the unimodality assumption.
6. Cont.'sโฆ.
๏Then there remains a smaller interval of uncertainty ๐น2 given by
๐ฟ2 = ๐ฟ0 โ ๐ฟ2
โ
= ๐ฟ0 1 โ
๐น๐โ2
๐น๐
=
๐น๐โ1
๐น๐
๐ฟ0 โฆโฆโฆโฆโฆโฆโฆโฆโฆ (4)
and with one experiment left in it. This experiment will be at a distance of
๐ฟ2
โ
=
๐น๐โ2
๐น๐
๐ฟ0 =
๐น๐โ2
๐น๐โ1
๐ฟ2 โฆโฆโฆโฆโฆโฆโฆโฆโฆโฆโฆโฆโฆ.. (5)
from one end and
๐ฟ2 โ ๐ฟ2
โ
=
๐น๐โ3
๐น๐
๐ฟ0 =
๐น๐โ3
๐น๐โ1
๐ฟ2 โฆโฆโฆโฆโฆโฆโฆโฆโฆโฆโฆ (6)
from the other end.
7. Cont.'sโฆ.
๏Now place the third experiment in the interval ๐ฟ2 so that the current two experiments are
located at a distance of
๐ฟ3
โ
=
๐น๐โ3
๐น๐
๐ฟ0 =
๐น๐โ3
๐น๐โ1
๐ฟ2 =
๐ฟ0
๐พ3 โฆโฆโฆโฆโฆโฆโฆโฆโฆโฆโฆโฆโฆ. (7)
from each end of the interval ๐ฟ2 .
๏Again, the unimodality property will allow us to reduce the interval of uncertainty to ๐ฟ3 given
by ๐ฟ3 = ๐ฟ2 โ ๐ฟ3
โ
= ๐ฟ2 โ
๐น๐โ3
๐น๐โ1
๐ฟ2 =
๐น๐โ2
๐น๐โ1
๐ฟ2 =
๐น๐โ2
๐น๐
๐ฟ0 =
๐ฟ0
๐พ2 โฆโฆโฆโฆโฆโฆ. (8
๏This process of discarding a certain interval and placing a new experiment in the remaining
interval can be continued, so that the location of the j th experiment and the interval of
uncertainty at the end of j experiments are, respectively, given by
8. CONTโฆ
๏๐ฟ๐
โ
=
๐น๐โ๐
๐น๐โ(๐โ1)
๐ฟ๐โ1 =
๐น๐โ๐
๐น๐
๐ฟ0 =
๐ฟ0
๐พ๐ โฆโฆโฆโฆโฆโฆโฆโฆโฆโฆโฆโฆโฆ (9)
๏๐ฟ๐ =
๐น๐โ(๐โ1)
๐น๐
๐ฟ0 =
๐ฟ0
๐พ๐โ1 โฆโฆโฆโฆโฆโฆโฆโฆโฆโฆโฆ. (10)
๏The ratio of the interval of uncertainty remaining after conducting j of the n
predetermined experiments to the initial interval of uncertainty becomes
๐ฟ๐
๐ฟ0
=
๐น๐โ(๐โ1)
๐น๐
โฆโฆโฆโฆโฆโฆโฆโฆโฆโฆ (11)
and for ๐ = ๐, we obtain
๐ฟ๐
๐ฟ0
=
๐น1
๐น๐
=
1
๐น๐
โฆโฆโฆโฆโฆโฆโฆโฆโฆ. (12)
9. CONTโS โฆ
๏The ratio ๐ฟ๐
๐ฟ0
will permit us to determine n, the required number of experiments, to achieve
any desired accuracy in locating the optimum point. Table 1 gives the reduction ratio in the
interval of uncertainty obtainable for different number of experiments.
๏The symbol ๐ฟ๐ is used to denote the interval of uncertainty remaining after conducting ๐
experiments,
๏while the symbol ๐ฟ๐
โ
๐ is used to define the position of the ๐ ๐กโ experiment.
11. 1.3 GOLDEN SECTION METHOD
๏ The golden section method is same as the Fibonacci method except that in the Fibonacci
method the total number of experiments to be conducted has to be specified before beginning
the calculation, whereas this is not required in the golden section method.
๏ In the Fibonacci method, the location of the first two experiments is determined by the total
number of experiments, N.
๏ In the golden section method we start with the assumption that we are going to conduct a large
number of experiments. Of course, the total number of experiments can be decided during the
computation.
๏ Set ๐ฟ = ๐ and ๐ = ๐
๏ Pick two points, ๐ฅ1 and ๐ฅ2, with ๐ฅ1 < ๐ฅ2, and both points in ๐ฟ, ๐
๏ Find ๐(๐ฅ1) and ๐(๐ฅ2)
12. Cont.'s โฆ
๏ If ๐(๐ฅ1) > ๐(๐ฅ2), then the minimizer must be to the right of ๐ฅ1.
๏Redefine the range as ๐ = ๐ฅ1, ๐ฟ = ๐ i.e. the minimizer must be in the interval [๐ฅ1, ๐].
๏ Repeat the algorithm from Step 2 until the interval length is smaller than some pre-set
tolerance.
๏ Otherwise (i.e. ๐(๐ฅ1) < ๐(๐ฅ2)), the minimizer must be to the left of ๐ฅ2.
๏ Redefine the range as ๐ = ๐, ๐ฟ = ๐ฅ2 i.e. the minimizer must be in the interval [๐, ๐ฅ2].
๏ Repeat the algorithm from Step 2 until the interval length is smaller than some pre-set tolerance
13. Cont.โฆ
____________ ๐ฟ__________________
______๐ฟ1 ___________
_____๐ฟ2 _____
L__________________________________ R
๐ฅ1 ๐ฅ2
๏The intervals of uncertainty remaining at the end of different number of experiments can be
computed as follows:
๐ฟ2 = lim
๐โโ
๐น๐โ1
๐น๐
๐ฟ0 โฆโฆโฆโฆโฆโฆโฆโฆโฆโฆ (13)
14. CONTโฆ.
๏๐ฟ3 = lim
๐โโ
๐น๐โ2
๐น๐
๐ฟ0 = lim
๐โโ
๐น๐โ2
๐น๐โ1
๐น๐โ1
๐น๐
๐ฟ0 โฆโฆโฆโฆโฆโฆโฆ.. (14)
๏๐ฟ3 โ lim
๐โโ
๐น๐โ1
๐น๐
2
๐ฟ0 โฆโฆโฆโฆโฆโฆโฆโฆโฆโฆโฆโฆโฆโฆโฆโฆโฆ. (15)
This result can be generalized to obtain
๐ฟ๐พ = lim
๐โโ
๐น๐โ1
๐น๐
๐พโ1
๐ฟ0 โฆโฆโฆโฆโฆโฆโฆโฆโฆโฆโฆโฆโฆโฆโฆ.. (16)
Using the relation
๐น๐ = ๐น๐โ1 + ๐น๐โ2 โฆโฆโฆโฆโฆโฆโฆโฆโฆโฆโฆโฆโฆโฆโฆ. (17)
we obtain, after dividing both sides by ๐น๐โ1,
16. CONTโฆ
Solve for ๐พ ( ๐พ is called the Golden Ratio, named by ancient Greeks)
๏This gives the root ๐พ = 1.618, and hence Eq. (16) yields
๐ฟ๐พ =
1
๐พ
๐พโ1
๐ฟ0 = 0.618 ๐พโ1
๐ฟ0 โฆโฆโฆโฆโฆโฆโฆโฆโฆโฆ.. (22)
๏In Eq. (15) the ratios
๐น๐โ2
๐น๐โ1
and
๐น๐โ1
๐น๐
have been taken to be same for large values of ๐.
๏ Procedure. The procedure is same as the Fibonacci method except that the location of the first
two experiments is defined by
17. Cont.โฆ.
๏ ๐ฟ2
โ
=
๐น๐โ2
๐น๐โ1
๐น๐โ1
๐น๐
๐ฟ0 =
1
๐พ2 = 0.382๐ฟ0 โฆโฆโฆโฆโฆโฆโฆโฆโฆ.. (23)
The desired accuracy can be specified to stop the procedure.
So, for the range [a , b],
๏ ๐1 = ๐ + ๐ฟ2
โ
= ๐ + 0.382๐ฟ0
= a + 0.382(b โ a) = 0.6183a + 0.38197b
๏ ๐2 = ๐ โ ๐ฟ2
โ
= ๐ โ 0.382๐ฟ0
= b โ 0.382(b โ a) = 0.6183b + 0.38197a
18. Example 1:
Find an approximation to the minimum of ๐ ๐ฅ = 4๐ฅ3
+ ๐ฅ2
โ 7๐ฅ + 14 ๐ค๐๐กโ๐๐ ๐กโ๐ interval [0,1]
using Golden ratio method with and iterate until the width of the interval is less than 0.15
Solution
Step1: ๐ฟ0 = 0,1 , stopping tolerance โ= 0.15
Step2: ๐ฟ2
โ
=
1
๐พ2 = 0.6182 2 = 0.3819
0_______________________________1
____๐ฟ2
โ
____ ๐ฅ1 ๐ฅ2____๐ฟ2
โ
___
19. Cont.โฆ
๐ฅ1 = 0 + 0.3819 = 0.3819 , ๐ ๐ฅ1 = 11. 6953
๐ฅ2 = 1 โ ๐ฟ2
โ
= 0.6181 , ๐ ๐ฅ2 = 11. 9999
๏Here, ๐ฅ1 < ๐ฅ2 but ๐ ๐ฅ1 > ๐ ๐ฅ1
๏Thus, minimizer must be to the right of ๐ฅ1
๏Therefore, the interval of uncertainty is [ ๐ฅ1, 1] => [0.3819,1]
๐ฟ2 = ๐ โ ๐ฟ = 1 โ ๐ฅ1 = 1 โ 0.3819 = 0.6181
Step3: to generate ๐ฅ3 ๐ฟ3
โ
=
1
๐พ3 = 0.6182 3 = 0.2361
๐ฅ1 _______________________________1
____๐ฟ3
โ
____ ๐ฅ2 ๐ฅ3____๐ฟ3
โ
___
20. CONTโฆ.
๐ฅ3 = 1 โ ๐ฟ3
โ
= 0.7639, ๐ ๐ฅ3 = 11.093
Now ๐ฅ2 < ๐ฅ3 ๐๐๐ ๐ ๐ฅ2 < ๐ ๐ฅ3
Thus, minimizer must be to the left of ๐ฅ1
Therefore, the interval of uncertainty is [ ๐ฅ1, ๐ฅ3] => [0.3819,0.7639]
๐ฟ3 = ๐ โ ๐ฟ = ๐ฅ3 โ ๐ฅ1 = 0.7639 โ 0.3819 = 0.382
21. Cont.โฆ.
Step4: to generate ๐ฅ4 then define ๐ฟ4
โ
=
1
๐พ4 = 0.6182 4 = 0.1459
๐ฅ1 _______________________________๐ฅ3
____๐ฟ4
โ
____ ๐ฅ4 ๐ฅ2____๐ฟ4
โ
___
๐ฅ4 = ๐ฅ1 + ๐ฟ4
โ
= 0.5278 , ๐ ๐ฅ4 = 11.174
Now ๐ฅ4 < ๐ฅ2 and ๐ ๐ฅ4 > ๐ ๐ฅ2
Thus, minimizer must be to the right of ๐ฅ4
Therefore, the interval of uncertainty is [ ๐ฅ4, ๐ฅ3] => [0.5278,0.7639]
๐ฟ4 = ๐ โ ๐ฟ = ๐ฅ4 โ ๐ฅ3 = 0.7639 โ 0.5278 = 0.2361
22. CONTโฆ
Step5: to generate ๐ฅ5 then define ๐ฟ5
โ
=
1
๐พ5 = 0.6182 5
= 0.0902
๐ฅ4 _______________________________๐ฅ3
____๐ฟ5
โ
____ ๐ฅ2 ๐ฅ5____๐ฟ5
โ
___
๐ฅ5 = ๐ฅ3 โ ๐ฟ5
โ
= 0.6737 , ๐ ๐ฅ5 = 10.9639
Now ๐ฅ2 < ๐ฅ5 and ๐ ๐ฅ2 > ๐ ๐ฅ5
Thus, minimizer must be to the right of ๐ฅ2
Therefore, the interval of uncertainty is [ ๐ฅ2, ๐ฅ3] => [0.6181,0.7639]
๐ฟ5 = ๐ โ ๐ฟ = ๐ฅ3 โ ๐ฅ2 = 0.7639 โ 0.6182 = 0.1457 < 0.15
23. Cont.โฆ.
L R x1 x2 f(x1) f(x2) Update R โ L
0 1 0.3819 0.6181 11. 6953 11. 9999 L=๐ฅ1 0.6181
0.3819 1 0.3819 0.7639 11.6953 11.093 L = ๐ฅ4 0.382
0.5278 0.7639 0.5278 0.7639 11.174 11.093 R= ๐ฅ2 0.2361
0.6182 0.7639 0.6181 0.7639 11. 9999 11.093 L = x2 0.1457