Page 1 of 1

Optimization of lattice with MATTER element

Posted: 07 Nov 2024, 19:46
by pratik
Hi,

I am looking into using the MATTER element with thicknesses less than 0.001
X0. Is there a way to use this element and optimize the lattice?

The probabilistic model does not allow me to easily do this. However, if I can stop it from changing after some evaluations, it could be possible.

Let me know if this could be possible.
elegant.lte
(867 Bytes) Downloaded 1122 times
elegant.ele
(1.5 KiB) Downloaded 1140 times
Best,
Pratik

Re: Optimization of lattice with MATTER element

Posted: 12 Nov 2024, 17:13
by michael_borland
Pratik,

You can try using the &transmute_elements command to turn the MATTER elements into drifts.

Code: Select all

&transmute_elements
        name = *, type = MATTER, new_type = DRIF
&end

&run_setup
...
--Michael

Re: Optimization of lattice with MATTER element

Posted: 25 Jan 2025, 19:51
by pratik
Hi Michael,

Thanks for your reply. I do want the MATTER element to be there. Do you think setting restart_random_numbers = 0, is a better choice. I do get the optimization to work with that change but it is still not monotonically decreasing. I am also switching to parallel_optimization for faster convergence. Let me know what you think about this and if there is any better way to do it. I am attaching the files.

Re: Optimization of lattice with MATTER element

Posted: 11 Feb 2025, 20:12
by pratik
pratik wrote:
25 Jan 2025, 19:51
Hi Michael,

Thanks for your reply. I do want the MATTER element to be there. Do you think setting restart_random_numbers = 0, is a better choice. I do get the optimization to work with that change but it is still not monotonically decreasing. I am also switching to parallel_optimization for faster convergence. Let me know what you think about this and if there is any better way to do it. I am attaching the files.

Re: Optimization of lattice with MATTER element

Posted: 24 Feb 2025, 16:34
by michael_borland
If you want to optimize with the MATTER element in place, then setting restart_random_numbers=1 in the optimization_setup command is the right thing to do. That should ensure that the random effects are the same each time.

--Michael