ALPype or AnyLogic Python Pipe is an open source library for connecting AnyLogic simulation models with python-based experiments. This project primarily encompasses two major areas:
ALPypeRL is a connector for reinforcement learning frameworks that are compatible with the OpenAI Gymnasium interface (single agent). Find more details at the oficial documentation.
ALPypeOpt is a connector for sequential optimization packages such as scikit-optimize
, optuna
, hyperopt
and bayesian optmization
. Refer to the documentation to learn more about this project.
With ALPype you will be able to:
- Connect your AnyLogic model to a sequential optimization package of your choice (e.g. scikit-optimize
skopt
). - Connect your AnyLogic model to a reinforcement learning framework of your choice (e.g. ray
rllib
). - Scale your RL training by launching many AnyLogic models simultaneously (requires an exported model).
- Deploy and evaluate your RL trained policy from AnyLogic.
- Debug your AnyLogic models during optimization loop (this special feature improves the user experience during model debugging remarkably).
- Leverage on the AnyLogic rich visualization as the optimization runs (which ties to the previous bullet point).
There is a more comprehensive documentation available that includes numerous examples to help you understand the basic functionalities about its subpackages in greater detail.
ALPype includes 2 environments that make the connection between AnyLogic and your python script possible:
-
The AnyLogic connector ('agent') to be dropped into your simulation model. You can add the library to your Palette. That will allow you to drag and drop the connector into your model. Note that further instructions are required to be followed in order for the connector to work.
-
The library that you will use to create a connection from the python side to the AnyLogic model, also offering multiple configuration options.
At the moment, ALPype is at its earliest stage. You can join the alpype project and raise bugs, feature requests or submit code enhancements via pull request.
If you are financially able to do so and would like to support the development of ALPype, please reach out to marcescandellmari@gmail.com.
The ALPypeOpt software suite is licensed under the terms of the Apache License 2.0. See LICENSE for more information.