Calculator inputs
This page solves two-variable integer linear models. Use bounded constraints for dependable outcomes.
Example data table
| Item | Sample value |
|---|---|
| Objective | Maximize Z = 5x + 4y |
| Constraint 1 | 6x + 4y ≤ 24 |
| Constraint 2 | x + 2y ≤ 6 |
| Integrality | x and y are non-negative integers |
| Expected best integer point | x = 4, y = 0, Z = 20 |
Formula used
Objective model: Z = c1x + c2y
Constraint model: aix + biy ≤, ≥, or = rhsi
LP relaxation bound: Solve the same model without integer limits.
Branch split: If x* is fractional, branch with x ≤ floor(x*) and x ≥ ceil(x*).
Alternative split: If y* is fractional, branch with y ≤ floor(y*) and y ≥ ceil(y*).
Fathoming rule: Stop a node when it is infeasible, integer-feasible, or weaker than the incumbent bound.
This implementation evaluates corner points of the LP relaxation in two dimensions, then applies recursive branching on the most fractional variable.
How to use this calculator
- Choose whether the model should maximize or minimize the objective.
- Enter the objective coefficients for x and y.
- Fill each active constraint row with x, y, relation, and RHS.
- Leave unused constraint rows empty.
- Set a branch-node limit if you want tighter or faster searches.
- Click Solve model to view the result above the form.
- Review the summary, graph, and branch log.
- Use the export buttons for CSV and PDF reports.
FAQs
1) What does this calculator solve?
It solves two-variable integer linear optimization models. The page finds an LP relaxation bound, branches on fractional values, prunes weak nodes, and reports the best integer solution found.
2) Why does this version use only x and y?
Two variables allow an exact corner-point LP relaxation step and a clear plot. This keeps the method transparent, fast, and easy to validate in a browser-based tool.
3) Can I minimize as well as maximize?
Yes. Select minimize or maximize before solving. The bound comparison and incumbent checks adjust automatically to the chosen optimization direction.
4) What does the LP bound mean?
The LP bound is the relaxed optimum before integer restrictions apply. For maximization, it is an upper bound. For minimization, it is a lower bound.
5) Why are some nodes pruned?
A node is pruned when it is infeasible, unbounded, or cannot beat the current incumbent. Pruning reduces unnecessary branching and speeds up the final search.
6) Why might the solver return no integer answer?
That usually means the model is infeasible, unbounded, or the node cap stopped the search early. Tighten the constraints or raise the branch-node limit.
7) What does the Plotly graph show?
The graph marks feasible integer points inside the visible bounded region and highlights the best integer point when one exists. It helps confirm the reported solution visually.
8) Can I enter decimal coefficients and RHS values?
Yes. Coefficients and right-hand sides may be decimals. Only the decision variables stay integer because branch and bound is enforcing integrality on x and y.