What's new in Analytica 5.4?
Here's a summary of notable enhancements to Analytica and ADE release 5.4 since the previous Analytica 5.3 release. We don't include numerous bug fixes and minor enhancements, which of course improve the user experience is subtle ways.
To get Analytica or ADE 5.4, go to the Analytica Downloads page.
- 1 Syntax coloring in Definitions
- 2 Module color inheritance
- 3 Multichoice option
- 4 Graphing
- 5 Tables
- 6 Built-in Functions
- 7 Other Misc
Syntax coloring in Definitions
It's now much easier to spot errors when writing and editing Definitions and other expressions in OnClick, OnChange, and Check attributes. It uses colors to distinguish different names and other elements -- and shows a wavy red line under syntax errors:
- It colors the text to distinguish globral and local variables, keywords (like IF, FOR, AND...), comments, text literals, and undefined variables.
- It uses a mono space font (each character has the same width as in typewriters) -- a common convention for code editors
- It underlines any syntax error with a red wavy line.
You can modify the color scheme, fonts, and syntax notification or revert to the previous look. See Syntax coloring and fonts and error underlining for details.
Module color inheritance
Module nodes now inherit their color from the Node style default rather than their containing module. See Sys UseLegacyColors if you want to revert back to the legacy behavior that inherited color from the containing module.
The expr pulldown menu for an index node now includes MultiChoice -- very useful when you want to be able to select one, several, or all options. This was available before but not on the menu.
Custom graph axis/key titles
You can now modify or hide the title for each graph axis and the Key instead of showing the title of the variable (or Index). On the graph (in edit mode), right click on the title or axis you want to change, and select Change axis title or Change key title. The dialog lets you edit the title -- or enter blank to hide it. For example, it's kind of redundant to show title Years (e.g. 2010, 2020, 2030) as "Years".
The dialog has a checkbox to let you to set the revised title (or hidden title) for every graph that uses that index or variable as an axis or key.
Axis/Key Title attribute
You can also see and set nondefault text used for axes and key titles for a variable or index with the Axis/Key Title attribute in the Object window or Attribute panel. You first need to set this attribute to show from the Attribute panel. This will apply to all graphs using the variable. But, it's usually easier to use the right-click menu on the title described above.
How the default axis/key title is determined
There are rules about how the default title is determined. If you have changed the axis/key title for all graphs using the index or variable, then the default is what you changed this to. If you have not changed the axis/key title then the default is the title of the index or variable, or, if that title is blank, the default is the identifier of the index or variable.
However, if you have checked the checkbox referred to above then blanked out the title, this resets any change you made for all graphs and the default is the title of the index or variable or, if that title is blank, the default is the identifier of the index or variable.
The popup "Use default axis title?" (or key title) will tell you what the default will be. You will see words in one of these three variations:
"Do you want to use the default axis title for Revenue, which is Annual revenue (global axis title override)?" - This indicates that the default is the axis title "Annual revenue" that has been designated to be used in all graphs using the index or variable Revenue.
"Do you want to use the default axis title for Revenue, which is Revenue (Title attribute)?" - This indicates that the default is the title "Revenue" of the index or variable Revenue.
"Do you want to use the default axis title for Revenue, which is Revenue (identifier)?" - This indicates that Revenue has no title and the default is the identifier of the index or variable Revenue.
There is a new Exceedance probability option in the Uncertainty views for each result. It shows the probability that the value of an uncertain variable is greater than each value. It's the complement (1 - p) of the Cumulative probability (CDF). In some fields, like cybersecurity risk, many people prefer exceedance probability distributions to CDFs.
- Shift+Space now extends the selected cells to include the entire row(s).
- Ctrl+Space now extends the selected cells to include the entire column(s).
Changes to existing functions
- The UncertainLMH distribution has been changed to use the Hadlock-Bickel-Johnson Quantile Parameterized Distribution by default, rather than the Keelin SPT distribution. The HBJ-QPD is preferred since it is maximally feasible. This impacts UncertainLMH, DensUncertainLMH, CumUncertainLMH and CumUncertainLMHInv functions.
- A new system variable has been added: UncertainLMH_Method, which selects the default algorithm used by these functions. If you need backward compatibility with 5.3 with this distribution, your can set this to 2. But note: Due to a small improvement, DensUncertainLMH with keelin algorithm is slightly more accurate, so numbers may differ out around the 9th decimal point compared to previously.
- A new optional parameter, «method», was added to each of these functions, which you can use to select the algorithm (HBJ-QPD or K-SPT) for the specific call.
- AskMsgText and AskMsgNumber: Added an option to include a checkbox on the dialog.
- Cdf Added an option to return the exceedance curve.
- Eliminated a spurious "dynamic-loop cyclic dependency" error message that appeared in a 2-D Dynamic loop. This is a case where there wasn't really a cyclic dependency, so the error message was a false positive. A 2-D dynamic loop is where two dynamic loops on different dynamic indexes intersect, so that the nodes in that loop have to iterate over two dynamic indexes (fairly rare).
- A «condition» parameter was added to Flatten. Makes it easy to include only the items that satisfy the «condition» in the flattened result.
- COMEnumerate -- enumerates the elements of an enumerable COM object.
- When the outermost function of a variable's Definition is Mid() or Sample(), the evaluation occurs slightly differently than before, which ensures that the mid-value and sample-value are the same when the Definition contains a random component. When the engine sees Mid() at the outer level, it tells it that this variable should only be evaluated in mid-mode. The sample value will share the same mid value. This results in a difference from previous releases when the Definition contains a random component, such as:
Previously, children that used its sample-value would see a different value than children who used its mid-value, and there wasn't any convenient way to tell it to use the same value for both mid- and sample-values.
- The same idea applies to expressions inside a call to Dynamic, for example
- If you want the legacy behavior (because you want identical random sequences if you find this changes them), press F12 to open the typescript window and type:
- The above descriptions apply symmetrically when the definition has Sample() as the outer function.
- The same idea applies to expressions inside a call to Dynamic, for example
- It now omits the currency symbol for non-finite values -- e.g. it shows
$NAN-- when you have selected currency in Number format.
- A new attribute, NodeBorderColor, can be set to get a non-black node border color. You can set this on a class object to change the default border color. There is no GUI for this yet, it has to be changed via typescript.