PET Nesting¶
PET Nesting allows the user to place a PET inside another PET and make connections between two PETs using the Problem Input and Problem Output atoms.
With PET Nesting, the user can add encapsulation and composability to an analysis workflow model.
Adding a new PET to another PET¶
To add a new PET to a PET, simply drag the Parametric Exploration icon from the Part Browser and onto the PET canvas.
Adding an existing PET to another PET¶
To add an existing PET to a PET:
- In the GME Browser window, right-click on the PET you want to add and select Copy.
- Then, right-click on the PET you want to add to and select Paste.
Problem Inputs¶
Problem Inputs allow the user to provide a nested PET with explicit inputs that are exposed to the parent PET as Parameter (input) ports.
Adding a Problem Input to a PET¶
To add a Problem Input to a PET, simply drag the Problem Input icon from the Part Browser and onto the PET canvas.
Setting a Problem Input’s Value Attribute¶
By default, Problem Inputs expect to pass the double data type (e.g. 0.0). If the Problem Input must pass another data type (e.g. a PET Analysis block in the nested PET requires a string input), then an example of that data type must be entered in the Problem Input’s Value attribute via the Object Inspector.
Note
Under certain conditions, the Master Interpreter may prompt you to enter example data types for all Problem Inputs (including doubles) in a nested PET.
Example Value attribute entries are as follows:
- To pass the double type, enter 0.0
- To pass the int type, enter 1
- To pass the string type, enter u’unicode’
Problem Outputs¶
Problem Outputs allow the user to provide a nested PET with explicit outputs that are exposed to the parent PET as Metric (output) ports.
Adding a Problem Output to a PET¶
To add a Problem Output to a PET, simply drag the Problem Output icon from the Part Browser and onto the PET canvas.
Nesting PETs with Drivers¶
In certain cases, it may be useful to nest an Optimizer PET within a Parameter Study PET (or another Optimizer PET). This type of hierarchy is easy to set up as shown below.
In the example above, the TopLevel PET provides the OptimizerPET a different value
of x
for each iteration of its Parameter Study Driver.
The OptimizerPET’s Optimizer Driver finds the minimum value of f_xy
for
the given value of x
by varying its Design Variable y
. The final
optimized f_xy
and y
values are passed back up to the TopLevel PET
where they are recorded by its Parameter Study driver.
Note
Only the final result (of OptimizerPET’s many iterations) is recorded by the TopLevel PET’s Parameter Study Driver.