Using linked elements when matching

Moderators: cyao, michael_borland

Post Reply
astecpete
Posts: 35
Joined: 24 Jul 2008, 04:01
Location: Daresbury Laboratory, UK

Using linked elements when matching

Post by astecpete » 18 Dec 2008, 09:47

Hi Michael,

I'd like to link up some quadrupole k-values and have them vary simultaneously as i do some twiss optimisation.
I have two "master" quads, LIN-S1-MAG-QUAD-01 and LIN-S1-MAG-QUAD-02. Then i have two sets of "slave" quads, LIN-S*-MAG-QUAD-01 (and -02), where * = 2 ... 16. i have inserted the following:

&link_elements
target = LIN-S*-MAG-QUAD-01
exclude = LIN-S1-MAG-QUAD-01
item = K1
source = LIN-S1-MAG-QUAD-01
source_position = "before"
mode = "dynamic"
equation = K1 sto
&end

&link_elements
target = LIN-S*-MAG-QUAD-02
exclude = LIN-S1-MAG-QUAD-02
item = K1
source = LIN-S1-MAG-QUAD-02
source_position = "before"
mode = "dynamic"
equation = K1 sto
&end

&link_control
summarize_links = 1
verbosity = 0
&end

The link_control output says i have done the right thing. But when i set up my twiss optimisation with LIN-S1-MAG-QUAD-01.K1 etc. as the optimisation variables it alters the K1 of this magnet only and leaves all the others unchanged :?:

Where am i going wrong?

Pete

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

Re: Using linked elements when matching

Post by michael_borland » 18 Dec 2008, 09:58

Pete,

The only thing I see wrong is that your equation is "K1 sto". You only need "K1". However, I'm not convinced that this should cause it not to work.

If fixing this doesn't resolve the problem, please send me the input files and I'll have a closer look.

Also, you can try setting summarize_links=1 and verbosity=1 in the link_control command to get more information.

--Michael

astecpete
Posts: 35
Joined: 24 Jul 2008, 04:01
Location: Daresbury Laboratory, UK

Re: Using linked elements when matching

Post by astecpete » 18 Dec 2008, 10:56

Just sent you the files - thanks for looking at this Michael

Post Reply