Package: gymprecice
Gym-preCICEGym-preCICE is a PythonpreCICEadapter fully compliant withGymnasium(also known asOpenAI Gym) API to facilitate designing and developing Reinforcement Learning (RL) environments for single- and multi-physics active flow control (AFC) applications. In an actor-environment setting, Gym-preCICE takes advantage of preCICE, an open-source coupling library for partitioned multi-physics simulations, to handle information exchange between a controller (actor) and an AFC simulation environment. The developed framework results in a seamless non-invasive integration of realistic physics-based simulation toolboxes with RL algorithms.InstallationMain required dependenciesGymnasium:  Installed by default. Refer tothe Gymnasiumfor more information.preCICE: You need to install the preCICE library. Refer tothe preCICE documentationfor information on building and installation.preCICE Python bindings: Installed by default. Refer tothe python language bindings for preCICEfor information.Installing the packageWe support and test for Python versions 3.7 and higher on Linux. We recommend installing Gym-preCICE within a virtual environment, e.g.conda:create and activate a conda virtual environment:condacreate-ngymprecicepython=3.8condaactivategymprecicePIP versioninstall the adapter:python3-mpipinstallgymprecicerun a simple test to checkgympreciceinstallation (this should pass silently without any error/warning messages):python3-c"import gymprecice"The default installation does not include extra dependencies to run tests or tutorials. You can install these dependencies likepython3 -m pip install gymprecice[test], orpython3 -m pip install gymprecice[tutorial], or usepython3 -m pip install gymprecice[all]to install all extra dependencies.Development versionif you are contributing a pull request, it is best to install from the source:gitclonehttps://github.com/gymprecice/gymprecice.gitcdgymprecice
pipinstall-e.
pipinstall-e.[dev]pre-commitinstallTestingWe usepytestframework to run unit tests for all modules in our package. You need to install required dependencies before running any test:python3-mpipinstallgymprecice[test]To run the full test suits:pytest ./testsTo run a specific unit test, e.g. to test core module (core.py):pytest ./tests/test_core.pyUsagePlease refer totutorialsfor the details on how to use the adapter. You can check out theQuickstartin ourtutorialsrepository to try a ready-to-run control case. You need to install some of the required dependencies before running any tutorial:python3-mpipinstallgymprecice[tutorial]Citing UsIf you use Gym-preCICE, please cite the following paper:@misc{shams2023gymprecice,
      title={Gym-preCICE: Reinforcement Learning Environments for Active Flow Control},
      author={Mosayeb Shams and Ahmed H. Elsheikh},
      year={2023},
      eprint={2305.02033},
      archivePrefix={arXiv}
}ContributingSee the contributing guidelinesCONTRIBUTING.mdfor information on submitting issues and pull requests.The TeamGym-preCICE and its tutorials are primarily developed and maintained by:Mosayeb Shams (@mosayebshams) - Lead Developer (Heriot-Watt University)Ahmed H. Elsheikh(@ahmed-h-elsheikh) - Supervisor (Heriot-Watt University)AcknowledgementsThis work was supported by the Engineering and Physical Sciences Research Council grant number EP/V048899/1.LicenseGym-preCICE and its tutorials areMIT licensed.