Binary Linear Programming Solver Calculator

Model yes-no decisions with flexible constraints and weights. Review exact solutions, slack, feasibility, and rankings. Explore optimal combinations visually before applying decisions in practice.

Build and Solve Your Model

This exact solver checks every binary pattern, so larger models take longer.

Exact search limit: 18 variables
Choose 1 to 18 binary variables.
Choose 1 to 25 linear constraints.
Pick the direction for the objective function.
Small values help manage equality rounding.
Controls the ranked feasible solutions table.
Comma-separated labels. Blank names become x1, x2, x3.

Objective Coefficients

Each coefficient multiplies a binary decision variable.

Constraint Matrix

For each constraint, enter coefficients, a relation sign, and a right-hand-side value.
The page stays single-column overall, while fields switch to 3, 2, and 1 columns responsively.

Example Data Table

The default example models a yes-no selection problem. The objective is to maximize total value.

Variable Objective Coefficient Constraint C1 Coefficient Constraint C2 Coefficient Constraint C3 Coefficient
x1 14 6 1 0
x2 8 4 1 1
x3 11 5 1 0
x4 6 3 0 1

C1: 6x1 + 4x2 + 5x3 + 3x4 ≤ 10

C2: x1 + x2 + x3 ≥ 1

C3: x2 + x4 ≤ 1

Formula Used

Objective: Maximize or Minimize

Z = Σ(cixi)

Constraints:

Σ(aj,ixi) ≤ bj,   Σ(aj,ixi) ≥ bj,   or   Σ(aj,ixi) = bj

Binary Rule:

xi ∈ {0, 1}

This calculator solves the model exactly by evaluating every binary pattern. It then keeps only feasible solutions and returns the best objective value.

How to Use This Calculator

  1. Choose the number of binary variables and constraints.
  2. Select whether the objective should be maximized or minimized.
  3. Enter optional variable names, separated by commas.
  4. Fill the objective coefficients for every variable.
  5. Enter each constraint row, relation sign, and right-hand-side value.
  6. Set a small tolerance when equality constraints may create rounding noise.
  7. Click Solve Model to generate the exact optimal result.
  8. Review the optimal assignment, constraint slack, ranked feasible solutions, and Plotly graphs.
  9. Use the CSV and PDF buttons to download the result summary.

FAQs

1) What does binary mean in this model?

Each decision variable can only be 0 or 1. That usually represents no or yes, reject or choose, or off or on.

2) Does this calculator support maximization and minimization?

Yes. Change the objective type selector before solving. The same constraint system can be used for either direction.

3) Why is there an 18-variable limit?

This page uses exact enumeration. It checks every binary pattern, so the workload doubles whenever one more variable is added.

4) What happens when no feasible solution exists?

The solver reports that no feasible binary pattern satisfies all constraints. You should then adjust coefficients, bounds, or relation signs.

5) What is slack, surplus, or deviation?

Slack measures unused room for ≤ constraints. Surplus measures excess for ≥ constraints. Deviation shows the absolute difference for = constraints.

6) What makes a constraint binding?

A constraint is binding when the optimal solution touches the limit within the chosen tolerance. Binding constraints often drive the final answer.

7) Can I use decimal coefficients?

Yes. Objective coefficients, constraint coefficients, and right-hand-side values can all be decimals.

8) When is binary linear programming useful?

It is useful for selection, assignment, scheduling, facility choice, project approval, portfolio picking, and other yes-no optimization decisions.

Related Calculators

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.