Skip to content

aadriantech/astrosim

Repository files navigation

AstroSim

CI GitHub License: MIT Docs

Open-source, modular simulation framework for modeling, analyzing, and optimizing sustainable human and robotic presence in space — lunar bases, Mars habitats, orbital stations, and deep-space missions.

Current release: v1.2.0 (public · MIT)

Features

  • Modular subsystems: Power, ECLSS, Thermal, Structure, ISRU, Compute/AI, Greenhouse
  • Time-stepped engine with Monte Carlo uncertainty analysis
  • Budgeting: energy, mass, and reliability tracking
  • Interpretation: implications, verdict, references, and recommended actions in study reports
  • Reference validation: compare results to NASA BVAD/OCHMO baselines (--validate)
  • AI hooks: LLM integration points for optimization and insights (offline mode included)
  • Visualization & export: matplotlib plots, HTML web dashboard, JSON/CSV output
  • Plugin system: register custom subsystems via @register_subsystem
  • Analysis: sensitivity sweeps, trade studies, scenario compare/suite, NL scenario editor
  • Example scenarios: lunar base, Mars habitat, greenhouse, closed-loop Mars, orbital station

Quick Start

# Install from GitHub
pip install git+https://github.com/aadriantech/astrosim.git

# Or clone for development
git clone https://github.com/aadriantech/astrosim.git
cd astrosim
pip install -e ".[dev]"

# Run a scenario
astrosim scenarios/greenhouse_lunar.yaml --report --validate --no-plot
# Python API
python examples/run_lunar_base.py
python examples/run_mars_habitat.py

Example output: energy/mass budgets, NASA benchmark PASS/WARN table, engineering verdict, and parameter suggestions (e.g. increase solar or water recovery).

CLI highlights

Flag What it does
--web Interactive HTML dashboard
--report study_report.md + JSON (implications, verdict, actions)
--validate Compare to reference/benchmarks.yaml; writes validation_report.json
--compare Multi-scenario metric table
--suite Run canonical scenario suite
--monte-carlo N Uncertainty summary
--trade-study Solar/battery Pareto grid

Documentation

Doc Description
IO.md Inputs & outputs — scenarios in, reports/dashboards out
ARCHITECTURE.md Engine, subsystems, budgets, events, plugins
SCENARIOS.md YAML/JSON schema, parameters, examples
API.md Public interfaces: Simulator, Subsystem, AIHooks
TUTORIAL.md 15-minute getting started
PLUGIN_COOKBOOK.md Custom subsystem patterns
CONTRIBUTING.md Human contributor guide
CHANGELOG.md Release history
ROADMAP.md Phase completion status (v1.2.0)
Example studies Reproducible lunar/Mars trade reports
AGENTS.md Agent methodology (PDD→TDD→CDD→AYSU)

Build static docs: bash scripts/build_docs.sh

Project Layout

src/astrosim/
  engine/        # Simulation loop and Monte Carlo runner
  subsystems/    # Pluggable habitat subsystem models
  budgeting/     # Energy, mass, reliability accounting
  validation/    # NASA benchmark checks
  export/        # JSON, CSV, study reports, interpretation
  ai/            # LLM hook interfaces
  analysis/      # Sensitivity, compare, suite, trade studies
  visualization/ # Matplotlib + HTML dashboards
reference/       # Official benchmark values (BVAD/OCHMO/ISS)
scenarios/       # YAML scenario definitions
examples/        # Runnable demo scripts
docs/            # Architecture, API, scenarios, contributing

Agent workflow (how this was built)

AstroSim was built with PDD → TDD → CDD → AYSU — open-sourced as ai-coding-scaffold.

Share / promote: copy-paste posts for X, Reddit, HN

Contributing

See CONTRIBUTING.md.

pip install -e ".[dev]"
pytest

Citation

See CITATION.cff for academic use.

License

MIT

About

Open-source space habitat systems simulator — power, ECLSS, ISRU, trade studies with NASA benchmark validation

Topics

Resources

License

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors