output_at_each_step creates unknown tokens when combined with optimization_covariable
Posted: 10 Mar 2020, 18:11
I'm trying to optimize a toy beam line and I can't access all the parameters I want to because of unexpected behavior of the output_at_each_step flag in twiss_setup.
When the flag is set (output_at_each_step = 1), the following optimization_covariable throws an unknown token:
Where MW is a mark element and TB is a twiss element. The MW#1.betax is the unknown token.
When I comment out the output_at_each_step flag, the previous optimization_covariable works just fine, but the following optimization_term does not (another unknown token error):
SW is a properly defined CSBEND element, the SW.ANGLE is the unknown token.
Since I can get one or the other to work depending on how the output_at_each_step flag is set, I know that everything is defined properly enough. Is this the intended functionality of output_at_each_step? If so, I do not understand it.
Edit: EDRIFT items don't appear to cause any problems, but KQUAD elements fail similarly to the CSBEND elements.
Edit: A set of files that can be used to recreate this problem are located in this topic:
viewtopic.php?f=9&t=1104
When the flag is set (output_at_each_step = 1), the following optimization_covariable throws an unknown token:
Code: Select all
&optimization_covariable
name=TB, item=betax, equation="MW#1.betax"
&end
When I comment out the output_at_each_step flag, the previous optimization_covariable works just fine, but the following optimization_term does not (another unknown token error):
Code: Select all
&optimization_term
term = "SW.ANGLE atan 0.25 0.01 selt"
&end
Since I can get one or the other to work depending on how the output_at_each_step flag is set, I know that everything is defined properly enough. Is this the intended functionality of output_at_each_step? If so, I do not understand it.
Edit: EDRIFT items don't appear to cause any problems, but KQUAD elements fail similarly to the CSBEND elements.
Edit: A set of files that can be used to recreate this problem are located in this topic:
viewtopic.php?f=9&t=1104