Optimising Phase Advance - error
Posted: 25 Jun 2018, 05:58
Hi,
I am quite new to Elegant, so I'm still learning. I am trying to optimise a set of quads to realise a given phase advance between two points. I use the following "optimisation_setup":
&optimization_setup
mode = "minimize", method = "simplex",
target = 0,
tolerance = 1e-12, n_passes = 2, n_evaluations = 10, n_restarts = 5, log_file = "/dev/tty",
output_sparsing_factor = 10
log_file = log
&end
A typical "optimization_variable" looks like:
&optimization_variable name = Q1, item=K1, step_size = 0.01, lower_limit = -35, upper_limit = 35, force_inside=1 &end
And a troublesome "optimization_term" looks like:
&optimization_term term = "E2#1.psix E1#1.psix - abs 0.5 - sqr" &end
The problem I have is the following error is given when I run elegant (terminal output):
unknown token: E1#1.psix
unknown token: E2#1.psix
too few items on stack (subtract)
*stop*
too few items on numeric stack (less)
too few items on logical stack (conditional_udf)
*stop*
too few items on stack (subtract)
*stop*
Problem evaluating expression: ENDUBC3#1.psix ENDMBC2#1.psix - abs 0.5 - sqr
RPN expression errors prevent optimization
I have checked and double checked that I haven't made a mistake in the .lte file, the element names are correct. I have a twiss_output definition and I have checked the .twi file when i run without optimisation, the psix variable is contained within it. Can you help?
Cheers,
Jimmy
I am quite new to Elegant, so I'm still learning. I am trying to optimise a set of quads to realise a given phase advance between two points. I use the following "optimisation_setup":
&optimization_setup
mode = "minimize", method = "simplex",
target = 0,
tolerance = 1e-12, n_passes = 2, n_evaluations = 10, n_restarts = 5, log_file = "/dev/tty",
output_sparsing_factor = 10
log_file = log
&end
A typical "optimization_variable" looks like:
&optimization_variable name = Q1, item=K1, step_size = 0.01, lower_limit = -35, upper_limit = 35, force_inside=1 &end
And a troublesome "optimization_term" looks like:
&optimization_term term = "E2#1.psix E1#1.psix - abs 0.5 - sqr" &end
The problem I have is the following error is given when I run elegant (terminal output):
unknown token: E1#1.psix
unknown token: E2#1.psix
too few items on stack (subtract)
*stop*
too few items on numeric stack (less)
too few items on logical stack (conditional_udf)
*stop*
too few items on stack (subtract)
*stop*
Problem evaluating expression: ENDUBC3#1.psix ENDMBC2#1.psix - abs 0.5 - sqr
RPN expression errors prevent optimization
I have checked and double checked that I haven't made a mistake in the .lte file, the element names are correct. I have a twiss_output definition and I have checked the .twi file when i run without optimisation, the psix variable is contained within it. Can you help?
Cheers,
Jimmy