Optimization with script variables


#1

Hello,

I want to use the optimization routines in Lumerical. Generally, you need to define one or more parameters to optimize and a figure of merit.
The problem is now that I use scripts to set up my geometry. I define some variables at the beginning of the script and with these few variables, the script automatically calculates the positions and sizes of all objects in my simulation. Is it possible to optimize one of these script variables?

An example: Imagine you want to optimize the dimensions of a structure and another structure shall always be at a fixed position relative to the first structure. It’s easy to write a script which places the structures correctly, but in an optimization, you can select only isolated geometric parameters of one structure. I need to select/optimize a variable that influences more than one geometric parameter of more than one structure.
Is this possible?

Thanks, Philipp


#2

If I understand you correctly, you would create your structure using StructureGroup, where you can define your parameters that you want to optimize, and put these parameters into the optimizer.

Ayata


#3

In principle yes, but I can’t add sources and monitors to a structure group.


#4

Hi,

You might also try AnalysisGroup. The structure that you can find in the following link has multiple sources.

https://kb.lumerical.com/en/diffractive_optics_pc_simulation_methodology.html

Ayata


#5

Hey,

thank you very much, I moved now the whole scripting for the construction and the analysis into this analysis group and it works perfectly.

Best,
Philipp