The SIMetrix optimiser can be accessed using the script language and can also be used to control an optimisation process. The latter feature is used to drive SIMPLIS optimiser analyses.
The following diagram shows the structure of the optimiser framework and its interaction with the script language:
Accessing Optimiser Definitions |
In this topic:
The script language accesses the optimiser definition by obtaining an ID reference to it. The ID is an integer value which a wide range of script functions take as an argument in order to retrieve information about the optimiser or to control an optimisation session. The following functions may be used to obtain an optimiser ID:
Function Name | Description |
OptimiserCreateFromXML | Reads an optimiser definition from a file, creates an optimiser definition, then returns the ID to access it |
OptimiserCreateFromXMLString | Creates an optimiser definition from an XML string then returns the ID to access it |
OptimiserWidgetCreateOptDef | Creates an optimiser definition from the current optimiser GUI then returns an ID to it |
OptimiserSimulatorGetDef | Creates an optimiser definition from the current state of the SIMetrix simulator then returns an ID to it |
It is possible to run an optimiser session from the script language and this is how optimisation for SIMPLIS is achieved. The SIMetrix simulator is able to run optimisation sessions internally defined by netlist commands and does not usually require to be driven by the script language. But this is nevertheless possible if required. In this section the functions needed to drive an optimiser session are described.
Function Name | Description |
OptimiserStart | Starts an optimiser session |
OptimiserFinish | Terminates and optimiser session. OptimiserCloseDef will also implicitly terminate a currently running session |
OptimiserGetParameterValues | Returns the current values for the parameters |
OptimiserParameterLine | Returns a line of text providing the names and current values of the parameters |
OptimiserApplySpecification | To be called after running all the analyses for an optimiser session. This calculates all the measurements and applies them to the optimiser session. The optimiser algorithm will then calculate new values for the parameters which can be retrieved from OptimiserGetParameterValues |
A typical sequence to run an optimiser session could be:
The following functions can be used to examine the results of an optimiser session:
OptimiserResults | Returns optimiser parameter and measurement values for best iteration of specified optimiser definition |
OptimiserSimulatorResults | Returns optimiser parameter and measurement values for best iteration of most recent SIMetrix simulation optimiser analysis |
OptimiserGetIteration | Returns optimiser parameter and measurement values for a specified iteration of specified optimiser definition |
OptimiserStatus | Returns the currents status of an optimiser session as a string |
OptimiserSimulatorStatus | Returns the currents status of the SIMetrix simulation optimiser analysis as a string |
OptimiserUserMessage | Returns a message about the current state of the specified optimiser |
OptimiserSimulatorUserMessage | Returns a message about the current state of the SIMetrix simulation optimiser |
◄ Automating Simulations | Schematic Symbol Script Definition ▶ |