Difference between revisions of "Preferences"

m (removed ancient history on Delete intermediates)
Line 114: Line 114:
  
 
We recommend keeping this preference on.
 
We recommend keeping this preference on.
 
==== Safe Intermediates ====
 
 
''Removed in Analytica 4.3''
 
 
When evaluating a result in a dynamic loop, there is a extremely rare case that could occur in which the internal representation of the result for the particular time slice is non-rectangular.  This case almost never happens in practice, but to ensure absolute correctness, Analytica needs to detect this and rectangularize it if the rare case should occur.  Since that test takes some time, evaluation speed-up can be gained by omitting the check.  Doing so risks a sacrifice of correctness, but > 99% of models won't be impacted. 
 
 
Back in Analytica 2.0 days, it was found that omitting this check could speed up some models by 20%-30%.  Over time, the algorithms have evolved and eliminating any real advantage to turning this off.  In fact, the setting doesn't even impact Analytica 4.2's dynamic algorithm (it could impact evaluation if you set the system variable evalDynamic to use a legacy dynamic algorithm), and as of Analytica 4.3, it has been removed from the preferences dialog altogether.
 
  
 
==== Auto recompute outgoing OLE links ====
 
==== Auto recompute outgoing OLE links ====

Revision as of 22:04, 10 August 2016



The Analytica Preferences dialog is accessed by selecting Preferences... on the Edit menu.

Preferences.jpg

Preferences Overview

The settings grouped in Personal preferences are stored on your computer and not in the model. All other settings are stored with your model. Internally, each of these preferences is stored in an Analytica system variable. Only settings that have changed from the default value are actually stored with the model.

When you use "Add Module..." or "Add Library..." from the File menu to add a file to your existing model, preference settings are imported from that file ONLY IF the file is a model file. If it is a linked module or linked library, then preferences are not stored with the file. Generally, if you plan to re-use a "component" in many models, you will usually store it as a linked module or linked library (set the Class attribute to one of these), and not as a model, unless of course you do want to import system variables and preferences when that model is included.

By configuring a registry setting and text file, you can configure some of these to use personalized default settings, which will be set when you start with a new model on your machine. See Configuring Personalized Defaults.

In Analytica 4.4 or later, you can hover the mouse over an item in the dialog for help information on what the preference does.

Details

Windows of each kind

One Only

If you select One only, opening an Object window (e.g. double-click a node) replaces any displayed Object window. It show only one Diagram window at each level of hierarchy. So opening a submodule Diagram (e.g. clicking a module node), will close any other submodule Diagram displayed , but leave the parent Diagram window open.

Any number

Select Any number to keep all windows open until you explicitly close them (by clicking [x] in top right of Window.)

Specify the maximum number of Result windows that may be open at once as a number from 2 to 20. When you open a new Result window, and there are already this number open, it will close the oldest one. This is useful to avoid creating an excessive number of windows.

Change Identifier:

Expr Opens:

Selects the default view shown when you click Expr.jpg in the toolbar or press Ctrl+e: Either the Attribute Panel (at the bottom of the diagram window) or the object window.

  • For a Variable, it opens its Definition.
  • For a Button or Picture node, it opens its Script.
  • For a text node, it opens its Description (the text that displays in the node).

This default has no effect on variables whose definition appears as a button:

  • For a variable defined as an Edit table, ProbTable, DetermTable, or Subtable), Expr.jpg or Ctrl+e open the table view.
  • For a variable defined as a probability distribution or sequence, it opens the definition in the Object Finder when the preference is set to "Diagram attribute panel".
  • For a user-defined Functions, it always opens an Object window. This is convenient since you usually want to work with the parameter and definition fields simultaneously.

Personal Preferences

These personal preferences are recorded for your computer, and are not stored with the model. They will be in force when you open other models.

Use Return to enter data

On a standard desktop keyboard, there are two Enter keys -- one (usually called Return) is just to the right of the letter keys, the second (usually called Enter) is on the number pad. In its default with this setting turned off, Analytica uses Return to start a new line (such as in a definition field where attributes can contain multiple lines) and uses Enter to accept entry. ALT-Return can also be used as Enter.

Many laptop keyboards have only a single Enter key. With the default setting, Enter starts a new line, while ALT+Enter accepts input. By checking this setting, these are swapped, so that Enterwill accept entry and ALT+Enter will start a new line. Many people who use a laptop keyboard layout exclusively find this more convenient.

Maintain Recovery Info

When checked, Analytica logs all changes since the last model save to a recovery file. If Analytica is terminated unexpectedly, from a crash, power outage, etc., those changes can be recovered so that your hard work is not lost.

Even when this is checked, it is still recommended that you save often.

If a crash occurs, a recovery dialog will display the next time you start Analytica, or the next time you attempt to load the model that was being edited.

If your model contains extremely large edit tables, this feature may slow down the editing of those tables, and disk space is consumed from the change log.

Unlike the other preference settings, this setting is stored as a user setting, and is not stored with the model.

Expression Assist

Expression assist provides real-time assistance while to type expressions in definition fields.

You can turn this preference off, and then press Ctrl+space or Ctrl+? to access expression assist only when you want it. Ctrl+space shows it once (if there is any assistance to show), Ctrl+? toggles it on for the duration of the current edit.

Or, you can keep this preference on and the expression assist will automatically pop up while you type. You then have the option of pressing Esc to remove it if it is in the way, or Ctrl + ? to toggle it off for the remainder of the current edit.

Help Balloons

Help balloons appear when you hover over a node with Help information or a Description. The information in the Help attribute is displayed, or if there is no help information, then the information in the description is displayed. Balloons do not pop up for nodes with neither. The first balloon appears after you have hovered without moving the mouse for one second.

You can configure these to be on only when viewing a model in browse mode, on in both browse and edit modes, or always off.

Large text in attributes and tables

When this is checked, the font used in the Object window, Attribute panel and table cells is increased in size. When unchecked, the AttributeFontSize and TableFontSize system variables are set to 10, when checked they are set to 13.

Default result view:

Controls whether result windows open initially in table view or graph view. Once you've opened a specific window, the window itself remembers what previous view was viewed, so this mostly impacts results that haven't been viewed yet.

Model Preferences

Check Variable class

When this is on, Analytica warns when an index node is not defined as a list, or if a constant node's definition does not appears to be constant.

Check value bounds

When checked, Analytica tests the computed result of a variable against its Check Attribute or Domain, and issues a warning if it fails the check. You can utilize the Check Attribute and Domain Attribute to reduce the chances of inadvertently introducing errors in the future.

In Analytica 4.3 or later, you can control whether the validation occurs against the Check Attribute only, Domain Attribute only, or both, using the separate checkboxes.

The domain is usually the most convenient specification, and has several other advantages when you specify it. But you are limited to the domain types provided. The Check Attribute is highly flexible and allows you to specify arbitrary logic.

For example, if the domain is Continuous(-10, 10), and a cell of the computed result is -15, then the computed value is out-of-range, and a warning will be issued when this check is on. Similarly, if the domain contains a set of possible values, but the result contains a value not listed, a warning will issue. A similar test can be carried out in a Check attribute, but it is often more convenient to encode such checks in the domain. These tests are turned off while a non-linear optimization search is in progress.

Show undefined

When checked, variable nodes on a diagram are cross-hatched when they have no yet been defined, or when their definition has not been successfully parsed.

Flag nodes w/descriptions

When this preference is enabled, a small red triangle appears in the upper-right corner of nodes on an influence diagram when those nodes have a non-empty description.

In general, filling in descriptions of all variables and modules will dramatic increase transparency of your model. Use of this feature can help identify variables where descriptions have not yet been filled in.

Show module hierarchy

When checked, each Diagram window displays the "Ancestors" of this module as a list across the top, from the Main model on the left down to this module. You can click on any ancestor to open its diagram. You can also press on the triangle to the left of each ancestor to see a menu listing its submodules -- the "aunts" or "grand-aunts" of this module. The "Ancestors" is very helpful in large models, to help see where each module is situated in the hierarchy, and to quickly navigate to other diagrams.

We recommend turning this preference on once your model reaches a size where you start using modules.

Show result warnings

If this preference is checked, Analytica will display various helpful warnings during evaluation. If you are using Analytica 4.2 or earlier and you ever press Ignore Warnings in response to one of these warnings, this preference is turned off, and you will need to visit the Preference dialog if you wish to re-enable it.

We highly advise keeping this option turned on. If you really want to ignore a warning, instead of pressing the Ignore Warnings button when asked, cancel the computation and surround the expression with an IgnoreWarnings function call, so that the global setting remains on. If you ever do press Ignore Warnings, return to the preference dialog and re-check Show Result Warnings. Warnings are displayed for many common problems that people encounter. Keeping this on will make your life easier.

We recommend keeping this preference on.

Auto recompute outgoing OLE links

When you use OLE Linking to link Analytica results into an external application such as Excel, this setting controls whether Analytica immediately notifies the external application of a change in the values whenever any result changes. With this on, changes to results will be reflected immediately in Excel. This cost for this is that it causes computations to occur proactively, so that outgoing results are computed immediately whenever any input changes. If computations are expensive, and if several inputs much be changed, this can get extremely inconvenient.

By turning this off, changes to inputs do not cause results to be automatically computed. Hence, Excel results don't refresh until you ask for the results -- either by asking Excel to refresh the incoming data, or by viewing the result window for the linked result.

Use Excel date origin

Like Excel, Analytica represents dates using an integer, which signifies the number of days that have passed since a certain date origin. When this preference is NOT checked, Analytica uses a date origin of Jan 1, 1904, so that, for example, the value 38000 represents 38,000 days after 1 Jan 1904, or 15 Jan 2008. When the preference is checked, Analytica uses the origin 1 Jan 1900, so that 38,000 denotes 16 Jan 2004.

Analytica 3.x and earlier used the origin 1 Jan 1904. Excel on Macintosh, as well as most other Macintosh programs also use this origin. However, Excel on Windows uses 1 Jan 1900. If you copy/paste dates as integers between Excel and Analytica, setting this preference helps to maintain consistency. However, if you are using pre-existing Analytica models containing dates, you may need to keep this preference off.

Domain acts as Self Index

In Analytica 4.2 and earlier, a variable's domain values become that variable's self-index values, allowing the variable to be used as an index. In Analytica 4.3, this has changed, so that a variable's domain values and its self-index values are separate indexes. This checkbox provides legacy support for models started in Analytica 4.2 or earlier which use self-indexes defined in domains (this is rare -- less than 5% of models do this).

A variable's domain specifies the set of possible values that the variable can take on. Using this set of possible values as an index makes it possible to define DetermTables and ProbTables, which map from the set of possible values to the case corresponding to the actual value. The convention in Analytica 4.2 to use domain values as a self-index made that possible, but confounded the concept of what the domain attribute is for. Analytica 4.3's treatment is more consistent, and enables several new enhancements that weren't possible previously.

You should try to keep this setting off. It will be on initially when you load a model that was created in Analytica 4.2 or earlier. It does that to remain backward compatibility, but the vast majority of models don't assume the domain is the self-index outside of DetermTables and ProbTables. So, in all likelihood you should be able to turn it off after you load your 4.2 model. You should, of course, verify that it doesn't cause anything to break. When creating a model initially in 4.3, there is no reason to ever turn this on -- you want the cleaner semantics for domain when possible.

In a legacy model, if you have an expression that refers to the domain index of X, such as: X[X = b], you can replace identifier with Domain of X, as in: X[Domain of X = b]. Once you make those changes, you should be able to turn off the preference.

We recommend turning this preference off.

Proactively evaluate indexes

This preference controls whether index variables are immediately evaluated when a model is loaded or when the index changes. If this is unset, then evaluation occurs only when the index value is needed. (See Proactive Evaluation).

When you set this preference, you may find that it takes a long time to load your model, most of which time is spent evaluating computed indexes. Unchecking may result in faster load times, but then index values may need to be evaluated the first time you view a result, and hence the computation occurs at that time.

Prior to Analytica 4.4.3, table and dynamic indexes had to be evaluated at parse time. Thus, if an index appears as a table index, it would be evaluated at load time even if Proactive Evaluation is turned off. In addition, all variables that the index depends are also evaluated.

Analytica 4.4.3 is able to parse tables and dynamic expressions without evaluation indexes; hence, many models will load dramatically faster when this preference is turned off.

We recommend turning this preference off.

See Also

Comments


You are not allowed to post comments.