Thank you very much for the previous reply again.
and adapt to solve the problem given in the research paper "Engineering Optimization with Particle Swarm".
The results give only with No-parallelization but not for SPM-Parallelization and DPM_parallelization. The error is followed.
Traceback (most recent call last):
File "C:\Users\Maha\Documents\Python\Optimisation\ALPSO PreV.py", line 79, in <module>
alpso_spm(opt_prob)
File "C:\Python27\lib\site-packages\pyOpt\pyOpt_optimizer.py", line 160, in __call__
return self.__solve__(opt_problem, *args, **kwargs)
File "C:\Python27\lib\site-packages\pyOpt\pyALPSO\pyALPSO.py", line 414, in __solve__
fileout,filename,log_file,hos_file,seed,scale,nhs,objconfunc)
File "C:\Python27\lib\site-packages\pyOpt\pyALPSO\alpso_spm.py", line 146, in alpso
h_start = Bcast(h_start, root=0)
UnboundLocalError: local variable 'Bcast' referenced before assignment
I can't understand why. Could you please clarify this too.
I have attached the program with this.