Export a model to AnyLogic Cloud - Tutorial

AnyLogic is integrated with AnyLogic Cloud - a web portal that hosts simulation models and allows you to run your models online and share them with other users.

AnyLogic models hosted at AnyLogic Cloud run on a server and do not require AnyLogic to be installed on the end user's computer. The execution process is visualized in a web browser.

How-To video: AnyLogic Cloud

This tutorial will show you how to upload and run your model in AnyLogic Cloud. We will perform the following steps:

We will use the Activity Based Costing Analysis model as an example.

Demo model: Activity Based Costing Analysis

In this simplified factory floor model the cost associated with product processing is calculated and broken down into several categories for analysis and optimization. 

After completing the tutorial, you will be able to view your model in AnyLogic Cloud, create experiments, run them with the provided parameters' values and view the output results:

AnyLogic Cloud experiment screen

Define the model's output

The Outputs section of AnyLogic Cloud experiment screen is populated by the elements of the  Analysis palette defined in the model. This section is used for displaying the data in the form of single values as well as charts.

Our model has the two following metrics that we would like to see in the results of the experiment: Total cost per product and Total products processed. To display these values on the AnyLogic Cloud experiment screen, we need to create two  Output elements inside the model.

Create and configure two Output elements

  1. Drag two Output elements from the  Analysis palette onto the Main diagram.
  2. Name them totalCostPerProductOutput and productCountOutput respectively.

  3. Configure the two elements:

We will also include the existing cost structure stack chart in the cloud model version. This chart is already set up and does not require any modification at this time:

We have defined all the required elements for our model. We may now proceed with configuring its export properties.

Configure the model export properties

Export properties are configured in the Run configuration editor.

To access the Run Configuration panel 
  1. Double-click the Run Configuration element in the model tree to open the Run configuration editor.

The editor pane is divided into two areas.

The elements that we add will be displayed in the Cloud's model user interface. This will give us the ability to change the input parameters of the model and view the values of the outputs after running an experiment.

By default the right area contains certain elements of the model. Now we will add the previously created Output elements to the right area of the editor.

To add an element

  1. First we will add the productCountOutput element. There are three alternative options of adding an element to the list of the to be exported elements:
  2. In the same way add the totalCostPerProductOutput element to the Outputs section in the right area of the Run Configuration editor.

    Note: you can add several elements at once. Select them in the tree with the Ctrl or Shift key pressed, then either right-click and select Add from the context menu, or instantly drag them from the tree to the required section.

Each added element is represented by a block containing information about it:

Let us make the label of the totalCostPerProductOutput element more informative.

Note: The text field inside the element's block allows to set the label for the added element that will be displayed in the AnyLogic Cloud user interface. In case of a Parameter element, its Label is used by default, if any. In case of an Output, its name is used by default. In case of a Chart, the Title of its data item is used by default. If the chart data contains multiple data items, the Name of the chart is used.

To set the text label for the element

  1. Click the text field within the totalCostPerProductOutput element's block.
  2. Edit the label. It should correspond to the one on the screenshot below.

If you do not want to export an element to the Cloud, you can always remove it from the right area of the editor.

To remove an element from the exporting Inputs/Outputs

There are two alternative options of removing an element from the list of the to be exported elements:

  1. Click the  button inside the element's block.
  2. Right-click the element in the tree and select Remove from the context menu.

To remove several elements at once, select them in the tree with the Ctrl or Shift key pressed, then right-click a selected element and select Remove from the context menu.

Upload the model

We may now export the model by clicking the Export model to AnyLogic Cloud link in the Run configuration editor properties:

The Export model to AnyLogic Cloud wizard will open. If you are already registered in AnyLogic Cloud, enter your login information in the E-mail and Password fields and click Log in. Otherwise, you will have to register a new account by clicking the register new account link, which will lead you to the registration page in your browser.

Select Create new model in the Model drop-down list 

Uncheck the Include morel source files option if you do not wish to export them.

click Finish:

The model will be exported to the My models section of AnyLogic Cloud. After the process is finished, the AnyLogic Cloud model screen page will open in the browser automatically.

Running your model

On the AnyLogic Cloud model screen, you can see the general information about the model:

In the sidebar on the left you can see the model versions and experiments. Since it is the first time that we uploaded the model, a single model version is present, which contains a single simulation experiment:

New model versions are added automatically when you export a model from AnyLogic as a new version of the existing model. Each model version can contain a number of experiments. To create a new experiment for the current model version, click the  button and set the experiment's properties.

Set up and run the simulation experiment

  1. Click the experiment in the sidebar to open the experiment screen. 

  2. Run the experiment with the default input values by doing either of the following: After the experiment is finished, the Outputs section displays the results of the experiment:

You can now change the values of the input parameters and run the experiment again to observe the changes in the model outputs.

This concludes the tutorial of bringing your model to AnyLogic Cloud. You can now proceed with creating new experiments and sharing your model with other users.