---
name: role-algorithms-mathematical-optimization-1a1a071c8423
description: Applies mathematical optimization — linear programming (simplex, interior point, duality), integer/mixed-integer programming (branch-and-bound, cutting planes), convex optimization (gradient descent variants, Adam, L-BFGS, Newton), constraint satisfaction (backtracking, AC-3, SAT/SMT solvers), and combinatorial optimization (VRP, scheduling, assignment, bin packing). Use when formulating optimization problems, selecting solvers, or solving scheduling/allocation/routing problems.
allowed-tools: Read, Grep, Glob, Bash
---

# 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
1. **Formulate before you code** — identify variables, objective, and constraints explicitly before touching a solver
2. **Tight LP relaxation = faster MIP** — every improvement to the relaxation bound shrinks the branch-and-bound tree
3. **Convexity is the dividing line** — convex problems are reliably solvable; non-convex require restarts and heuristics
4. **Adam is not always the answer** — L-BFGS beats Adam on smooth well-conditioned problems with moderate dimension
5. **CP-SAT over custom backtracking** — Google OR-Tools CP-SAT handles constraint propagation and search orders better than hand-rolled solvers

## Reference Files
- `references/linear-and-integer-programming.md` — LP formulation, simplex vs interior point, duality and shadow prices, MIP branch-and-bound, Big-M method, symmetry breaking, solver library options
- `references/convex-and-gradient.md` — convexity verification (Hessian PSD), gradient descent variants (SGD, Adam, L-BFGS), Newton/conjugate gradient second-order methods, CVXPY/SciPy/JAX tooling
- `references/constraint-and-combinatorial.md` — CSP formulation, backtracking + constraint propagation, SAT/SMT solvers (Z3, CDCL), VRP/scheduling/assignment/bin packing patterns, problem classification guide


---
Source attribution: rnavarych
Original project: https://github.com/rnavarych/alpha-engineer/blob/c5b74102c7fd584af3d344ba7c331a7bbec3c729/plugins/roles/role-algorithms/skills/mathematical-optimization/SKILL.md
License: MIT
License information: https://opensource.org/license/mit
Original upstream instructions; downloaded from Mega AI Hub.

## Upstream license notice

MIT License

Copyright (c) 2026 Raman Navarych

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.



# Mega AI Hub resource metadata

Creator / publisher: rnavarych
Original project: https://github.com/rnavarych/alpha-engineer/blob/c5b74102c7fd584af3d344ba7c331a7bbec3c729/plugins/roles/role-algorithms/skills/mathematical-optimization/SKILL.md
Attribution basis: Source repository record

Fields of work: Data & Analytics, Development & Engineering, Operations, Product Management
Roles: Business Process Analyst, Data Analyst, Data Scientist, ML / AI Engineer, Product Manager
Specialties: API
Tools: Cvxpy, Gurobi, Or Tools, Pulp, Z3
Country applicability: Country not specified
Classification basis: Source catalog labels
Instruction SHA-256: dd0b5d1b1f9fd44c45e5f1345a4b7f07b4611f532b81ffbe81654ce2526f2ee4
