Sie sind auf Seite 1von 38

TUGAS ANALISA REKAYASA

SERLI CARLINA 26916004


IRA KRISTANTY 26916309
ZAID DZULKARNAIN ZUBIZARETTA 26916312
TAUFIK DIMITRI SUTARYONO 26917002

Item Weight (Kg) Value (000 Rp.,) Problem Representation


(W) (V)
A 2 20 A B C D E
B 3 80 Yes/No Yes/No Yes/No Yes/No Yes/No
C 7 120 1/0 1/0 1/0 1/0 1/0
D 5 100
E 15 500

Chromosome
Example
A B C D E
1 0 1 1 0

Objective Function
MAX( (V1*allele1)+(V2*allele2)+(V3*allele3)+(V4*allele4)+(V5

Constraint
17 kg > = ( (W1*allele1)+(W2*allele2)+(W3*allele3)+(W4*allel
3*allele3)+(V4*allele4)+(V5*allele5))

e2)+(W3*allele3)+(W4*allele4)+(W5*allele5))
Parameter Setting
Number of Individual 5
Number of Iteration 6
Crossover Rate 0.65
Mutation Rate 0.02

Rand 0

Step 1 Initialisation
A B C D E
Ind. 1 1 1 0 1 0
Ind. 2 0 1 1 0 0
Ind. 3 0 0 1 1 1
Ind. 4 0 0 0 1 0
Ind. 5 0 0 0 0 1

Step 2 Fitness Computation

A B C D E
Ind. 1 1 1 0 1 0
Ind. 2 0 1 1 0 0
Ind. 3 0 0 1 1 1
Ind. 4 0 0 0 1 0
Ind. 5 0 0 0 0 1

Constraint Check
A B C D E
Ind. 1 1 1 0 1 0
Ind. 2 0 1 1 0 0
Ind. 3 0 0 1 1 1
Ind. 4 0 0 0 1 0
Ind. 5 0 0 0 0 1

Step 3 Evolution

Crossover

Crossover rate 0.65


Rand 0.592918 0.156167
Cross over or not Cross Over

Parent from Individual 3


A B C D E
Parent 1 0 0 0 1 0 Ind 4
Parent 2 0 1 1 0 0 Ind 2
Cross over location 3 3
A B C D E
New Cr. 1 0 0 0 0 0
New Cr. 2 0 1 1 1 0

Mutation

Mutation rate 0.02


Rand 0.498373
Mutation or not Not

Reproduction (the roulette wheel )


Fitness Value Proportion Slot A
Ind. 1 200 15.0% 0.0% 15.0% 1
Ind. 2 200 15.0% 15.0% 29.9% 0
Ind. 3 36 2.7% 29.9% 32.6% 0
Ind. 4 100 7.5% 32.6% 40.1% 0
Ind. 5 500 37.4% 40.1% 77.5% 0
New Cr. 1 0 0.0% 77.5% 77.5% 0
New Cr. 2 300 22.5% 77.5% 100.0% 0

1336
the wheel
46.0%
46.0%
Selected Ind 5

Selection Result
A B C D E
Ind. 1 0 1 1 0 0 Ind 2
Ind. 2 1 1 0 1 0 Ind 1
Ind. 3 0 0 0 0 1 Ind 5
Ind. 4 0 1 1 1 0 New Cr.2
Ind. 5 0 0 0 0 1 Ind 5
Item Weight (Kg) Value (000 Rp.,)
(W) (V)
A 2 20
B 3 80
C 7 120
D 5 100
E 15 500

Fitness Value MAX( (V1*allele1)+(V2*allele2)+(V3*allele3)+(V4*allele4)+(V5*allele5))


200
200
720
100
500

Weight Fitness Value 19 kg > = ( (W1*allele1)+(W2*allele2)+(W3*allele


10 OK 200
10 OK 200
27 Penalty 36
5 OK 100
15 OK 500

Weight Fitness Value


5 OK 100
10 OK 200
Weight Fitness Value Fitness Value Checked
0 OK 0 0
15 OK 300 300

B C D E Weight
1 0 1 0 10
1 1 0 0 10
0 1 1 1 27
0 0 1 0 5
0 0 0 1 15
0 0 0 0 0
1 1 1 0 15

Weight Fitness Value


10 OK 200
10 OK 200
15 OK 500
15 OK 300
15 OK 500
5*allele5))

)+(W2*allele2)+(W3*allele3)+(W4*allele4)+(W5*allele5))
Fitness Value Checked
OK 200
OK 200
Penalty 36
OK 100
OK 500
OK 0
OK 300
Parameter Setting
Number of Individual 5
Number of Iteration 6
Crossover Rate 0.65
Mutation Rate 0.02

Rand 0

Step 1 Initialisation
A B C D E
Ind. 1 0 1 1 0 0
Ind. 2 1 1 0 1 0
Ind. 3 0 0 0 0 1
Ind. 4 0 1 1 1 0
Ind. 5 0 0 0 0 1

Step 2 Fitness Computation

A B C D E
Ind. 1 0 1 1 0 0
Ind. 2 1 1 0 1 0
Ind. 3 0 0 0 0 1
Ind. 4 0 1 1 1 0
Ind. 5 0 0 0 0 1

Constraint Check
A B C D E
Ind. 1 0 1 1 0 0
Ind. 2 1 1 0 1 0
Ind. 3 0 0 0 0 1
Ind. 4 0 1 1 1 0
Ind. 5 0 0 0 0 1

Step 3 Evolution

Crossover

Crossover rate 0.65


rand 0.071297 0.258294
Cross over or not Cross Over

Parent from Individual 2


A B C D E
Parent 1 1 1 0 1 0 Ind 2
Parent 2 0 1 1 0 0 Ind 1
Cross over location 3 4
A B C D E
New Cr. 1 1 1 0 1 0
New Cr. 2 0 1 1 0 0

Mutation

Mutation rate 0.02


rand 0.440027
Mutation or not Not

Reproduction (the roulette wheel )


Fitness Value Proportion Slot A
Ind. 1 200 9.5% 0.0% 9.5% 0
Ind. 2 200 9.5% 9.5% 19.0% 1
Ind. 3 500 23.8% 19.0% 42.9% 0
Ind. 4 300 14.3% 42.9% 57.1% 0
Ind. 5 500 23.8% 57.1% 81.0% 0
New Cr. 1 200 9.5% 81.0% 90.5% 1
New Cr. 2 200 9.5% 90.5% 100.0% 0
2100

the wheel
82.2%
82.2%
Selected New Cr. 1

Selection Result
A B C D E
Ind. 1 0 0 0 0 1 Ind 5
Ind. 2 0 1 1 0 0 Ind 1
Ind. 3 0 0 0 0 1 Ind 3
Ind. 4 1 1 0 1 0 Ind 2
Ind. 5 0 1 1 0 0 New Cr. 2
Item Weight (Kg) Value (000 Rp.,)
(W) (V)
A 2 20
B 3 80
C 7 120
D 5 100
E 15 500

Fitness Value MAX( (V1*allele1)+(V2*allele2)+(V3*allele3)+(V4*allele4)+(V5*allele5))


200
200
500
300
500

Weight Fitness Value 19 kg > = ( (W1*allele1)+(W2*allele2)+(W3*allele


10 OK 200
10 OK 200
15 OK 500
15 OK 300
15 OK 500

Weight Fitness Value


10 OK 200
10 OK 200
Weight Fitness Value Fitness Value Checked
10 OK 200 200
10 OK 200 200

B C D E Weight
1 1 0 0 10
1 0 1 0 10
0 0 0 1 15
1 1 1 0 15
0 0 0 1 15
1 0 1 0 10
1 1 0 0 10

Weight Fitness Value


15 OK 500
10 OK 200
15 OK 500
10 OK 200
10 OK 200
+(V5*allele5))

le1)+(W2*allele2)+(W3*allele3)+(W4*allele4)+(W5*allele5))
Fitness Value Checked
OK 200
OK 200
OK 500
OK 300
OK 500
OK 200
OK 200
Parameter Setting
Number of Individual 5
Number of Iteration 6
Crossover Rate 0.65
Mutation Rate 0.02

rand 0

Step 1 Initialisation
A B C D E
Ind. 1 0 0 0 0 1
Ind. 2 0 1 1 0 0
Ind. 3 0 0 0 0 1
Ind. 4 1 1 0 1 0
Ind. 5 0 1 1 0 0

Step 2 Fitness Computation

A B C D E
Ind. 1 0 0 0 0 1
Ind. 2 0 1 1 0 0
Ind. 3 0 0 0 0 1
Ind. 4 1 1 0 1 0
Ind. 5 0 1 1 0 0

Constraint Check
A B C D E
Ind. 1 0 0 0 0 1
Ind. 2 0 1 1 0 0
Ind. 3 0 0 0 0 1
Ind. 4 1 1 0 1 0
Ind. 5 0 1 1 0 0

Step 3 Evolution

Crossover
Crossover rate 0.65
rand 0.004572 0.019437
Cross over or not Cross Over

Parent from Individual 4


A B C D E
Parent 1 1 1 0 1 0 Ind 4
Parent 2 0 1 1 0 0 Ind 5
Cross over location 1 4
A B C D E
New Cr. 1 1 1 0 1 0
New Cr. 2 0 1 1 0 0

Mutation

Mutation rate 0.02


rand 0.660198
Mutation or not Not

Reproduction (the roulette wheel )


Fitness Value Proportion Slot A
Ind. 1 500 25.0% 0.0% 25.0% 0
Ind. 2 200 10.0% 25.0% 35.0% 0
Ind. 3 500 25.0% 35.0% 60.0% 0
Ind. 4 200 10.0% 60.0% 70.0% 1
Ind. 5 200 10.0% 70.0% 80.0% 0
New Cr. 1 200 10.0% 80.0% 90.0% 1
New Cr. 2 200 10.0% 90.0% 100.0% 0
2000

the wheel
1.3%
1.3%
Selected Ind 1

Selection Result
A B C D E
Ind. 1 0 0 0 0 1 Ind 3
Ind. 2 0 1 1 0 0 Ind 5
Ind. 3 0 0 0 0 1 Ind 3
Ind. 4 0 1 1 0 0 New Cr. 2
Ind. 5 1 1 0 1 0 Ind 4
Item Weight (Kg) Value (000 Rp.,)
(W) (V)
A 2 20
B 3 80
C 7 120
D 5 100
E 15 500

Fitness Value MAX( (V1*allele1)+(V2*allele2)+(V3*allele3)+(V4*allele4)+(V5*allele5))


500
200
500
200
200

Weight Fitness Value 19 kg > = ( (W1*allele1)+(W2*allele2)+(W3*allele


15 OK 500
10 OK 200
15 OK 500
10 OK 200
10 OK 200

Weight Fitness Value


10 OK 200
10 OK 200
Weight Fitness Value Fitness Value Checked
10 OK 200 200
10 OK 200 200

B C D E Weight
0 0 0 1 15
1 1 0 0 10
0 0 0 1 15
1 0 1 0 10
1 1 0 0 10
1 0 1 0 10
1 1 0 0 10

Weight Fitness Value


15 OK 500
10 OK 200
15 OK 500
10 OK 200
10 OK 200
+(V5*allele5))

le1)+(W2*allele2)+(W3*allele3)+(W4*allele4)+(W5*allele5))
Fitness Value Checked
OK 500
OK 200
OK 500
OK 200
OK 200
OK 200
OK 200
Parameter Setting
Number of Individual 5
Number of Iteration 6
Crossover Rate 0.65
Mutation Rate 0.02

rand 1

Step 1 Initialisation
A B C D E
Ind. 1 0 0 0 0 1
Ind. 2 0 1 1 0 0
Ind. 3 0 0 0 0 1
Ind. 4 0 1 1 0 0
Ind. 5 1 1 0 1 0

Step 2 Fitness Computation

A B C D E
Ind. 1 0 0 0 0 1
Ind. 2 0 1 1 0 0
Ind. 3 0 0 0 0 1
Ind. 4 0 1 1 0 0
Ind. 5 1 1 0 1 0

Constraint Check
A B C D E
Ind. 1 0 0 0 0 1
Ind. 2 0 1 1 0 0
Ind. 3 0 0 0 0 1
Ind. 4 0 1 1 0 0
Ind. 5 1 1 0 1 0

Step 3 Evolution

Crossover
Crossover rate 0.65
rand 0.209556 0.152093
Cross over or not Cross Over

Parent from Individual 2


A B C D E
Parent 1 1 1 0 1 0 Ind 5
Parent 2 0 0 0 0 1 Ind 1
Cross over location 3 2
A B C D E
New Cr. 1 1 1 0 0 1
New Cr. 2 0 0 0 1 0

Mutation

Mutation rate 0.02


rand 0.580846
Mutation or not Not

Reproduction (the roulette wheel )


Fitness Value Proportion Slot A
Ind. 1 500 28.9% 0.0% 28.9% 0
Ind. 2 200 11.6% 28.9% 40.5% 0
Ind. 3 500 28.9% 40.5% 69.4% 0
Ind. 4 200 11.6% 69.4% 80.9% 0
Ind. 5 200 11.6% 80.9% 92.5% 1
New Cr. 1 30 1.7% 92.5% 94.2% 1
New Cr. 2 100 5.8% 94.2% 100.0% 0
1730

the wheel
11.2%
11.2%
Selected Ind 1

Selection Result
A B C D E
Ind. 1 1 1 0 0 1 New Cr. 1
Ind. 2 1 1 0 1 0 Ind 5
Ind. 3 0 1 1 0 0 Ind 2
Ind. 4 0 0 0 0 1 Ind 1
Ind. 5 0 0 0 0 1 Ind 3
Item Weight (Kg) Value (000 Rp.,)
(W) (V)
A 2 20
B 3 80
C 7 120
D 5 100
E 15 500

Fitness Value MAX( (V1*allele1)+(V2*allele2)+(V3*allele3)+(V4*allele4)+(V5*allele5))


500
200
500
200
200

Weight Fitness Value 19 kg > = ( (W1*allele1)+(W2*allele2)+(W3*allele3


15 OK 500
10 OK 200
15 OK 500
10 OK 200
10 OK 200

Weight Fitness Value


10 OK 200
15 OK 500
Weight Fitness Value Fitness Value Checked
20 Penalty 600 30
5 OK 100 100

B C D E Weight
0 0 0 1 15
1 1 0 0 10
0 0 0 1 15
1 1 0 0 10
1 0 1 0 10
1 0 0 1 20
0 0 1 0 5

Weight Fitness Value


20 Penalty 30
10 OK 200
10 OK 200
15 OK 500
15 OK 500
)+(V5*allele5))

ele1)+(W2*allele2)+(W3*allele3)+(W4*allele4)+(W5*allele5))
Fitness Value Checked
OK 500
OK 200
OK 500
OK 200
OK 200
Penalty 30
OK 100
Parameter Setting
Number of Individual 5
Number of Iteration 6
Crossover Rate 0.65
Mutation Rate 0.02

rand 1

Step 1 Initialisation
A B C D E
Ind. 1 1 1 0 0 1
Ind. 2 1 1 0 1 0
Ind. 3 0 1 1 0 0
Ind. 4 0 0 0 0 1
Ind. 5 0 0 0 0 1

Step 2 Fitness Computation

A B C D E
Ind. 1 1 1 0 0 1
Ind. 2 1 1 0 1 0
Ind. 3 0 1 1 0 0
Ind. 4 0 0 0 0 1
Ind. 5 0 0 0 0 1

Constraint Check
A B C D E
Ind. 1 1 1 0 0 1
Ind. 2 1 1 0 1 0
Ind. 3 0 1 1 0 0
Ind. 4 0 0 0 0 1
Ind. 5 0 0 0 0 1

Step 3 Evolution

Crossover
Crossover rate 0.65
rand 0.119928 0.152093
Cross over or not Cross Over

Parent from Individual 3


A B C D E
Parent 1 0 0 0 0 1 Ind 4
Parent 2 1 1 0 1 0 Ind 2
Cross over location 3 1
A B C D E
New Cr. 1 0 1 0 1 0
New Cr. 2 1 0 0 0 1

Mutation

Mutation rate 0.02


rand 0.456056
Mutation or not Not

Reproduction (the roulette wheel )


Fitness Value Proportion Slot A
Ind. 1 30 1.4% 0.0% 1.4% 1
Ind. 2 200 9.4% 1.4% 10.8% 1
Ind. 3 200 9.4% 10.8% 20.2% 0
Ind. 4 500 23.5% 20.2% 43.7% 0
Ind. 5 500 23.5% 43.7% 67.1% 0
New Cr. 1 180 8.5% 67.1% 75.6% 0
New Cr. 2 520 24.4% 75.6% 100.0% 1
2130

the wheel
87.4%
87.4%
Selected New Cr.2

Selection Result
A B C D E
Ind. 1 0 0 0 0 1 Ind 4
Ind. 2 1 0 0 0 1 New Cr.2
Ind. 3 0 1 1 0 0 Ind 3
Ind. 4 0 0 0 0 1 Ind 5
Ind. 5 0 1 0 1 0 New Cr. 1
Item Weight (Kg) Value (000 Rp.,)
(W) (V)
A 2 20
B 3 80
C 7 120
D 5 100
E 15 500

Fitness Value MAX( (V1*allele1)+(V2*allele2)+(V3*allele3)+(V4*allele4)+(V5*allele5))


600
200
200
500
500

Weight Fitness Value 19 kg > = ( (W1*allele1)+(W2*allele2)+(W3*allele


20 Penalty 30
10 OK 200
10 OK 200
15 OK 500
15 OK 500

Weight Fitness Value


15 OK 500
10 OK 200
Weight Fitness Value Fitness Value Checked
8 OK 180 180
17 OK 520 520

B C D E Weight
1 0 0 1 20
1 0 1 0 10
1 1 0 0 10
0 0 0 1 15
0 0 0 1 15
1 0 1 0 8
0 0 0 1 17

Weight Fitness Value


15 OK 500
17 OK 520
10 OK 200
15 OK 500
8 OK 180
(V5*allele5))

e1)+(W2*allele2)+(W3*allele3)+(W4*allele4)+(W5*allele5))
Fitness Value Checked
Penalty 30
OK 200
OK 200
OK 500
OK 500
OK 180
OK 520
Parameter Setting
Number of Individual 5
Number of Iteration 6
Crossover Rate 0.65
Mutation Rate 0.02

rand 0

Step 1 Initialisation
A B C D E
Ind. 1 0 0 0 0 1
Ind. 2 1 0 0 0 1
Ind. 3 0 1 1 0 0
Ind. 4 0 0 0 0 1
Ind. 5 0 1 0 1 0

Step 2 Fitness Computation

A B C D E
Ind. 1 0 0 0 0 1
Ind. 2 1 0 0 0 1
Ind. 3 0 1 1 0 0
Ind. 4 0 0 0 0 1
Ind. 5 0 1 0 1 0

Constraint Check
A B C D E
Ind. 1 0 0 0 0 1
Ind. 2 1 0 0 0 1
Ind. 3 0 1 1 0 0
Ind. 4 0 0 0 0 1
Ind. 5 0 1 0 1 0

Step 3 Evolution

Crossover
Crossover rate 0.65
rand 0.395307 0.474411
Cross over or not Cross Over

Parent from Individual 3


A B C D E
Parent 1 0 1 0 1 0 Ind 5
Parent 2 0 1 1 0 0 Ind 3
Cross over location 3 3
A B C D E
New Cr. 1 0 1 0 0 0
New Cr. 2 0 1 1 1 0

Mutation

Mutation rate 0.02


rand 0.461094
Mutation or not Not

Reproduction (the roulette wheel )


Fitness Value Proportion Slot A
Ind. 1 500 21.9% 0.0% 21.9% 0
Ind. 2 520 22.8% 21.9% 44.7% 1
Ind. 3 200 8.8% 44.7% 53.5% 0
Ind. 4 500 21.9% 53.5% 75.4% 0
Ind. 5 180 7.9% 75.4% 83.3% 0
New Cr. 1 80 3.5% 83.3% 86.8% 0
New Cr. 2 300 13.2% 86.8% 100.0% 0

2280
the wheel
14.2%
14.2%
Selected Ind 1

Selection Result
A B C D E
Ind. 1 0 1 1 0 0 Ind 3
Ind. 2 0 0 0 0 1 Ind 4
Ind. 3 1 0 0 0 1 Ind 2
Ind. 4 0 0 0 0 1 Ind 1
Ind. 5 0 1 0 0 0 New Cr. 1
Item Weight (Kg) Value (000 Rp.,)
(W) (V)
A 2 20
B 3 80
C 7 120
D 5 100
E 15 500

Fitness Value MAX( (V1*allele1)+(V2*allele2)+(V3*allele3)+(V4*allele4)+(V5*allele5))


500
520
200
500
180

Weight Fitness Value 19 kg > = ( (W1*allele1)+(W2*allele2)+(W3*allel


15 OK 500
17 OK 520
10 OK 200
15 OK 500
8 OK 180

Weight Fitness Value


8 OK 180
10 OK 200
Weight Fitness Value Fitness Value Checked
3 OK 80 80
15 OK 300 300

B C D E Weight
0 0 0 1 15
0 0 0 1 17
1 1 0 0 10
0 0 0 1 15
1 0 1 0 8
1 0 0 0 3
1 1 1 0 15

Weight Fitness Value


10 OK 200
15 OK 500
17 OK 520
15 OK 500
3 OK 80
(V5*allele5))

le1)+(W2*allele2)+(W3*allele3)+(W4*allele4)+(W5*allele5))
Fitness Value Checked
OK 500
OK 520
OK 200
OK 500
OK 180
OK 80
OK 300

Das könnte Ihnen auch gefallen