casadi-ipopt-nlp

Formulate and solve nonlinear optimization problems with CasADi and IPOPT.

Updated Jan 15, 2026
One-click install
npx skills add https://github.com/KaiserWhoLearns/skillsbench --skill casadi-ipopt-nlp
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: casadi-ipopt-nlp
Source: https://github.com/KaiserWhoLearns/skillsbench/tree/main/tasks/energy-ac-optimal-power-flow/environment/skills/casadi-ipopt-nlp
Command: npx skills add https://github.com/KaiserWhoLearns/skillsbench --skill casadi-ipopt-nlp

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Nonlinear optimization problems in energy systems require robust mathematical modeling and reliable solvers to obtain feasible, optimal operating points.

Core Features & Use Cases

  • Symbolic formulation of NLPs using CasADi
  • IPOPT-based solver for large-scale nonlinear programming problems
  • Supports multiple initializations and extraction of solutions in power-system contexts
  • Per-unit scaling and complex-number formulations coverage for realistic models

Quick Start

Use CasADi with IPOPT to define an NLP, configure solver options, and extract the optimal values for variables such as voltages, power, and angles.

Frequently Asked Questions about casadi-ipopt-nlp

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I formulate nonlinear optimization problems for power systems using CasADi and IPOPT?

To formulate nonlinear optimization for power systems, you use CasADi for symbolic variable construction and IPOPT to solve the large-scale NLP, enabling you to extract optimal values for voltages, power, and angles.

What is the best way to configure an IPOPT solver for large-scale power-system NLPs?

Configuring an IPOPT solver for power-system NLPs involves setting solver options within the CasADi interface to handle nonlinear constraints and per-unit scaling, ensuring the solver reliably converges on feasible operating points.

Do I need Python integration to build and solve NLP models with CasADi and IPOPT?

Yes, Python integration is required for model creation, constraint handling, and result retrieval, acting as the bridge to define symbolic variables and pass them to the IPOPT solver for optimization.

How do I extract solutions and debug NLP models when IPOPT fails to converge?

To debug NLP models and extract solutions, you can use multiple initializations in CasADi to help the IPOPT solver converge, then retrieve the optimal variable values directly from the solver object.

Why does my CasADi NLP solver return infeasible results for power system optimization?

Infeasible NLP results often stem from poorly defined nonlinear constraints or inadequate per-unit scaling, which you can resolve by adjusting solver configuration and testing multiple initializations in CasADi.