# Integer linear programming (ILP) formulation

> Design, assemble, and rigorously audit modular ILP models, with exact proofs of which constraints are truly ideal.

Integer linear programming (ILP) formulation is a paid AI agent skill on Agensi by Leonid Chindelevitch, in Business & Operations. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $20 (one-time purchase)
- Creator: [Leonid Chindelevitch](https://www.agensi.io/creators/leonid-chindelevitch)
- Category: [Business & Operations](https://www.agensi.io/skills/business-operations)
- Version: 1.0
- Last updated: 2026-06-17
- Security: scan passed (2026-06-17); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/integer-linear-programming-ilp-formulation
- Tags: business-operations, integer-programming, optimization, operations-research, combinatorial-optimization, ilp, milp, linear-programming

## About this skill

Most ILP/MILP modeling goes wrong in one of two ways: the model grows into one unmaintainable file, and people claim their constraints are tight or "ideal" without ever proving it. This skill fixes both.

Developed by a MILP practitioner with over 20 years of experience in industry and academia, this skill guides you through a disciplined five-phase workflow: problem definition → modular formulation → assembly → tightness audit → refinement. Your modular optimization model in GLPK/MathProg is then compiled into the universal LP format. Jump in at any phase: start from scratch, add a constraint module, assemble modules into one runnable file, or audit an existing formulation.

What sets it apart: a real tightness audit. Phase 4 doesn't eyeball your constraints; it proves whether a constraint family is ideal using exact-rational convex-hull / vertex enumeration (the cddlib engine, which ports to Python via pycddlib or to R via rcdd). A seven-check method covers total unimodularity, McCormick envelopes, big-M vs disaggregation, and modern-solver cut recovery, so you stop shipping "valid inequalities" that do nothing and learn which ones actually matter.

Modular by construction. Bundled helpers (assembleModel, parseModule, checkDependencies, findDuplicateNames) merge ordered .mod modules into one runnable model, catch duplicate declarations, and verify dependencies, so large models stay readable across sessions.

Battle-tested, not theoretical. Stress-tested on classic Erwin Kalvelagen's examples and used to audit ILPs from multiple published papers (validated against Gurobi, CPLEX, and CBC). Encodes hard-won heuristics, such as: for modern solvers prioritize model-size reductions over LP-relaxation tightening, since a good cut engine recovers bound tightenings for free but can't shrink a bloated model.

Who it is for: operations researchers, MILP practitioners, and anyone formulating combinatorial problems (job or staff scheduling, vehicle routing, network design) who wants provably correct, tight, maintainable models.

## Requires

- Python

## Known limitations

Does not currently work directly with GAMS
Does not include solver-specific tuning, by design - only sharpens the ILP formulation

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Integer linear programming (ILP) formulation skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### What makes this skill different from a standard AI code generator?

This skill provides a structured framework for building maintainable, modular MILP models and includes a rigorous 'tightness audit' that uses exact-rational arithmetic to prove if your constraints are mathematically ideal.

### Which optimization solvers are supported?

The skill outputs modular GLPK/MathProg code and universal .lp files, making it compatible with all major solvers including Gurobi, CPLEX, CBC, and SCIP.

### How does the skill prove that a constraint is 'ideal'?

The 'tightness audit' (Phase 4) utilizes the cddlib engine to perform vertex enumeration and convex hull analysis, providing an exact proof of whether your formulation is as tight as possible.

### Can I use this skill to audit and improve an existing model I've already written?

Yes, the skill is designed to take existing 'messy' formulations and break them into manageable modules while identifying redundant constraints or loose big-M bounds.

### What is included in the purchase of this skill?

You receive the full five-phase optimization workflow, the core formulation logic, and access to a suite of modular helpers for model assembly and dependency checking.

### What types of optimization problems is this skill best suited for?

It is ideal for complex combinatorial problems like vehicle routing (VRP), job-shop scheduling, and network design where model size and relaxation tightness directly impact solve times.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
