Can we integrate anylogic railway simulator with openai gym environment to test some RL algorithms? As a railway environment does not exist in openai gym. Or do you have any suggestions?
Hi Yassine! There are a few things to consider - AnyLogic model is implemented in Java and Gym is implemented in Python. It is, however, possible to integrate them using various approaches: - use Java API for Gym developed as part of DL4J lib; - connect Java and Python directly with some library-bridge like py4j, then you will be able to invoke python methods and java methods from both sides; - use some intermediate data storage, and use callbacks with common Java API. Here's how it works: a) prepare data and save it in the storage; b) invoke Python from Java; c) process data on Python side and save it in the data storage; d) callback Java and apply data in the model. This way does not require any third-party libraries, but here you need intermediate data storage (file or database).
Can we integrate anylogic railway simulator with openai gym environment to test some RL algorithms? As a railway environment does not exist in openai gym. Or do you have any suggestions?
Hi Yassine!
There are a few things to consider - AnyLogic model is implemented in Java and Gym is implemented in Python. It is, however, possible to integrate them using various approaches:
- use Java API for Gym developed as part of DL4J lib;
- connect Java and Python directly with some library-bridge like py4j, then you will be able to invoke python methods and java methods from both sides;
- use some intermediate data storage, and use callbacks with common Java API.
Here's how it works:
a) prepare data and save it in the storage;
b) invoke Python from Java;
c) process data on Python side and save it in the data storage;
d) callback Java and apply data in the model.
This way does not require any third-party libraries, but here you need intermediate data storage (file or database).
...