Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Explains constrained optimization strategies, including Lagrangian, KKT conditions, penalty and barrier methods, and SciPy SLSQP usage.
91% 100%+9 ptsof test cases passed
Passed 22 of 22 test cases with the skill, and 20 of 22 without it.
I need to symbolically find the critical points for a system derived from setting the gradient of the Lagrangian to zero. Which symbolic computation script target handles solving algebraic derivative systems?
Calls sympy_compute.py with the solve command
3 of 3 safety checks passed
Use this skill when working on constrained-optimization problems in optimization.
Constraint Classification
Lagrangian Method (Equality Constraints)
sympy_compute.py solve "grad_L_system"KKT Conditions (Inequality Constraints)
z3_solve.py prove "kkt_satisfied"Penalty and Barrier Methods
SciPy Constrained Optimization
scipy.optimize.minimize(f, x0, method='SLSQP', constraints=cons)uv run python -c "from scipy.optimize import minimize; cons = dict(type='eq', fun=lambda x: x[0] + x[1] - 1); res = minimize(lambda x: x[0]**2 + x[1]**2, [1, 1], method='SLSQP', constraints=cons); print('Min at', res.x)"
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.