Sample Python/Pyomo Codes (ECE6379)

Python Code, by Haoxiang Wan, Mar 05, 2026.

AMPL Codes for Examples in ECE6379 PSOM

This repo provides 30 Python/Pyomo programs, including simple tutorial-level examples and codes for course-level DCOPF, SCUC and LMP examples. They match the AMPL codes that were used for the class ECE6379 Power System Operations and Modeling at University of Houston in 2025 Fall.

Special thanks to our PhD student Haoxiang Wan for translating the AMPL programs into Python programs, including the project codes.

This repo is part of the open source materials for the following course taught by Dr. Xingpeng Li.

  • ECE6379 Power System Operations and Modeling (PSOM) at University of Houston for 2025 Fall

The course materials such as lecture slides and assignments can be found here.

Contact:

Dr. Xingpeng Li

University of Houston

Email: xli83@central.uh.edu

Website: https://rpglab.github.io/

Figshare:

The codes in this repo was initially included in the following package uploaded on Figshare. The link is as follows: https://figshare.com/articles/online_resource/ECE6379_PSOM_zip/17161805

Citation:

Li, Xingpeng: ECE6379_PSOM.zip. figshare. Online resource. https://doi.org/10.6084/m9.figshare.17161805

License:

This work is licensed under the terms of the Creative Commons Attribution 4.0 (CC BY 4.0) license.

Disclaimer:

The author doesn’t make any warranty for the accuracy, completeness, or usefulness of any information disclosed and the author assumes no liability or responsibility for any errors or omissions for the information (data/code/results etc) disclosed.