role-algorithms:mathematical-optimization
Installation
SKILL.md
Mathematical Optimization
When to use
- Formulating a real-world problem as a mathematical optimization model
- Choosing between LP, MIP, convex, CSP, or combinatorial approaches
- Selecting the right gradient descent variant for a machine learning or fitting problem
- Solving scheduling, assignment, routing, or bin packing problems
- Applying SAT/SMT solvers or constraint programming for logical constraint problems
- Evaluating solver options (PuLP, CVXPY, OR-Tools, Gurobi, Z3)
Core principles
- Formulate before you code — identify variables, objective, and constraints explicitly before touching a solver
- Tight LP relaxation = faster MIP — every improvement to the relaxation bound shrinks the branch-and-bound tree
- Convexity is the dividing line — convex problems are reliably solvable; non-convex require restarts and heuristics
- Adam is not always the answer — L-BFGS beats Adam on smooth well-conditioned problems with moderate dimension
- CP-SAT over custom backtracking — Google OR-Tools CP-SAT handles constraint propagation and search orders better than hand-rolled solvers