AnyLogic
Expand
Font size

Model file formats

In AnyLogic, the model file stores everything related to the AnyLogic model, including its space markup, resource references, and so on. In simpler terms, a model file is a container that holds all the pieces needed to work with a simulation model in AnyLogic.

If you want to share your AnyLogic model with someone else, they would need the model file itself and all the file resources referred by the model. Usually the resource files are located in the model folder where the ALP file is located; this can include images, 3D objects, database files, GIS shapefiles, routing files, GIS cache files, external JAR files, and so on.

Starting with version 8.9, AnyLogic supports two formats of model files: ALP and ALPX.

The ALPX format is a beta feature that is currently implemented in AnyLogic to gather user feedback.

ALP format

ALP is a default format of AnyLogic models. It is a single file that contains all the information related to a specific model.

If the model uses a database or file resources, they are usually stored separately.

ALPX format

ALPX is a new model file format first introduced in AnyLogic 8.9.0. It fragments the model, making it easier to maintain and organize. In this format, code is easier to read and understand, and multiple developers can work on the same model without conflicts.

The ALPX format is the result of splitting the original ALP file into parts. The ALPX model folder consists of the main file (which has an .alpx extension) and a folder named _alp. This folder contains the elements of the single ALP file, but split into parts:

  • The Agents folder, with a separate subfolder for each agent type. There are files containing definitions for each presentation level of the agent, Java files for functions and events, and the lists of connectors and variables in separate files.
  • The Classes folder, which contains custom Java classes in standalone .java files.
  • A set of separate XML files containing definitions for experiments and model resources.

To enable the ALPX format

  1. From the AnyLogic menu, select Tools > Preferences.
  2. Switch to the Development page.
  3. Select the Enable multi-part ALP (beta) option.
  4. Click OK.

To save the model in the ALPX format

  1. When creating a new model or saving an existing model, select the Use multi-part ALP format (beta) option in the appropriate dialog.
  2. Click Finish.

In the resulting folder, the model is saved in the ALPX format, with its components stored neatly in the _alp folder.

To save the ALPX model as ALP

  1. Open the Save As dialog.
  2. Clear the Use multi-part ALP format (beta) option.
  3. Click Finish.
How can we improve this article?