# What's new in Analytica 6.0?

This page list the enhancements that are new to Analytica 6.0 since Analytica 5.4. Analytica 6.0 is currently in beta, so that Analytica 5.4 is still the current official release. If you have an Analytica subscription, you can use or test drive Analytica 6.0 beta. For information on how, visit the Beta Tester Page.

# Diagrams

## Arrows

You can now modify arrows to have multiple line segments or curves, very handy when you want to avoid arrows crossing other arrows or nodes. You can also set arrows' thickness, linestyle and colors.

### Bends and Curves

Here's how to add segments or spline curves to an arrow:

• Click a straight arrow to select it (in Edit mode). It will show a square and round handles in the middle of the arrow.
• For two straight line segments, drag the square handle.
• For a curved arrow, drag the round handle.

To modify a segmented or curved arrow, click to select it and then:

• To move the waypoints (dark circles or squares), just drag them.
• To add more lines or curves, drag a new midpoints handle (open circle or square).

For more options, right-click on a multi-segment arrow to see the arrow menu:

• Select Curved on the context menu to toggle between curved and straight segments.
• Select Remove way point to remove a segment.
• Select Remove all way points to restore a simple straight arrow.
• Select Dash style to change line style t o solid, dashes, dots, dash-dot, or Dash-dot-dot.
• Select Thickness to make the arrow thicker or thinner.
• Select 'double line

### Colors and line formats

• To change the arrow color, click the arrow to select it, and click a color from the Color palette.

### Showing and hiding arrows

As before, you can use the Diagram Style dialog to control whether to show arrows to and from indexes and functions (off by default) or modules (on by default) or use the Node Style dialog to control whether to show inputs and outputs to a node. Now, you can now show or hide individual arrows using the Arrow menu:

• Select "'Hide arrow to hide an arrow entirely that would otherwise show.
• Or Show arrow to show a hidden arrow (but first you'll have to click around to find the arrow and right-click menu:-).

## Rounded corners

The borders of Text nodes, Frame nodes, Pictures, and User Inputs and Outputs (when shown) , were formerly rectangles with sharp corners. They are now have rounded corners for a more modern, less formal, look.

• There isn't a user interfacee to change the rounding radius for these node types. But you can do it in the Typescript. For example, if you prefer the old-fashioned rectangle view for all Text nodes, set the 18th field of NodeInfo of Text to 0 (instead of the default 12). The last 0 is the corner radius:
NodeInfo of Text:1,0,0,,0,0,,,,,,,0,,,,,0

## Proactive calculation of outputs

Normally, Analytica computes variables only when you ask to view a result value. And when you change an input, any user output influenced by the input reverts to the [calc] button. So you need to click any results that depend on the input again to recompute them. In some cases, especially with ACP, it's more user-friendly to have result tables and graphs compute and appear automatically when you view a Diagram (or ACP Tab). A new library "Configure Proactive User Outputs" lets you easily configure your UI's proactive evaluation behavior.

See Proactive Evaluation for details.

## Larger default node size

• The default node size for new models has been increased from 96x48 to 128x48 pixels.
Note: You can still modify the default node size from the Diagram Style dialog.

# Graphs

## Custom graph titles

• You can now include the title of the graph on the graph image itself, above the grid. To include the title, check the Graph title check box in Graph setup / Text.
• From there you can select the font, size and color for the title.
• You can customize the title, making it different from the variable's own title.
• To do this, right-click on the title on the graph and select Change graph title. This takes you to the Graph title expression attribute, where you can enter a custom title.
• The Graph title expression attribute is an expression, so that you can compute your own title (for example, changing the title based on the uncertainty view or current slicer selections). The locals info and roles that are provided to OnGraphDraw are also provided to your expression here.
• If you want a simple (non-computed) title, just make sure your text has quotes around it.

## Dash style role

• Using the new dash style (aka stipple) role and key you can depict some information using line color and different information using the line dash style.
• To enable this option, enable the checkbox for Separate dash style key in the Graph setup dialog / Chart type / Line style settings.
• When enabled, a new Dash style pivot control appears in the result window.
• This works best for depicting short indexes with no more than 5 items.

## Hiding labels for one axis

• People often find the numeric values for the probability density of a continuous variable to be confusing. So you may prefer to hide the labels for the density axis.
• You can hide labels for any axis from Graph Setup / Axis Ranges, by checking the Hide labels checkbox.
• This setting is associated with the specific graph dimension on the axis at the time you select it, So if you pivot or change view mode, other axes aren't hidden.

## OnGraphClick

A new expression attribute, OnGraphClick has been added, which is evaluated when you mouse-click on a graph. Your code can access information about what was clicked on, and set variables in your model based on what was clicked.

## New Grid options

• There are now 3 new grid options: Solid line mesh (in addition to the former & current default, dotted line mesh), x-axis-only and y-axis-only.
• The default grid has been changed to solid line mesh.
• The default grid color has been lightened a little, from 0x9c9c9c to 0xe0e0e0.

## New hover icons

• There are new hover icons to switch an axis to log-scale or back to linear-scale in a single click.

## Computed Axis Title

• It is now possible to compute an axis or key title dynamically when the graph is drawn. An example would be to base the title on which item is selected in one of the slicers for the result.
• This is enabled by the addition of "Title" to the GraphFillerInfo index.
• See Using a computed axis title in a graph for details and an example.

# Copy/Paste

• When you copy/paste from an expression attribute (like a Definition) into another application such as a gmail message, it now preserves the fixed-width font, the indentation of each line, and the syntax colors.

# Filed Modules and Libraries

It now treats the situation differently when you open a model that uses a filed module or filed library that cannot be found.

• It keeps a placeholder "Missing module" or "Missing library" object in your model.
• The Missing module/library looks like a module or library with a big crack through it.
• You don't experience two extra error messages during the file load when you tell it to skip a filed module, because the node location and size attributes that cause these still apply to the missing module object.
• If you save your model after not loading a filed module or library, the new scheme doesn't forget that it uses the filed module/library.
• A hover icon on the missing module placeholder allows you to find and load the file to correct the missing module after the model is loaded.

# Expressions

• Added Formatted Text Literals (a.k.a. F-strings). For example:
F"Golden ratio={(1+sqrt(5))/2}" → "Golden ratio=1.618"
• You can now nest comments in curly braces " {} ". For example, if you have { start of comment { interior comment } more comment }, the comment doesn't end until it gets to the second " } ". This makes it easier to temporarily comment out blocks of code that contain comments. Previously, the first } ended the comment. When loading a legacy model with an unbalanced comments, it automatically adds a balancing " } " so that the comment still ends it the same place it doesn't break the model.
• You can now omit a capture destination in a multiple-return-value assignment operator. This makes a common pattern more convenient and terse. For example, previously a pattern such as this was common:
 Local txt; (txt, Filename) := ReadTextFile(""); txt 

where Filename is defined as a ComputedBy. The third line (txt) was already unnecessary, since the result of the assignment is the first parameter value. Now even the Local declaration is unnecessary, so that the above becomes just

( , Filename) := ReadTextFile("")

The result of the full expression is the first return value, with the second return value assigned to Filename.

• You have long been able to select an item in a Choice control using the assignment operator. For example,
Select_fruit := "apple"
But, there was not an easy way to select the All option. Now you can select it by assigning the full index value, assigning an ordered list of all the options, or assigning the text "All" or "«All»" (as long as "All" (or "«All»" respectively) is not one of the choice items. (MultiChoice does the same, but that's not new to 6.0).

# Built-in functions

• There is now a sliding window option for CumMin and CumMax, which uses an O(n) algorithm, and which also handles the «passNull» and «reset» options.
• You can list multiple arguments when calling ConsolePrint. They are printed on the same line, with no separation, and without combining the indexes of the parameters.
• Added an optional «rollover» index to the Dispatch function, which you can use to rollover unmet demand or unused capacity to the next time period.
• Added these new items to DatePart. DatePart( d, 'Date') returns the date part of a date time (dropping the time part), and DatePart(d, 'Time') returns the time part (dropping the date part). Also, Mod(d,1) now returns a date-time number when d is a date-time number, and is equivalent to DatePart(d,'Time') (formerly it returned a float).
• Null values in «x» or «y» to CanvasDrawPolygon now cause it to start a new, distinct polygon.
• Added the Cell formatting functions system library to the definition menu.
• A collection of File system functions were added to the Enterprise edition (and higher). These functions are: FileFullPath, FilePathPart, FileSystemCopy, FileSystemDelete, FileSystemListing, FileSystemMove, and FileSystemNewFolder.
• You can test whether an array has a specific index using the new built-in functions HasImplicitDimension or HasIndex.
• There are a few new advanced math functions, including the Airy functions and Bessel zero functions.
• A bug fix to DbQuery() and DbWrite() -- affects mostly DbWrite. These have a feature that splits queries on double semi-colons, and sends each part as separate queries. For example
INSERT INTO Tab(X) Value(3);;
INSERT INTO Tab(Y) Value(2)
Gets sent as two separate queries. Some databases won't process sequential statements in the same query, so this feature provides a way around that. All queries are done in the same context, which is also sometimes relevant. A bug was causing it to split on a single semi-colon, which was a problem, especially in complex queries with SQL variables. With this fix, single semi-colons are part of the same query and don't split them into separate queries. Unfortunately, this could break some SQL queries that used a single semi-colon and depended on them being split. SQL statements in this category would almost always be to DbWrite(), and very unlikely to impact queries that read data.

# Batch processing

You can now run a model in a batch process from a Windows command line or script. So, you can run Analytica as part of an automated workflow. You were always about to do this using the Analytica Decision Engine (ADE) product. Now you can do it with Analytica alone. See Running a model in a command line workflow.

The key additions that enable this capability include:

• The parameter /eval to the Analytica Command Line.
• The Bye command, lets you automate the exit of an Analytica process.
• An option to the Bye command let's you exit without saving (or asking to save) changes to the model if the model has been modified.
• The command line option /NoSplash suppresses the splash screen when starting Analytica, which removes some startup delay.

# Example Models & Libraries

## Supply Chain

The "Beer Distribution Supply Chain.ana" model in the Business Examples folder applies probabilistic supply and production disruptions to evaluate which operational decisions can mitigate order fulfillment disruptions.

## Boolean circuits

This new example model was developed partially by a 7 year-old who was learning about boolean circuits, and enjoyed drawing and simulating his own circuits in Analytica. You can draw your own boolean circuit using AND gates, OR gates and NOT inverter gates, and toggle input bits to see how the 0s and 1s flow through the circuit. A nice model to teach young kids about boolean circuits and allow them to build their own simple feed-forward circuits.

## Power law distribution library

The Power law distribution is implemented in a library that is now included with Analytica. The Power law distribution is useful in a number of applications, but perhaps even more important is that this library provides an example template that you can follow for adding other distributions to Analytica when you need one that isn't already built-in.

## New ACP Styles Library

The ACP Style Library has been completely rewritten, and is tailored to the newest Analytica Cloud Platform release.

# Optimizer

• When you have an array constraint has both intrinsic and extrinsic indexes, the positions of Null constraints can now appear at different (intrinsic) coordinates in each extrinsic slice. Formerly, it assumed that Null constraints appear at the same coordinates in every extrinsic slice. For example, in If b Then x<y, where b is an array of booleans, b b can now vary along both intrinsic AND extrinsic indexes. Scalar constraints are not sent to the solver engine for positions where b=0 (hence are not counted in your total number of constraints).

# Attributes and Object window

• The attribute that used to be titled "Cloud Player Styles" or "AWP Styles" is now "AcpStyles".
• In the Object window, it has syntax coloring and expression assist.
• In the Object Window, you can right-click in the row-header column to select which attributes to display or hide for this object. Applies to this object only, and saves you from having to do it globally in the Attributes dialog.
• The default text for the author attribute is improved, using your first and last name and organization if possible (as opposed to your window login name). It is able to find this information if you had entered that information in the installer while installing Analytica. You can also customize your default author signature, which will then be used as your default text when you create new models. To do this, edit the author attribute (in the Object Window or Attribute pane) to be as you wish, then right-click on it to bring up the context menu. Select the new option Save author signature. Subsequently, the same context menu will also have a Use saved author signature option.
• A right-mouse context menu option makes is easier to set (or unset) the "apply computed cell formats to edit table" flag.
• When typing an expression, Expression Assist can now suggest the names of indexes for a local identifier in appropriate contexts when the dimensionality of the local has been declared.

# Number format and Cell-level formats

• In a date template, it now accepts capital letters for D, DD, YY and YYYY, so MM/DD/YYYY can be used as well as MM/dd/yyyy. Formerly it recognized only lower case dd and yyyy.
• On the Cell format dialog, the text entry options has been moved from the Alignment tab to its own Entry tab.
• The options for Entry are now split into checkboxes for each data type
• Added data type options for Null and Identifiers (handles)
• The suffix number format displays (and has always done displayed) a G suffix for Giga ($10^9$) and a u suffix for micro ($10^{-6}$). We added a «GigaOrMuSuffixChars» field to the NumberFormat attribute (item 18) that gives you a way to use a B suffix for Giga (B=billion in English) and µ for micro (greek letter mu). If you want to change this, at present you'll have to change the Sys_DefaultNumberFmt system variable from the Typescript window. To see the exact syntax, and for Library with a UI for configuring this, see Displaying B for billion, µ for micro on the User Forum.

# Misc

• When a window loses focus, its non-active scrollbars now have a more modern appearance.
• You can now evaluate an expression when a hyperlink is clicked. This might be a call to ShowWindow(), for example, to jump to a particular result or diagram, or a button identifier to "press" an existing button.
• When it generates an identifier from a title, it uses only a single underscore where multiple successive characters in the title are not valid in the identifier. For example, from the title "Taxes & Depreciation", the automatically generated identifier will now be Taxes_Depreciation rather than Taxes___Depreciation.
• The option Run at load time has been added to the right-mouse edit-mode context menu for a button. Sets the 32-bit of ProactivelyEvaluate for the button, causing it to be run when the model is loaded.
• Faster saving of model file when you save to a remote drive over a VPN connection.
• Added the system variable Sys_WarningsToIgnore.
• Added Copy identifier to the right-mouse context menu for a node (in the diagram window).
• Added a Server combo box to the Publish To Cloud dialog. Although rare, if you have access to an ACP server other than public ACP server, you can enter your server domain into the combo and then have an easy way to select which server you are publishing to.

## No more 32-bit application and no "64" bit labels

Long ago, most software including Analytica were 32-bit applications. When we produced a 64-bit version, we used the '64-bit' label in many places. Today, we only produce a 64-bit, the 32-bit version is obsolete. So we've eliminated the "64-bit" from application file names, including:

• The installer filename is now AnaSetup«ver».exe, not Ana64Setup«ver».exe.
• The executables are now Analytica.exe and Ade.exe, not Analytica64.exe and Ade64.exe. Similarly, ADEW.DLL replaces ADEW64.DLL and AnalyticaUpdateCheck.exe replaces Analytica64UpdateCheck.exe.
• Edition names omit "64-bit". So it now says "Analytica Enterprise" and not "Analytica Enterprise 64-bit".
• The user's registry hive is now HKCU/Software/Lumina Decision Systems/Analytica/6.0, not .../6.0x64