I have 1000 room each room has inside different cash and also all the rooms are closed on initial state.
At that time 5 rooms only to be permitted to open and get a cash from respective rooms only.for example room 1 has Rs 200, room 2 has Rs 300, room 3 has Rs 700, room 4 has Rs 800 and so on upto room 1000. My objective is to get a maximum amount when i opened 5rooms ? Here i hope to using Particle Swarm Optimization Technique. Step 1: I initialize randomly 100*5 size array for ex A=[1 4 2 6 7; 2 3 6 7 8; 2 5 7 10 210] and so on Note:Value indicates room numbers. And the row indicates at that time 5rooms[1 4 2 6 7] only opened.
How to velocity update this PSO problem???

 Akzeptierte Antwort

Yuvaraj Venkataswamy
Yuvaraj Venkataswamy am 28 Aug. 2018

1 Stimme

5 Kommentare

VIJAY
VIJAY am 28 Aug. 2018
Thanks for your kindly reply i try your code....
Yuvaraj Venkataswamy
Yuvaraj Venkataswamy am 28 Aug. 2018
@Vijay, you are welcome
VIJAY
VIJAY am 29 Aug. 2018
Hai sir i slight changes my objective function to your code .In velocity updation i got is float value and also repeated value is . x=x+v x is initial random value v is velocity value after that x=x+v the x is float and also repeated value sir ...But the room number never be float value and repeated room number sir
@Vijay: Is possible to do round off of your room number.
Y = round(X)
VIJAY
VIJAY am 29 Aug. 2018
If using round X ,the Y may be repeated .For ex X=[4.566 6 8 9 4.99] if round(X) ieee Y=[5 6 8 9 5] The room number 5 repeated.....

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by