I mean that you missed the point about what ns-3 is and what ns-3 is not. ns-3 isn't Matlab, you'll not find any pre-coocked PSO code in ns-3, just because there's no network protocol actually implemented in ns-3 that is using any form of PSO.
I you need PSO or your own protocol, you'll have to implement it or use the code rom another library. I you want to "borrow" the ns-3 PSO implementation... well, sorry, but we don't have any.
That's why I told you to read the tutorial and the manual. Your question only shows that you don't know what ns-3 is (and is not). Reading the tutorial will enlighten you and will only take a couple o hours.
Have fun,
T.