Run AnyLogic models exported from the RL Experiment
Project description
Alpyne
The AnyLogic-Python connector
This is a Python library for interactively running models exported from the RL experiment.
Currently, this library released as a public beta (so please excuse any rough edges). If you have problems or bugs, please file them in the Issues
tab. For general talk or questions, there's the Discussions
tab.
Full documentation (with background information, getting started guide, and class docs) can be found @ https://t-wolfeadam.github.io/Alpyne
Installation
Alpyne supports Python 3.6+
Install this library running the following command in a terminal prompt: pip install anylogic-alpyne
.
Preparing an AnyLogic model
You can use any edition of AnyLogic (PLE, University, or Professional) with this library. However, be aware that limitations of the edition will still apply. For example, PLE users executing models which utilize industry-specific libraries have their runs limited to 1-hour simulation time.
You will need to setup your model with the following components.
- RL experiment, with the Configuration, Observation, Action, and stopping conditions filled out, as per your specifications
- A call to the RL experiment's
takeAction
method, at the moment you wish an action to be taken
To export the model, navigate to the properties of your RL experiment and click the option at the top to export it. If you do not see an option for Alpyne or generic 3rd parties, you may use the one for "Microsoft Bonsai".
Next Steps
The API and overall workflow for Alpyne is intentionally similar to the AnyLogic Cloud. In your Python code, you will create a single Client object, passing a reference to where your exported model is located, in addition to setting other options. This object then gives you access to templates for the inputs/outputs of the model in addition to methods for creating new model runs, which can then be interacted with.
For more, see the documentation page, download the provided examples, or post in the Discussions tab.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Hashes for anylogic_alpyne-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 81d8eb67a35837b2bcd80453bfdac50cb6f10bc74fb54baa2c68dd3f89a72c10 |
|
MD5 | a95b027164dcfaaf0aaced0dfe6817d8 |
|
BLAKE2b-256 | 8009b12efb1896268c8cfd986bfd57c59af156fb1a2d8b5e9d538e21841c329a |