User Defined FOM in Optimization


Hi I’m trying to use my own figure of merit in the optimization toolbox; however, I have not been able to find documentation for this feature and I have not had luck getting it to work yet. How do I select a user defined variable in the “user defined figure of merit” as my variable to optimize? I am working in device if that makes a difference.



Hi @brandonjisaac,

I think the following KX topic might help:

Can I define an arbitrary figure-of-merit (FOM) for optimization?

Basically, we suggest to start with defining a result (the FOM that you want) in the model, and then add this result as the FOM to the optimization.

It is more or less the same to define the FOM directly in the Optimization window, please make sure you tick the “Use figure of merit script” check box. I guess there might be a problem in your script that made you failed defining the FOM, please attach your simulation file so that we can discuss about it.

I hope this could help :slight_smile:


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.



Hi @brandonjisaac,

I am not aware that DEVICE doesn’t have the analysis tab in model. Please send me your file and we can figure out a solution for this together :slight_smile: