Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Solution 1
1.1 Questions
An optimization problem could be formulated as:
min f ( x)
x
s.t. : g ( x) 0
h( x ) = 0
i
0
1
2
3
a
-2.0
-2.0
-2.0
-0.94
b
5.0
2.27
0.73
0.73
x1
0.73
-0.33
-0.94
-0.33
x2
2.27
0.73
-0.33
0.08
f(x1)
3.50
0.93
7.18
0.93
f(x2)
11.13
3.50
0.93
0.05
f(x2)>f(x1)
Y
Y
N
N
Computations in Matlab
step
0
(initiali
sation)
Matlab commands
f=inline('1/5*x.^5 a=-2;
b=5;
x1=a+(1-0.61)*(b-a)
x2=b-(1-0.61)*(b-a)
f(x1)
f(x2)
b=x2
x2=x1
x1=a+(1-0.61)*(b-a)
f(x1)
b=x2
x2=x1
x1 = 0.73
x2 = 2.27
3.5020
11.12
b = 2.27
x2 = 0.73
x1 = -0.3347
0.9328
b = 0.73
x2 = -0.3347
1/4
Process Optimization
Solution 1
x1=a+(1-0.61)*(b-a)
f(x1)
a=x1
x1=x2
x2=b-(1-0.61)*(b-a)
f(x2)
x1 = -0.9353
7.1808
a = -0.9353
x1 = -0.3347
x2 = 0.0805
0.0511
[
x = -0.1908
x=x-f1(x)/f2(x)
x = -0.0050
x=x-f1(x)/f2(x)
x = -6.2818e-006
x( x 4)( x 2 4) = 0
The candidate values for a local minimum are: x1=0, x2=4, x3=-2 and x4=2.
Check the sufficient condition
2 f (4)
2 f (2)
2 f (0)
2 f (2)
=
>
48
0
= 16 < 0
16
0
48
0
=
>
=
<
,
,
,
x 2
x 2
x 2
x 2
x1=0 and x2=4 satisfy the sufficient condition. f(0)=0, f(4)=-8.53.
For the global minimum, calculate the values at bounds f(-3)=-21, f(5)=33.33. Therefore x*=3 is the global minimum.
c. Conclusion
40
30
20
10
-10
-20
-30
-3
-2
-1
Fig.1
Both numerical methods require that the function is unimodular, but this is not the case here.
We should have checked the unimodularity of the function, before, but that can be quite
difficult in more complex cases. Hence, we have always to be careful, when interpreting
numerical results!
The global minimum could be found with the Interval Reduction method, but it would take a
lot of iterations. The Newton method is much faster, but it finds only local extrema. In this
case the global minimum is not a local minimum, because the derivative is not zero.
2/4
Process Optimization
Solution 1
Fig.2
The task now is to bound the negative root of P(x) which in the same time is a minimum of
|P(x)|. Algorithm 1 describes the procedure.
Algorithm 1 Enclosure of the Minimum
F(x) = |P(x)|
x (1) = x ( 0 ) + s
if F ( x (1) ) > F ( x ( 0 ) ) then
= -s
else
= s
end if
while F ( x (i ) + ) < F ( x (i ) ) do
x (i +1) = x (i ) +
end while
xLow = min( x (i +1) , x (i 1) )
3/4
Process Optimization
Solution 1
To determine the values of the other minima one has to start from different initial values and
follow the same procedure described above.
Tab. 1: Application of the enclosure of the minimum procedure
i
x
x+
F(x)
F(x+)
0
-5
(=s) 1
168.10
76.60
1
-4
-4
168.10
76.60
2
-3
-3
76.60
17.9
3
-2
-2
17.9
14.0
4
-1
-1
14.0
25.1
F(x+)<F(x)
Yes
Yes
Yes
Yes
No
Fig.3
x1
x2
F(x1)
F(x2)
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
-3.0000
-3.0000
-3.0000
-2.7082
-2.7082
-2.5967
-2.5967
-2.5541
-2.5541
-2.5379
-2.5379
-2.5379
-2.534
-2.534
-2.5326
-2.5326
-2.5326
-1.000
-1.7640
-2.2360
-2.2360
-2.4164
-2.4164
-2.4852
-2.4852
-2.5116
-2.5116
-2.5216
-2.5278
-2.5278
-2.5302
-2.5302
-2.5311
-2.5316
-2.2360
-2.5278
-2.7082
-2.5278
-2.5967
-2.5278
-2.5541
-2.5278
-2.5379
-2.5278
-2.5316
-2.534
-2.5316
-2.5326
-2.5316
-2.532
-2.5322
-1.7640
-2.2360
-2.5278
-2.4164
-2.5278
-2.4852
-2.5278
-2.5116
-2.5278
-2.5216
-2.5278
-2.5316
-2.5302
-2.5316
-2.5311
-2.5316
-2.532
8.5696
0.1344
6.0876
0.1344
2.1473
0.1344
0.7228
0.1344
0.1903
0.1344
0.0114
0.066
0.0114
0.0186
0.0114
0.0005
0.0072
18.2719
8.5696
0.1344
3.5895
0.1344
1.4894
0.1344
0.6577
0.1344
0.3357
0.1344
0.0114
0.0579
0.0114
0.0287
0.0114
0.0005
4/4
F(x2)>F(x1)
Yes
Yes
No
Yes
No
Yes
No
Yes
No
Yes
Yes
No
Yes
No
Yes
Yes
No