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)

Your First Optimization

Interface Overview

  • Solver Selection (left): Choose ED, UC, DC-OPF, or AC-OPF
  • Parameter Configuration (left): Set test system, day, 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 Solver] --> 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 KPG193 system.

Step 1: Select Solver

  • Click ‘DC-OPF’ in the solver type selector (left panel)
  • The interface updates to show DC-OPF-specific options

Step 2: Configure Parameters

Test System:

  • Set Test System Folder to the directory containing the KPG 193 files.

Day Selection:

  • Enter ‘200’ (summer day, mid July).

Step 3: Solve

  • Click ‘Solve’ button
  • Watch console output in real-time:
[DC-OPF] Starting DC Optimal Power Flow...
[DC-OPF] Test system: KPG193_ver1_4
...
Optimization complete: OPTIMAL
Objective value: 6.5328039886964634e7

Step 4: View Results

  • When the view 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 solver selector
  2. Interface shows UC-specific options

Step 2: Configure 24-Hour Problem

Test System:

  • Set Test System Folder to the directory containing the KPG 193 files.

Day/Period Selection:

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

Step 3: Solve

  • Click ‘Solve’ button
  • Watch console output in real-time:
Test system: KPG193_ver1_4 | Day: 200 | Period: 1 day(s) | Solver: Gurobi
...
Optimization complete: OPTIMAL
Objective value: 6.081385067463001e7
✓ UC commitment saved - you can now use it for DC/AC OPF

Step 4: View Results

  • When the view 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

Try different hours:

  • Hour 3: Minimum load (test flexibility)
  • Hour 12: Peak solar generation
  • Hour 18: Evening peak

2. Compare Solvers

Run same scenario with different models:

# Same day, same hour
day = 200
hour = 18
# Economic Dispatch (ignore network)
# DC-OPF (with network)
# AC-OPF (full AC network)
# Compare costs

3. Visualize in KPG View

Export results to GeoJSON:

  1. Click Save to Folder button
  2. Store file to your desired directory
  3. Visualize in KPG View

→ KPG View Guide

Next Steps