Difference between revisions of "Specifying Settings"
Jhernandez3 (talk | contribs) (Created page with "Category: Analytica Optimizer Guide <breadcrumbs> Analytica Optimizer Guide > {{PAGENAME}}</breadcrumbs><br /> If you want to change the value for a single control settin...") |
Jhernandez3 (talk | contribs) |
||
Line 2: | Line 2: | ||
<breadcrumbs> Analytica Optimizer Guide > {{PAGENAME}}</breadcrumbs><br /> | <breadcrumbs> Analytica Optimizer Guide > {{PAGENAME}}</breadcrumbs><br /> | ||
− | If you want to change the value for a single control setting, you can specify values for two optional parameters, | + | If you want to change the value for a single control setting, you can specify values for two optional parameters, <code>settingName</code> and <code>settingValue</code>, to [http://wiki.analytica.com/index.php?title=DefineOptimization DefineOptimization](), providing the text name of the setting to <code>settingName</code>, and the numeric value to <code>settingValue</code>. |
− | For example, if you want to set the Scaling parameter to 1, you would modify your call to [http://wiki.analytica.com/index.php?title=DefineOptimization DefineOptimization]() as follows. | + | For example, if you want to set the <code>Scaling</code> parameter to 1, you would modify your call to [http://wiki.analytica.com/index.php?title=DefineOptimization DefineOptimization]() as follows. |
<nowiki> DefineOptimization( .., settingName: "Scaling", settingValue: 1 )</nowiki> | <nowiki> DefineOptimization( .., settingName: "Scaling", settingValue: 1 )</nowiki> | ||
− | To alter more than one control setting, you need to supply arrays to these parameters. The arrays passed to | + | To alter more than one control setting, you need to supply arrays to these parameters. The arrays passed to <code>settingName</code> and <code>settingValue</code> should have a single common index. If the index of the array passed to <code>settingValue</code> is a list of labels, where the index labels contain the name of each control setting, then you only need to include the <code>settingValue</code> parameter. |
It is often convenient to specify control settings in a self-indexed edit table. The following steps illustrate this: | It is often convenient to specify control settings in a self-indexed edit table. The following steps illustrate this: | ||
− | # Drag a variable node to your diagram, title it | + | # Drag a variable node to your diagram, title it <code>Opt Settings</code>. |
# In the definition pane, set the definition type to '''Table'''. | # In the definition pane, set the definition type to '''Table'''. | ||
# In the '''Index Chooser''' box, select '''Opt Settings (Self)''' as the table index. | # In the '''Index Chooser''' box, select '''Opt Settings (Self)''' as the table index. | ||
# Click the row heading cell, and change <code>Item</code> 1 to <code>Scaling</code>. | # Click the row heading cell, and change <code>Item</code> 1 to <code>Scaling</code>. | ||
− | # With the row header still selected, press down-arrow to add a row. | + | # With the row header still selected, press ''down-arrow'' to add a row. |
# Change the second row header cell to <code>MaxTime</code>. | # Change the second row header cell to <code>MaxTime</code>. | ||
# Enter <code>1</code> into the first table body cell. | # Enter <code>1</code> into the first table body cell. |
Revision as of 15:40, 6 December 2015
If you want to change the value for a single control setting, you can specify values for two optional parameters, settingName
and settingValue
, to DefineOptimization(), providing the text name of the setting to settingName
, and the numeric value to settingValue
.
For example, if you want to set the Scaling
parameter to 1, you would modify your call to DefineOptimization() as follows.
DefineOptimization( .., settingName: "Scaling", settingValue: 1 )
To alter more than one control setting, you need to supply arrays to these parameters. The arrays passed to settingName
and settingValue
should have a single common index. If the index of the array passed to settingValue
is a list of labels, where the index labels contain the name of each control setting, then you only need to include the settingValue
parameter.
It is often convenient to specify control settings in a self-indexed edit table. The following steps illustrate this:
- Drag a variable node to your diagram, title it
Opt Settings
. - In the definition pane, set the definition type to Table.
- In the Index Chooser box, select Opt Settings (Self) as the table index.
- Click the row heading cell, and change
Item
1 toScaling
. - With the row header still selected, press down-arrow to add a row.
- Change the second row header cell to
MaxTime
. - Enter
1
into the first table body cell. - Enter
30
into the second body table cell.
- In your call to DefineOptimization(), insert a settng parameter as follows.
DefineOptimization( ..., settingValue: Opt_Settings )
The Optimizer scales parameters and terminates after 30 seconds if the optimum has not been found. A self-indexed table set up in this fashion makes it easy to adjust multiple control settings if the need arises.
Enable comment auto-refresher