How nrel/sdom works
Project Type and Purpose
• SDOM is primarily an optimization framework (MILP) for planning energy storage deployment.
• It is implemented in GAMS (core model) with a companion Python package for data handling and post-processing.
• Its goal is to ingest time-series and techno-economic inputs, solve a MILP, and produce summary outputs.
File Structure
• Root:
• SDOM_1.0.gms – the GAMS model file (defines sets, parameters, variables, equations).
• SDOM_Sol_Summary_Updated.py – Python script for summarizing or post-processing results.
• README.md, LICENSE.
• SDOM_TestCase/ – contains a complete example:
• inputs/ – all CSV and TXT files for load profiles, VRE resource profiles, storage tech, scalars.
• cplex.opt – solver options for CPLEX.
• SDOM_1.0.gms, SDOM_1.0.log, SDOM_1.0.~gm – GAMS run artifacts.
• Output/ – CSV files generated by a test run.
README for Technical Stack
• Core modeling: GAMS MILP with CPLEX solver.
• Python 3.10+ for open-source orchestration and post-processing (likely uses pandas/numpy).
• Input files: flat CSV/TXT files in “inputs” folder.
• Outputs: CSV summaries ready for analysis or visualization.
Main Components and Their Relationships
a. Input Data Store (Folder “inputs”)
• Contains time-series (8760 rows) and techno-economic parameters (scalars.csv, StorageData_2050.csv, CapSolar_2050.csv, etc.).
b. Orchestration Layer (Python Script)
• Reads inputs, may pre-process or validate.
• Optionally writes GAMS data exchange files (e.g., GDX) or directly calls GAMS.
c. Optimization Engine (GAMS Model + Solver)
• SDOM_1.0.gms: defines the MILP formulation (sets, parameters, variables, equations).
• CPLEX configured via cplex.opt.
• Processes inputs and solves the model.
d. Post-Processing Layer (Python Script)
• Parses GAMS output (.log, .lst, .gdx).
• Converts solution into CSV summaries (Output/2050_*.csv).
e. Test Harness (SDOM_TestCase)
• Provides a containerized example run: inputs → model → outputs.
f. External Dependencies
• GAMS software (model compiler).
• CPLEX solver.
• Python runtime (3.10+) and libraries (pandas, numpy).
Architectural Patterns and Design Principles
• Layered architecture: Data layer → Orchestration → Optimization core → Post-processing → Outputs.
• Clear separation of concerns:
• Data ingestion and validation in Python.
• Mathematical formulation and solving in GAMS.
• Reporting and summary back in Python.
• Reusability: The test case folder can be swapped out for new datasets.
• Configurability: Solver options via cplex.opt; time horizon and tech sets via input files.