Export a model to AnyLogic Cloud — Tutorial

AnyLogic Cloud is 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 describes 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 these two elements:

We will also include the existing cost structure stack chart into the model’s cloud 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 configure its export properties.

Configure the model export properties

To configure the export properties, use 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’s make the label of the totalCostPerProductOutput element more informative.

Note: The text field inside the element’s block allows for setting the label for the added element that will be displayed in the AnyLogic Cloud user interface. For a Parameter element, its Label is used by default, if any. For an Output, its name is used by default. For 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 look like the one shown on the screenshot:

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 up. 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.

To proceed with exporting the model through the wizard:

  1. Select Create new model in the Model drop-down list.
  2. From the Icon list, select the image you want to display on the model tile in AnyLogic Cloud.

    Note: This option is only available the first time you export this particular model to AnyLogic Cloud.

    Here AnyLogic offers to select the presentation of the model’s top-level agent or one of the model’s experiments (except the custom experiment) as an image. The icon only displays the visible part of the presentation (area of the graphical diagram inside the model frame). You can change the icon to any other image in the model screen.
  3. Remove the selection from the Include model source files option if you do not wish to export them.

    Note: If you choose to export the source files, the next step will allow you to select the files that will be exported.

  4. Remove the selection from the Provide public access to this model checkbox if you do not want this model to be added to the Public models catalog. In this way you will export it as a private model, providing only certain users with access to it.

    Note: Private model uploading is available only if you have AnyLogic Professional or AnyLogic University Researcher with valid support and maintenance license.

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 multiple 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 any 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.

Related topics

How-to video: AnyLogic Cloud

AnyLogic Cloud

AnyLogic Cloud options