# SAMIN() in Julia (Simulated Annealing)?

**URL:** <https://discourse.julialang.org/t/samin-in-julia-simulated-annealing/30972>\
**Category:** Optimization (Mathematical)\
**Created:** [November 11, 2019, 9:57pm UTC](https://discourse.julialang.org/t/samin-in-julia-simulated-annealing/30972 "2019-11-11T21:57:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bashonubuntu](https://avatars.discourse-cdn.com/v4/letter/b/f19dbf/32.png) [@bashonubuntu](https://discourse.julialang.org/u/bashonubuntu)\
**Post date:** [November 11, 2019, 9:57pm UTC](https://discourse.julialang.org/t/samin-in-julia-simulated-annealing/30972/1 "2019-11-11T21:57:47Z")

</div>

Hello,

I was looking at the `SAMIN()` code in Optim ([Optim.jl](https://julianlsolvers.github.io/Optim.jl/stable/#algo/samin/)) and wanted to ask if someone could help provide some intuition for the nt, ns and neps terms.

While checking some julia discourses online, there seems to be good intuition for why setting `rt` to be somewhere between (0.8, 1) is a good idea, and if you want faster convergence you may want to set` rt` to be low so that the algorithm can “zero in” on the optimizer quicker. In a similar vein, would setting `nt = ns = neps = 1` correspond to a more “aggressive” ` SAMIN()` algorithm, where by “aggressive” I mean that, at the new (lower) values of `nt, ns and neps`, temperature is lowered and bounds are adjusted more quickly relative to when they are set at their default values (i.e. 5).

- What are the pitfalls of setting lower values, say 1, for nt, ns and neps?
- Are there are potential benefits of setting lower values, say 1, for nt, ns and neps (perhaps, together with a lower value of rt)?
