Вы находитесь на странице: 1из 14





The development of linear programming (LP) during World War II began to have a large impact
on water resource researchers by the 1960s. After more than three decades of water resource
model development, the field is still dominated by LP models or their extensions. It is usually
not practical to solve problems with hundreds of decision variables by other techniques. Consider for example a municipal water supply system with 5 possible sources of water, and deliveries at 6 service zones (each with different pumping costs). The objective is to optimally size
all the supply facilities necessary and to determine how much flow should occur from each
source to each zone during each of 4 seasons of the year. Specifically, define Xijt as the flow
from source i to zone j during season t. We then have (5) (6) (4) = 120 of these variables without
even considering transfers between zones (each season) nor pipe and pump sizes which will constrain each Xijt. Liner programming will solve such problems in a few seconds.

General Linear Programming Model

Consider (temporarily) a perfectly linear world in which all components can be described by
straight lines--or in n-dimensional space, linear hyper-planes. Such a model of the world will
clearly include some error, but we will later discuss methods of rounding out the model where
errors are serious.
A linear programming problem is defined as the following:

Max Z =

cj xj


j= 1

subject to:

aij xj = bi

i = 1, 2, ..., m


j = 1, 2, ..., n


j= 1

xj 0

How then does this LP problem differ from the kinds of general optimization problems discussed
in Chapter 1? For problems in the general form:


Max Z = f(x)


subject to:
gi(x) = bi

i = 1, 2, ..., m


only mild restrictions, such as continuity or differentiability were placed on f(x) and gi(x).
Now, in [2.1] through [2.3] we have specified the form of f and gi once and for all. The coefficients cj, aij, and bi are real scalars and may vary, but the form of the problem is fixed.
As the word linear in the name linear programming suggests, it can be seen that the objective function [2.1] is a linear form in the variables xj, whose optimal values are to be determined.
Similarly, the constraints in [2.2] are linear equations. Actually, the constraints of the physical
problem that we are describing in any specific case, may be linear inequalities. However, as we
shall see later, we will convert them to linear equalities before developing a solution method, or
indeed, solving a problem. It should be borne in mind, however, that the natural description of
a linear programming problem is frequently stated in terms of linear inequalities rather than
Example: Consider the following simplified problem: A farmer desires to maximize revenue
from two crops (beans and potatoes). He estimates his net profit at $100 per acre of beans and
$150 per acre of potatoes. He is limited to 10 acres of land and for labor or equipment reasons
can plant no more than four acres of potatoes. Also beans require two feet of irrigation water,
potatoes require four feet, and his total dependable water supply is 24 acre feet. We develop an
LP model as follows:
Define X1 and X2 respectively as acres of beans and potatoes to be planted. We wish to maximize net benefits subject to the constraints on land, water, and labor:
Max f = 100 X1 + 150 X2


X1 + X2 10

(total land)


X2 4

(land for potatoes)


2 X1 + 4 X2 24

(total water)


Since the problem has only two variables, it can be displayed graphically, as illustrated in Figure






f* = 1100




f = 600


f = 1000

Figure 2.1: Graphical Solution of a Linear Programming Problem

From Figure 2.1, it can be observed that the optimal solution is:
X1 = 8 acres of beans
X2 = 2 acres of potatoes
f* = $1,100

Development of Linear-Programming Equations

With this example in mind, the following describes the general structure of LP equations:
Decision Variables: Define each of the variable inputs by Xj and assume that there are n of
them. These variables are also called resource activity levels. In LP problems a restriction that
is imposed on these variables is that they be nonnegative, i.e.,
Xj 0


Objective Function: The objective function, the output will be called Z and defined as
Z = C1X1 + C2X2 + ... + CnXn


where the Cj values, j = 1, 2, . . ., n, are unit costs. Associated with each variable Xj is a cost
coefficient Cj, which may be zero, positive, or negative. Some examples of Cj values are:



In each case, the product of Xj and Cj represents a cost or benefit in dollars per time period or
unit resource. These may be added together to represent the total benefit or cost, in dollars, and
could therefore represent a meaningful objective function. Mathematically, the objective may
be represented in summation notation as:


Cj Xj


j= 1

Note that this equation is linear, as required in LP models.

Constraint Equations: The mathematical form of the constraints may be represented as:
A11X1 + A12X2 + ... + A1jXj + ... + A1nXn = B1


A21X1 + A22X2 + ... + A2jXj + ... + A2nXn = B2


Am1X1 + Am2X2 + ... + AmjXj + ... + AmnXn = Bm


Each equation in an LP model takes this form and is called a row or constraint. The right-hand
sides are the Bi values. Each Aij is a coefficient with the usual mathematical convention for subscripts of rows before columns; thus, i represents the row and j the column. The coefficients
may be zero, positive, or negative. Equations [2.13] to [2.15] can be expressed mathematically:

Aij Xj Bi

i = 1, 2, ..., m


j= 1

Slack and Surplus Variables: Suppose that a maximum production of a certain crop X1 is 1000
kg/ha. Mathematically,
X1 1000



It is necessary to express this fact within the LP model. Any solution to the problem that violates
this limit is not a valid solution because the land cannot physically produce a larger quantity.
The expression in [2.17] is not in the form of a linear equation, and it becomes necessary to convert the inequality to an equality relationship. This is done through the introduction of a slack
variable. Express [2.17] as
X1 + S1 = 1000


The variable S1, the slack variable, is treated like any other variable with the restriction of nonnegativity imposed on it. When S1 assumes its minimum value of 0, then X1 = 1000, and for the
maximum value S1 = 1000, X1 = 0.
In contrast, suppose the following inequality appears:
X2 100


This expression states that X2 must be at least 100 kg/ha. In a manner similar to the foregoing
illustration, a surplus variable S2 is subtracted so that expression [2.19] becomes
X2 - S2 = 100


The surplus variable S2 must meet the non-negativity restriction, of course. Thus, a method is
available of converting inequalities to equalities and satisfying the form of the standard LP constraint equations.
Quality Constraints: Another type of constraint encountered in LP work is the quality constraint.
Normally, some type of specification or quality of product must be met. As an example, consider the blending of water to meet a certain salinity. The assumption of linear blending will be
made so that the following relation holds:

Q1X1 + Q2 X 2 + Q3 X3
X1 + X2 + X3


Xi = quantity of blending water

Qi = quality of the ith blending water, e.g., TDS in mg/l

Equation [2.21] then represents the salinity of blending three water sources. In general,

Q i Xi



Example: Three sources with salinity of 108, 93, and 100 mg/l are to be linearly blended. The
final salinity of the mixture must be no more than 98 mg/l. Express this condition as a standard
equation in an LP model.
The final salinity of the mixture can be obtained from Equation [2.22], and it must be a maximum of 98. That is,
108 X1 + 93 X 2 + 100 X3
X1 + X 2 + X3


108 X1 + 93 X2 + 100 X3 98 X1 + 98 X2 + 98 X3


10 X1 - 5 X2 + 2 X3 0




Introducing the slack variable S4, the required relationship is

10 X1 - 5 X2 + 2 X3 + S4 = 0


which is in standard LP form and can be used as one of the equations in the model to represent
the quality constraint for blending water.


Joes meat market produces hamburger of two grades. Regular consists of 30 percent beef and
70 percent oatmeal, and deluxe grade uses 80 percent beef and 20 percent oatmeal. Joe can sell
all that he can produce of either grade, but both equipment and ability to buy ingredients limit
him. His grinder will produce only 1300 pounds of hamburger per day, and he can pay no more
than $500 per day for beef plus oatmeal. He sells the products at $1.00 and $2.00 per pound of
regular and deluxe product, respectively. He buys at $0.60 and $0.10 per pound of beef and
oatmeal, respectively. Joe has standing orders that require him to produce at least 250 and 600
pounds of regular and deluxe product, respectively, per day.
An LP problem can be developed in which the objective is to maximize daily profit and solved
graphically as follows. Let:
R = pounds per day of regular hamburger
D = pounds per day of deluxe hamburger


The LP problem can be formulated as:

Max Z = Profit = Revenue - Cost
= 1.00 R + 2.00 D - [0.3 (0.6) + 0.7 (0.1)] R - [0.8 (0.6) + 0.2 (0.1)] D
= 0.75 R + 1.5 D


subject to:
Cost $500

0.25 R + 0.5 D < 500


R 250


D 600


R + D 1300


The problem can be expressed graphically, as illustrated in Figure 2.2, which shows the constraints [2.28] through [2.31] as lines labeled 1 through 4, respectively. Figure 2.2 also shows
that a family of curves can be plotted to represent values of the objective function, with each
curve expressing a different but constant objective function value. Note the location of the
objective function line that has highest value and that is still in contact with the area labeled the
feasible region.
Note that an alternative formulation would have been to define the quantities of beef and oatmeal
as decision variables as follows:
Beef = B = 0.3 R + 0.8 D


Oatmeal = M = 0.7 R + 0.2 D



This would have resulted in a total of four decision variables, and two additional constraints.
Solution of this problem is not difficult when using a computer algorithm, but it would have prevented a graphical solution. The formulation above exploits the fact that any time a strict equality appears, expressing it in terms of the other variables can eliminate at least one variable.



Z* = 1500



Z = 1425
Z = 1087.5






Z = 187.5

Figure 2.2: Graphical Solution of a Production Problem

with Constraints on Resources



A good outline and procedure to follow in LP problem formulation is the following:

1. Sketch out the problem; use diagrams, flow charts, schematics, etc., and describe the general objective.
2. Define decision variables
a. Resources to be allocated
b. Management or operational choices to be made
3. State the objective function
a. Linear relation of decision variables and coefficient required
b. Maximize or minimize
4. Describe the types or sets of constraints that will apply
a. Analyze resource characteristics or management options to determine
b. Specify required constraint values and upper/lower bounds


5. Structure a simplified version of the problem -- test with numerical data

6. Develop full-scale problem
a. Gather data
b. Expand model structure and test
c. Operate model and perform post-optimal analyses




1. An irrigated farm can be planted in two crops: eggplants and tomatoes. Data are as follows:
Seasonal Resource
Inputs or Profit

1x103 gal/plant
4 ft2/plant

2x103 gal/plant
3 ft2/plant

Determine the optimal planting for the two crops.

a. Formulate the LP problem.

b. Solve graphically:


4x106 gal/year
1.2x104 ft2

2. An industry must have a water supply of at least 4x106 liters/day of a quality such that total
dissolved solids (TDS) is kept below 100 mg/l. The water can be obtained from two
sources: (1) purchase from the city system at $100 per million liters, and (2) pump from a
nearby stream at $50 per million liters. The concentration of TDS in the city source is 50
mg/l. TDS in the stream is 200 mg/l. Water from the two sources is completely mixed
before it is used. The city can supply up to 3.5x106 l/day, and water rights permit pumping
up to 2x106 l/day from the stream.
a. Formulate a linear program to optimize the amount of water used from each source.
Define your decision variables and the meaning of the objective function and constraints.

b. Use the graphical method to determine the optimal solution.

(1) Clearly show the feasible region on your graph.
(2) What is the optimal objective function value?
(3) What is the optimal amount of water to use from each source?


3. An aqueduct constructed to supply water to industrial users has an excess capacity in the
months of June, July, and August of 14,000 acft, 18,000 acft, and 6,000 acft, respectively.
It is proposed to develop not more than 10,000 acres of new land by utilizing the excess
aqueduct capacity for irrigation water deliveries. Two crops, hay and grain, are to be
grown. Their monthly water requirements and expected net returns are given in the following table:


Monthly Water Requirement (acft/acre)


Return, $/acre

a. Formulate a linear program to optimize the irrigation development. Clearly define all
the variables used and give their units.

b. Solve graphically.


4. A construction site requires a minimum of 10,000 yd3 of sand and gravel mixture. The
mixture must contain no less than 5,000 yd3 of sand and no more than 6,000 yd3 of gravel.
Materials may be obtained from two sites:

Delivery Cost, $/yd3


Percent Sand

Percent Gravel

a. Write the mathematical model formulated in standard LP form. Include slack and
surplus variables.

b. Solve the problem graphically.

c. What is the optimal solution for the decision variables and objective function?


(this page is intentionally left blank)