Quick Optimization

Moderators: cyao, michael_borland

Post Reply
mjoyce
Posts: 15
Joined: 28 Jul 2008, 12:56

Quick Optimization

Post by mjoyce » 28 Jan 2009, 16:41

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

michael_borland
Posts: 1933
Joined: 19 May 2008, 09:33
Location: Argonne National Laboratory
Contact:

Re: Quick Optimization

Post by michael_borland » 28 Jan 2009, 17:16

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

michael_borland
Posts: 1933
Joined: 19 May 2008, 09:33
Location: Argonne National Laboratory
Contact:

Re: Quick Optimization

Post by michael_borland » 28 Jan 2009, 17:31

Sorry, I mean the "target" parameter in optimization_setup, not optimization_term.

--Michael

mjoyce
Posts: 15
Joined: 28 Jul 2008, 12:56

Re: Quick Optimization

Post by mjoyce » 29 Jan 2009, 10:01

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?

Post Reply