 |
This task explains how to valuate free parameters using a
relation. In the scenario described below, you want to find the minimum
value of the fxy function. To do so, you:
- Create 3 parameters (x, y, fxy) and assign a formula to the fxy
function.
- Create an optimization and assign inferior and superior bounds to the
x, and y parameters.
- Create 2 checks that will turn to true whenever the value of the free
parameters hits the bounds.
- Create a reaction based on the checks that will change the value of
the inferior range as soon as one of the checks turns true.
|
 |
To value free parameters using relations:
- Create an optimization containing
Free Parameters.
- Add ranges to the free
parameters in the Optimization window.
- Access the Relation editor and click the Optimization in the
specification tree. The free parameters are displayed in the editor.
- Click the free parameters that you need to value. Click OK
when done.
|
 |
The Knowledge Advisor Product is required to perform this
scenario. |
 |
-
From the File > New... command, create a Part.
-
Click the Formula icon ( )
to create 3 parameters.
- Select Real in the scrolling list and click
New parameter of type.
|
- In the Edit name or value of the current parameter,
enter x and 150. Click Apply.
|
- Select Real in the scrolling list and click
New parameter of type.
|
- In the Edit name or value of the current parameter,
enter y and 150. Click Apply.
|
- Select Real in the scrolling list and click
New parameter of type.
|
- In the Edit name or value of the current parameter,
enter fxy, and click Add formula, enter the following
formula, and click OK when done:
fxy=(x-10)*(x-10) + (y-20)*(y-20) + 100 |
|
-
From the Start > Knowledgeware menu, access
the Product Engineering Optimizer workbench and click the
Optimization icon ( ).
The Optimization window is displayed.
-
Enter the following parameters and click OK
when done:
Optimization type |
Minimization |
Optimized parameter |
fxy |
Free Parameters |
x and y: Inf. Range: 100 Sup. Range: 200 |
Algorithm type |
Gradient Algorithm Without Constraint |
-
From the Start > Knowledgeware menu, access
the Knowledge Advisor workbench.
-
Click the Check icon ( ).
Enter the name of the check: Check_Inferior_Range and click OK.
The Check Editor opens.
-
Enter the following check body and click OK
when done:
`Relations\Optimizations.1\Optimization.1\Free Parameter.1\Inferior
Range` == x or `Relations\Optimizations.1\Optimization.1\Free
Parameter.2\Inferior Range` == y |
-
Click the Check icon ( ).
Enter the name of the check: Check_Superior_Range and click OK.
The Check Editor opens.
-
Enter the following check body and click OK
when done:
`Relations\Optimizations.1\Optimization.1\Free Parameter.1\Superior
Range` == x or `Relations\Optimizations.1\Optimization.1\Free
Parameter.2\Superior Range` == y |
-
Click the Reaction icon ( ).
The Reaction window is displayed:
- In the Source Type field, select Selection
and click the Check_Inferior_Range from the specification tree.
In the Select a source Window, select Result and click
OK.
|
- In the Available events list, select ValueChange.
|
- Click Edit action.... The Action Editor is
displayed. Enter the following action body and click OK
twice when done:
`Relations\Optimizations.1\Optimization.1\Free
Parameter.1\Inferior Range` = x - x/2 |
|
- Right-click the reaction in the specification tree, rename it
into Inferior_Range_Reaction using the Properties
command.
|
-
Click the Reaction icon ( ).
The Reaction window is displayed:
- In the Source Type field, select Selection
and click the Check_Inferior_Range from the specification tree.
In the Select a Source Window, select Result
and click OK.
|
- In the Available events list, select ValueChange.
|
- Click Edit action.... The Action Editor is
displayed. Enter the following action body and click OK
twice when done:
`Relations\Optimizations.1\Optimization.1\Free
Parameter.2\Inferior Range` = x - x/2 |
|
- Right-click the reaction in the specification tree, rename it
rename it into Superior_Range_Reaction using the Properties
command.
|
-
Double-click Optimization.1 twice and click Run
Optimization until x=10.
|
 |
Note that:
- The inferior range value changes (inferior range=x-x/2 each time the
optimization is run). To access the result sample file, click
here.
- The ranges valuation will not be taken into account during the
algorithm run. Ranges are taken into account at the beginning of each
run.
- You cannot use the contextual menu to create a formula to valuate the
Target Value of the optimization. To do so, use the Formula editor.
|
 |