Calculator Inputs
Choose the model size, define your objective, then enter each linear constraint.
Constraints allowed: 1 to 5
Example Data Table
This example models four binary project choices under capacity, budget, and coverage limits.
| Variable | Objective Coefficient | Capacity Coefficient | Budget Coefficient | Coverage Coefficient |
|---|---|---|---|---|
| x1 | 9 | 5 | 2 | 1 |
| x2 | 7 | 3 | 4 | 0 |
| x3 | 8 | 4 | 3 | 1 |
| x4 | 6 | 2 | 5 | 1 |
| Constraint sign / RHS | <= 10 | <= 9 | >= 2 | |
| Best vector | [1, 0, 1, 0] with objective value 17 | |||
Formula Used
Maximize or minimize Z = Σ(ci × xi)
For each rule, calculate Σ(aij × xi) and test it against bj using <=, >=, or =.
Every variable must satisfy xi ∈ {0,1}. This page checks every possible binary vector and returns the best feasible outcome.
How to Use This Calculator
- Choose whether your objective should be maximized or minimized.
- Set the number of binary variables and the number of constraints.
- Enter the objective coefficient for each variable.
- For every constraint, add a label, coefficients, a comparison sign, and a right-hand-side value.
- Press Calculate Optimization to generate the best feasible vector.
- Review the constraint check table, ranked solutions, and feasibility ratio.
- Use the CSV and PDF buttons to save the result section for analysis or sharing.
FAQs
1. What does this calculator solve?
It solves small binary linear optimization problems. Each decision variable can only be zero or one, and the tool returns the best feasible combination.
2. When should I use binary optimization?
Use it when every choice is yes or no. Common examples include project selection, machine activation, campaign picking, staffing choices, and portfolio screening.
3. Can the calculator minimize instead of maximize?
Yes. Switch the objective type to minimize, and the solver will rank feasible binary vectors from lowest objective value to highest.
4. How are constraints evaluated?
For each constraint, the calculator multiplies every coefficient by its binary variable, sums the results, and compares that total with the chosen right-hand side.
5. Why might no feasible solution appear?
Your constraints may conflict. For example, one rule may require too many variables selected while another caps resources too tightly for that to happen.
6. Does the tool support decimal coefficients?
Yes. Objective coefficients, constraint coefficients, and right-hand-side values can be integers or decimals, which helps with weighted scoring and scaled limits.
7. Is this suitable for large optimization models?
It is best for small to medium teaching, planning, and review problems. Large industrial models usually need specialized solvers and stronger computing resources.
8. What do slack, surplus, and binding mean?
Slack shows unused room in a ≤ constraint. Surplus shows extra achievement in a ≥ constraint. Binding means the rule is met exactly.