Difference between revisions of "Category:System Variables"
m (→System Variables)
|Line 58:||Line 58:|
Revision as of 19:34, 20 October 2014
System variables are variables predefined in Analytica. They help control all kinds of behavior and appearance of Analytica. Most of the options in the Preferences dialog and other dialogs set System variables. For example, in the Uncertainty Sample tab in Uncertainty Setup dialog, you can set the Sample size. This sets a System variable Samplesize.
You can refer to System variables in expressions. For example, you could define a function to estimate the standard error in the estimate of the mean of x of a Monte Carlos sample as:
Function Error_in_mean(x) := Sdeviation(x)/Sqrt(SampleSize)
Some System variables are not accessible directly from user-interface dialogs (unlike Samplesize, for example). Many of these are esoteric or obsolete, but a few listed below are often quite useful. The best way to modify these is via the Typescript window. Press Ctrl-' (control key and single quote) to open this Window.
- System Variables described in the Scripting Guide.
There are more than 160 system variables. The full list can be viewed by typing list sysvar in the typescript window. Some are esoteric or obsolete and only exist for compatibility with legacy models. The most useful ones are those that are not already accessible through the UI and are potentially useful for access in the typescript window either for setting new values or for referencing the current value. This page focuses on the most useful system variables.
This sets the font size in the attribute pane and object windows. This setting is also accessible in the UI by selecting Preferences from the Edit menu. The check box labeled Large text in attributes & tables toggles between 10 point and 13 point. Other font sizes can be chosen through the typescript window. Since this is a preference value, its value sticks to Analytica rather than being saved to a particular model.
- TableFontSize: The font size (in points) for text shown in table results and edit tables.
This is a non-editable read-only variable. It shows the file path Analytica is currently using to save the recovery file. Referencing this variable in the typescript window is a convenient way to locate the last saved recovery file.
The Frontline optimization engines sometimes fail to compute, and return an SDK error. This is a known issue that Frontline has ameliorated but not fully resolved (as of Analytica 4.5). The occurrence of these errors is not predictable. When one occurs, it is possible that the next optimization with run with no problems. This system variable determines the number of consecutive errors and automatic restarts Analytica will allow without faulting. If you are getting frequent SDK errors with InternalSDKErrTries = 0, try setting it to 5 or so. The value of this variable sticks to an individual model. The default value for new models is 0.
When you are using typescript for calculations by entering Analytica expressions, It refers to the last result. For example: > pi*2 returns 6.28 > It * 2 then returns 12.57
This setting is accessible in the UI by selecting Preferences from the Edit menu. If Use Excel date origin is unchecked, it will use Jan 1, 1904 as used on Macintosh, corresponding to an offset of zero. If Use Excel date origin is checked, it will use Jan 1, 1900 as used on Excel on Windows. This corresponds to a date offset of -1462.
This is useful for legacy models made with Analytica versions before 4.4. 4.4 changed the way Analytica handles null values is some functions. See What's new in Analytica 4.4?.
When set to 1, Analytica will animate windows as they open and close. This is useful for presentations since it gives a visual cue whenever a module is opened to a window. This feature is deactivated by default (Sys_AnimateWindows = 0) because some graphics processors fail to redraw properly when it is activated. If your system does not exhibit this problem, you may find it preferable.
This affects how the DBQuery() function handles date values. If dates are imported numerically, they will be processed as dates in Analytica functions. But if this creates problems, set Sys_DbDatesAsText = 1 to suppress date intelligence and handle the imported values as text.
This is active (1) by default. When you select Set Node Style... from the diagram menu, then select Font, you will see the font names displayed in the actual font styles. If this feature is taking up too much processing time or memory, set this variable to 0.
This variable sets the default value for table cells when no value has been set the Cell Default attribute. In other words, Sys_TableCellDefault is the default to the default. For new models, the value of Sys_TableCellDefault is 0. If you change it, the new value will be saved with the model. To designate empty text for the default, do not type anything after the colon in the typescript command. ( Sys_TableCellDefault: ) Regardless of Sys_TableCellDefault , you can always use the Cell Default attribute to establish a default value for an individual table. First activate the Cell Default attribute by selecting Attributes... from the Object window. Place a check box next to Cell Default. The attribute will now appear in the object window for tables.
This Boolean variable enables a warning when you try to evaluate a table with one or more undefined cells. For new models, this value is set to 1 (warning enabled). If you edit this variable, the new value will be saved with the model.
This Boolean variable enables a warning when you omit the index attribute from array reducing functions. Sum() is an example of an array reducing function. It normally has two attributes: The array and the index to operate over. For example: Sum(cost_table, item_index). Analytica will always warn when the array has two or more dimensions and you omit the second parameter. But there is no ambiguity you are operating on a one-dimensional array or an index. In this case, Analytica will either warn or not depending on the value of WarnOnNotIndexedOp . It is always a good idea to include the index parameter regardless of the dimensions of the array. This way you can add new dimensions to the existing model without introducing ambiguities. Although WarnOnNonIndexedOp is not enabled for new models, it is a good idea to enable it if you want to enforce this guideline.
Pages in category "System Variables"
The following 56 pages are in this category, out of 56 total.
- Sys AllNullTreatment
- Sys AttPaneInitAtt
- Sys ComparisonTolerance
- Sys DbDatesAsText
- Sys DefaultNumberFmt
- Sys EnableErrorUnder
- Sys EnableFixedFont
- Sys EnableSyntaxColo
- Sys FoundSet
- Sys PreLoadScript
- Sys SyntaxColors
- Sys TableCellDefault
- Sys UseLegacyColors
- Sys WarningsToIgnore
- Sys WarnUndefCell
- System Variables
- System variables