Casadi Ipopt Nlp
Nonlinear optimization with CasADi and IPOPT solver. Use when building and solving NLP problems: defining symbolic variables, adding nonlinear constraints, setting solver options, handling multiple initializations, and extracting solutions. Covers power systems optimization patterns including per-unit scaling and complex number formulations.
Install
npx skills add UCSB-NLP-Chang/Skill-Usage --skill casadi-ipopt-nlpgit 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-ac-optimal-power-flow/environment/skills/casadi-ipopt-nlp ~/.claude/skills/casadi-ipopt-nlpPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# CasADi + IPOPT for Nonlinear Programming
CasADi is a symbolic framework for nonlinear optimization. IPOPT is an interior-point solver for large-scale NLP.
## Quick start (Linux)
```bash
apt-get update -qq && apt-get install -y -qq libgfortran5
pip install numpy==1.26.4 casadi==3.6.7
```
## Building an NLP
### 1. Decision variables
```python
import casadi as ca
n_bus, n_gen = 100, 20
Vm = ca.MX.sym("Vm", n_bus) # Voltage magnitudes
Va = ca.MX.sym("Va", n_bus) # Voltage angles (radians)
Pg = ca.MX.sym("Pg", n_gen) # Real power
Qg = ca.MX.sym("Qg", n_gen) # Reactive power
# Stack into single vector for solver
x = ca.vertcat(Vm, Va, Pg, Qg)
```
### 2. Objective function
Build symbolic expression:
```python
# Quadratic cost: sum of c2*P^2 + c1*P + c0
obj = ca.MX(0)
for k in range(n_gen):
obj += c2[k] * Pg[k]**2 + c1[k] * Pg[k] + c0[k]
```
### 3. Constraints
Collect constraints in lists with bounds:
```python
g_expr = [] # Constraint expressions
lbg = [] # Lower bounds
ubg = [] # Upper bounds
# Equality constraint: g(x) = 0
g_expr.append(some_expression)
lbg.append(0.0)
ubg.append(0.0)
# Inequality constraint: g(x) <= limit
g_expr.append(another_expression)
lbg.append(-ca.inf)
ubg.append(limit)
# Two-sided: lo <= g(x) <= hi
g_expr.append(bounded_expression)
lbg.append(lo)
ubg.append(hi)
g = ca.vertcat(*g_expr)
```
### 4. Variable boundsDetails
- Skill name
casadi-ipopt-nlp- Repository
- UCSB-NLP-Chang/Skill-Usage
- Path
tasks/energy-ac-optimal-power-flow/environment/skills/casadi-ipopt-nlp/SKILL.md- Repo updated
- 8 April 2026
FAQ
What does the Casadi Ipopt Nlp skill do?
Nonlinear optimization with CasADi and IPOPT solver. Use when building and solving NLP problems: defining symbolic variables, adding nonlinear constraints, setting solver options, handling multiple initializations, and extracting solutions. Covers power systems optimization patterns including per-unit scaling and complex number formulations.
How do I install the Casadi Ipopt Nlp skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add UCSB-NLP-Chang/Skill-Usage --skill casadi-ipopt-nlp. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Casadi Ipopt Nlp popular?
It lives in UCSB-NLP-Chang/Skill-Usage, which has 49 GitHub stars and 5 forks.
Related skills
Pubchem Database
49UCSB-NLP-Chang/Skill-Usage
Query PubChem via PUG-REST API/PubChemPy (110M+ compounds). Search by name/CID/SMILES, retrieve properties, similarity/substructure searches, bioactivity, for cheminformatics.
Pymatgen
49UCSB-NLP-Chang/Skill-Usage
Materials science toolkit. Crystal structures (CIF, POSCAR), phase diagrams, band structure, DOS, Materials Project integration, format conversion, for computational materials science.
Rdkit
49UCSB-NLP-Chang/Skill-Usage
Cheminformatics toolkit for fine-grained molecular control. SMILES/SDF parsing, descriptors (MW, LogP, TPSA), fingerprints, substructure search, 2D/3D generation, similarity, reactions. For standard workflows with simpler interface, use datamol (wrapper around RDKit). Use rdkit for advanced control, custom sanitization, specialized algorithms.
Custom Distance Metrics
49UCSB-NLP-Chang/Skill-Usage
Define custom distance/similarity metrics for clustering and ML algorithms. Use when working with DBSCAN, sklearn, or scipy distance functions with application-specific metrics.
Finance Skills
40ArogyaReddy/alirezarezvani-claude-skills
Financial analyst agent skill and plugin for Claude Code, Codex, Gemini CLI, Cursor, OpenClaw. Ratio analysis, DCF valuation, budget variance, rolling forecasts. 4 Python tools (stdlib-only).
Reflow Machine Maintenance Guidance
49UCSB-NLP-Chang/Skill-Usage
This skill should be considered when you need to answer reflow machine maintenance questions or provide detailed guidance based on thermocouple data, MES data or defect data and reflow technical handbooks. This skill covers how to obtain important concepts, calculations, definitions, thresholds, and others from the handbook and how to do cross validations between handbook and datasets.
Browse the most popular Claude skills, all finance & crypto skills, or write your own with the skills generator.