Skip to content
Tyler Wolfe-Adam edited this page Oct 29, 2020 · 2 revisions

General explanation

  • Pypeline allows you to call Python code from within a running AnyLogic model by connecting to a local Python installation.
  • With this approach, you can make use of any installed Python libraries on your machine or custom code from an existing solution that you want to incorporate into your AnyLogic model.
  • Due to the nature of its design, you can run any sort of parallel-running AnyLogic experiment (Parameter Variation, Optimization, etc.) without any extra code.
  • JSON support is also included, with functions provided for converting to/from single agents or populations.
  • Pypeline allows you to communicate between Java and Python for cases like:
    • Utilizing code that was previously written in Python without having to port it to Java
    • Writing complex algorithms in Python that you can call in Java, optionally passing objects/data between the languages
    • When a certain library is only available in Python and you do not want to recreate it in Java
    • Using simulation as a testbed for testing trained artificial intelligence policies; useful for examining AI behavior in new situations, not just on historical data

Warnings and caveats about use

  • Pypeline is released as a complimentary library for AnyLogic users. It is not part of the main AnyLogic product, and The AnyLogic Company is not obligated to provide support for users or to provide future support/updates. It’s encouraged to make use of the community features available here on GitHub (issues tab, forking, etc.) or elsewhere online.
  • Using Pypeline is not a substitute for Java, which still remains as the only native scripting language of AnyLogic. You can (and should) build models in the AnyLogic GUI exactly as before, making full use of AnyLogic’s extensive native capabilities.
  • Pypeline will also add some computational overhead to your model and therefore may not be the best option if computational efficiency is a priority in your models.

The library comes provided with demos and example models. Please review them to get some inspiration of possible use cases and to better understand the workflow.