Design Variables vs. Equation Variables
Local Variables at the Design Level vs. Twin Builder Equation Variables
When working with design variables and variables in FML, ICA, or STATE blocks, there are some important differences that you must consider when using them.
Design variables and design parameters have a special purpose and special treatment in the schematic environment:
-
They are parametric (calculated or set once at the start of simulation).
-
One of the main purposes is to hold parametric values set by Optimetrics.
-
They are stored in the design.
-
If you set the design variable's Sweep property, this variable should be under full control of Optimetrics.
Equation Block or State variables are managed by the Twin Builder solver:
-
Their main purpose is to hold the dynamic quantities of the solver.
-
They are stored in the solver even if they have the same name as design variables. The solver variables are independent of the design variables. Assigning a value to an equation block variable will not change the value of the design variable with the same name.
-
You can change an equation block variable during simulation by other FML, ICA, or STATE equations.
-
Any tool other than the Twin Builder solver will not have access to the value of equation block variables.
Plotting variable values in reports:
-
Reports will, when there is a design variable as well as a LHS equation block variable with the same name, plot the value of the design variable.
As a result of those special properties and to prevent confusion between equation variables and design variables, the Twin Builder solver will not allow you to assign values to variables that are also defined as design variables and have the Sweep property set. Design variables that don’t have the Sweep property set can be still used on the LHS of FML, ICA, or STATE equations; however, it is not advisable, as those values are not visible to reports, which might cause confusion.