About gtopt

Overview

gtopt** is a high-performance C++ library and solver for Generation and Transmission Expansion Planning (GTEP). It minimizes the total expected cost of operation and expansion of electrical power systems (CAPEX + OPEX).

Key Features

  • Cost Optimization: minimizes investment (CAPEX) and operational (OPEX) costs
  • System Modeling: single-bus or multi-bus DC power flow (Kirchhoff's laws)
  • Multiple Solvers: monolithic LP, SDDP decomposition, and cascade multi-level hybrid
  • Flexible I/O: Parquet (default), CSV, and JSON via Apache Arrow
  • Scalability: sparse-matrix LP/MIP formulation for large-scale grids
  • Pluggable Backends: CLP, CBC, CPLEX, HiGHS loaded dynamically at runtime
  • Web & GUI Services: Next.js REST API and Python/Flask GUI for job management

Architecture

The core library is organized around these key components:

ComponentDescription
PlanningMulti-stage planning problem definition
SystemPower system model (buses, generators, demands, lines, storage, hydro)
PlanningLPLP/MIP formulation assembly and solver orchestration
SimulationLPSingle-simulation LP formulation
InputContextArrow/CSV table cache and I/O
OutputContextSolution output to Parquet/CSV files

Power System Components

ComponentRole
BusElectrical node; reference bus has θ = 0
GeneratorThermal/renewable/hydro unit with variable cost
DemandFixed or flexible load with curtailment penalties
LineTransmission branch with reactance (for Kirchhoff mode)
BatteryEnergy storage with charge/discharge efficiencies
ConverterCouples Battery to Generator (discharge) and Demand (charge)
JunctionHydraulic node in cascaded hydro systems
ReservoirWater storage with volume balance across blocks
TurbineLinks a waterway to a generator for hydro dispatch

Time Structure

The optimization uses a three-level time hierarchy:

  • Scenario – possible future realization (weighted by probability)
  • Stage – investment period (with discount factor)
  • Block – smallest operating period (typically 1 hour)