User Guide Overview

Welcome to the Steel Model User Guide. This section contains comprehensive documentation for users and developers working with the Steel Model simulation system.

Contents

Installation Guide

Step-by-step installation instructions for developers. Covers:

  • Basic installation: Clone repository, set up virtual environment with uv, install dependencies

  • Running tests: pytest, coverage reports, wind/PV tests

  • Static type checking: mypy configuration and usage

  • Managing dependencies: Adding, updating, and upgrading packages with uv

  • Building the package: Creating distribution packages

  • Jupyter notebooks: Running interactive analysis notebooks

  • Standalone application: Building Electron apps via GitHub Actions

  • System requirements: CBC solver installation for different platforms

Running Simulations Locally

Complete guide to running steel model simulations on your local machine. Covers:

  • Three execution methods: Programmatic (Python/Notebook), Command-Line Interface (CLI), and Django Web Interface

  • Data pipeline architecture: From S3 storage through local caching to simulation execution

  • Caching system: Content-based caching for faster repeated simulations

  • Configuration examples: Technology constraints, custom paths, and simulation parameters

  • Troubleshooting: Common issues and debugging tips

  • Output files: Understanding simulation results and visualizations

Scenario Viewer

Browsing and comparing the results of local runs, offline. Covers:

  • Opening it: steelo-viewer from the command line, or Scenario viewer in the app

  • Filters and scenarios: How the viewer groups runs, and how run names are made unique

  • The panes: Explore, Compare, Annual costs, View data and Download results

  • Rebuilding a run’s viewer files: steelo-viewer regenerate

CLI Commands

Reference documentation for all command-line interface tools:

  • run_simulation: Main command to run simulations with automatic data preparation and caching

  • steelo-viewer: Serve the scenario viewer for local runs, or rebuild a run’s viewer files

  • steelo-data-prepare and steelo-data-recreate: Prepare the data files a simulation needs

  • generate-geo-options: List the sub-national geography keys the master workbook can use

  • list-binaries: View available Steel Model standalone binaries on S3

  • download-binaries: Download specific builds of the Electron app

  • download-latest: Get the latest version of the Electron app for your platform

Each command includes usage examples, options, and practical tips.

Configuration

Comprehensive guide to configuring the Steel Model simulation:

  • SimulationConfig: Central configuration object for all simulation parameters

  • Path configuration: Custom data sources and output directories

  • Technology settings: Controlling which technologies are available and when

  • Economic parameters: Carbon pricing, capital costs, discount rates

  • Geographic constraints: Land use, infrastructure, and renewable energy

  • Environment variables: System-wide configuration options

Master Input Reference

What the master input workbook’s columns may contain and what the model does with them:

  • Per sheet: allowed values, effect in the model, rules enforced at data preparation

  • Parameters that interact: the simulation levers that change how a sheet is used

  • Being built up sheet by sheet, starting with the China capacity-replacement policy sheets

Logging Guide

Understanding and controlling simulation logging:

  • Log levels: DEBUG, INFO, WARNING, ERROR, CRITICAL

  • Configuring loggers: Module-specific logging control

  • Output destinations: Console, file, and structured logging

  • Debugging workflows: Using logs to troubleshoot issues

  • Performance logging: Tracking simulation performance metrics

Quick Start

For Developers (from source)

See the Installation Guide for complete setup instructions:

  1. Clone and set up:

    git clone git@github.com:systemiqofficial/steel-model.git
    cd steel-model
    uv venv -p python3.13
    source .venv/bin/activate
    uv sync
    
  2. Run tests:

    pytest
    
  3. Run a simulation:

    run_simulation
    

For Package Users

  1. Install the package:

    uv add steel-model
    
  2. Prepare data (automatic):

    run_simulation
    

    The run_simulation command automatically downloads and prepares all required data.

  3. Run a simulation:

    run_simulation --start-year 2025 --end-year 2030
    

Common Workflows

Running a Quick Test

# Short simulation for testing
run_simulation --start-year 2025 --end-year 2027 --log-level INFO

Using Custom Data

# Prepare data from your own master Excel and run the simulation on it
run_simulation --master-excel path/to/your/master_input.xlsx

Web Interface

# Set up Django (first time only)
cd src/django
python manage.py migrate

# Start the web server
python manage.py runserver

Then open http://localhost:8000 in your browser. The app starts a background worker itself when the Simulations page first loads, asking for a confirmation only when memory is short. Prepare data under Master Excel in the navigation bar, with Prepare Data with This Master Excel on a workbook’s page.

Key Concepts

Data Pipeline

The Steel Model uses a structured data flow:

  1. S3 Storage: Raw data packages (core-data, geo-data, master Excel)

  2. Local Cache: Downloaded packages cached in ~/.steelo/data_cache/

  3. Data Preparation: Transform raw data into JSON repositories

  4. Preparation Cache: Processed data cached in ~/.steelo/preparation_cache/

  5. Simulation: Uses prepared fixtures for fast execution

Caching System

  • Content-based: Cache keys derived from master Excel file hash

  • Automatic reuse: Same inputs = instant cache hit

  • Version tracking: Automatic invalidation when code changes

  • Cache commands: steelo-cache stats, steelo-cache clear, etc.

Configuration Hierarchy

  1. Environment variables: System-wide defaults (e.g., STEELO_HOME)

  2. SimulationConfig: Explicit configuration object

  3. Command-line flags: Override defaults for specific runs

Getting Help

Documentation

Troubleshooting

Common issues and solutions are documented in:

Support

  • Issue Tracker: Report bugs and request features

  • Documentation: Comprehensive guides and API references

  • Community: Share experiences and get help