MOGA optimizer for rings

Moderators: cyao, michael_borland

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

MOGA optimizer for rings

Post by michael_borland » 07 Sep 2011, 09:11

As many of you know, APS is using a Multi-Objective Genetic Algorithm (MOGA) optimizer to develop lattices for operations and the APS upgrade. Details of our approach are described in this document:
http://www.aps.anl.gov/Science/Publicat ... 418279.pdf

In addition to APS, we've applied this algorithm to NSLS-II, SPEAR, Diamond, and PEPX. For those who might want to try it, I've uploaded a set of examples and instructions. You can get it from our software downloads page at

http://www.aps.anl.gov/Accelerator_Syst ... shtml#MOGA

--Michael

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

Re: MOGA optimizer for rings

Post by michael_borland » 07 Sep 2011, 09:12

By the way, I'd like to thank Lanfa Wang (SLAC) for being the first to try this and helping to iron out some confusing parts.

--Michael

kron
Posts: 7
Joined: 13 Apr 2012, 13:59
Location: JAI,Oxford

Re: MOGA optimizer for rings

Post by kron » 07 Jul 2012, 15:08

Hi Michael

I have tried to used MOGA optimizer to optimize beam emittace and DA.
I found some problem with the DA calculation process in "processJob" script which integrate the clipped area.
It give abnormal large area when the unclipped area is zero.
mpl.png
At the right down corner.
Those with the large area have DA like this:
002834check.png
DA
002834check.png (3.96 KiB) Viewed 12622 times
I tried to solve this problem by adding a line in the script:
...
-redefine=column,Area1, Area 0 == ? 0 : Area1 $ " \
...
this seem to solve the problem. However is there a better way to this?
And I wonder why the calculation gives the wrong values in the first place?

Also I try to use the FMA and diffusion rate as the objective for DA optimization but there is a problem with some points
(close to horizontal and vertical axis) which the algorithm can not find the real frequency (is it FFT ?) (If I understand correctly from your
explanation in another post)
as you can see:
985fma.png
fmaresult
985fma.png (22.27 KiB) Viewed 12621 times
Is there a way to solve this?

Many thanks
Thapakron

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

Re: MOGA optimizer for rings

Post by michael_borland » 07 Jul 2012, 15:17

Thapakron,

I wonder if you are using a very old version of elegant? The problem with getting very large area when the area is actually zero was solved several releases ago (I thought). If not, perhaps you can post the files for one of these cases.

The problem with FMA near the y=0 plane is due to cross-plane coupling. When the y value is very small, the motion coupled from the x plane can produce complex motion that doesn't have an unique, easily-identified frequency. The best thing to do is ignore the data for small y. You can change the input file to increase ymin in the &frequency_map command, or just filter the data after the fact.

--Michael

kron
Posts: 7
Joined: 13 Apr 2012, 13:59
Location: JAI,Oxford

Re: MOGA optimizer for rings

Post by kron » 07 Jul 2012, 19:19

Michael,

Thanks a lot for your help.
I use Elegant 24.0.1-1.x86_64.

Please find the attached aperture output.

Thanks,
Thapakron
Attachments
002834.aper
area0
(1.84 KiB) Downloaded 389 times

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

Re: MOGA optimizer for rings

Post by michael_borland » 07 Jul 2012, 22:43

Thapakon,

Can you try the most recent version? You are two versions behind.

If it still shows the problem, I need you to send the *input* files to diagnose the issue.

--Michael

kron
Posts: 7
Joined: 13 Apr 2012, 13:59
Location: JAI,Oxford

Re: MOGA optimizer for rings

Post by kron » 08 Jul 2012, 06:20

Hi Michael

The Area obtained from Elegant is correct (zero when there is no aperture).
But during the clipped Area (Area1) calculation by the script "processJob", it gives
some large constant value for example ***

Area_check :0.000000000000000e+00 (from .aper)
Area1_check:1.005000000000000e+00 (after processing) ***

On the other hand, when the Area is non-zero the clipped area (Area1) can be calculated correctly:
Area_check :1.125074645767331e-04 (from .aper)
Area1_check:7.669601360507396e-05 (after processing) ***

you can see from attached script.

Thanks a lot
Thapakron
Attachments
processTest.tar.gz
script and aperture files
(2.17 KiB) Downloaded 387 times

xhs05
Posts: 30
Joined: 29 Nov 2012, 21:43

Re: MOGA optimizer for rings

Post by xhs05 » 26 Jan 2013, 16:04

Hi Michael,
I met a problem when I try to use the geneticOptimizer.

I met a problem when I follow the steps in the GuideToUse to run demo.

The problem is :

bash: plotTwiss: command not found.

We are using the "Elegant 25.1.0" in Red Hat Enterprise Linux Workstation release 6.3.

Could you give me some suggestions on this problem?

Regards,
Haisheng Xu

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

Re: MOGA optimizer for rings

Post by michael_borland » 26 Jan 2013, 17:03

Haisheng,

The script plotTwiss should be included in the distribution, but perhaps we missed it. I've attached it here. Just unzip and put in your search path.

--Michael
Attachments
plotTwiss.gz
(3.07 KiB) Downloaded 415 times

xhs05
Posts: 30
Joined: 29 Nov 2012, 21:43

Re: MOGA optimizer for rings

Post by xhs05 » 28 Jan 2013, 09:19

Thank you, Michael!

We'll try to add this script into the search path.

Regards,
Haisheng Xu

Post Reply