GitHub - inertialobs/pasta: Parallel Astrodynamic Solver for Trajectory Analysis (PASTA), a orbit optimizer based on PyKEP and with a web ui · GitHub
Skip to content
inertialobsPublic

About

Parallel Astrodynamic Solver for Trajectory Analysis (PASTA), a orbit optimizer based on PyKEP and with a web ui

Resources

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

introducing

License Python Platform

A configuration-driven MGA-1DSM gravity-assist trajectory optimization tool with a browser GUI: configure → parallel search → 3D visualization, all in one page — no Python scripting required.

The name stands for Parallel Astrodynamic Solver for Trajectory Analysis — complex transfer trajectories look like tangled spaghetti.

中文说明见 README_zh.md · Chinese docs in README_zh.md

  • Frontend:Local Web page (http://127.0.0.1:8765)
  • Backend:Flask + JobManager + per-job subprocess + multiprocessing parallel search (scan → refine → ballistic seed → wide/tight compress → pick best)
  • Engine:pykep (mga_1dsm / lambert) + pygmo

Features

  • Configuration as script:a single web page completes "configure → compute → visualize"; the generated config is itself a reproducible full task script (JSON).
  • Six-stage parallel pipeline:scan → refine → ballistic seed → wide J→U compress → tight-frontier compress → pick best;each stage independently toggleable.
  • Fixed random seeds:fixed seeds + pinned numeric library versions → bit-identical reproducibility (same config, same result on repeated runs).
  • Global compute config:one single compute configuration (pipeline toggles / keep percentages / workers); auto-updated on every submit and restored on restart — no per-preset engine settings.
  • 3D visualization:Plotly 3D trajectory + static PNG + structured result.json.

Installation

Three ways to get PASTA:

1. Packaged binary (recommended)

Grab the binary file from the release page and it works out of the box.

2. Source via pip

Requires Windows + Python 3.13 / 3.14. Notice that pykep/pygmo have no official Windows wheels on PyPI, so install them from the prebuilt wheel repository first:

  • Download the matching pykep and pygmo .whl from inertialobs/pykep-pygmo-win-wheels/releases
  • Then:
    pip install <path>\pygmo-*.whl
    pip install <path>\pykep-*.whl
    pip install -r requirements.txt
    python main.py        # default http://127.0.0.1:8765

3. Source via conda

Install pykep/pygmo through conda following the official pykep docs, then install the remaining runtime deps and run from the project dir:

pip install -r requirements.txt
python main.py        # default http://127.0.0.1:8765

CLI examples

python main.py --port 0                              # random free port
python main.py --host 0.0.0.0 --port 8765            # expose to LAN (secure intranet only)

Build the binary yourself (optional)

pip install -r requirements.txt
pip install pyinstaller
pyinstaller build.spec           # output dist\pasta\pasta.exe (onedir)

Usage

  1. Mission config:task name on its own row;planet-sequence nodes addable/removable;per-leg TOF bounds;objective & constraints (min_tof / min_dsm / custom weights, DSM limit, launch/arrival v∞, eta, rp upper bound, frontier penalty);launch windows addable/removable (multiple epochs).
  2. Computation config:4 pipeline stage toggles, worker count, search step, scan/refine keep percentages.
  3. Submit → automatically queued (at most 1 running job; the rest queue).
  4. Result card:total TOF / total DSM / C3, per-leg details (flyby rp, DSM location), 3D plot + static image.
  5. Job management:running / queued / cancel / delete;closing the tab keeps the job running in the background;top-right「⏹」stops the backend.
  6. Presets:task-preset dropdown;loading fills the mission form (with load feedback);「save as…」exports to presets/*.json. The compute form is backed by a single global config (pasta.settings.json), auto-saved on each submit.
  7. System settings:port, expose to LAN, auto-open browser.

Architecture

Browser (Flask web UI)
   └─ JobManager ── Popen subprocess: <pasta.exe> --cli --config ... --outdir ...
        └─ ProcessPoolExecutor(jobs=N) parallel search (scan/refine/compress)
  • Entry main.py:starts Flask; the --cli subprocess mode strips the flag and forwards to the computation entry; the entry calls multiprocessing.freeze_support() (required in PyInstaller frozen builds or the pool workers crash with BrokenProcessPool).
  • Computation entry orbcalc/run_cli.py:loads config → runs the 6 stages → writes artifacts; the error path releases all multiprocessing children in finally.
  • Artifacts(per-job dir runs/<job>/):config.json、log.txt、result.json、plot.json、best_x.npy、trajectory.png.
  • Config-driven:orbcalc/config.py TrajConfig carries every task parameter (defaults kept aligned with the reference implementation).
  • Global settings pasta.settings.json:host / port / open_browser + global compute config;CLI flags override the file.

Layout

main.py                 Web/CLI launcher
build.spec              PyInstaller packaging config
requirements.txt        runtime dependencies (install pyinstaller separately to build)
orbcalc/                engine layer (config / udp / stages / engines / run_cli / settings)
webapp/                 Flask backend + frontend (templates + static)
presets/                built-in + user-exported task presets
runs/<job>/             job artifacts

Acknowledgments

Thanks to Oxygen 5305 for the prototype codes and MifanInSalt for the icon file, and all the friends that offerred tests and helps.

Thanks to the authors and contributors of third party components, without whose help this software could not have been delivered as it is.

Also thanks to Astesia Urbica and Astgenne Urbica from RhineLab LLC. The stars will light our way.

License: GPL-3.0

GPLv3-logo

About

Parallel Astrodynamic Solver for Trajectory Analysis (PASTA), a orbit optimizer based on PyKEP and with a web ui

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages