What's new in Analytica 5.1?

Analytica and ADE 5.1 were released on June 1, 2018. This page summarizes the improvements. We don't list the many minor bug fixes explicitly here.


If you have a subscription, there is no need to re-activate the license when you install a newer (or older) release or build. That's because all license files are now located in directory:


Now all releases can see active subscriptions. Previously, License files were stored in an application-specific directory.

Multithreading and computation speed

The biggest area of improvements in Release 5.1 is speeding up calculation. Many operations and functions now run faster. Many more now use multithreading -- i.e. parallel computating using the multiple processors available on most recent computers. How much effect these changes have depends on the specifics of your model. For some models, the effect is most. Others have seen a speed up of a factor of up to 10.

These are some of the areas with most significant improvements:

  • Sum, Max and Min use multithreading (when the arrays are large enough to warrant it). They are now very much faster and more memory efficient when working over a binary operation -- expressions of the form Sum( x op y, I ), Max( x op y, I ) or Sum( x op y, I ), over any number of indexes.
  • Some large tables parse and splice much faster, most evident during load time, and when indexes are changed.
  • If, IfAll and IfOnly.
  • An important bookkeeping operation, rectangularize and canonicalize, is multithreaded.
  • Sorting operations utilize multiple threads.
  • Some arithmetic operations are even faster when they can detect that all cells in the array are floating-point numbers (a homogenous array).
  • Assigning arrays of literals to a global variable.
  • LogNormal, especially when working over multiple indexes.
  • LogisticRegression is faster, enabling its use on much larger datasets than was possible previously.

Numeric round-off

  • Round-off issues with date-time numbers has been virtually eliminated. Date-time numbers are now represented in a form that is exact to the microsecond, whereas previously they were stored as a floating-point number denoting the number of days since the date origin with the time part represented as a binary fraction. The floating-point representation was susceptible to various round-off errors, since for example an hour (1/24 days) cannot be represented exactly in binary with a finite number of bits.
  • Analytica now uses an improved methodology for printing floating point numbers, which is particularly helpful when floating point numbers are rendered at full precision. Formerly, when a 64-bit floating point number was printed in base 10 at full precision, it would print the base-10 representation at the full number of digits whose value was closest to the binary value. Now, it prints the shortest base-10 representation that parses to the same binary floating point value. The new methodology is more stable, for example when a number is printed and then re-parsed, you always get the same value back. When printing numbers at full precision, you will often see 1.4, rather than something like 1.39999999999999997.
  • Formerly, the If function would incorrectly round numbers between -1e7 and 1e7 to zero and take the false clause. For example, If 1n then 2 else 3 would return 3. It now takes the Then clause.

Expressions and Engine

  • The precedence of the Not operator has been reduced to be weaker than the precedence of the obj->method and A.I operators. Hence,
    If Not comObj->method() Then
    is now equivalent to
    If Not (comObj->method()) Then
    Previously it would have been parsed as (Not comObj)->method(), which never be meaningful, which meant parenthesis were required. With A.I, this could theoretically break an existing model, although this not real likely. Previously, Not A.I would have been equivalent to (Not A).I, whereas now it is parsed as Not (A.I).
  • A new system variable, RandomLegacyRelease, has been introduced, with which you can specify that you want the random sequence to match the random sequence of an earlier release (from 5.0 or later). Occasionally, improved algorithms are discovered and implemented which alter the random sequence, making it impossible to compare exact numbers in the Monte Carlo sequence between different releases. One such improvement was made to the LogNormal function in Analytica 5.1, which speeds it up considerably, but alters the exact random sequence, so by setting RandomLegacyRelease to 50000, you'll get the slower algorithm that matches the same sequence produced in release 5.0.
  • The behavior of the logical operators, And and Or, have been modified so that they can skip the evaluation of the second parameter in some cases. When the first parameter to And is False, or is an array that does not contain any True value, then the second parameter will not be evaluated. Likewise, when the first parameter to Or is True, on is an array that does not contain any False value, then the second parameter will not be evaluated. In some cases this may cause the dimensionality of the result to be different compared to earlier releases, although the result will be equivalent (i.e., when this happens, the result would have been non-varying over the extra index).
  • We have long recommended that you turn off the Domain acts as self-index preference, which exists only for backward compatibility with Analytica 4.2 and earlier. For legacy models that still have this on, we've made it easier to turn off. When you uncheck it, Analytica will now volunteer to scan all the Definitions in your model and automatically rewrite expressions that rely on the preference. It isn't 100% perfect, but the few cases it can't handle are pretty contorted, so the odds are good it will get your model producing the same results with it off.

Built-in functions

  • Added the CanvasDrawPixel function.
  • Using ImageInfo, you can now access the colors of individual pixels of an image.
  • DatePart has new options '#m' and '#s', the minute number or second number in the current year. These can also be used in a custom date format.
  • Added an over parameter to the Canvas function. Useful when creating multiple images (via array abstraction) simultaneously. To see an example where this is useful, see the Analytica 5 Video Short: An expression to crop an image, where the over parameter is a better solution for getting the array of canvases at the 3:26 minute mark.
  • Changed the Fractiles function to use a repeated parameter and the "modern" Analytica parameter conventions. This function has been deprecated for over a decade (largely because it wasn't consistent with other Analytica conventions). This change may have some backward-compatibility ramifications for legacy models, but they are trivial to address. See Fractiles if you encounter an error.
  • Removed the archaic and non-functional built-in function named Reform().
  • AskMsgText, AskMsgNumber, AskMsgChoice now appear in the center of the monitor, like MsgBox does, and they also adapt in size to the amount of text.
  • The functions DensNormal, DensLogNormal, CumLogNormal and CumLogNormalInv are now built-in functions, so it is no longer necessary to add the Distribution Densities library to use these.
  • MultiChoice was change so that when no «n» values are listed and «allowNone» is false, it now treats this as if ALL options are selected.

User Interface


  • When the Analytica application window is not in focus, the first mouse click, which brings the window into focused, is now processed. This is the more common convention in Windows programs. Previously, the first click brought the app into focused, but wasn't processed.
  • Some function key shortcuts have changed, so that they go from F2 to F9 across the toolbar in the same sequence they appear. Hence:
    • F7: Is now Find, was previously Browse
    • F8: Is now Browse, was previously Edit
    • F9: Is now Edit, was unassigned in 5.0 and was Arrow mode in 4.6.
  • Eliminated a case in which the Recent Models on the intro screen took a long time to refresh, cause when a model on this list was saved with a long but unspliced Run index.
  • The toolbar ToolbarExprButton.png button changes to ToolbarTableButton.png when pressing it opens an edit table rather than a textual definition.


  • You can click on the items in a graph key to hide the corresponding curve on the graph. This is especially nice when two curves are exactly on top of each other -- it enables you to hide the top curve to see the one under it.


  • Dragging a node that wasn't previously selected feels less "sticky", more natural.
  • When you resize a control (in a user input or output node) and have multiple form nodes selected, all controls are resized.
  • Hover icons now fade in rather than exploding outward.
  • Eliminated a delay when you click on a node to edit its text in-place.
  • Added the system variable Sys_AttPaneInitAtt to allow control over the default selection in the attribute panel .
  • Arrow drawing between nodes on a diagram is a bit more graceful, and more importantly, it works correctly on ultra-high-resolution displays under Windows 10.
  • When a text-box input control is sized to be tall enough, the text box now allows multiple lines of text (formerly, text box controls on diagrams were limited to a single line of text).
  • When you hold down the Shift key while pressing the ToolbarTableButton.png hover icon, it jumps to the textual definition instead of the edit table window. This is now consistent with Shift+ToolbarTableButton.png on the toolbar.


  • It was too easy to accidentally change the height of a row header. This is better now.
  • An unparseable expression can now exist in an edit table cell. For example, it may have a syntax error, unrecognized identifier, etc. When it is unparseable, the cell appears with a red background, and of course an error will result if you attempt to evaluate the variable.
    • Formerly, if you made a typo while entering an expression, it would add quotes to make it text. This meant you had to remove the quotes when fixing your typo. Now you can just fix your typo.
    • If you set the Entry Type to Text only or Text and numbers only, then this doesn't apply, since your entry will be saved as text. So if you want to be able to enter text without explicitly typing quotes, set the entry type.
    • This also served as a fix for a bug (or series of bugs) that occurred when an object or objects whose identifiers appeared in expressions in cells of an edit table were deleted. Things would get out of sync, with several glitches resulting. Now, the expressions remain, but are just invalid.* Cascaded comparisons display as true or false, instead of as comparisons, in non-constraint nodes. Formerly, a node defined as a comparison would display in a result table of a variable node as a comparison (like "10<12<15" instead of just "True").

Example models

  • Added the "Blackjack 21.ana" example model to the Fun and Games folder.
  • Added the "Retirement plans.ana" example model to the Decision analysis folder. See the blog article.


  • Fixed a race-condition that would cause the creation of an ADE instance to fail if another ADE instance is exiting at the exact same moment.

You are not allowed to post comments.