This project implements a Security-Constrained Unit Commitment (SCUC) model for the IEEE 73-bus system using AMPL. The model optimizes generator scheduling while ensuring system reliability under transmission constraints, generator contingencies, renewable variability, and transmission contingencies. It employs a Benders decomposition approach to iteratively solve subproblems and enforce security constraints.
- Optimizes generator commitment and dispatch for a 24-hour horizon.
- Handles generator and transmission contingencies.
- Incorporates renewable scenario variability using wind data.
- Uses Power Transfer Distribution Factors (PTDF) and Line Outage Distribution Factors (LODF) for power flow calculations.
- Implements Benders cuts to achieve convergence across subproblems.
The repository contains the following files:
- Model Files:
ieee73_scuc_main.mod: Main SCUC model defining base case optimization.scuc_gc_sub.mod: Subproblem for generator contingencies.scuc_rs_sub.mod: Subproblem for renewable scenarios.scuc_rs_gc_sub.mod: Subproblem for renewable scenarios with generator contingencies.scuc_rs_tc_sub.mod: Subproblem for renewable scenarios with transmission contingencies.
- Data Files:
ieee73_sced_bus.dat: Bus data (bus numbers, power demand).ieee73_sced_gen.dat: Generator data (operational parameters, costs).ieee73_sced_branch.dat: Branch data (from/to buses, reactance, thermal ratings).ieee73_scuc_load_deviation24.dat: Load deviation data (max/min deviations).ptdf_ieee73.dat: PTDF matrix for power flow calculations.winds.dat: Wind scenario data.ieee73_scuc_baseload24.dat: Base load data for 24-hour periods.
- Supporting Files:
requirements.txt: Lists dependencies (AMPL, Gurobi).
- AMPL: Install AMPL from ampl.com. Ensure it is added to your system PATH.
- Gurobi Solver: Install Gurobi from gurobi.com with a valid license. Configure the AMPL-Gurobi interface as per AMPL's Gurobi instructions.
- Data Files: Ensure all
.datfiles listed above are present in the working directory.
- Clone the Repository:
git clone https://github.com/your-username/scuc-model.git cd scuc-model - Install AMPL and Gurobi:
- Follow installation instructions for AMPL and Gurobi from their respective websites.
- Verify AMPL can access Gurobi by running:
ampl -v
- Prepare Data Files:
- Place all
.datfiles in the same directory as the.modfiles. - Ensure data files are correctly formatted to match the model’s parameter definitions.
- Place all
-
Run the Model:
- Open AMPL in the project directory.
- Load and solve the main model:
model ieee73_scuc_main.mod; solve;
- The model iteratively solves subproblems, adding Benders cuts until convergence.
-
Outputs:
- Console: Displays total solve time, cut counts (generator, renewable, transmission contingencies), total cost, and spinning reserve allocations.
- Log File: Infeasibility details are logged to
file.log. - Key variables (e.g.,
gen_supply,line_flow,spin) can be displayed using AMPL’sdisplaycommand.
-
Example Commands:
display COST; # Total cost display n_cut_GC, n_cut_RS, n_cut_RSGC, n_cut_RSTC; # Cut counts display sum{t in LOAD, g in GEND} spin[t,g]; # Total spinning reserve
- Objective: Minimize total cost, including generation, startup, no-load, and spinning reserve costs.
- Constraints:
- Unit commitment (startup, minimum up/down times).
- Generation bounds and ramping limits.
- Supply-demand balance and DC power flow.
- Transmission constraints using PTDF and LODF.
- Contingency handling for generators, transmission lines, and renewable scenarios.
- Subproblems:
- Generator contingency: Ensures feasibility post-generator outages.
- Renewable scenario: Accounts for wind variability.
- Renewable with generator contingency: Combines renewable variability and generator outages.
- Renewable with transmission contingency: Combines renewable variability and line outages.
- Convergence: Iterates up to 10 times, adding cuts until no new violations occur.
- The model assumes a 24-hour horizon with hourly load and generation data.
- Radial lines (branches 51 and 88) are excluded from certain LODF calculations.
- Gurobi solver options include
show_statsand suppressed messages for subproblems. - Regulation reserve constraints are commented out and not active.
- Piecewise linear cost segments are not optimized for compactness.
- Data file consistency is critical to avoid infeasibility.
- The model assumes all generators and buses are defined in the provided
.datfiles.
- Infeasibility Errors: Check
file.logfor details on infeasible subproblems (time period, contingency type). - Data Issues: Verify
.datfile formats and consistency with model parameters. - Solver Errors: Ensure Gurobi is licensed and correctly linked to AMPL.
- Convergence Issues: If the model does not converge, check for data inconsistencies or increase
MAX_ITER(default: 10).