Page 1 of 1

Quick Optimization

Posted: 28 Jan 2009, 16:41
by mjoyce
I have used elegant to match the twiss parameters at a particular location, and have asked it to create a new lattice file with the optimized quad values.
I then (just for grins) optimized the same parameters, same location, against the new lattice. As expected, no changes to the optimum values of the variables occurred, but the process took just as long..I would have thought that it would find a solution quicker.
Is there a way for elegant to check if the parameters are within tolerance, and not do the full optimization routine if they are? Ideally, I'd like this to live in a single file so that we can just run the command file on a newly revised lattice, and check that the parameters are good, but optimize if not.

I know this can all be done in separate steps, I was just hoping there was a command that I could directly use in the file.
Thanks,
Michele

Re: Quick Optimization

Posted: 28 Jan 2009, 17:16
by michael_borland
Michele,

You should be able to get the desired behavior by setting the "target" parameter in optimization_term to a non-zero value. The default is target=0, which means that elegant will run until it exhausts the allowed number of iterations or sees no changes within the tolerance. If target>0, then elegant will terminate the optimization once the penalty function goes below the target.

--Michael

Re: Quick Optimization

Posted: 28 Jan 2009, 17:31
by michael_borland
Sorry, I mean the "target" parameter in optimization_setup, not optimization_term.

--Michael

Re: Quick Optimization

Posted: 29 Jan 2009, 10:01
by mjoyce
According to the documentation, the "target" parameter in optimization_setup is : The value which, if reached, results in immediate termination of the optimization, whether it has converged or not....

I'm not sure how I would set this to a specific value. I have four optimization_terms, which value to I use as the target?