All Tools

Linear Programming & Constraints Explorer

Set up an objective function and linear constraints, then visualize the feasible region, evaluate corner points, and find the optimal solution. Supports sensitivity analysis and integer programming.

Controls

Z =x +y
x +y
x +y
Non-negativity constraints x ≥ 0 and y ≥ 0 are always included.

Feasible Region

Feasible regionCorner pointOptimalC1C2

Results

Maximize Z=5x+4y\text{Maximize } Z = 5x + 4y
Optimal Solution
x=3.00,y=1.50x^* = 3.00, \quad y^* = 1.50
Z=21.00Z^* = 21.00

Corner Points

PointxyZ
A3.001.5021.00
B4.000.0020.00
C0.003.0012.00
D0.000.000.00

Sensitivity Analysis

Coefficient of x can range from 7.00 to 11.00

Coefficient of y can range from 7.33 to 14.00

Shadow Prices
C1: 0.7500
C2: 0.5000
Step-by-Step Solution
Maximize Z = 5x + 4y
Subject to:
6x + 4y ≤ 24
1x + 2y ≤ 6
x ≥ 0, y ≥ 0
Found 4 corner point(s) in the feasible region.
Evaluating Z at each corner point:
(3.00, 1.50): Z = 5(3.00) + 4(1.50) = 21.00
(4.00, 0.00): Z = 5(4.00) + 4(0.00) = 20.00
(0.00, 3.00): Z = 5(0.00) + 4(3.00) = 12.00
(0.00, 0.00): Z = 5(0.00) + 4(0.00) = 0.00
Optimal solution: (3.00, 1.50) with Z = 21.00
Sensitivity Analysis:
Coefficient of x can range from 7.00 to 11.00
Coefficient of y can range from 7.33 to 14.00
Shadow price for constraint 1: 0.7500
Shadow price for constraint 2: 0.5000

Reference Guide

Linear Programming Setup

A linear program has an objective function to optimize and a set of linear inequality constraints that define what solutions are allowed.

Standard form
Maximize/Minimize Z=ax+by\text{Maximize/Minimize } Z = ax + by
Subject to constraints
aix+biyci,x0,  y0a_i x + b_i y \le c_i, \quad x \ge 0, \; y \ge 0

Feasible Region

Each constraint defines a half-plane. The feasible region is the intersection of all half-planes, including the non-negativity constraints. It forms a convex polygon (or is empty or unbounded).

Key property

The feasible region of a linear program is always convex. If it is bounded, it is a convex polygon with a finite number of vertices.

Corner Point Theorem

If the feasible region is bounded, the optimal value of the objective function occurs at one of the corner points (vertices) of the feasible region.

Algorithm
  1. Find all corner points by intersecting constraint boundary lines
  2. Evaluate the objective function Z at each corner point
  3. Select the corner with the largest (or smallest) value of Z

Sensitivity Analysis

Sensitivity analysis asks how much the objective coefficients or constraint bounds can change before the optimal vertex shifts.

Allowable increase/decrease

Each objective coefficient has a range over which the current optimal solution remains optimal.

Shadow price

The shadow price of a constraint tells you how much the optimal Z value changes per unit increase in that constraint's right-hand side. Non-binding constraints have a shadow price of zero.