I am working on Battery aging control for EV using PSO algorithm ,my prof send me code which I felt bit difficult to understand .When I tried to search on PSO matlab code in internet I found in all the paper they have initalized the parameters with respect to this formula

------- Vnewi,j=w*Vi,j+ C1*r1*(Pbest-Xi,j)+C2*r2*(Gbest- Xi,j) --------Xnew=Xi,j+Vnewi,j.In my prof code he has just mentioned a command called" particleswarm "and he say this command will automatically take cares about updating position and velocity.Is that true ?so we don't have control over (w,c1,c2,r1,r2)variables ? optimoptions('particleswarm','SwarmSize',150,'StallIterLimit',10,'Display','iter')

opt = particleswarm(@Cost_function,opt_var,lb,ub,options)

More Harini Pushparaj's questions See All
Similar questions and discussions