Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose more optimisation parameters to users #1093

Open
rafaqz opened this issue Apr 26, 2024 · 4 comments
Open

Expose more optimisation parameters to users #1093

rafaqz opened this issue Apr 26, 2024 · 4 comments

Comments

@rafaqz
Copy link

rafaqz commented Apr 26, 2024

In simulated annealing the start temperature, rate of expansion, and acceptance ratio are all fixed constants defined in code.

With expensive objective functions it can make a lot of sense to adjust these parameters, but currently that requires editing the code directly.

@pkofod
Copy link
Member

pkofod commented Apr 26, 2024

I agree 👍 Edit: or maybe not

@pkofod
Copy link
Member

pkofod commented Apr 30, 2024

Start temperature is controlled by the temperature input. For example SimulatedAnnealing(; temperature=t->30/t) gives you a temperature of 30 in the first iteration, then 15, then 7.5, .... The temperature controls the rate of cooling (is that what you call rate of expansion?) and the formulate for the acceptance probability depends on the temperature. Can you maybe expand on your thoughts? Is this maybe a documentation issue?

@rafaqz
Copy link
Author

rafaqz commented Apr 30, 2024

Sorry I mean bounded, SAMIN. But really they should be the same in this regard.

In SAMIN the start temperature is just set to 2.0:
https://github.com/JuliaNLSolvers/Optim.jl/blob/master/src/multivariate/solvers/constrained/samin.jl#L76

Acceptance thresholds are hard coded:
https://github.com/JuliaNLSolvers/Optim.jl/blob/master/src/multivariate/solvers/constrained/samin.jl#L218-L219

And the temperature is multiplied by 10 in the increase phase:
https://github.com/JuliaNLSolvers/Optim.jl/blob/master/src/multivariate/solvers/constrained/samin.jl#L312

@pkofod
Copy link
Member

pkofod commented Apr 30, 2024

I see, let me review that then :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants