Ana:4.0 Docs plans and status

Wiki Page Status

Wiki pages that are part of the documentation for Analytica are given status that indicates the level of completion of that page. The wiki page status is indicated by making setting the category of the page to the correct status. The category will be the phrase "Doc Status <STAT>", where the <STAT> is one of the status values shown below. For example, if the page is being drafted by Lonnie, it should be in the category "Doc Status D" (Draft); if it is being edited by Max, it should be in the category "Doc Status EM" (Edited by Max); if the page has been drafted, edited, and reviewed and is ready for inclusion in the User Guide and release to the general public on the wiki, it's status would be "Doc Status A" (Approved).

The documentation process for creating and completing these pages is:

  1. A stub for a page is created, indicating an aspect of Analytica that needs to be documented. Status is Doc Status D.
  2. Lonnie drafts the initial information on that function, feature, or topic. When he is done he sets the status to Doc Status C
  3. Max or Richard edits and expands the information drafted by Lonnie. When they start the process (if it is going to take time), they set the satus to Doc Status EM or Doc Status ER, respectively. When they are done they set the status to Doc Status R.
  4. Lonnie reviews the edited page for corectness and signs off; at this point the wiki page is complete (for this release of Analytica). If Lonnie finds problems with the page, he will make comments on the page (or otherwise communicate with the editor, Max or Richard, and change the status back to Doc Status C (ready for editing). If he is happy with the content, he sets the status to Doc Status A.
  5. Richard moves the information into FrameMaker (where relevant) for information that will go into a hardcopy book or PDF files, such as the User Guide. The status does not change on the wiki page.
  6. If the page is later edited (e.g., after the 4.0 release), the status would be set back to Doc Status C (assuming Lonnie has added information) or Status Doc R (assuming Max or Richard have reworked the existing information and want Lonnie to review it).

Process Status:

  • Doc Status D: Page is a stub or contents are still being drafted (by Lonnie).
  • Doc Status C: Initial draft completed. Ready for editing by Richard or Max.
  • Doc Status EM & Doc Status ER: Content in the process of being edited by Richard (ER) or Max (EM).
  • Doc Status R: Ready for review, or in review (by Lonnie).
  • Doc Status A: Approved: review complete; ready for release on the wiki to general public and for conversion to FrameMaker. Further changes to the Wiki page will not (normally) make it into 4.0 Frame docs.

What's new in Analytica 4.0?:

Output formats

Graphs and Charts

Graph Style Templates:

Graph settings:


Dropdown menus in an Edit table:

  • Select Find... from Object menu, or press control-F, to search for text in a table.

Shortcuts for Table Navigation: E_M

  • When you reopen a table or graph, Analytica remembers all settings from the last time it was displayed, including pivoting (index chosen for horizontal and vertical dimensions), slicers (values to show for other dimensions).
  • You can control the ordering of slicers table and graph windows. Simply click on the variable name and drag the slicer to the desired position.
  • Copy and paste from a table now uses full numerical precision. You can control the order of indexes in a copy of a multidimensional table by reordering its slicer indexes.
  • Exported table data includes any external variable columns or coordinate index columns.
  • With Analytica Enterprise or Power Player, you can now scroll through Huge index dimensions with over 32,000 elements.


automatically spliced

Influence Diagrams

  • Make neater diagrams: New options in the Diagram menu include Align nodes to top, left, bottom, or center; Make same size for height, width, or both; and Space evenly horizontally or vertically.
  • URLs in a text node appear as hyperlinks in the diagram.
  • Optional red flag in node shows which objects have Descriptions.
  • When you've selected a Button object, Control-e now opens its Script. As before, for a Variable or Function, Control-e opens its Definition.
  • The mouse wheel scrolls a diagram vertically or, pressing the control key, horizontally.

Non-US text and numbers

Recognizing that nearly half Analytica users are outside the US -- Analytica is finally getting a bit less US-centric:

  • Date and currency formats: The Number format dialog now lets you select a much wider variety of formats, including non-US dates, currency symbols, and negative numbers. Date formats respond to the Windows region setting.
  • You can now paste text containing accents, symbols, and characters from non-English languages (for ascii>127) into Object windows and diagram nodes.
  • We know we still have some distance to go towards full internationalization, but this is a start!

The Application

Auto save: D

  • Analytica now shares CPU nicely with other applications. Earlier versions hogged 100% of CPU cycles when the Analytica was in focus -- i.e. its application window is on top.
  • It can now read model files that use LF (linefeed) as the end-of-line character, instead of CR (carriage return). This convention is standard for Unix and Linux, and sometimes happens to files that are stored or emailed from a Unix server.
  • If your computer has multiple screens to show a larger desktop, you can now edit Analytica diagrams on any screen or across multiple screens.
  • Analytica recovers more gracefully when a calculation causes it to run out of memory.
  • Analytica 4.0 can handle up to 32,000 objects -- variables, modules, functions, etc. --- double that in previous releases.

New and Enhanced Functions

Date functions: M

MdxQuery: M


  • You can specify an array of independent probability distributions by specifying an Over index i to any probability distribution function -- for example, Normal(0, 1, Over: i).

Statistical functions, such as Mean, Variance, Frequency, Correlation, and many others, operate over the Run Index: Thus, Mean(x) gives the mean over a random Monte Carlo sample from x, indexed by Run. You can now specify a different index to operate over -- for example, Mean(x, k), useful for statistical analysis of an input dataset x indexed by k.






Pdf and Cdf: M in process

Importance weighting: L SampleWeighting: L

IsSampleEvalMode: L Gamma, Binomial, GammaIInv

System Functions

RunConsoleProcess L

  • GetRegistryValue( ) gives specified values from the computer registry, such as the name of default directory for model or datafiles.
  • ShowPdfFile( ) shows an Adobe PDF file -- for example, to open PDF documentation for a model.
  • Function AnalyticaLicenseInfo can return the expiration date, purchaser ID, user ID of the license, whether it has Educational, Beta status, or supports the Optimizer. System variable AnalyticaEdition gives the Edition (Player, Professional, Enterprise, etc.)

Array functions

  • The new operator @J returns the position of each element in index J -- i.e. the integers from 1 to Size(J) indexed by J. You can also use it in a subscript: A[@J = 2] is equivalent to Slice(A, J, 2). /At operator
  • PositionInIndex(a, u, i) returns the position n (an integer 1 to Size(i)) in index i for which a[i=n] = u. It is the equivalent of SubIndex, except that it returns a position instead of index value. Useful when i may contain duplicate values.
  • The subscript syntax now lets you to subscript an expression -- e.g., (A+B)[I=x].
  • The new function Argmin(x, i) gives the last value of i for which x is at a minimum over i, like the existing function ArgMax(x, i). These functions can now find a min or max over one or more dimensions by specifying multiple indexes, and can return index value or position.
  • Rank now lets you specify mid, lower, or upper rank in the event of a tie.
  • Area adds an optional fifth parameter: Area(R,I,X1,X2,J)
  • MdTable now lets you specify the first N columns of X as coordinates and the rest as measures, as used in a fact table, the format used to specify OLAP hypercubes. It also supports a user-defined conglomeration function for combining elements.
  • The new IndexValue function provides access to a self-indexed variable's index value from a value context.

Special Functions

  • Added inverse functions ArcCos, ArcSin, ArcTan, and hyperbolic functions CosH, SinH, and TanH to the standard Sin, Cos, and Tan. All use degrees, not radians.
  • TypeOf(X): Returns the type of each atom in X as a text.
  • A VarTerm is a pointer to an object, such as a Variable or Module. Varterms lets you write functions and models that navigate and change a model by working with Objects -- for example, to find the inputs or earlier ancestors of a variable. They allow an Analytica programmer to write lots of nifty functions, which the rest of us will benefit from.
  • For j:=X Do ... generalized to allow X to be any expression, including an array. When X is an index, j iterates over the IndexValues.

Database Functions

  • The index used to indexed the rows of the table retrieved using DbQuery can now be a local index, defined via Index..Do.

Language Features

  • Function Parameter Qualifiers specify what type, dimensions, or range of values are expected for parameters. New qualifiers include "..." meaning one or more parameters of the same type, NonNegative, ContextSamp' (the default), and Optional indexes You can also supply default values for optional parameters, to be used when the parameter is absent.
  • A variable used as an IndexType parameter gives its Indexval if it has a self-index, when evaluated in the function.
  • The Domain attribute specifies the set of acceptable values of a variable. When displaying a probability distribution, Analytica uses the Domain to decide whether to generate a probability density or mass function, according to whether the Domain is continuous or discrete. If the Domain is Automatic, Analytica guesses from the actual values (usually correctly). If the Domain is Index, it gets the domain as a list of values from an Index variable.
  • 0*NaN and 0*INF now give a warning and return NaN, consistent with the IEEE 754 and SANE arithmetic standards. Earlier releases simply returned 0.
  • Release-gated comments. The syntax {!40000|expr} will be treated as a comment in releases prior to 4.0.0, but as the expression expr in 4.0.0 or after. {!-40001|expr} or {!40000-40001|expr} acts as expr in releases 4.0.0 through 4.0.1, but as a comment in earlier or later releases. This syntax is accepted in both typescript and expressions.


New distributions in "Multivariate Distributions.ana"
  • MultiUniform
  • Uniform_Spherical
Distribution variations

(Note: these distributions can also be used within the Random function for single variate generation)

  • Smooth_fractile
  • Warp_dist
  • Erlang
  • Pareto
  • Rayleigh
  • Lorenzian
  • NegBinomial
  • InverseGaussian
  • Wald
Functions in the new "Generalized Regression.ana" library
  • Logistic_Regression
  • Probit_Regression

(These require Analytica Optimizer)

The Optimizer

The Analytica Optimizer offers powerful solver engines, licensed from Frontline Systems, to solve linear programms (LP) and mixed integer programs (MIP), quadratic programs (QP), and general nonlinear programs (NLP). The Optimizer is an optional extension to Analytica Enterprise, Power Player and ADE.

  • Analytica Optimizer 4.0 uses the new 7.0 release of Frontline Systems Solver, which offers significant improvements in performance and functionality.
  • The new Grouped integer variable type lets you define a set of N integer decision variables, where a solution must assign a different integer from 1 to N to each of the variables in the group.
  • QpDefine now supports quadratic constraints. (Before QP problems supported quadratic objective but constraints had to be linear.)
  • If your optimization problems are really large, you can use yet more powerful add-on solver engines, including OptQuest, Knitro NLP, Mosek SOCP and NLP, and Xpress LP, QP and MIP (priced separately).
  • Function SolverInfo provides information about any installed solver engine, including engine type, all parameters, search-control settings, and their allowed ranges.
  • ObjNl and LhsNl parameters add the 'Q' option to specify quadratic dependence.
  • Function LpFindIIS lets you relax variable bounds (not just constraints, as before). Two new parameters control this, and whether a subset of constraints is returned or a new LP.
  • LpWrite, LpRead, and LpWriteIIS support three file formats: LP, MPS, and LPFML to help you document and diagnose solver formulation and behavior.
  • Tracefile helps debug NLP optimizations.
  • Hooks for array abstraction in NLPs: Enhancements to NlpDefine give more flexibility to structure a large model so NLP optimization array abstracts properly -- for example, for probabilistic or WhatIf analysis with NLP.
  • Almost all parameters to NlpDefine are now optional, making it simpler to define an optimization problem with a scalar decision variable, only zero or one constraints, or to find feasible solutions only.
  • To speed up NLP, you can give NlpDefine an explicit expression to compute the Hessian -- second derivatives of the objective and LHS.