0% found this document useful (0 votes)
58 views

Linear Programming Overview

The document discusses solving the diet problem using linear programming. The diet problem aims to select a set of foods to meet daily nutritional requirements at minimum cost, given nutrient information and costs for different foods. It provides an example with 3 foods, and constraints on calories and vitamin A. The problem is formulated as a linear program to minimize total food cost subject to constraints on minimum/maximum nutrient levels and minimum/maximum servings for each food. Solver in Excel can be used to find the optimal solution.

Uploaded by

YASH JHERWAL
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
58 views

Linear Programming Overview

The document discusses solving the diet problem using linear programming. The diet problem aims to select a set of foods to meet daily nutritional requirements at minimum cost, given nutrient information and costs for different foods. It provides an example with 3 foods, and constraints on calories and vitamin A. The problem is formulated as a linear program to minimize total food cost subject to constraints on minimum/maximum nutrient levels and minimum/maximum servings for each food. Solver in Excel can be used to find the optimal solution.

Uploaded by

YASH JHERWAL
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Linear Programming Overview

Using linear programming requires defining variables, finding constraints and finding the
objective function, or what needs to be maximized. In some cases, linear programming is
instead used for minimization, or the smallest possible objective function value. Linear
programming requires the creation of inequalities and then graphing those to solve
problems. While some linear programming can be done manually, quite often the variables
and calculations become too complex and require the use of computational software.

1
Introduction
The problem of solving a system of linear inequalities dates back at least as far as Fourier,
who in 1827 published a method for solving them,[1] and after whom the method of Fourier–
Motzkin elimination is named.
Linear programming (LP, also called linear optimization) is a method to achieve the best
outcome (such as maximum profit or lowest cost) in a mathematical model whose
requirements are represented by linear relationships. Linear programming is a special case of
mathematical programming (also known as mathematical optimization).
More formally, linear programming is a technique for the optimization of a linear objective
function, subject to linear equality and linear inequality constraints. Its feasible region is
a convex polytope, which is a set defined as the intersection of finitely many half spaces,
each of which is defined by a linear inequality. Its objective function is a real-valued affine
(linear) function defined on this polyhedron. A linear programming algorithm finds a point in
the polyhedron where this function has the smallest (or largest) value if such a point exists.
Linear programs are problems that can be expressed in canonical form as

Maxmize c^tx
Subject to ax<=b
And x>=0

where x represents the vector of variables (to be determined), c and b are vectors of

coefficients, A is a (known) matrix of coefficients, and is the matrix transpose. The


expression to be maximized or minimized is called the objective function (cTx in this
case). The inequalities Ax ≤ b and x ≥ 0 are the constraints which specify a convex
polytope over which the objective function is to be optimized. In this context, two vectors
are comparable when they have the same dimensions. If every entry in the first is less-
than or equal-to the corresponding entry in the second, then it can be said that the first
vector is less-than or equal-to the second vector.
Linear programming can be applied to various fields of study. It is widely used in
mathematics, and to a lesser extent in business, economics, and for some engineering
problems. Industries that use linear programming models include transportation, energy,
telecommunications, and manufacturing. It has proven useful in modeling diverse types
of problems in planning, routing, scheduling, assignment, and design.

2
Objectives

 To apply the theory of linear programming into real life situations so as to get a better
understanding of the structure and the mechanism of linear programming.

Characteristics

A. Objective function:
There must be clearly defined objective which can be stated in quantitative way. In business
problems the objective is generally profit maximization or cost minimization.

B. Constraints:
All constraints (limitations) regarding resources should be fully spelt out in mathematical
form.

C. Non-negativity:
The value of variables must be zero or positive and not negative. For example, in the case of
production, the manager can decide about any particular product number in positive or
minimum zero, not the negative.

D. Linearity:
The relationships between variables must be linear. Linear means proportional relationship
between two ‘or more variable, i.e., the degree of variables should be maximum one.

E. Finiteness:
The number of inputs and outputs need to be finite. In the case of infinite factors, to compute
feasible solution is not possible.

3
Assumptions

(i) There are a number of constraints or restrictions- expressible in quantitative terms.

(ii) The prices of input and output both are constant.

(iii) The relationship between objective function and constraints are linear.

(iv) The objective function is to be optimized i.e., profit maximization or cost minimization.

4
Steps of formulating LPP

 Understand the problem.


The goal of a linear programming problems is to find a way to get the most, or least,
of some quantity -- often profit or expenses. This quantity is called your objective.

The answer should depend on how much of some decision variables you choose. Your
options for how much will be limited by constraints stated in the problem.

 Describe the objective.


What are you trying to optimize? Are you trying to minimize costs? Maximize
production quantities?

You may have constraints like "you can't spend more than $1000" or "you mus't ship
at least 50 tons of product C". These are limits but don't necessarily reflect your
employer's top priorities; don't mistake these for suggestions that you minimize costs
or maximize production.

 Define the decision variables.


The answer to a linear programming problem is always "how much" of some things.
What are those things? Choose variables to represent how much of each of those
things. For example:
L = number of leadership training programs offered
P = number of problem solving programs offered.

 Write the objective function.


Use the variables you just chose to write down an algebraic expression that describes
the amount you're trying to minimize. Do not use an = sign. Do not use < or > signs.

 Describe the constraints.


What are the limits on "how much" your decision variables can be? Look for words
like "at least", "no more than", "two thirds of of", "we must fill orders for", etc.
 Write the constraints in terms of the decision variables.
For each constraint such as "at least $500" or "no more than 29" write an inequality
using the decision variables. For example: 2.5 L > 500
P + L < 29
 Add the nonnegativity constraints.
Don't forget to include non-negativity constraints like P >= 0.

5
Case Study

Problem Statement:
The diet problem was one of the first optimization problems studied in the 1930s and 1940s.
The problem was motivated by the Army's desire to minimize the cost of feeding GIs in the
field while still providing a healthy diet. One of the early researchers to study the problem
was George Stigler, who made an educated guess of an optimal solution using a heuristic
method. The goal of the diet problem is to select a set of foods that will satisfy a set of daily
nutritional requirement at minimum cost. The problem is formulated as a linear program
where the objective is to minimize cost and the constraints are to satisfy the specified
nutritional requirements. Given a set of foods, along with the nutrient information for each
food and the cost per serving of each food, the objective of the diet problem is to select the
number of servings of each food to purchase (and consume) so as to minimize the cost of the
food while meeting the specified nutritional requirements. Typically, the nutritional
requirements are expressed as a minimum and a maximum allowable level for each
nutritional component. Other constraints such a minimum and/or maximum number of
servings may be included to improve the quality of the menu.
Suppose there are three foods available, corn, milk, and bread, and there are restrictions on
the number of calories (between 2000 and 2250) and the amount of Vitamin A (between 5000
and 50,000). The first table lists, for each food, the cost per serving, the amount of Vitamin A
per serving, and the number of calories per serving.

Food Cost per Serving Vitamin A Calories


Corn 0.18 107 72
Milk 0.23 500 121
Wheat Bread 0.05 0 65

Suppose that the maximum number of servings is 10.


Find the optimum solution.

6
Mathematical Formulation:

The Diet Problem can be formulated mathematically as a linear programming problem as


shown below.
Sets
F = set of foods
N = set of nutrients
Parameters
aij = amount of nutrient j in food i
ci = cost per serving of food i
Fmini = minimum number of required servings of food i
Fmaxi = maximum allowable number of servings of food i
N minj = minimum required level of nutrient j
N maxj = maximum allowable level of nutrient j
Variables
xi = number of servings of food i to purchase/consume
Objective Function: Minimize the total cost of the food
Constraint Set 1: For each nutrient at least meet the minimum required level.
Constraint Set 2: For each nutrient do not exceed the maximum allowable level.
Constraint Set 3: For each food, select at least the minimum required number of servings.
Constraint Set 4: For each food, do not exceed the maximum allowable number of servings.

To solve this linear programming problem, we use Solver tool in Excel.

7
8
Interpretation

A simple interpretation of this information is that the cost would be 3.15.The optimum quantity of
Corn would be 1.94 units, 10 units of Milk and 10 units Wheat Bread. This would satisfy all the
mentioned constraints as well as keep the cost minimum.

9
References
 The nutrition information was obtained from US Department of Agriculture National Nutrient
Database for Standard Reference.
 The demo and description of this case study were originally created by Optimization Center at
Northwestern University.
 The history of the diet problem was obtained from George Dantzig's 1990 article in Interfaces:
G.B. Dantzig. The Diet Problem, Interfaces 20(4), 1990, 43-47.
 R. Fourer, D. M. Gay, and B. W. Kernighan, 1993. AMPL: A Modeling Language for Mathematical
Programming. Scientific Press, San Francisco, California.

10

You might also like