Running a model in a command line workflow

Revision as of 22:51, 28 December 2020 by Lchrisman (talk | contribs) (Created page with "''Requires Analytica 5.5 or later.'' This page details how you can launch an Analytica model from a command line or batch file for the purpose of having it automatically...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Requires Analytica 5.5 or later.

This page details how you can launch an Analytica model from a command line or batch file for the purpose of having it automatically run your model and exit, for example as part of an automated computational pipeline.

Use case example

  1. You have an R program that outputs data files that serve as input to your Analytica model.
  2. Your Analytica model reads and processes these, and writes some output files.
  3. Those output files are then used as input to a Python program that does some final calculations and transmits the final results


You want to automate this computational workflow so that in Step 2, Analytica launches, processes the data, and exits automatically without human intervention.

When to use

In general, it works best to use the Analytica Decision Engine (ADE) for programmatic automation. ADE runs as a component without a graphical user interface, and provides a rich API for flexible transfer of input and output data and full control over calculations and all other aspects of the engine. ADE requires a separate license from desktop Analytica.

However, you can do some simple batch processing as described in the use case example with Analytica itself. These limitations generally apply:

  • The Analytica graphical user interface appears on the screen (So you also need to be logged into a console). You can't suppress the GUI during processing.
  • Events that require user interaction could cause your batch process to halt as it waits for a user's response. This could include error messages, warnings, and evaluation of UI functions such as MsgBox.
  • The features required to make this plausible require Analytica 5.5 or later.
  • Although the core functionality to run in this fashion doesn't require any minimal edition, in most cases an Analytica Enterprise edition or better, or Analytica Power Player edition or better will likely be necessary. This is because you will probably configure your model to read and write data from and from external sources like databases or data files while it is running in batch mode, which are Enterprise-edition-level features.
  • The process runs in batch, in which in runs and terminates without any automated interactions in between. This can be contrasted to the case where a master program makes repeated calls to a child (Analytica) model, so that state within the child process is preserved between calls. For this latter pattern, you'd need to use ADE.

How to batch a model calculation

Comments


You are not allowed to post comments.