Python mission modeling framework for Aerie
Project description
pymerlin
A python modeling framework for Aerie.
TODO:
- Daemon tasks
- More interesting cells and resources
- Conditions on discrete cells
- Conditions on continuous cells
- Child tasks
- Spiceypy
- JPL time
- pip-installable models
- build Aerie-compatible jars and provide docker-compose file with python
Prerequisites
- python >=3.6.3 (only tested on 3.11 so far...)
- java >=21
Install pymerlin by running pip install pymerlin
- Make a venv
python -m venv venv
- Activate the venv
source ./venv/bin/activate
- Install requirements
python -m pip install -r requirements.txt
- Start jupyter lab
jupyter-lab
- When jupyter opens, navigate to
demo/simulation_example.py
- Update the path in the first cell to point to your cloned
pymerlin
directory (we should eliminate the need for this hack) - Run all cells
Architecture
pymerlin is to merlin as pyspark is to spark. This means that pymerlin uses py4j as a bridge between a python process and a java process. This allows pymerlin to use the Aerie simulation engine directly, without having to re-implement it in python.
This means that running simulate
starts a subprocess using java -jar /path/to/pymerlin.jar
.
Approachability over performance
The main tenet of pymerlin is approachability, and its aim is to enable rapid prototyping of models and activities. While where possible, performance will be considered, it is expected that someone who wants to seriously engineer the performance of their simulation will port their code to Java - which has the double benefit of removing socket communication overhead, as well as giving the engineer a single Java process to instrument and analyze, rather than a hybrid system, which may be more difficult to characterize.
Building pymerlin.jar
cd pymerlin-java
./gradlew assemble
mv pymerlin/build/libs/pymerlin.jar ../pymerlin/_internal/jars
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pymerlin-0.0.5.tar.gz
.
File metadata
- Download URL: pymerlin-0.0.5.tar.gz
- Upload date:
- Size: 22.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83384a0e59c722360be8d7f865912716609b0e2ebc6eee5edb6cf75a07bf949e |
|
MD5 | 018c85ad9f80c1f4ae7ff96e63081d6f |
|
BLAKE2b-256 | bbae6bf91d5de813210356a885914ac3393d3cb89fa55ca8a906df8cd7729cbc |
Provenance
File details
Details for the file pymerlin-0.0.5-py3-none-any.whl
.
File metadata
- Download URL: pymerlin-0.0.5-py3-none-any.whl
- Upload date:
- Size: 22.2 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5adb816b6d7123a7cedbe91bb6edcc81474cf238418b03645e6194736199f308 |
|
MD5 | 81da38ba81dee94bc322d96b77da6f4d |
|
BLAKE2b-256 | 309b15aa44700e2676954f8a70f881ebd377e0450d685e400e141053d26261a0 |