Calculator Inputs
Use non-negative decision variables and enter constraints in ≤ form with non-negative right-hand-side values.
Example Data Table
This sample matches the built-in example and produces x1 = 1, x2 = 2, and an optimal objective value of 13.
| Row | x1 | x2 | Relation | RHS |
|---|---|---|---|---|
| Objective (Max Z) | 3 | 5 | = | - |
| Constraint 1 | 2 | 3 | ≤ | 8 |
| Constraint 2 | 2 | 1 | ≤ | 4 |
| Constraint 3 | 1 | 2 | ≤ | 5 |
Formula Used
Objective: Maximize or minimize Z = c1x1 + c2x2 + ... + cnxn
Constraints: a11x1 + a12x2 + ... + a1nxn ≤ b1, and similarly for each row.
Slack variables: si = bi − Σ(aijxj), converting each inequality to an equality.
Pivot ratio: ratio = RHS / pivot-column entry, using the smallest positive ratio.
The simplex method starts from a basic feasible solution built with slack variables. Each pivot selects the most negative reduced cost in the objective row, then performs row operations to replace one basic variable with a better entering variable.
For minimization, this page transforms the model into an equivalent maximization form internally, solves it with simplex pivots, and reports the original objective value.
How to Use This Calculator
- Choose whether you want to maximize or minimize the objective.
- Set the number of decision variables and constraints, then rebuild the grid if needed.
- Enter all objective coefficients in the top section.
- Fill every constraint row using ≤ form and non-negative right-hand-side values.
- Click Solve Simplex to generate the optimal solution, slack values, iteration tables, and chart.
- Use the CSV or PDF buttons after solving to export your results.
Frequently Asked Questions
1. What kind of models can this calculator solve?
It solves linear programming models with non-negative variables, ≤ constraints, and non-negative right-hand-side values. It supports both maximization and minimization objectives through a simplex tableau workflow.
2. Why are slack variables shown in the results?
Slack variables measure unused capacity in each constraint. A zero slack value means the constraint is binding at the current solution, while a positive slack shows remaining room.
3. What does the objective chart represent?
The Plotly graph tracks the objective value from the starting tableau through each pivot step. It helps you see whether the simplex path is improving steadily.
4. What does an unbounded result mean?
An unbounded result means the selected objective can improve indefinitely without violating the entered constraints. This usually indicates missing limits in the model.
5. Can I use decimal coefficients?
Yes. The inputs accept integers and decimals. The solver keeps internal floating-point values and displays rounded results for readability in the summary and tableau sections.
6. Why must the right-hand side stay non-negative?
This implementation uses a standard simplex setup that starts from slack-variable feasibility. Negative right-hand-side values may require extra transformations or a two-phase method.
7. Does the calculator show every tableau step?
Yes. After solving, it lists the initial tableau and every pivoted tableau, along with the entering variable, pivot row, and current objective value.
8. What is included in the CSV and PDF exports?
The exports include solution summaries, slack values, and iteration details. The PDF captures the visible results section, while the CSV stores the numerical tables.