0

I started an AnyLogic Optimization experiment on my local machine (server was not an option for me). It was a lengthy one that could take several hours. During the execution of this experiment, an urgent work came up that required me to run other experiments. I now need to stop the opt experiment to perform other experiments.

How to stop the opt expt but store the current state so I can continue the opt experiment in the future without starting from the beginning? Is this possible?

James Z
  • 12,209
  • 10
  • 24
  • 44
Luan
  • 1

1 Answers1

0

Well, the very simple approach would be to traceln the current best solution (see the example models using optimization) after each iteration.

When you kill your current experiment, note it down (obviously, you can write to an xls file instead if it is a lot of params).

For your next restart, use those as the "suggested solution" and continue the optimization.

Benjamin
  • 10,603
  • 3
  • 16
  • 28
  • 1
    Thank you for your suggestions. That makes sense. Also, I appreciate other AnyLogic content you put out on Youtube as well. They've been very helpful. – Luan Jun 21 '21 at 18:37
  • Hi @Luan, if the answer was helpful, please flag it as such. Helps other users find it faster, see https://stackoverflow.com/help/privileges/vote-up – Benjamin Jun 22 '21 at 07:08
  • Note that this is only a 'pseudo' solution. Starting the optimisation at "the best solution it got to previously" will 100% NOT guarantee that the optimisation progresses in the same way it would have done if you left it running (since it now has zero historic information on parameters it tried and their outcomes). But this is at least better than restarting 'from scratch' (though there's no way of quantifying how 'much' better and it may end up being equivalent to starting from scratch anyway). – Stuart Rossiter Jun 22 '21 at 12:52
  • Thanks @StuartRossiter. I should kill the optimization when absolutely must, it seems. – Luan Jun 23 '21 at 03:02