Guide
Python libraries
The science code is split in two. Numerical integration, aerodynamics, radiation pressure, gravity, magnetics, and the attitude laws are C++17 in cpp/, exposed as arlamx_cpp through pybind11. Geometry, the atmosphere query, the Gymnasium environment, and the trainers are Python. Install the set below from environment.yml.
mamba env create -n arlamx -f environment.yml
mamba activate arlamx
./build.sh
Keep the conda PyTorch
environment.yml selects the conda-forge CPU build of PyTorch and conda-forge Stable-Baselines3. pip install torch on top of that environment replaces it, often with a CUDA wheel, and the trainer stops importing. requirements.txt is only a hint for a machine with no conda. On that path, install a CPU torch from the PyTorch index first, then pip install -r requirements.txt.Installed for the plant and the trainer
| Package | Where it comes from | What ARLAMX uses it for |
|---|---|---|
| Python 3.12 | conda-forge | ./build.sh refuses any other version. The extension is tagged for 3.12. |
| NumPy | conda-forge | Plate arrays, state vectors, and the arrays passed into the C++ simulator. |
| SciPy | conda-forge | Independent checks in python main.py verify and the tests. The plant itself does not integrate with SciPy. |
| PyYAML | conda-forge | Every file under config/. |
| Matplotlib | conda-forge | Decay plots, simplification figures, campaign figures. |
| Gymnasium | conda-forge | ArlamxV2Env. The advisor API the trainers speak. |
| PyTorch | conda-forge, CPU | The policy and value networks. Training is FP32. |
| Stable-Baselines3 | conda-forge | PPO, SAC, and TD3, plus VecNormalize. Cloudpickle rides along so those zips reload. |
| TensorBoard | conda-forge | Logs under outputs/models/<id>/logs/. |
| pymsis | pip, inside the env file | NRLMSIS 2.1 and NRLMSISE-00. It is not on conda-forge. atmosphere.py calls it. |
| trimesh | conda-forge | Loads STL, OBJ, and STEP into vertices and faces for the simplifier. |
| cascadio | pip, inside the env file | OpenCASCADE tessellation so trimesh can read STEP. STL and OBJ do not need it. |
| pybind11 | conda-forge | Generates the Python module from cpp/src/bindings.cpp. ./build.sh asks this interpreter for the CMake directory. |
| CMake, a C++ compiler, make | conda-forge | Build the plant. C++17, position-independent code, no Eigen. |
| pytest | conda-forge | python main.py test. |
Optional
| Package | When |
|---|---|
| reportlab | python main.py plot build_mpc_report writes a PDF. Nothing else imports it. |
| Basilisk | Optional gravity referee. tests/basilisk_ref/ skips cleanly when it is absent. The plant does not link it. |
| CSPICE | The C++ API can load a SPICE kernel for the Sun and Moon. The shipped build does not link CSPICE. The high physics preset uses the analytic Meeus ephemeris. |
Standard library, used directly
The trainers and the command line also use the Python standard library throughout: argparse, pathlib, dataclasses, concurrent.futures for the Monte Carlo tools, and subprocess when main.py launches pytest. Those need no extra install.