JuliaNLSolvers / Optim.jl

Optimization functions for Julia
Other
1.1k stars 214 forks source link

Non-Adaptive PSO #995

Open AlexvZyl opened 1 year ago

AlexvZyl commented 1 year ago

I am currently using particle swarm on one of my problems and wanted to change the weights, but:

image

c1,c2 and w are not exposed, due adaptive PSO being implemented. Would it be possible to make these values static?

cc @ErichWiehahn

pkofod commented 1 year ago

what do you mean make them static? I can expose them, yes

pkofod commented 1 year ago

Notice, that I do allow for this already over in NLSolvers.jl https://github.com/JuliaNLSolvers/NLSolvers.jl/blob/7ce1e0c7ef1c76f84098e6c392a589f13c2f4869/src/optimize/randomsearch/particleswarm.jl

pkofod commented 1 year ago

I actually see that the initial weight parameter is not exposed. I will do so.

AlexvZyl commented 1 year ago

Exposing them would be nice, yes!

I was asking if it was possible to make the weights parameters fixed. My problem invovled an extremely non-linear space and I wanted to play around with the weight parameters to see if I can yield better results.

I am unsure if that would be trivial to add or if it would require a whole different algorithm. If it is not that trivial I would understand you not wanting to add it.

pkofod commented 1 year ago

Ah, so you mean a "non-adaptive" version of PSO?

AlexvZyl commented 1 year ago

Yes, that is what I meant.

pkofod commented 1 year ago

Yes, that is what I meant.

That should be possible.