The project is broken down into the following modules:
grid_data.py: Contains the power system network data (buses, branches, generators)dc_power_flow.py: Implements DC power flow calculationsunit_commitment.py: Provides a simplified unit commitment optimization model (optional)load_testing.py: Tools for testing the impact of new load placementvisualization.py: Visualization utilities for power system resultsmain.py: Main script that deals with the analysis
- Clone the repository:
git clone git@github.com:HodgeLab/LoadPlacementDeloitte.git
cd LoadPlacementDeloitte- Install required packages:
pip install -r requirements.txtRun the main script with default parameters:
python main.pyThis will test placing a 50 MW load on buses 4 through 9 of the IEEE 9-bus system.
You can customize the analysis with command-line parameters:
python main.py --load-size 75.0 --reactive-load 30.0 --test-buses 4,5,7Parameters:
--load-size: Size of new load to test in MW (default: 50.0)--reactive-load: Reactive component of new load in MVAr (default: 20.0)--test-buses: Comma-separated list of buses to test load placement (default: 4,5,6,7,8,9)
The analysis follows these steps:
- Run a base case DC power flow to establish the initial state of the system
- Perform unit commitment optimization to determine generator dispatch
- Test the impact of placing the new load at each specified bus
- Analyze results and recommend the best bus for load placement
- Generate visualizations to help understand the results
The program can generate various visualizations:
- Network diagram showing buses, lines, and power flows
- Line loading comparison between base case and load addition scenarios
- Generator dispatch schedule from unit commitment
- Bus ranking for load placement recommendations
To add a new power system model:
- Create a new function in
grid_data.pythat returns the system data - Follow the same format as
get_9bus_system()