This guide walks you through your first power system optimization using KPG Run, from launch to results analysis.
Before starting, ensure you have:
KPG Run installed
Julia environment configured with the required packages
Solver Engines: Ipopt, Gurobi and Knitro
Gurobi and Knitro require valid license
Basic understanding of power systems (helpful but not required)
Data Source: Select the test system folder.
Problem Type: Choose ED, UC, DC-OPF, or AC-OPF.
Parameter Configuration: Set the day and any additional options.
Main Workspace
Editor Tab: File editing and customization
Network Data Tab: Tools for data inspection
Time Series Tab: Demand and renewable generation profiles
Console Tab: Real-time solver output
Results Tab: Solution summary and details
Detailed User Interface Guide →
Let’s solve a DC-OPF for the KPG 193 system.
Click DC OPF - DC Optimal Power Flow in the problem type selector.
The interface updates to show DC-OPF-specific options.
Test System:
Select the KPG 193 dataset folder.
Day Selection:
Enter 200 (summer day, mid-July).
Click the Solve button
Monitor console output in real-time:
[DC-OPF] Starting DC Optimal Power Flow...
[DC-OPF] Test system: KPG193_ver1_5
...
Optimization complete: OPTIMAL
Objective value: 6.5328039886964634e7
When KPG Run switches to the Results tab, review the results.
Now let’s solve a 24-hour Unit Commitment problem.
Click UC - Unit Commitment in the problem type selector.
The interface updates to show UC-specific options.
Data Source:
Select the KPG 193 dataset folder.
Day/Period Selection:
Day: 200 (same summer day)
Period: 1 day
Click the Solve button.
Monitor console output in real-time:
[SolverFactory] Available solvers: Ipopt, Gurobi, KNITRO
[UC] Using solver: Gurobi
...
Optimization complete: OPTIMAL
Objective value: 5.918295911596663e7
[SolverFactory] Available solvers: Ipopt, Gurobi, KNITRO
✓ UC commitment saved - you can now use it for DC/AC OPF
When KPG Run switches to the Results tab, review the results.
Try different days:
Day 15: Cold winter, evening peak
Day 75: Moderate spring, high renewables
Day 200: Hot summer, afternoon peak (you just ran this!)
Day 290: Moderate fall, shoulder season
Run same scenario with different models:
# Same day
day = 200
# Economic Dispatch (ignore network)
# DC-OPF (with linearized network)
# AC-OPF (with AC network)
# Compare costs
Export results to GeoJSON:
Click Save to Folder.
Save the file to a directory of your choice.
Open the exported GeoJSON in KPG View.
Full installation: Installation Guide →
Learn the interface: User Interface Guide →
Understand mathematical model: Formulations →