integer-programming

Solve integer programming and constraint satisfaction problems with OR-Tools CP-SAT.

1|Updated Feb 24, 2026
One-click install
npx skills add https://github.com/dzackgarza/ai --skill integer-programming-dzackgarza
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: integer-programming
Source: https://github.com/dzackgarza/ai/tree/main/opencode/skills/integer-programming
Command: npx skills add https://github.com/dzackgarza/ai --skill integer-programming-dzackgarza

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automates modeling and solving integer programming and constraint satisfaction problems using CP-SAT in OR-Tools.

Core Features & Use Cases

  • Modeling CP-SAT: define integer variables and linear constraints to capture combinatorial problems.
  • Solution discovery: obtain feasible or optimal solutions for scheduling, packing, and numeral puzzle problems.
  • Translation to runnable code: convert mathematical formulations into Python models using ortools.sat.

Quick Start

Install OR-Tools and run the provided CP-SAT examples to model and solve a sample integer programming problem.

Frequently Asked Questions about integer-programming

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Can I use OR-Tools to find feasible solutions without optimizing an objective function?

Yes, OR-Tools CP-SAT can find feasible solutions by defining integer variables and linear constraints without specifying an objective function, allowing you to check if a valid configuration exists.

How do I solve integer programming problems using CP-SAT in Python?

To solve integer programming problems with CP-SAT in Python, you use OR-Tools to define integer variables, set linear constraints, and configure an objective function to find feasible or optimal solutions.

What is the process for modeling combinatorial optimization with OR-Tools?

Modeling combinatorial optimization with OR-Tools involves translating mathematical formulations into Python code using the ortools.sat module to define variables, constraints, and objective functions.

How do I define linear constraints for resource allocation tasks in CP-SAT?

Defining linear constraints for resource allocation in CP-SAT requires creating integer variables for resources and applying ortools.sat linear expressions to bound capacities before solving.

Can I use OR-Tools to find feasible solutions without optimizing an objective function?

Yes, OR-Tools CP-SAT can find feasible solutions by defining integer variables and linear constraints without specifying an objective function, allowing you to check if a valid configuration exists.

Do I need to install OR-Tools to use CP-SAT for scheduling and packing problems?

Yes, you must install the OR-Tools Python package to use CP-SAT for modeling and solving scheduling, packing, and numeral puzzle problems across math and resource allocation tasks.