Economic Dispatch

Generator economic dispatch and cost optimization for power systems. Use when minimizing generation costs, computing optimal generator setpoints, calculating operating margins, or working with generator cost functions.

49 stars 5 forksOther

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add UCSB-NLP-Chang/Skill-Usage --skill economic-dispatch
Manual install
git clone --depth 1 https://github.com/UCSB-NLP-Chang/Skill-Usage.git /tmp/Skill-Usage
mkdir -p ~/.claude/skills
cp -r /tmp/Skill-Usage/tasks/energy-market-pricing/environment/skills/economic-dispatch ~/.claude/skills/economic-dispatch

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# Economic Dispatch

Economic dispatch minimizes total generation cost while meeting load demand and respecting generator limits.

## Generator Data Indices

MATPOWER generator array columns (0-indexed):

| Index | Field | Description |
|-------|-------|-------------|
| 0 | GEN_BUS | Bus number (1-indexed) |
| 8 | PMAX | Maximum real power (MW) |
| 9 | PMIN | Minimum real power (MW) |

```python
# Use bus number mapping (handles non-contiguous bus numbers)
bus_num_to_idx = {int(buses[i, 0]): i for i in range(n_bus)}
gen_bus = [bus_num_to_idx[int(g[0])] for g in gens]

pmax_MW = gen[8]
pmin_MW = gen[9]
```

## Cost Function Format

MATPOWER gencost array (polynomial type 2):

| Index | Field | Description |
|-------|-------|-------------|
| 0 | MODEL | 2 = polynomial |
| 1 | STARTUP | Startup cost ($) |
| 2 | SHUTDOWN | Shutdown cost ($) |
| 3 | NCOST | Number of coefficients |
| 4+ | coeffs | Cost coefficients (highest order first) |

For quadratic (NCOST=3): coefficients are [c2, c1, c0] at indices 4, 5, 6
For linear (NCOST=2): coefficients are [c1, c0] at indices 4, 5

Cost = c₂·P² + c₁·P + c₀ ($/hr) where P is in MW.

## Optimization Formulation
Read the full skill on GitHub

Details

Skill name
economic-dispatch
Path
tasks/energy-market-pricing/environment/skills/economic-dispatch/SKILL.md
Repo updated
8 April 2026

FAQ

What does the Economic Dispatch skill do?

Generator economic dispatch and cost optimization for power systems. Use when minimizing generation costs, computing optimal generator setpoints, calculating operating margins, or working with generator cost functions.

How do I install the Economic Dispatch skill?

skills CLI (Claude Code, Cursor, Codex and more): npx skills add UCSB-NLP-Chang/Skill-Usage --skill economic-dispatch. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Economic Dispatch popular?

It lives in UCSB-NLP-Chang/Skill-Usage, which has 49 GitHub stars and 5 forks.

Related skills

Browse the most popular Claude skills, all other skills, or write your own with the skills generator.