Thanks for your response. I have looked at that topic however, there is not an option to add analysis variables and scripts in device like there is in MODE and FDTD and Interconnect. I am trying to use the “Use figure of merit script” but I get an error that no fom variable was defined. So my question is how to define a variable in the “Use figure of merit script” so that it is the variable that is optimized?
So far I define a variable with results from a monitor, but I can’t figure out how to select that as the optimized variable since it is not available before the simulation runs. I have tested the figure of merit script on its own after running one simulation and it works fine.
I will send my simulation file in a pm to you.