Requirements
You will need the following before continuing:
-
You must have have access to AnyLogic Private Cloud or a AnyLogic Public Cloud subscription
Note: This is due to the fact the external communication from the Cloud environment is needed (to contact the brain) -
You have a trained brain which has been exported to a web app
Note: For more information, read the exporting section of Querying exported brains -
You have added the Bonsai Connector or a function for contacting the brain
Note: The choice of which is dependent on whether you want to run the model in a headless mode. For more information, read Querying exported brains.
Implementation
To start, decide whether the playback URL (of your exported brain) should be fixed or dynamic.
To make it modifiable without needing to upload another version of the model, you should add a String parameter to your top-level agent representing the URL and specify the parameter as the value for the “Exported brain address” option in the Bonsai Connector.
Next, open the Cloud’s “Run Configurations” for the model desired to upload. Drag over any inputs that should be changed from their default values or that you wish to make configurable by end-users.
In this example, we’ll want to change the defaults for the Bonsai mode and the playback URL.
Next, upload the model to the AnyLogic Cloud by clicking the “Export model” option from the Properties panel of the Run Configuration or by right clicking the Run Configuration option in the Projects panel > Export model to AnyLogic Cloud.
After uploading, you may wish to change the default options of the inputs or toggle their visibility. To do this, start by clicking on the experiment. You’ll be shown the available inputs. Modify these as you would like the default values in this experiment.
For this example, the option for “Playback” mode was chosen and the brain address was modified from the generic default.
After you’ve updated the settings, click the save button, as shown below.
As a final step, you may wish to hide these options from the end-user. Doing this will preserve their settings that you chose in the previous step.
To do this, click on the pencil button to edit the dashboard. Then, click on the open eye icons next to the inputs you wish to hide. Finally, click on one of the options for saving the dashboard.
For this example, it was desired to hide the Bonsai mode (so that end-users could not be confused by the “Training” option) but make the brain address visible in case others want to try their own exported brain.