Difference between revisions of "Specifying Settings"
Jhernandez3 (talk | contribs) |
Jhernandez3 (talk | contribs) |
||
Line 17: | Line 17: | ||
# 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. | ||
− | # Enter <code>30</code> into the second body table cell. | + | # Enter <code>30</code> into the second body table cell.<br /> |
::[[File:7-2.png|300px]] | ::[[File:7-2.png|300px]] | ||
− | <ol start="9"><li> In your call to [http://wiki.analytica.com/index.php?title=DefineOptimization DefineOptimization](), insert a settng parameter as follows.</li></ol> | + | <ol start="9"><li> In your call to [http://wiki.analytica.com/index.php?title=DefineOptimization DefineOptimization](), insert a settng parameter as follows.</li></ol><br /> |
+ | |||
<nowiki> DefineOptimization( ..., settingValue: Opt_Settings )</nowiki> | <nowiki> DefineOptimization( ..., settingValue: Opt_Settings )</nowiki> |
Revision as of 15:42, 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