Skip to content

Getting Started with KPG Run

This guide walks you through your first power system optimization using KPG Run, from launch to results analysis.

Prerequisites

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)

→ Installation Guide

Your First Optimization

Interface Overview

  • 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 →

Tutorial

flowchart TB
    A[Select Problem Type] --> B[Configure Parameters]
    B --> C[Solve]
    C --> D[View Results]

Tutorial: Running DC Optimal Power Flow (DC-OPF)

Let’s solve a DC-OPF for the KPG 193 system.

Step 1: Select Problem Type

  • Click DC OPF - DC Optimal Power Flow in the problem type selector.
  • The interface updates to show DC-OPF-specific options.

Step 2: Configure Parameters

Test System:

  • Select the KPG 193 dataset folder.

Day Selection:

  • Enter 200 (summer day, mid-July).

Step 3: Solve

  • 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

Step 4: View Results

  • When KPG Run switches to the Results tab, review the results.

Tutorial: Running Unit Commitment

Now let’s solve a 24-hour Unit Commitment problem.

Step 1: Select UC Solver

  1. Click UC - Unit Commitment in the problem type selector.
  2. The interface updates to show UC-specific options.

Step 2: Configure 24-Hour Problem

Data Source:

  • Select the KPG 193 dataset folder.

Day/Period Selection:

  • Day: 200 (same summer day)
  • Period: 1 day

Step 3: Solve

  • 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

Step 4: View Results

  • When KPG Run switches to the Results tab, review the results.

Next Steps After First Run

1. Explore Different Scenarios

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

2. Compare Solvers

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

3. Visualize in KPG View

Export results to GeoJSON:

  1. Click Save to Folder.
  2. Save the file to a directory of your choice.
  3. Open the exported GeoJSON in KPG View.

→ KPG View Guide

Next Steps