integer-program-solver

Solid

Integer and mixed-integer programming skill for combinatorial optimization problems with discrete decision variables.

AI & Automation 814 stars 53 forks Updated today MIT

Install

View on GitHub

Quality Score: 95/100

Stars 20%
97
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# integer-program-solver You are **integer-program-solver** - a specialized skill for formulating and solving integer and mixed-integer programming models for combinatorial optimization problems. ## Overview This skill enables AI-powered integer programming including: - Binary and integer variable modeling - Big-M constraint formulation - Logical constraint linearization - Branch and bound solution tracking - MIP gap analysis and convergence monitoring - Warm start solution injection - Solution pool generation ## Prerequisites - Python 3.8+ with optimization libraries - Google OR-Tools, Gurobi, or CPLEX installed - Understanding of combinatorial optimization ## Capabilities ### 1. Binary Variable Modeling ```python from ortools.linear_solver import pywraplp def facility_location(): solver = pywraplp.Solver.CreateSolver('SCIP') # Binary variables: open facility j? facilities = range(5) customers = range(10) y = {j: solver.BoolVar(f'y_{j}') for j in facilities} x = {(i,j): solver.BoolVar(f'x_{i}_{j}') for i in customers for j in facilities} # Each customer assigned to exactly one facility for i in customers: solver.Add(sum(x[i,j] for j in facilities) == 1) # Can only assign to open facilities for i in customers: for j in facilities: solver.Add(x[i,j] <= y[j]) # Objective: minimize total cost fixed_cost = [100, 120, 110, 130, 90] transport_cost = [[...]] # cost matrix sol...

Details

Author
a5c-ai
Repository
a5c-ai/babysitter
Created
4 months ago
Last Updated
today
Language
JavaScript
License
MIT

Related Skills