Skip to main content

Python mission modeling framework for Aerie

Project description

pymerlin

pymerlin is a discrete event simulation framework, built for use in the Aerie ecosystem.

To learn more about Aerie, read the Aerie Docs.

TODO:

  • Daemon tasks
  • More interesting cells and resources
  • Conditions on static cells
  • Conditions on autonomous cells
  • Child tasks
  • Spiceypy
  • JPL time
  • pip-installable models
  • build Aerie-compatible jars and provide docker-compose file with python
  • checkpoint restart

Prerequisites

  • python >=3.6.3 (only tested on 3.11 so far...)
  • java >=21

Install pymerlin by running pip install pymerlin

  1. Make a venv python -m venv venv
  2. Activate the venv source ./venv/bin/activate
  3. Install requirements python -m pip install -r requirements.txt
  4. Start jupyter lab jupyter-lab
  5. When jupyter opens, navigate to demo/simulation_example.py
  6. Update the path in the first cell to point to your cloned pymerlin directory (we should eliminate the need for this hack)
  7. 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

If any changes are made to the java code, rebuild the jar and place it in the correct location as follows:

cd java
./gradlew assemble
mv pymerlin/build/libs/pymerlin.jar ../pymerlin/_internal/jars

The jar lives inside of the pymerlin python source directory because that ensures that it will be packaged (and accessible) in a distribution.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pymerlin-0.0.6.tar.gz (22.2 MB view details)

Uploaded Source

Built Distribution

pymerlin-0.0.6-py3-none-any.whl (22.2 MB view details)

Uploaded Python 3

File details

Details for the file pymerlin-0.0.6.tar.gz.

File metadata

  • Download URL: pymerlin-0.0.6.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

Hashes for pymerlin-0.0.6.tar.gz
Algorithm Hash digest
SHA256 7b118ef63a84cdda9cdf2729f2de88de16ed9c9e60198b005f22c4365dd9af89
MD5 90d6663133924f3ec5f07bf8fb647598
BLAKE2b-256 7a8001aad7c2148e6f76a00c5ae882441818e0b0962d94045bcb175aa825a0d2

See more details on using hashes here.

Provenance

File details

Details for the file pymerlin-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: pymerlin-0.0.6-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

Hashes for pymerlin-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 dfa8e8331794ffef2a62f5fb8b698fcf618ced785f55c938d0f3bb59690ff11c
MD5 0de2911c75ff0ef729a9ea3e5541190f
BLAKE2b-256 c6a4236cbc0f3fd1242c9d43ab19126af464e5da2e0570db10c2bfbc0a6c0d55

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page