Using linked elements when matching
Posted: 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
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