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.
ALP is a format of AnyLogic models that stores all the information related to a specific model in a single file.
It is currently the default format for saving AnyLogic models.
If the model uses a database or file resources, they are usually stored separately.
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.
It is currently the default format for saving AnyLogic models.
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 save the model in the ALPX format
- When creating a new model or saving an existing model, select the Use multi-part ALP format option in the appropriate dialog.
- 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
- Open the Save As dialog.
- Clear the Use multi-part ALP format option.
- Click Finish.
-
How can we improve this article?
-