Download as pdf or txt
Download as pdf or txt
You are on page 1of 27

Optimizare multiobiectiv

utilizand
algoritmi genetici

Multiobjective optimization
using
genetic algorithms
Multiobjective Optimization (MOO)

Find x = [x1 , x 2 , ... , x N ] T

that minimizes
{f1(x), f2(x),…, fM(x)}

 All individual objective functions fi(x) must be


simultaneously minimized.

 If the objective functions are competing, there is no unique


solution to this problem.
Variante de rezolvare
 Pentru probleme de optimizare multiobiectiv exista
doua variante:

 Optimizare multiobiectiv reala – multimea solutiilor


optime Pareto
 Transformarea intr-o problema cu un singur obiectiv prin
combinarea functiilor obiectiv individuale intr-o singura
functie obiectiv globala – rezulta o singura solutie
M
Gaseste x care minimizeaza F (x ) = ∑ wi f i (x )
i =1
unde wk sunt ponderi ce arata preferinta relativa
pentru fiecare dintre functiile obiectiv f k ( x)
Real multiobjective optimization –
Pareto optimality
• The concept of noninferiority (Pareto optimality) is used

A solution x* is said to be Pareto optimal, or a nondominated


solution for a multiobjective optimization problem if and only if
there is no other x such that
f i ( x) ≤ f i ( x * ) for ∀i = 1,..., n
∃j for that f j ( x) < f j ( x ) *
Illustration of
Pareto frontier

The boxed points represent feasible choices, and smaller values are preferred
to larger ones. Point C is not on the Pareto frontier because it is dominated by
both A and B points. Points A and B are not strictly dominated by any
other, and hence do lie on the Pareto frontier.
Case study
 We want to minimize two competing objectives,
each having one decision variable.

f1 (x ) = ( x + 2) 2 − 10
f 2 (x ) = ( x − 2) 2 + 20

Find x that minimizes {f1(x), f2(x)}


180
objective1
160 objective2

140

120

100

80

60

40

20

-20
-10 -8 -6 -4 -2 0 2 4 6 8 10
x

f1min = −10 , for x = −2


f 2 min = +20 , for x = +2
Methods to solve

 Use a real MOO (multiobjective ranking )


 Solution: Pareto frontier

 Transformation to a SOO, (using a weighted sum)


and optimize one objective
 Solution: one individual

8 /20
Fitness assignment:
multiobjective ranking

 Each individual in a population receives a rank according to its


quality.
 All solutions found during optimization and nondominated by
a different solution constitute the Pareto optimal solutions set.
 Rank 1 individuals are best, rank 2 individuals are dominated
only by rank 1 individuals, and so on…
Coding the Fitness Function
For serial evaluation
function y = moo(x)
y(1) = (x+2)^2 - 10;
y(2) = (x-2)^2 + 20;

For vectorized evaluation


function y = moo_v(x)
y(:,1) = (x+2).^2 - 10;
y(:,2) = (x-2).^2 + 20;
Minimizing Using GAMULTIOBJ
pop =
-2.000282778881985
optimresults = 2.000661899148628
x: [9x1 double] 9 solution on the Pareto frontier -2.000282778881988
fval: [9x2 double] objectives for solution -2.000282778881986
-2.000282778881986
exitflag: 0 -2.000282778881987
output: [1x1 struct] -2.000282778881988
population: [25x1 double] individuals in last generation -2.000282778881988
-2.000282778881986
score: [25x2 double] objectives for last generation 2.000661899149350
2.000661899148628
x objective1 objective2 2.000661899149427
2.000661899148811
-2.000282778881985 -10.0000 36.0023 -2.000282778881986
2.000661899148628 6.0053 20.0000 -2.000282778881986
6.0053 20.0000 -2.000282778881986
2.000661899148628 1.035470952846574
1.035470952846574 -0.7859 20.9303 0.505323859855575
0.505323859855575 -3.7234 22.2341 0.755010732722052
-2.000282778881986
0.755010732722052 -2.4099 21.5500 -2.000282778881986
-2.000282778881986 -10.0000 36.0023 2.000661899148662
0.035470952846574 -5.8569 23.8594 -1.000282778881986
0.035470952846574
1.637152311139357 3.2289 20.1317 1.637152311139357
Pareto front
38
objective1 objective2
36 -10.0000 36.0023
6.0053 20.0000
34
6.0053 20.0000
32 -0.7859 20.9303
-3.7234 22.2341
Objective 2

30 -2.4099 21.5500
-10.0000 36.0023
28
-5.8569 23.8594
26 3.2289 20.1317

24

22

20
-10 -8 -6 -4 -2 0 2 4 6 8
Objective 1
Solutions from the Pareto front

The user should choose the final


solution, according with its
preferences/options/constrains
pop =
Rank histogram -2.000282778881985
9 2.000661899148628
-2.000282778881988
8 -2.000282778881986
-2.000282778881986
7 -2.000282778881987
-2.000282778881988
-2.000282778881988
Number of individuals

6
-2.000282778881986
2.000661899149350
5 2.000661899148628
2.000661899149427
4 2.000661899148811
-2.000282778881986
3 -2.000282778881986
-2.000282778881986
1.035470952846574
2
0.505323859855575
0.755010732722052
1 -2.000282778881986
-2.000282778881986
0 2.000661899148662
1 1.5 2 2.5 3 3.5 4 4.5 5 5.5 6 -1.000282778881986
Rank 0.035470952846574
1.637152311139357
Score Histogram
5

4.5

3.5
Number of individuals

2.5

1.5

0.5

0
-10 -5 0 5 10 15 20 25 30 35 40
Score (range)
Problema se poate exporta in workspace

Se poate salva pe disk (save nume)

Daca problema a fost exportata cu “Include information needed to resume


this run”, dupa realizarea importului optimizarea porneste din punctul in
care s-a oprit inainte de exportare.
Ulterior problema de optimizat se poate incarca de pe disk in workspace
(load nume)
Apoi se poate importa din workspace

Se poate porni algoritmul de optimizare.


SOO method
Coding the fitness function as a weighted sum
function z = moo_soo(x)
y(1) = (x+2)^2 - 10;
y(2) = (x-2)^2 + 20;
w1=0.75; w2=0.25;
z=w1*y(1)+w2*y(2);

w1=0.2; w2=0.8;

Solution changes with weights


Studiu de caz: Dimensionarea unui
amplificator cu tranzistor
in conexiunea EC, utilizand MOO

Parametrii: R1 R2 RE RC
Cerinte de proiectare: Avo , Ro
Constrangere liniara de inegalitate
• Domeniile de valori ale pentru a avea tranzistorul in conductie
parametrilor
R1 − 9 R2 ≤ 0
10K ≤ R1 ≤ 200K
1K ≤ R2 ≤ 200K
Mai trebuie satisfacuta si conditia
0.5K ≤ RE ≤ 10K
VCE ≥ VCE _ c
0.5K ≤ RC ≤ 20K
Pentru ca T sa nu intre in saturatie
VCE = VCC − I C (RC + RE )
Rezulta o constrangere neliniara de
inegalitate
Cerinte de proiectare
Avo = Avo _ c
Ro = Ro _ c
• Deoarece optimizarea MOO cu AG nu permite utilizarea de
constrangeri neliniare de valori ale parametrilor vom include aceasta
constrangere in functia obiectiv.

• Rezulta asadar o problema de optimizare MOO cu


• trei obiective
• 4 constrangeri de marginire (domeniile de valori ale parametrilor)
• 1 constrangere liniara de inegalitate

Obiective Constrangeri de marginire

Avo = Avo _ c lb = [10 1 0.5 0.5]


Ro = Ro _ c ub = [200 200 10 20]
VCE ≥ VCE _ c

Constrangere de inegalitate liniara

A = [1 − 9 0 0] b = [0]
300

Formularea functiei
200
obiectiv (multiobiectiv)

y(1)
100

0
0 100 200 300 400 500 600
Avo_c=300; Avo

Ro_c=2.5; 3

Vce_c=2.5; 2

y(2)
y(1)=abs(Avo_c-av); 1

y(2)=abs(Ro_c-ro);
0
y(3)=zmf(vce,[0.5*Vce_c,Vce_c]) 0 1 2 3 4 5
Ro

Av, ro si vce sunt valorile


curente ale performantelor
y(3)

0.5
circuitului, calculate pentru
fiecare individ in parte
0
0 0.5 1 1.5 2 2.5 3 3.5 4
Vce
24 /20
Rank histogram
15

Number of individuals

10

Optimization terminated: average


change in the spread of Pareto
5
solutions less than options.TolFun.

0
1 2 3 4 5 6 7 8
Rank
Average Spread: 0.0966314
1
Average Distance Between Individuals
100
0.9

90 0.8

80 0.7
Average Spread
0.6
Avergae Distance

70

0.5
60
0.4
50
0.3
40
0.2

30 0.1

20 0
20 40 60 80 100 120 140 160 180 200 0 20 40 60 80 100 120 140 160 180 200
Generation Generation
Pareto front
10

6
Objective 2

0
0 20 40 60 80 100 120
Objective 1
6 solutii selectate din cele 15 de pe frontul Pareto
"equal"
400

Avo 200

0
1 1.5 2 2.5 3 3.5 4 4.5 5 5.5 6
"equal"
20
Ro

10

0
1 1.5 2 2.5 3 3.5 4 4.5 5 5.5 6
"greater than"
6
Vce

2
1 1.5 2 2.5 3 3.5 4 4.5 5 5.5 6
solution

Cum poate alege utilizatorul solutia finala dintre cele de pe frontul Pareto?

You might also like