Skip to main content

gridops

tests

gridops is an open-source and customizable grid operations model for three major U.S. interconnections (Western, Eastern, ERCOT). Production cost modeling in gridops utilizes linear DC Optimal Power Flow (DC-OPF) approximation to optimize hourly unit commitment (UC) and economic dispatch (ED) processes over a user-configurable rolling horizon.

Purpose

gridops was created to:

  • Address weather and water dynamics and associated vulnerabilities in U.S. bulk power systems,
  • Link with a wide range of hydrometeorological datasets and energy system/machine learning models to explore future uncertainty in grid operations,
  • Analyze current and future grid stress and reliability trends under a wide range of weather conditions, generation mixes, and demand growth scenarios.
  • Create simple and user-tailored representations of the U.S. interconnections to find a balance between model accuracy and run time to answer research questions of interest.

Installation

pip install gridops

Quickstart

import gridops as go

# Instantiate the model
model = go.Model(
    region="west",              # U.S. Western Interconnection
    problem="linear",           # Linear programming (economic dispatch only)
    solver_name="appsi_highs",  # Using open-source HiGHS solver
    solver_params=None,         # Optional – using default solver parameters
)

# Run for 7 days with a 24-hour rolling horizon
model.run(
    config_file="example_config_file.yml",  # Path to the model configuration file
    n_days=7,                               # Running for 7 days
    horizon_hours=24,                       # Optional – using default 24-hour horizon
)

Configuration file

gridops needs a YAML file that maps each input CSV and NPY files to their file path and each output Parquet to its destination. Check out below for a minimal example (see gridops/data/example_config_file.yml for a full template):

generator_parameters_file: Input/data_genparams.csv
line_parameters_file: Input/line_param.csv
# … all other input entries …
flow_file: Output/flow.parquet
mwh_file: Output/mwh.parquet
# … all other output entries …
restart_file_directory: Restart/

Supported solvers

Solver Interface Notes
HiGHS appsi_highs Open-source; install separately with pip install highspy
Gurobi appsi_gurobi or gurobi Commercial; requires a valid Gurobi license

Users can pass any desired solver parameters via the solver_params:

model = go.Model(
    solver_name="appsi_highs",
    solver_params={"presolve": "on", "solver": "ipm", "time_limit": 3600},
    ...
)

License

BSD-2-Clause – See LICENSE.

Disclaimer

See DISCLAIMER.

Reference

If you use gridops in an academic context, please cite the following article.

Akdemir, K. Z., Oikonomou, K., Kern, J. D., Voisin, N., Ssembatya, H., & Qian, J. (2024). An open-source framework for balancing computational speed and fidelity in production cost models. Environmental Research: Energy, 1(1), 015003. https://doi.org/10.1088/2753-3751/ad1751

Metadata

Release files for gridops 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gridops 1.0.0
File Size Uploaded Provenance Actions
gridops-1.0.0.tar.gz 714.5 kB With provenance Details for gridops-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gridops 1.0.0
File Interpreter ABI Platform Actions
gridops-1.0.0-py3-none-any.whl Python 3 none any Details for gridops-1.0.0-py3-none-any.whl

Total release size: 1.4 MB

Release files / gridops-1.0.0.tar.gz

Download URL gridops-1.0.0.tar.gz
Size 714.5 kB
Tags Source
SHA-256 checksum
How to use checksums
9bdef145618bc4950633c16ff21e17352d5ae89406f214a2d10124d9afe72242
BLAKE2b-256 checksum
How to use checksums
e772a2c95c27030e6fa38a52466d2df7a6afb37baf0b0f81fc7139c6df475d40
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Release files / gridops-1.0.0-py3-none-any.whl

Download URL gridops-1.0.0-py3-none-any.whl
Size 728.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c637673d478a5c37d38d376e9cad60853fbd5b2f39834c0ce3c68724f33aa913
BLAKE2b-256 checksum
How to use checksums
b581aea2fa0aa5a52315c19dd75ca62094af02d62bfaabbeca4dfaaae7bd6bbc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Security for gridops 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for gridops-1.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page