constrained-optimization

Solve constrained optimization problems using SciPy, SymPy, and Z3.

8|1|Updated Jan 4, 2026
One-click install
npx skills add https://github.com/scooter-lacroix/Maestro --skill constrained-optimization
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: constrained-optimization
Source: https://github.com/scooter-lacroix/Maestro/tree/main/maestro/skills/math/math/optimization/constrained-optimization
Command: npx skills add https://github.com/scooter-lacroix/Maestro --skill constrained-optimization

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides strategies and tools for solving optimization problems where variables are subject to specific limitations or conditions.

Core Features & Use Cases

  • Constraint Handling: Addresses equality, inequality, and bound constraints.
  • Method Implementation: Supports Lagrangian, KKT conditions, penalty/barrier methods, and SciPy's SLSQP.
  • Use Case: Optimize a company's production schedule to maximize profit while adhering to material availability and labor hour constraints.

Quick Start

Use the constrained-optimization skill to solve the KKT conditions for the given problem.

Frequently Asked Questions about constrained-optimization

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

FAQPage Schema
How do I solve constrained optimization problems with equality and inequality constraints in Python?

Solve constrained optimization problems in Python by applying Lagrangian methods, KKT conditions, and SciPy's SLSQP algorithm to handle equality, inequality, and bound constraints deterministically.

What is the best way to maximize profit under material and labor constraints?

Maximize profit under labor and material constraints by formulating the objective function and applying penalty or barrier methods to find the optimal production schedule using mathematical techniques.

Can I use SciPy and SymPy together for KKT conditions calculation?

Use SciPy and SymPy together for constrained optimization by leveraging SymPy for symbolic KKT condition formulation and SciPy for numerical solving via SLSQP to compute deterministic results.

How does the Lagrangian method work for bound constraints?

The Lagrangian method handles bound constraints by incorporating them into the objective function, allowing solvers to find optimal variable values while respecting specified upper and lower limits.

When should I use penalty methods versus barrier methods for constrained optimization?

Use penalty methods when constraints can be violated during iteration and barrier methods when solutions must strictly remain within the feasible region throughout the optimization process.

Does Z3 work with SciPy for deterministic constrained optimization?

Z3 works alongside SciPy and SymPy to provide deterministic problem-solving capabilities for constrained optimization, handling complex mathematical relationships and logical constraints.