The Linear Programming (LP) method approaches optimization problems where both the objective function and all constraints are linear functions of the decision variables.
LP seeks to maximize or minimize a linear objective function subject to linear inequality constraints, equality constraints, and variable bounds—guaranteeing that any local optimum is also a global optimum due to the convexity of the feasible region.
Fundamental Components of a Linear Program:
The 3-Step Formulation Process Consider a standard linear program solved via the Linprog interface:
- Decision Variables: Define the vector of unknown variables to be optimized.
- Objective Function Vector: Specify the objective coefficient vector :math:\mathbf{f}, defining the linear cost or performance surface to minimize:
- Constraints & Bounding Domains: Formulate inequality systems , equality restrictions , and lower/upper variable bounds :math:\mathbf{Lb} \le \mathbf{x} \le \mathbf{Ub}.
## Constraint Types in Linprog
The Linprog solver handles three levels of constraint complexity depending on problem parameters: - Inequality Constraints (): Defines the primary polyhedral boundary of the feasible region. - Equality Constraints (): Restricts the feasible solution domain to a lower-dimensional affine subspace or hyperplane within the polyhedron. - Variable Bounds (): Sets direct lower and upper box constraints on individual decision variables, improving solver efficiency.
Comparison: Linprog Formulation Levels Feature | Basic Inequality LP | LP with Equality Constraints | Fully Bounded LP Objective | | | Inequalities | | | Equalities | None | | Variable Bounds | Implicit / Unbounded | Implicit / Unbounded | Explicit (:math:\mathbf{Lb}, \mathbf{Ub})
Example 1: Standard Linear Program with Inequality Constraints
Minimizing a linear objective function subject to a system of linear inequalities defining a 2D polyhedral feasible region:
Example 1C#
Optimal solution found 0.6667 1.3333
Example 2: Linear Program with Inequality and Equality Constraints
Incorporating linear equality constraints to restrict the search space along a hyper-plane intersecting the feasible region:
Example 2C#
Optimal solution found 0 2
Example 3: Fully Constrained Linear Program with Variable Bounds
Enforcing explicit lower () and upper () limits on each decision variable alongside inequality and equality systems:
Example 3C#
Optimal solution found 0.1875 1.2500