evo-dcopf-solver

SkillDev tools

Solves DC-OPF with spinning reserve co-optimization using PuLP/CBC. Extracts LMPs from dual variables, reserve MCP, binding lines.

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the evo-dcopf-solver skill

What this skill tells your AI

The instructions your AI receives, as published by openlair/openskill in tasks-evolved/energy-market-pricing/environment/skills/evo-dcopf-solver/SKILL.md and read by ahel’s review.

Solves DC-OPF with reserve co-optimization using PTDF formulation and PuLP.

Key Functions

  • solve_dcopf_with_reserves(nb, ng, nl, gen_info, branches, costs, load_p, matrices, reserve_capacity, reserve_requirement, Cg) - Main solver
  • extract_lmps(result, int2ext) - Returns list of {bus, lmp_dollars_per_MWh}
  • extract_reserve_mcp(result) - Returns reserve MCP float
  • identify_binding_lines(result, branches, int2ext, threshold=0.99) - Returns binding line dicts
  • compute_total_cost(result) - Returns total cost float

Usage

import sys
sys.path.insert(0, '/app/environment/skills/evo-dcopf-solver/scripts')
from utils import (solve_dcopf_with_reserves, extract_lmps, extract_reserve_mcp,
                   identify_binding_lines, compute_total_cost)

result = solve_dcopf_with_reserves(nb, ng, nl, gen_info, branches, costs,
                                    load_p, matrices, reserve_capacity,
                                    reserve_requirement, Cg)
lmps = extract_lmps(result, int2ext)
reserve_mcp = extract_reserve_mcp(result)
binding = identify_binding_lines(result, branches, int2ext)
total_cost = compute_total_cost(result)

Signals

GitHub stars
89
Forks
4
Last commit
Sep 2026
Advanced
Catalog kind
skill
Gateway key
evo-dcopf-solver
Source
github.com/openlair/openskill