I am currently running a command: NMaximize[{expression, constraints}, {x1, ..., xn}]
that takes quite a while to converge. Is there a way to run Nmaximize in a verbose way such that every say 10 seconds, it outputs the current best maximum value?
1 Answer
Actually, I realised the answer after posting the question. I did this and it worked:
NMaximize[{f[x], constraints}, x, StepMonitor :> (Print["step x = ", {x}, ", f[x]=", f[x]]; Pause[.1])]