To start training brains, the simulation model can either be hosted from your local machine or scaled on the Azure platform – this page focuses on the latter, referred to as “uploaded” or “scaled” training here; Bonsai refers to the simulation models in this case being “managed”.
About
For efficient brain training, Bonsai has built-in support for using up to hundreds of parallel simulation models. All you need to do is export your RL-ready simulation model to a zip file (via the RL Experiment) and upload it to the Bonsai UI.
After uploading your model, you can configure settings related to the hardware used for training (under the properties of the Simulator in the Bonsai UI).
Instructions
Starting in your AnyLogic environment:
-
In the Projects panel, under the model you wish to export for, click on the RL Experiment to view its properties.
-
At the top of the Properties panel, click the link for Export to Microsoft Bonsai (if prompted to save your model, select Yes)
-
In the “Export Model” dialog box, ensure the option for Destination ZIP is as desired and then click Next. The model will then export to the specified file.
Tip: After a successful export, click the ‘Locate ZIP file’ link to open your system’s file explorer to where the file is saved (a small time saver when going to upload the model).Note: This zip file contains your exported model (including all of its assets) and setup to use the RL Experiment.Important: A model exported from the RL Experiment has all the limitations of its edition (namely relevant for PLE) and configured to only work in a compatible platform, such as Bonsai. You - as the end-user - are unable to run this exported model yourself. -
Once complete, you will see the “Done” screen. Click Finish to close the dialog box.
Now in the Bonsai UI:
-
From the Simulators section, add a new simulator, following the prompts.
-
After uploading your model, it will need a few minutes to finish setting it up.
-
Once ready, you can configure its hardware settings and copy the package name (to be used in your Inkling) from the Simulator’s properties.
Tip: The settings are per instance. AnyLogic recommends using 1 core (as a single run cannot use more), memory appropriate to the complexity of the model (256MB - 1GB works well in most cases), and a max instance count appropriate to your desired resource usage.