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.
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.
Multichoice option
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.
Graphing
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.
Exceedance probability
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.
Tables
- 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).
Built-in Functions
- The UncertainLMH distribution now uses the Hadlock-Bickel-Johnson Quantile Parameterized Distribution by default, rather than the Keelin SPT distribution. The advantage of HBJ-QPD is that it finds a feasible distribution in all possible cases, wehere the Keelin (metalog) distribution sometimes does not. This affects UncertainLMH, DensUncertainLMH, CumUncertainLMH and CumUncertainLMHInv functions.
- The new system variable, UncertainLMH_Method, lets you select the default algorithm used by these functions. For backward compatibility with 5.3, you can set this to 2. But note: Due to a small improvement, DensUncertainLMH with keelin algorithm is slightly more accurate, so numbers may differ beyond the 8th decimal point compared to previously.
- You can also select which algorithm (HBJ-QPD or K-SPT) to use with the new optional parameter, «method», for these functionsl.
- AskMsgText and AskMsgNumber now have an option to include a checkbox on the dialog -- very useful if you want switch an option on or off at the same time you answer the question.
- Cdf adds an option to return the exceedance curve.
- Eliminated a spurious "dynamic-loop cyclic dependency" error message that appeared in a 2-D Dynamic loop -- where there isn't really a cyclic dependency. 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 (rare).
- Flatten now has a «condition» parameter, which makes it easy to include only the items that satisfy the «condition» in the flattened result.
New functions
- COMEnumerate -- enumerates the elements of an enumerable COM object.
Mid and Prob evaluation
When the outermost function of a variable's Definition is Mid() or Sample(), it evaluates in a slightly differently way to ensure that the mid-value and sample-value are the same when the Definition contains a random element. Mid() at the outer level means that it evaluates this variable only in mid-mode -- determinsitically. The prob and mid value will share the same mid value. This results in a difference from previous releases when the Definition contains a random component, such as:
Mid(Random())
Previously, children that used the 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
Dynamic(0, Mid(Random()+Self[Time-1]))
. - 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:
RandomLegacyRelease:50300
. - Similarly, when the definition has Sample() as the outer function, both Prob and Mid return the same Prob (sampled) value.
- The same idea applies to expressions inside a call to Dynamic, for example
Other
- It now omits the currency symbol for non-finite numbers --
INF
instead of$INF
andNAN
instead of$NAN
-- when you select currency in Number format. - You can now set the border color of nodes to colors other than black using the new attribute, NodeBorderColor. You can set this on a class object to change the default border color. For now, you have to change this in the Typescript since it is not available in the graphical user interface.
Enable comment auto-refresher