Skip to main content

Open Stochastic Daily Unit Commitment of Thermal and ESS Units (openSDUC) - Version 1.3.34 - January 19, 2026

Project description

logo

PyPI versions docs AGPL pepy

Open Stochastic Daily Unit Commitment of Thermal and ESS Units (openSDUC)

It determines the system operation for supplying the demand at minimum cost.

The openSDUC model presents a decision support system for defining the generation operation of a large-scale electric system.

The scope of the model corresponds to one day or one week, divided into load levels: 01-01 00:00:00+01:00 to 01-21 23:00:00+01:00. The time division allows a flexible representation of the periods for evaluating the system operation. For example, by 84 periods of two hours or by 168 hours of the week.

It considers stochastic short-term yearly uncertainties (scenarios) related to the system operation. The operation scenarios are associated with renewable energy sources and electricity demand.

The model formulates an optimization problem including binary and continuous operation decisions.

The unit commitment (UC) model is based on a tight and compact formulation including operating reserves. It considers different energy storage systems (ESS), e.g., pumped-storage hydro, battery, etc.

The main results of the model can be structured into these topics:

  • Operation: the output of different units and technologies (thermal, storage hydro, pumped-storage hydro, RES), RES curtailment

  • Emissions: CO2

  • Marginal: Short-Run Marginal Costs (SRMC)

A careful implementation has been done to avoid numerical problems by scaling parameters, variables, and equations of the optimization problem, allowing the model to be used for large-scale cases.

Installation

There are 2 ways to get all the required packages under Windows. We recommend using the Python distribution Miniconda. If you don’t want to use it or already have an existing Python (version 3.11) installation, you can also download the required packages by yourself.

Solvers

HiGHS

The HiGHS solver can also be used. It can be installed using: pip install highspy. This solver is activated by calling the openTEPES model with the solver name ‘appsi_highs’.

Gurobi

Another recommendation is the use of Gurobi solver. However, it is commercial solver but most powerful than open-source solvers for large-scale problems. As a commercial solver it needs a license that is free of charge for academic usage by signing up in Gurobi webpage. You can also ask for an evaluation license for 30 days to test the solver. It can be installed using: conda install -c gurobi gurobi and then ask for an academic or commercial license. Activate the license in your computer using the grbgetkey command (you need to be in a university internet domain if you are installing an academic license).

GLPK

As an easy option for installation, we have the free and open source GLPK solver. However, it takes too much time for large-scale problems. It can be installed using: conda install glpk.

CBC

The CBC solver is also another free and open-source solver. For Windows users, the effective way to install the CBC solver is to download the binaries from this site, copy and paste the cbc.exe file to the PATH that is the “bin” directory of the Anaconda or Miniconda environment. Under Linux, it can be installed using: conda install -c conda-forge coincbc.

Mosek

Another alternative is the Mosek solver. Note that it is a commercial solver and you need a license for it. Mosek is a good alternative to deal with QPs, SOCPs, and SDPs problems. You only need to use conda install -c mosek mosek for installation and request a license (academic or commercial). To request the academic one, you can request here. Moreover, Mosek brings a license guide. But if you are request an academic license, you will receive the license by email, and you only need to locate it in the following path C:\Users\<username>\mosek in your computer.

GAMS

The openTEPES model can also be solved with GAMS and a valid GAMS license for a solver. The GAMS language is not included in the openTEPES package and must be installed separately. This option is activated by calling the openTEPES model with the solver name ‘gams’.

Users

If you are not planning on developing, please follows the instructions of the Installation.

Once installation is complete, openSDUC can be executed in a test mode by using a command prompt. In the directory of your choice, open and execute the openSDUC_run.py script by using the following on the command prompt (Windows) or Terminal (Linux). (Depending on what your standard python version is, you might need to call python3 instead of python.):

openSDUC_main

Then, four parameters (case, dir, solver, and console log) will be asked for.

Remark: at this step, only press enter for each input and openSDUC will be executed with the default parameters.

After this, in a directory of your choice, make a copy of the 16g case to create a new case of your choice but using the current format of the CSV files. A proper execution by openSDUC_Main can be made by introducing the new case and the directory of your choice. Note that the solver is glpk by default, but it can be changed to other solvers that Pyomo supports (e.g., gurobi, mosek).

Then, the results should be written in the folder that is called with the case name. The results contain plots and summary spreadsheets for multiple optimized energy scenarios, periods, and load levels as well as the investment decisions.

Note that there is an alternative way to run the model by creating a new script script.py, and write the following:

from openSDUC.openSDUC import openSDUC_run

openSDUC_run(<case>, <dir>, <solver>)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

opensduc-1.3.34.tar.gz (433.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

opensduc-1.3.34-py3-none-any.whl (70.9 kB view details)

Uploaded Python 3

File details

Details for the file opensduc-1.3.34.tar.gz.

File metadata

  • Download URL: opensduc-1.3.34.tar.gz
  • Upload date:
  • Size: 433.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.32.5

File hashes

Hashes for opensduc-1.3.34.tar.gz
Algorithm Hash digest
SHA256 70298dc402ed48779906639a3e5a11433a5ddc65c2bced37008f4c4719618fbb
MD5 34907d1adcf5d029ee3fc76a82c00b23
BLAKE2b-256 293e3d022319414ae74763260b7a553774a82bd53427c9be71ab32111a1f55a3

See more details on using hashes here.

File details

Details for the file opensduc-1.3.34-py3-none-any.whl.

File metadata

  • Download URL: opensduc-1.3.34-py3-none-any.whl
  • Upload date:
  • Size: 70.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.32.5

File hashes

Hashes for opensduc-1.3.34-py3-none-any.whl
Algorithm Hash digest
SHA256 2f2b00bdc70646fd7715aedfd0829a4bdc50b46f5f4e1cdbfcb77230ee43828e
MD5 bb9fd163bfe6dda0abbaae4a7914bcee
BLAKE2b-256 0fbcc6ac468af5193f30d50f00c6fad3c079c50a0ec03f1e72ac1cd242aa9cd9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page