Skip to main content

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.

  1. RL experiment, with the Configuration, Observation, Action, and stopping conditions filled out, as per your specifications
  2. 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

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

anylogic_alpyne-0.2.0-py3-none-any.whl (8.9 MB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page