Skip to content

An open source library for connecting AnyLogic models with python-based experiments

License

Notifications You must be signed in to change notification settings

MarcEscandell/ALPype

Repository files navigation

ALPype

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

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.

ALPypeRL GIF

ALPypeOpt

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.

ALPypeOpt example

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.

Environments and installation

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.

ALPype Library

  • The library that you will use to create a connection from the python side to the AnyLogic model, also offering multiple configuration options.

    • alpypeopt. Run pip install alpypeopt to get access.
    • alpyperl. Use pip install alpyperl in this case.

Bugs and/or development roadmap

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.

Support ALPype's development

If you are financially able to do so and would like to support the development of ALPype, please reach out to marcescandellmari@gmail.com.

License

The ALPypeOpt software suite is licensed under the terms of the Apache License 2.0. See LICENSE for more information.

About

An open source library for connecting AnyLogic models with python-based experiments

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published