I want to know what is best simulator can be used for Localization in wireless sensor network , if we want to use optimization algorithms such as ABC, PSO and so on.
Hanaa, Understanding and programming NS2/NS3 is very very difficult. I would suggest you go for NetSim which is a commercial tool but discounted for educational users. You can also look at an example project on WSN localization using anchor nodes & trilateration is available at http://tetcos.com/file-exchange.html
There is no best algorithm for WSN localization . Each algorithm has some drawbacks and advantages. the performance of any localization algorithm depends on the quality of scenario under test, the type of information measurements and the quality of localization algorithm. in addition, there is some restrictions that effect the algorithm design, such as measurements and sensors error, multi-path signals, and the measurement type (TDOA, TOA, AOA, RSS).
finally, I think the localization is depended on the philosophy behind conception of your proposed model.