ملخص 1 (Operation Research) -

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 87

Course’s Name: Operation Research

Course's Number: 19041225


Instructor : Dr. Basheer Abdallah

Introduction

Operation Research: an analytical method of problem-solving and decision-making that is useful in


the management of organizations

‫ طريقة تحليلية لحل المشكالت واتخاذ القرار تفيد في إدارة المؤسسات‬:‫بحوث العمليات‬

Stages of Development of Operations Research

‫مراحل تطور بحوث العمليات‬

Step I: Observe the problem environment

‫ مالحظة بيئة المشكلة‬:‫الخطوة االولى‬

Step II: Analyze and define the problem

‫ تحليل وتحديد المشكلة‬:‫الخطوة الثانية‬

Step III: Develop a model

‫ تطوير نموذج‬: ‫الخطوة الثالثة‬

Step IV: Select appropriate data input

1
‫ اختيار ادخال البيانات المناسبة‬:‫الخطوة الرابعة‬

Step V: Provide a solution and test its reasonableness

‫ تقديم حالواختبار مدى معقوليته‬:‫الخطوة الخامسة‬

Step VI: Implement the solution

‫ تنفيذ الحل‬:‫الخطوة السادسة‬

Tools and Techniques


O.R. Tools and Techniques Operations Research uses any suitable tools or techniques available. The
common frequently used tools/techniques are mathematical procedures, cost analysis, electronic
computation.
However, operations researchers given special importance to the development and the use of techniques
like linear programming, game theory, decision theory, queuing theory, inventory models and
simulation. In addition to the above techniques, some other common tools are non-linear programming,
integer programming, dynamic programming, sequencing theory, Markov process, network scheduling
(PERT/CPM), symbolic Model, information theory, and value theory.
The brief explanations of some of the above techniques/tools are as follows:
Linear Programming: This is a constrained optimization technique, which optimize some criterion
within some constraints. In Linear programming the objective function (profit, loss or return on
investment) and constraints are linear. There are different methods available to solve linear
programming.
Game Theory: This is used for making decisions under conflicting situations where there are one or
more players/opponents. In this the motive of the players are dichotomized. The success of one player
tends to be at the cost of other players and hence they are in conflict.
Decision Theory: Decision theory is concerned with making decisions under conditions of complete
certainty about the future outcomes and under conditions such that we can make some probability about
what will happen in future.
Queuing Theory: Choose the solution to be used. ‘Sell’ the decision to operating managers; get their
understanding and cooperation. Manager Manager and O.R. Specialist This is used in situations where
the queue is formed (for example customers waiting for service, aircrafts waiting for landing, jobs
waiting for processing in the computer system, etc). The objective here is minimizing the cost of
waiting without increasing the cost of servicing.
Inventory Models: Inventory model make a decisions that minimize total inventory cost. This model
successfully reduces the total cost of purchasing, carrying, and out of stock inventory.
Simulation: Simulation is a procedure that studies a problem by creating a model of the process
involved in the problem and then through a series of organized trials and error solutions attempt to
2
determine the best solution. Some times this is a difficult/time consuming procedure. Simulation is used
when actual experimentation is not feasible or solution of model is not possible.
Non-linear Programming: This is used when the objective function and the constraints are not linear
in nature. Linear relationships may be applied to approximate non-linear constraints but limited to some
range, because approximation becomes poorer as the range is extended. Thus, the non-linear
programming is used to determine the approximation in which a solution lies and then the solution is
obtained using linear methods.
Dynamic Programming: Dynamic programming is a method of analyzing multistage decision
processes. In this each elementary decision depends on those preceding decisions and as well as
external factors.
Integer Programming: If one or more variables of the problem take integral values only then dynamic
programming method is used. For example number or motor in an organization, number of passenger in
an aircraft, number of generators in a power generating plant, etc.
Markov Process: Markov process permits to predict changes over time information about the behavior
of a system is known. This is used in decision making in situations where the various states are defined.
The probability from one state to another state is known and depends on the current state and is
independent of how we have arrived at that particular state.
Network Scheduling: This technique is used extensively to plan, schedule, and monitor large projects
(for example computer system installation, R & D design, construction, maintenance, etc.). The aim of
this technique is minimize trouble spots (such as delays, interruption, production bottlenecks, etc.) by
identifying the critical factors. The different activities and their relationships of the entire project are
represented diagrammatically with the help of networks and arrows, which is used for identifying
critical activities and path. There are two main types of technique in network scheduling, they are:
Program Evaluation and Review Technique (PERT) – is used when activities time is not known
accurately/ only probabilistic estimate of time is available. Critical Path Method (CPM) – is used when
activities time is know accurately.
Information Theory: This analytical process is transferred from the electrical communication field to
O.R. field. The objective of this theory is to evaluate the effectiveness of flow of information with a
given system. This is used mainly in communication networks but also has indirect influence in
simulating the examination of business organizational structure with a view of enhancing flow of
information.
Transportation
Assignment

3
Course’s Name: Operation Research
Course's Number: 19041225
Instructor : Dr. Basheer Abdallah

Modeling with Linear Programming


‫النمذجة بالبرمجة الخطية‬

Example 2.1-1 (The Reddy Mikks Company) Reddy Mikks produces both interior and exterior paints
from two raw materials, M1 and M2. The following table provides the basic data of the problem:
.M1, M2 ‫تنتج شركة ريدي مكس نوعين من الدهانات داخلي وخارجي من مادتين خام‬
:‫الجدول التالي يبين المعلومات األساسية للمسألة‬
‫الكمية بالطن من الدهانات‬
Tons of raw materials per ton
Raw Material External paint Internal paint Maximum daily
‫الدهان الخارجي المركب األساسي‬ ‫ الدهان الداخلي‬availability(ton)
‫يوم‬/‫الكمية المتوفرة‬
x1 x2
M1 6 4 24
M2 1 2 6
Profit per 5 4
ton($1000)

The daily demand for interior paint cannot exceed that for exterior paint by more than 1 ton. Also, the
maximum daily demand for interior paint is 2 tons. Reddy Mikks wants to determine the optimum

1
(best) product mix of interior and exterior paints that maximizes the total daily profit (Write the linear
programming model).
‫ كما أن الحد األقصى للطلب اليومي على الدهانات‬.‫ طن‬1 ‫الطلب اليومي للدهان الداخلي ال يمكن ان يزيد عن الدهان الخارجي بأكثر من‬
‫ تريد شركة ريدي مكس تحديد مزيج المنتجات األمثل(األفضل) من الدهانات الداخلية والخارجية والتي تحقق أقصى‬.‫ طن‬2 ‫الداخلية هو‬
.)‫ربح االجمالي اليومي(اكتب النموذج الرياضي‬
Solution:
All OR models, LP included, consist of three basic components:
1. Decision variables that we seek to determine.
2. Objective (goal) that we need to optimize (maximize or minimize).
3. Constraints that the solution must satisfy.
The variables of the model are defined as:
x1 = Tons produced daily of exterior paint
x2 = Tons produced daily of interior paint
Reddy Mikks model is
Maximize z = 5x1 + 4x2
subject to
6𝑥1 + 4𝑥2 ≤ 24 (1)
𝑥1 + 2𝑥2 ≤ 6 (2)
−𝑥1 + 𝑥2 ≤ 1 (3)
𝑥2 ≤ 2 (4)
𝑥1, 𝑥2 ≥ 0 (5)

Example 2.2-2 (diet Problem) Ozark Farms uses at least


800 lb of special feed daily. The special feed is a mixture of corn and soybean meal with the following
compositions
‫ العلف الخاص عبارة عن خليط من دقيق الذرة وفول الصويا‬.‫ رطل على األقل من العلف الخاص يوميًا‬800 ‫تستخدم مزارع أوزارك‬
‫بالتركيبات التالية‬
Ib per Ib for feedstuff
feedstuff protein fiber cost($/Ib)

)x1 (corn 0.09 0.02 0.3

2
Soyabean 0.60 0.06 0.9
(x2)meal

The dietary requirements of the special feed are at least 30% protein and at most 5% fiber.
determine the daily minimum-cost feed mix(Write the linear programming model)
‫ حدد مزيج التغذية اليومية بأقل تكلفة‬.‫ ألياف على األكثر‬٪5 ‫ بروتين على األقل و‬٪30 ‫المتطلبات الغذائية لألعالف الخاصة هي‬
)‫(اكتب النموذج الرياضي‬
Solution:
The decision variables of the model are:
x1 = lb of corn in the daily mix
x2 = lb of soybean meal in the daily mix
The objective is to minimize the total daily cost (in dollars) of the feed mix—that is,
Minimize z = .3x1 + .9x2
The constraints represent the daily amount of the mix and the dietary requirements. Ozark Farms needs
at least 800 lb of feed a day—that is, 𝒙𝟏 + 𝒙𝟐 ≥ 𝟖𝟎𝟎
The amount of protein included in x1 lb of corn and x2 lb of soybean meal is (.09x1 + .6x2)lb. This
quantity should equal at least 30% of the total feed mix (x1 + x2) lb—that is,
. 09𝑥1 + .6𝑥2 ≥ .3(𝑥1 + 𝑥2) …(1`)
In a similar manner, the fiber requirement of at most 5% is represented as
.02𝑥1 + .06𝑥2 ≤ .05(𝑥1 + 𝑥2) …(2)
The model is
Minimize z = .3x1 + .9x2
Subject to
𝒙𝟏 + 𝒙𝟐 ≥ 𝟖𝟎𝟎
𝟎. 𝟐𝟏𝒙𝟏 − 𝟎. 𝟑𝒙𝟐 ≤ 𝟎
. 𝟎𝟑𝒙𝟏− . 𝟎𝟏𝒙𝟐 ≥ 𝟎
𝒙𝟏, 𝒙𝟐 ≥ 𝟎

3
Example 2.4-1 (bank Loan Model) Bank One is in the process of devising a loan policy that involves a
maximum of $12 million. The following table provides the pertinent data about available loans.
‫ الجدول التالي يعرض البيانات ذات الصلة حول القروض‬.‫ مليون دوالر كحد أقصى‬12 ‫يقوم البنك بعملية وضع سياسة قروض تتضمن‬
.‫المتاحة‬
Type of loan Interest rate Bad-debt Ratio
‫نوع القرض‬ ‫سعر الفائدة‬ ‫نسبة الديون المعدومة‬
Personal (x1) 0.140 0.10
Car (x2) 0.130 0.07
Home (x3) 0.120 0.03
Farm (x4) 0.125 0.05
Commercial (x5) 0.100 0.02

Bad debts are unrecoverable and produce no interest revenue. Competition with other financial
institutions dictates the allocation of at least 40% of the funds to farm and commercial loans. To assist
the housing industry in the region, home loans must equal at least 50% of the personal, car, and home
loans. The bank limits the overall ratio of bad debts on all loans to at most 4%.
Write the mathematical model.
‫ على األقل من‬٪40 ‫ تتطلب المنافسة مع المؤسسات المالية األخرى تخصيص‬.‫الديون المعدومة غير قابلة لالسترداد وال تنتج ايراد فائدة‬
‫ على األقل من‬٪50 ‫ يجب أن تساوي قروض اإلسكان‬، ‫ لمساعدة صناعة اإلسكان في المنطقة‬.‫األموال للقروض الزراعية والتجارية‬
4% ‫ يحد البنك من النسبة اإلجمالية للديون المعدومة على جميع القروض إلى‬.‫القروض الشخصية وقروض السيارات وقروض المنازل‬
.‫ أكتب النموذج الرياضي‬.‫على األكثر‬

Mathematical Model: The situation deals with determining the amount of loan in each category, thus
leading to the following definitions of the variables:
x1 = personal loans (in millions of dollars)
x2 = car loans
x3 = home loans
x4 = farm loans
x5 = commercial loans

4
The objective of the Bank One is to maximize net return, the difference between interest revenue and
lost bad debts. Interest revenue is accrued)‫ (المستحق‬on loans in good standing. For example, when
10% of personal loans are lost to bad debt, the bank will receive interest on 90% of the loan—that
is, it will receive 14% interest on .9x1 of the original loan x1. The same reasoning applies to the
remaining four types of loans. Thus,
Total interest
= .14(.9x1) + .13(.93x2) + .12(.97x3) + .125(.95x4) + .1(.98x5)
= .126x1 + .1209x2 + .1164x3 + .11875x4 + .098x5
We also have Bad debt = .1x1 + .07x2 + .03x3 + .05x4 + .02x5
The objective function combines interest revenue and bad debt as:
Maximize z = Total interest - Bad debt
= 0.126x1 + .1209x2 + .1164x3 + .11875x4 + .098x5
- (.1x1 + .07x2 + .03x3 + .05x4 + .02x5)
z = .026x1 + .0509x2 + .0864x3 + .06875x4 + .078x5

The problem has five constraints:


1. Total funds should not exceed $12 (million):
𝒙𝟏 + 𝒙𝟐 + 𝒙𝟑 + 𝒙𝟒 + 𝒙𝟓 ≤ 𝟏𝟐
2. Farm and commercial loans equal at least 40% of all loans:
𝒙𝟒 + 𝒙𝟓 ≥ . 𝟒(𝒙𝟏 + 𝒙𝟐 + 𝒙𝟑 + 𝒙𝟒 + 𝒙𝟓)
𝑜𝑟
. 𝟒𝒙𝟏 + . 𝟒𝒙𝟐 + . 𝟒𝒙𝟑 − . 𝟔𝒙𝟒 − . 𝟔𝒙𝟓 ≤ 𝟎
3. Home loans should equal at least 50% of personal, car, and home loans:
𝒙𝟑 ≥. 𝟓(𝒙𝟏 + 𝒙𝟐 + 𝒙𝟑)
𝑜𝑟
. 𝟓𝒙𝟏 + . 𝟓𝒙𝟐 − . 𝟓𝒙𝟑 ≤ 𝟎
4. Bad debts should not exceed 4% of all loans:
.𝟏𝒙𝟏 + . 𝟎𝟕𝒙𝟐 + . 𝟎𝟑𝒙𝟑 + . 𝟎𝟓𝒙𝟒 + . 𝟎𝟐𝒙𝟓 ≤ . 𝟎𝟒(𝒙𝟏 + 𝒙𝟐 + 𝒙𝟑 + 𝒙𝟒 + 𝒙𝟓)
𝑜𝑟
. 𝟎𝟔𝒙𝟏 + . 𝟎𝟑𝒙𝟐 − . 𝟎𝟏𝒙𝟑 + . 𝟎𝟏𝒙𝟒 − . 𝟎𝟐𝒙𝟓 ≤ 𝟎
5. Nonnegativity:
𝒙𝟏, 𝒙𝟐, 𝒙𝟑, 𝒙𝟒 , 𝒙𝟓 ≥ 𝟎

5
The model is
Max z = .026x1 + .0509x2 + .0864x3 + .06875x4 + .078x5
Subject to
𝒙𝟏 + 𝒙𝟐 + 𝒙𝟑 + 𝒙𝟒 + 𝒙𝟓 ≤ 𝟏𝟐
. 𝟒𝒙𝟏 + . 𝟒𝒙𝟐 + . 𝟒𝒙𝟑 − . 𝟔𝒙𝟒 − . 𝟔𝒙𝟓 ≤ 𝟎
. 𝟎𝟔𝒙𝟏 + . 𝟎𝟑𝒙𝟐 − . 𝟎𝟏𝒙𝟑 + . 𝟎𝟏𝒙𝟒 − . 𝟎𝟐𝒙𝟓 ≤ 𝟎
𝒙𝟏, 𝒙𝟐, 𝒙𝟑, 𝒙𝟒 , 𝒙𝟓 ≥ 𝟎

6
Course’s Name: Operation Research
Course's Number: 19041225
Instructor : Dr. Basheer Abdallah

(Graphical Method(‫الطريقة البيانية‬


Graphical LP SoLution
The graphical solution includes two steps:
1. Determination of the feasible solution space.
2. Determination of the optimum solution from among all the points in
the solution space.

‫تضمن الحل الرسومي خطوتين‬:


‫)تحديد منطقة الحل المتاح‬1
‫)تحديد الحل األمثل من بين جميع النقاط في منطقة الحل‬2

Example: Solve the problem by using Graphical Method

‫ حل المسألة التالية باستخدام الطريقة البيانية‬:‫مثال‬


‫جد القيمة العظمى القتران الهدف‬
𝑚𝑎𝑥 𝑧 = 2𝑥1 + 3𝑥2
‫بحيث أن‬
Subject to
2𝑥1 + 𝑥2 ≤ 4 …(1)
𝑥1 + 2𝑥2 ≤ 5 …(2)

𝑥1 ≥ 0 …(3)
𝑥2 ≥ 0 …(4)
The equation that associates to inequality (1) is
2𝑥1 + 𝑥2 = 4 … )1)
Then we want to find x-intercept and y-intercept for this equation.
To find x-intercept, we assume that 𝑥2 = 0
Then , we susitute the value of 𝑥2 in this equation to obtain
2𝑥1 + 0 = 4
2𝑥1 = 4
𝑥1 = 2
So, we have the point (2,0), then we assign it on the xy-plane
Next, to find the y-intercept for this equation, we assume that 𝑥1 = 0
To get
2(0) + 𝑥2 = 4
𝑥2 = 4
So, we have the point (0,4), then we assign it on the xy-plane.
After that , we draw straight line between the two points D(2,0), F(0,4) that
represents equation(1) ,then we choose (0,0) and substitute into inequality (1) to
know the feasible region.

2𝑥1 + 𝑥2 = 4 ‫المعادلة المرافقة للمتباينة األولى هي‬


:‫ثم نجد المقطع السيني والصادي لهذه المعادلة‬
‫𝑥 ثم نعوضها في المعادلة‬2 = 0 ‫اليجاد المقطع السيني نفرض‬
2𝑥1 + 0 = 4‫فنحصل على‬
2𝑥1 = 4 ‫أو‬
𝑥1 = 2 ‫ومنه‬
‫( ثم نعينها على المستوى الديكارتي‬2 ,0)‫لذا نحصل على النقطة‬
‫𝑥 ثم نعوضها في المعادلة‬1 = 0 ‫اليجاد المقطع الصادي للمعادلة االولى نفرض‬
2(0) + 𝑥2 = 4‫فنحصل على‬
𝑥2 = 4 ‫أو‬

‫( ثم نعينها على المستوى الديكارتي‬0 , 4) ‫لذا نحصل على النقطة‬


‫( والذي يمثل المعادلة األولى‬2 ,0), (0 , 4)‫رسم خط مستقيم بين النقطتين‬
‫(ثم نعوضها في المتباينة األولى فاذا حققت‬0 , 0)‫ثم نختار النقطة‬
‫( تلك المتباينة فتكون منطقة الحل للمتباينة‬0 , 0) ‫النقطة‬

(0 , 0)‫النقطة في المنطقة التي تقع فيها‬

The equation that associates to inequality (2) is


𝑥1 + 2𝑥2 = 5
Then we want to find x-intercept and y-intercept for this equation. To find x-
intercept, we assume that 𝑥2 = 0
Then , we susitute the value of 𝑥2 in this equation to obtain
𝑥1 + 2(0) = 5
𝑥1 = 5
So, we have the point (5,0), then we assign it on the xy-plane
Next, to find the y-intercept for this equation, we assume that 𝑥1 = 0
To get
0 + 2𝑥2 = 5
𝑥2 = 2.5
So, we have the point (0, 2.5), then we assign it on the xy-plane.
After that , we draw straight line between the two points E(5,0), B(0,2.5) that
represents equation(2) ,then we choose (0,0) and substitute into inequality (2) to
know the feasible region.

Now, we want to find the intersection between equation (1) and equation(2)
2𝑥1 + 𝑥2 = 4 …(1)
𝑥1 + 2𝑥2 = 5 …(2)

We multiply equation(2) by (-2) to obtain

−2𝑥1 −4𝑥2 = −10 (5)

Adding equation(5) to equation(1)

−3𝑥2 = −6
𝑥2 = 2
Then , we subsitute the value of 𝑥2 into equation(2) to get

𝑥1 + 2(2) = 5
𝑥1 = 5 − 2(2) = 1
So, the intersection between the two equations(1) and (2) is
(𝟏, 𝟐)

The feasible region is shown in the following figure for the inequalities(1) ,(2),(3)
and (4)

Then, we find the corner points


A(0,0) , B(0, 2.5) , C(1, 2) , D(2,0)
Then , we find the objective function at each point of the corner points
𝑧 = 2𝑥1 + 3𝑥2
𝑧|𝐴(0,0) = 2(0) + 3(0) = 0
𝑧|𝐵(0,2.5) = 2(0) + 3(2.5) = 7.5

𝑧|𝐶 (1,2) = 2(1) + 3(2) = 8

𝑧|𝐷(2,0) = 2(2) + 3(0) = 4


So, the maximum value for the objective function is Z= 8
At the point (1,2)
The shortest path is 𝐴 → 𝐵 → 𝐶

Example : Solve the following model by using graphical method

max 𝑧 = 5𝑥1 + 4𝑥2


subject to
6𝑥1 + 4𝑥2 ≤ 24 …(1)
𝑥1 + 2𝑥2 ≤ 6 …(2)

−𝑥1 + 𝑥2 ≤ 1 ….(3)

𝑥2 ≤ 2 …(4)
𝑥1 ≥ 0 …(5)
𝑥2 ≥ 0 …(6)
The equation that associates to inequality (1) is
6𝑥1 + 4𝑥2 = 24
Then we want to find x-intercept and y-intercept for this equation. To find x-
intercept, we assume that 𝑥2 = 0
Then , we susitute the value of 𝑥2 in this equation to obtain
6𝑥1 + 4(0) = 24
𝑥1 = 4
So, we have the point (4,0), then we assign it on the xy-plane
Next, to find the y-intercept for this equation, we assume that 𝑥1 = 0
To get
6(0) + 4𝑥2 = 24
𝑥2 = 6
So, we have the point (0, 6), then we assign it on the xy-plane.
After that , we draw straight line between the two points (4,0),(0, 6) that
represents equation(1) ,then we choose (0,0) and substitute into inequality (1) to
know the feasible region.

The equation that associates to inequality (2) is


𝑥1 + 2𝑥2 = 6
Then we want to find x-intercept and y-intercept for this equation. To find x-
intercept, we assume that 𝑥2 = 0
Then , we susitute the value of 𝑥2 in this equation to obtain
𝑥1 + 2(0) = 6
𝑥1 = 6
So, we have the point (6,0), then we assign it on the xy-plane
Next, to find the y-intercept for this equation, we assume that 𝑥1 = 0
To get
0 + 2𝑥2 = 6
𝑥2 = 3
So, we have the point (0,3), then we assign it on the xy-plane.
After that , we draw straight line between the two points (6,0),(0,3) that represents
equation(2) ,then we choose (0,0) and substitute into inequality (2) to know the
feasible region.

The equation that associates to inequality (3) is


−𝑥1 + 𝑥2 = 1 Then we want to find x-intercept and y-intercept for this
equation. To find x-intercept, we assume that 𝑥2 = 0
Then , we susitute the value of 𝑥2 in this equation to obtain
−𝑥1 + 2(0) = 1
𝑥1 = −1
So, we have the point (-1,0), then we assign it on the xy-plane
Next, to find the y-intercept for this equation, we assume that 𝑥1 = 0
To get
0 + 𝑥2 = 1
𝑥2 = 1
So, we have the point (0, 1), then we assign it on the xy-plane.
After that , we draw straight line between the two points (-1,0),(0,1) that
represents equation(3) ,then we choose (0,0) and substitute into inequality (3) to
know the feasible region.

Now, we want to find the intersection between equation (1) and equation(2)
6𝑥1 + 4𝑥2 = 24 …(1)
𝑥1 + 2𝑥2 = 6 …(2)

We multiply equation(2) by (-6) to obtain

−6𝑥1 −12𝑥2 = −36 (7)

Adding equation(7) to equation(1)

−8𝑥2 = −12
3
𝑥2 =
2
Then , we subsitute the value of 𝑥2 into equation(2) to get

3
𝑥1 + 2 ( ) = 6
2
𝑥1 = 6 − 3 = 3
So, the intersection between the two equations(1) and (2) is
3
𝐶 (3, )
2

We want to find the intersection between equation(2) and equation (4)


𝑥1 + 2𝑥2 = 6 …(2)

𝑥2 = 2 …(4)

We substitute equation(4) into equation(2),


𝑥1 + 2(2) = 6
𝑥1 = 6 − 4 = 2
𝐷(2,2) is the intersection between equations (2) and (4)

We want to find the intersection between equation(3) and equation (4)


−𝑥1 + 𝑥2 = 1 …(3)

𝑥2 = 2 …(4)

We substitute equation(4) into equation(2),


−𝑥1 + 2 = 1
𝑥1 = 1
𝐸(1,2) is the intersection between equations (3) and (4)

The feasible region is shown in the following figure for the inequalities(1) ,(2),(3)
and (4)

Then, we find the corner points


3
𝐴(0,0) , 𝐵 4,0 , 𝐶 (3, ) , 𝐷 (2,2) , 𝐸 (1,2) , 𝐹(0 , 1)
( )
2
Then , we find the objective function at each point of the corner points
𝑧 = 5𝑥1 + 4𝑥2
𝑧|𝐴(0,0) = 5(0) + 4(0) = 0
𝑧|𝐵(4,0) = 5(4) + 4(0) = 20

3
𝑧|𝐶(3, 3
)
= 5(3) + 4(2 ) = 21
2

𝑧|𝐷(2,2) = 5(2) + 4(2) = 18


𝑧|𝐸 (1,2) = 5(1) + 4(2) = 13
𝑧|𝐹(0 ,1) = 5(0) + 4(1) = 4

So, the maximum value for the objective function is z= 21


3
At the point 𝐶 (3, )
2
The path is 𝐴 → 𝐵 → 𝐶
Course’s Name: Operation Research
Course's Number: 15041225
Instructor : Dr. Basheer Abdallah

Linear Programming Model in Equation Form


‫النموذج القياسي لمسألة البرمجة الخطية‬

LP modeL in equation Form


The development of the simplex method computations is facilitated by
imposing two requirements on the LP model:
1. All the constraints are equations with nonnegative right-hand side.
2. All the variables are nonnegative.
:‫يتميز الشكل القياسي لمسألة البرمجة الخطية بمايلي‬
‫)جميع القيود في المسألة تكون على شكل معادالت والطرف األيمن للقيد كمية موجبة‬1
‫)جميع المتغيرات هي موجبة‬2
Converting inequalities into equations with nonnegative right-hand
side.
‫تحويل المتباينات الى معادالت على أن يكون الطرف األيمن موجبا‬

Remark: To convert a (≤)-inequality to an equation, a nonnegative


slack variableis added to the left-hand side of the constraint.
Example, converted the following inequality into equation
6𝑥1 + 4𝑥2 ≤ 24
Solution: We add slack variable 𝑠1, then we have
6𝑥1 + 4𝑥2 + 𝑠1 = 24, 𝑠1 ≥ 0
The nonnegative variable s1 is the slack (or unused amount) of resource
M1.
‫ يمكن تحويل متباينات القيد (الشرط) على شكل (≤( الى معادلة وذلك باضافة‬:‫ملحوظة‬
‫( الى الطرف األيسر‬Slack variable) ‫المتغير المكمل‬
‫ حول المتبانة التالية الى معادلة‬:‫مثال‬
6𝑥1 + 4𝑥2 ≤ 24
‫𝑠 ثم نحصل على‬1‫ نضيف المتغير المكمل‬:‫الحل‬
6𝑥1 + 4𝑥2 + 𝑠1 = 24, 𝑠1 ≥ 0

Remark: To convert a (≥)-inequality to an equation, a nonnegative


surplus variable is subtracted to the left-hand side of the constraint.
Example, converted the following inequality into equation
5𝑥1 + 2𝑥2 + 4𝑥3 ≥ 10
Solution: We subtract surplus variable 𝑠2, then we have

5𝑥1 + 2𝑥2 + 4𝑥3 − 𝑠2 = 10


, 𝑠2 ≥ 0
The nonnegative variable s1 is the slack (or unused amount) of resource
M1.

‫ يمكن تحويل متباينات القيد (الشرط) على شكل (≥( الى معادلة وذلك بطرح‬:‫ملحوظة‬
‫( الى الطرف األيسر‬surplus variable) ‫المتغير الفائض‬

‫ حول المتبانة التالية الى معادلة‬:‫مثال‬


5𝑥1 + 2𝑥2 + 4𝑥3 ≥ 10
‫𝑠 ثم نحصل على‬2‫ نطرح المتغير الفائض‬:‫الحل‬
5𝑥1 + 2𝑥2 + 4𝑥3 − 𝑠2 = 10
, 𝑠2 ≥ 0

Dealing with unrestricted variables


Remark: If variable is unrestricted, then it can be converted to
Restricted variable
Example: If 𝑥𝑖 is unrestricted variable , the we can write 𝑥𝑖 as
𝑥𝑖 = 𝑥𝑖 + − 𝑥𝑖 − , 𝑥𝑖 + , 𝑥𝑖 − ≥ 0
‫التعامل مع المتغيرات غير المقيدة‬

‫ اذا كان المتغير غير مقيد فانه يمكن تحويله الى متغير محددوذلك بالتعويض عنه‬:‫ملحوظة‬
‫بمتغيرين مقيدين‬
‫ اذا كان 𝑖𝑥 متغير غير مقيد فانه يمكن كتابته كمايلي‬:‫مثال‬
𝑥𝑖 = 𝑥𝑖 + − 𝑥𝑖 − , 𝑥𝑖 + , 𝑥𝑖 − ≥ 0
Example: Convert the LPmodel into standard form
Min 𝑧 = 2𝑥1 + 4𝑥2
‫بحيث أن‬
𝑥1 + 2𝑥2 = 10 …(1)
−2𝑥1 + 3𝑥2 ≤ −5 …(2)

7𝑥1 − 5𝑥2 ≤ 6 ….(3)

𝑥1 𝑢𝑛𝑟𝑒𝑠𝑡𝑟𝑖𝑐𝑡𝑒𝑑 …(5)
𝑥2 ≥ 0 …(6)

Solution:We multiply the constraint(2) by(-1)


2x1 − 3x2 ≥ 5
We assume that x1 = x1+ − x1− , x1+ , x1− ≥ 0
We add slack variable s1 to constraint (3)
And we subtract s2 from constraint(1).
So, the standard form is
min z = 2x1+ − 2x1− + 4x2
subject to
x1+ − x1− + 2x2 = 10 …(1)
+ −
2x1 − 2x1 − 3x2 − s2 = 5 …(2)

7x1+ − 7x1− − 5x2 + s1 = 6 ….(3)

s1, s2, x1+ , x1− , x2 ≥ 0 …(6)


Transition from Graphical to Algebraic Solution
‫االنتقال من الطريقة البيانية الى الطريقة الجبرية‬

The maximum number of corner points is

‫أكبر عدد من النقاط الركنية هو‬

𝑛
𝑛!
𝐶𝑚 =
𝑚! (𝑛 − 𝑚)!

Example : Find the maximum number of corner points for the


following system
Max 𝑧 = 2𝑥1 + 3𝑥2
Subject to
2𝑥1 + 𝑥2 ≤ 4 …(1)
𝑥1 + 2𝑥2 ≤ 5 …(2)

𝑥1 , 𝑥2 ≥ 0 …(3)
Solution: m = 2 equations and n = 4 variables

So, the maximum number of the corner points is


4
4! 4! (4)(3)(2)(1)
𝐶2 = = = =6
2! (4 − 2)! 2! 2! (2)(1) (2)(1)

Basic and Non Basic Variables


Remark:
1) Basic variables are the variable that are not equal to zero
2) NonBasic variables are the variable that are equal to zero
‫) المتغيرات األساسية هي المتغيرات التي التساوي صفرا‬1:‫ملحوظة‬
‫) المتغيرات غير األساسية هي المتغيرات التي تساوي صفرا‬2
Example : Write the standard form for the following system
Then find the number of basic variables
Max 𝑧 = 2𝑥1 + 3𝑥2
Subject to
2𝑥1 + 𝑥2 ≤ 4 …(1)
𝑥1 + 2𝑥2 ≤ 5 …(2)

𝑥1 , 𝑥2 ≥ 0 …(3)

Solution:

Max 𝑧 = 2𝑥1 + 3𝑥2


Subject to
2𝑥1 + 𝑥2 + 𝑠1 = 4 …(1)
𝑥1 + 2𝑥2 + 𝑠2 = 5 …(2)

𝑠1 , 𝑠2 ,𝑥1 , 𝑥2 ≥ 0 …(3)
The basic solutions are determined by setting n – m(= 4 - 2 = 2)variables
equal to zero and solving for the remaining m(= 2) variables. For
example, if we set x1 = 0 and x2 = 0, the equations provide the unique
basic solution
s1 = 4, s2 = 5

n - m (= 4 - 2 = 2)‫يتم تحديد الحلول األساسية عن طريق تحديد متغيرات‬


m (= 2)‫وحل للمتغيرات المتبقية‬
x1 = 0 ‫ و‬x2 = 0‫ إذا قمنا بتعيين‬، ‫على سبيل المثال‬
‫فإن المعادالت توفر الحل األساسي الفريد‬
s1 = 4 ‫ و‬s2 = 5

This solution corresponds to point A in the following Figure (convince


yourself that s1 = 4 and s2 = 5 at point A). Another point can be
determined by setting s1 = 0 and s2 = 0 and then solving the
resulting two equations
2x1 + x2 = 4
x1 + 2x2 = 5

A‫في الشكل السابق يتوافق هذا الحل مع النقطة‬


s1 = 0 ‫ و‬s2 =0 ‫يمكن تحديد نقطة أخرى وذلك بفرض‬

‫ثم حل المعادلتين التاليتين‬


2𝑥1 + 𝑥2 + 𝑠1 = 4 …(1)
𝑥1 + 2𝑥2 + 𝑠2 = 5 …(2)

s1=0, s2=0
to obtain
2x1 + x2 = 4

x1 + 2x2 = 5
The associated basic solution is (x1 = 1, x2 = 2), or point C in the
Figure (1)

)1(‫ كما في الشكل‬C‫( أو النقطة‬x1 = 1 ، x2 = 2)‫الحل األساسي المرتبط هو‬


Nonbasi Basic Basic Associate feasibl Objectiv
c (zero) variabl Solutio d corner e e
variable e n point value(z)
s
(𝑥1 , 𝑥2 ) (𝑠1 , 𝑠2 ) (4,5) A yes 0
(𝑥1 , 𝑠2 ) ( 𝑥2 , 𝑠2 ) (4, −3) F No
(𝑥1 , 𝑠2 ) ( 𝑥2 , 𝑠1 ) (2.5 ,1.5) B yes
( 𝑥2 , 𝑠1 ) (𝑥1 , 𝑠2 ) (2 ,3) D yes
( 𝑥2 , 𝑠2 ) (𝑥1 , 𝑠1 ) (5, −6) E No
(𝑠1 , 𝑠2 ) (𝑥1 , 𝑥2 ) (1 , 2) C yes

The path is 𝐴 → 𝐵 → 𝐶
‫الشكل (‪)1‬‬

‫المتغيرات‬ ‫المتغيرات‬ ‫الحل‬ ‫النقطة‬ ‫منطقة‬ ‫اقتران‬


‫غير‬ ‫االساسية‬ ‫االساسي‬ ‫الركنية‬ ‫الحل‬ ‫)‪(z‬الهدف‬
‫االساسية‬ ‫المرتبطة‬ ‫المتاح‬
‫) ‪(𝑥1 , 𝑥2‬‬ ‫) ‪(𝑠1 , 𝑠2‬‬ ‫)‪(4,5‬‬ ‫𝐴‬ ‫‪yes‬‬ ‫‪0‬‬
‫) ‪(𝑥1 , 𝑠1‬‬ ‫)‪( 𝑥2 , 𝑠2 ) (4, −3‬‬ ‫‪F‬‬ ‫‪No‬‬
‫) ‪(𝑥1 , 𝑠2‬‬ ‫)‪( 𝑥2 , 𝑠1 ) (2.5 ,1.5‬‬ ‫‪B‬‬ ‫‪yes‬‬ ‫‪7.5‬‬
‫) ‪( 𝑥2 , 𝑠1‬‬ ‫)‪(𝑥1 , 𝑠2 ) (2 ,3‬‬ ‫‪D‬‬ ‫‪yes‬‬ ‫‪4‬‬
‫) ‪( 𝑥2 , 𝑠2‬‬ ‫)‪(𝑥1 , 𝑠1 ) (5, −6‬‬ ‫‪E‬‬ ‫‪No‬‬ ‫‪-‬‬
‫) ‪(𝑠1 , 𝑠2‬‬ ‫)‪(𝑥1 , 𝑥2 ) (1 , 2‬‬ ‫‪C‬‬ ‫‪yes‬‬ ‫‪8‬‬

‫المسار هو 𝐶 → 𝐵 → 𝐴‬
2𝑥1 + 𝑥2 + 𝑠1 = 4 …(1)
𝑥1 + 2𝑥2 + 𝑠2 = 5 …(2)

X1=0, s1=0
X2=4
2x2+s2=5
2(4)+s2=5
S2=5-8=-3
Course’s Name: Operation Research
Course's Number: 19041225
Instructor : Dr. Basheer Abdallah

(Simplex Method(‫طريقة الصف البسيط‬


Elementary Row Operations
I. Interchange two rows
II. Multiply a row by nonzero real number
III. Replace a row by it’s sum with a multiple of a nother
row

‫عمليات الصف البسيط‬


‫ تبديل صفين‬:‫النوع االول‬
‫ ضرب صف ما بعدد حقيقي غيرالصفر‬:‫النوع الثاني‬
‫ ضرب صف ما بعدد حقيقي غير الصفر ثم اضافته الى صف آخر‬:‫النوع الثالث‬

Remark: Simplex Method that includes elementary row operation


‫ طريقة سمبلكس هي التي تتضمن عمليات الصف البسيط‬:‫ملحوظة‬

Example : Solve the following system by using simplex method


Max 𝑧 = 2𝑥1 + 3𝑥2
Subject to
2𝑥1 + 𝑥2 ≤ 4 …(1)
𝑥1 + 2𝑥2 ≤ 5 …(2)
𝑥1 , 𝑥2 ≥ 0 …(3)
:‫الحل‬

The standard form for the original problem is


Max 𝑧 − 2𝑥1 − 3𝑥2 =0
Subject to
2𝑥1 + 𝑥2 + 𝑠1 = 4 …(1)
𝑥1 + 2𝑥2 + 𝑠2 = 5 …(2)

𝑠1 , 𝑠2 ,𝑥1 , 𝑥2 ≥ 0 …(3)

the starting simplex tableau can be represented as follows

Basic 𝑥1 𝑥2 (entering 𝑠1 𝑠2 ‫الحل‬solution Ratio


variable)
z -2 -3 0 0 0
𝑠1 2 1 1 0 4 4/1=4
𝑠2 1 2 0 1 5 5/2=2.5
(leaving the smallest
variable) ratio
The basic variables in the starting simplex tableau are
‫المتغيرات األساسية في الجدول االبتدائي هي‬

𝑠2 ، 𝑠1
The nonbasic variables in the starting simplex tableau are

‫المتغيرات غير األساسية في الجدول االبتدائي هي‬

𝑥2 ، 𝑥1
X2 is known as the entering variable because it enters the basic solution
(the most negative coefficient in the objective equation)
Then we find the ratio to determine the leaving variable and pivot
element
‫المتغير الداخل للمتغيرات األساسية‬
) ‫𝑥 (أكبر عدد سالب للصف االول بعد أخذ القيمة المطلقة‬2 ‫هو‬
‫ثم نجد النسبة‬
‫(النسبة‬Ratio)
4/1=4
5/2=2.5
The leaving variable is 𝑠2 and pivot element is (2) and to make it to (1)
by using Elementary row operation

)‫𝑠 (أصغر نسبة موجبة‬2 ‫المتغير الخارج من المتغيرات األساسية هو‬


1 ‫) هو العنصر المحوري ولهذا نريد ان نجعله‬2( ‫ العدد‬:‫ملحوظة‬
‫وذلك باستخدام عمليات الصف البسيط‬
We multiply the third row by (0.5)
0.5 𝑅3

basic 𝑥1 𝑥2 𝑠1 𝑠2 solution
z -2 -3 0 0 0
𝑠1 2 1 1 0 4
𝑥2 0.5 1 0 0.5 2.5

Multiply the third row by (-1)and add it to the second row


Multiply the third row by (3)and add it to the first row to obtain
−𝑅3 +𝑅2
3𝑅3 +𝑅1

basic 𝑥1 (entering 𝑥2 𝑠1 𝑠2 Solution Ratio


variable)
z -0.5 0 0 1.5 7.5
𝑠1 1.5 0 1 -0.5 1.5 1.5/1.5=1
Leaving the
variable smallest
ratio
𝑥2 0.5 1 0 0.5 2.5 2.5/0.5=5
table (b)
We follow the same manner for table (b)

x1 is known as the entering variable because it enters the basic solution


(the most negative coefficient in the objective equation)
Then we find the ratio to determine the leaving variable and pivot
element

Ratio
1.5/1.5=1
2.5/0.5=5
The leaving variable is 𝑠1 and pivot element is (1.5) and to make it to
(1) by using Elementary row operation
2 1
Multiply the second row by ( = ) to obtain
3 1.5
2
𝑅
3 2

basic 𝑥1 𝑥2 𝑠1 𝑠2 solution
z -0.5 0 0 1.5 7.5
𝑥1 1 0 2 −1 1
3 3
𝑥2 0.5 1 0 0.5 2.5

Multiply the second row by (-0.5)and add it to the third row


Multiply the second row by (0.5)and add it to the first row to obtain
−0.5𝑅2 +𝑅3
0.5𝑅2 +𝑅1

basic 𝑥1 𝑥2 𝑠1 𝑠2 sol
z 0 0 1 −1 3 8
+
3 6 2
8
=
6
𝑥1 1 0 2 −1 1
3 3
𝑥2 0 1 −1 2 2
3 3

The optimal value is z=8


when
𝑥1 = 1 , 𝑥2 = 2
Example : Solve the following model by using simplex method
Max 𝑧 = 5𝑥1 + 4𝑥2
Subject to
6𝑥1 + 4𝑥2 ≤ 24 …(1)
𝑥1 + 2𝑥2 ≤ 6 …(2)

−𝑥1 + 𝑥2 ≤ 1 …(3)
𝑥2 ≤ 2 …(4)

𝑥1 , 𝑥2 ≥ 0 …(5)

Solution: The standard form for the original problem is


Max 𝑧 − 5𝑥1 − 4𝑥2 =0
Subject to
6𝑥1 + 4𝑥2 + 𝑠1 = 24 …(1)
𝑥1 + 2𝑥2 + 𝑠2 = 6 …(2)

−𝑥1 + 𝑥2 + 𝑠3 = 1 …(3)
𝑥2 + 𝑠4 = 2 …(4)

𝑥1 , 𝑥2 , 𝑠1, 𝑠2 , 𝑠3 , 𝑠4 ≥ 0 …(5)
the starting simplex tableau is

basic 𝑥1 (entering 𝑥2 𝑠1 𝑠2 𝑠3 𝑠4 solution Ratio


variable)
z -5 -4 0 0 0 0 0
𝑠1 (𝑙𝑒𝑎𝑣𝑖𝑛𝑔) 6 4 1 0 0 0 24 24/6=4
𝑠2 1 2 0 1 0 0 6 6/1=6
𝑠3 -1 1 0 0 1 0 1 1
−1
= −1
𝑠4 0 1 0 0 0 1 2 2
0
undefined
x1 is known as the entering variable because it enters the basic solution
(the most negative coefficient in the objective equation)
Then we find the ratio to determine the leaving variable and pivot
element

Ratio
24/6=4
6/1=6
1/-1=-1
(undefined)2/0
The leaving variable is 𝑠2 and pivot element is (6)
1
Multiply the second row by ( ) to obtain
6
1
𝑅
6 2

basic 𝑥1 𝑥2 𝑠1 𝑠2 𝑠3 𝑠4 solution
z -5 -4 0 0 0 0 0
𝑥1 1 2 1 0 0 0 4
3 6
𝑠2 1 2 0 1 0 0 6
𝑠3 -1 1 0 0 1 0 1
𝑠4 0 1 0 0 0 1 2
Table (b)
Multiply the second row by (-1)and add it to the third row
Multiply the second row by (1)and add it to the fourth row
Multiply the second row by (5)and add it to the first row to obtain
−𝑅2 +𝑅3
𝑅2 +𝑅4
5𝑅2 +𝑅1

Basic 𝑥1 𝑥2 (𝑒𝑛𝑡𝑒𝑟𝑖𝑛𝑔) 𝑠1 𝑠2 𝑠3 𝑠4 solution Ratio
z 0 −2 5 0 0 0 20
3 6
𝑥1 1 2 1 0 0 0 4 6
3 6
𝑠2 (Leaving) 0 4 −1 1 0 0 2 6=𝟑
4 𝟐
3 6
𝑠3 0 5 1 0 1 0 5 3
3 6
𝑠4 0 1 0 0 0 1 2 2
Table (c)
Repeat the same steps for table (c)
X2 is known as the entering variable because it enters the basic solution
(the most negative coefficient in the objective equation)
Then we find the ratio to determine the leaving variable and pivot
element
Ratio
2
4÷ =6
3
4
2 ÷ = 1.5)‫(األقل‬
3
5
5÷ =3
3
2÷1=2
4
The leaving variable is 𝑠2 and pivot element is ( )
3
3
We multiply the third row by
4
3
𝑅
4 3

Basic 𝑥1 𝑥2 𝑠1 𝑠2 𝑠3 𝑠4 solution
z 0 −2 5 0 0 0 20
3 6
𝑥1 1 2 1 0 0 0 4
3 6
𝑠2 0 1 −1 3 0 0 3
8 4 2
𝑠3 0 5 1 0 1 0 5
3 6
𝑠4 0 1 0 0 0 1 2

−2
Multiply the third row by ( )and add it to the second row
3
−5
Multiply the third row by ( )and add it to the fourth row
3
Multiply the third row by (-1)and add it to the fifth row

2
Multiply the third row by ( )and add it to the first row to obtain
3

−2
𝑅 +𝑅
3 3 2
−5
𝑅 +𝑅
3 3 4
−𝑅3 +𝑅5
2
𝑅 +𝑅
3 3 1

Basic 𝑥1 𝑥2 𝑠1 𝑠2 𝑠3 𝑠4 Soltuion
z 0 0 3 1 0 0 21
4 2
𝑥1 1 0 1 −1 0 0 3
4 2
𝑥2 0 1 −1 3 0 0 3
8 4 2
𝑠3 0 0 3 −5 1 0 5
8 4 2
𝑠4 0 0 1 −3 0 1 1
8 4 2
The optimal solution is z=21
When

3
𝑥2 =
2
, 𝑥1 = 3
Course’s Name: Operation Research
Course's Number: 19041225
Instructor : Dr. Basheer Abdallah

3.4.1 𝑴-Method
M-Method‫طريقة الجزاء أو العقوبة‬

The simplex algorithm in the previous section is explained in the case that all constraints in LP
problems are of the form (≤) −inequalities. This section will consider LP problems including (≥)
and/or (=) type constraints. Two techniques will be presented in this section to solve such LP
problems, one is called 𝑴-Method and the other one is called Two-Phase Method. These
methods are modifications of the simplex method.
‫الحظنا في الدرس السابق أن طريقة سمبلكس كانت تستعمل في مسائل البرمجة الخطية التي تكون فيها جميع المتباينات (القيود) على‬
‫ في‬.‫ إذا كانت إحدى القيود على شكل معادلة (=) أو متباينة أكبر أو يساوي فإننا نلجأ لطريقتين إليجاد الحل األمثل‬.‫شكل أقل أو يساوي‬
.‫ وفي الدرس القادم سنستعرض الطريقة الثانية بإذن هللا تعالى‬M-Method ‫هذا الدرس سنستعرض طريقة‬
As in the simplex method we start with the standard equation form of the LP problem. If an
equation 𝑖 has no slack variable then we add an artificial variable )‫ 𝑖𝑅 (متغير مصطنع أو زائف‬to its
left-hand side. However, these artificial variables are not part of the original LP problem, so a
penalty )‫(عقوبة‬should be added in the objective function defined as

−𝑀, 𝑖𝑛 𝑚𝑎𝑥𝑖𝑚𝑖𝑧𝑎𝑡𝑖𝑜𝑛 𝑝𝑟𝑜𝑏𝑙𝑒𝑚𝑠


𝐴𝑟𝑡𝑖𝑓𝑖𝑐𝑖𝑎𝑙 𝑣𝑎𝑟𝑖𝑎𝑏𝑙𝑒 𝑜𝑏𝑗𝑒𝑐𝑡𝑖𝑣𝑒 𝑓𝑢𝑛𝑐𝑡𝑖𝑜𝑛 𝑐𝑜𝑒𝑓𝑓𝑖𝑐𝑖𝑒𝑛𝑡 = {
𝑀, 𝑖𝑛 𝑚𝑖𝑛𝑖𝑚𝑖𝑧𝑎𝑡𝑖𝑜𝑛 𝑝𝑟𝑜𝑏𝑙𝑒𝑚𝑠

The constant 𝑀 is a sufficiently large positive value (mathematically, 𝑀 → ∞). It should be


noticed that in some references 𝑀-method is called penalty method.

Slack variables together with artificial variables serve as starting basic variables in the initial
simplex tableau. The 𝑀-method will be shown in the next example.

1
‫المشكلة في القيود التي على شكل معادلة (=) أو متباينة أكبر أو يساوي أنه عند تحويلها لشكل المعادالت القياسي ‪(Standard‬‬
‫)‪ Equation Form‬فإنها ال تحتوي على متغيرات مكملة )‪ (Slack Variables‬لذلك نضيف لكل قيد منها متغير مصطنع أو‬
‫زائف)‪ (Artificial Variable‬يقوم مقام المتغيرات المكملة ‪.‬ولكن هذه المتغيرات المصطنعة ليست من متغيرات المسألة األصلية‪،‬‬
‫هي فقط متغيرات دخيلة وبالتالي يجب أن نضمن خروجها ‪ Leaving‬من ‪ iterations‬وعدم عودتها ‪ entering‬مرة أخرى‪ ،‬لذلك‬
‫نفرض عليها عقوبة كبيرة جدا في إقتران الهدف ‪ objective function‬تتمثل هذه العقوبة بجعل معامل كل متغير مصطنع هو ‪–M‬‬
‫في حالة ‪max‬‬
‫ومعامل كل متغير مصطنع هو ‪ M‬في حالة ‪ min‬حيث أن ‪ M‬كمية موجبة وكبيرة جدا‪.‬‬

‫هذه العقوبة منطقية جدا ألنه إذا كانت ‪ M‬عدد موجب وكبير جدا فإن المتغير المصطنع ‪ R‬سيظهر في اقتران الهدف في حالة ‪max‬‬
‫على الشكل )‪( -MR‬أي يصبح هناك عدد سالب وكبير جدا وبالتالي هذا يجبر المتغير المصطنع ‪ R‬أن تصبح قيمته الحقا تساوي‬
‫صفرا )‪ (non basic variable‬وإال سيكون هناك مقدار سالب وكبير جدا في حالة ‪ !max‬وبالتالي ال يمكن تحقيق هدف ‪.max‬‬

‫المتغيرات المصطنعة مع المتغيرات المكملةهي التي ستصبح المتغيرات األساسيةاالبتدائية في الجدول األولي لسمبلكس ‪Starting‬‬
‫‪.Simplex Tableau‬‬
‫‪Example 3.4.1‬‬
‫‪Bevco manufactures an orange-flavored soft drink called Oranj by combining orange soda and‬‬
‫‪orange juice. Each ounce of orange soda contains 0.5 oz of sugar and 1 mg of vitamin C. Each‬‬
‫‪ounce of orange juice contains 0.25 oz of sugar and 3 mg of vitamin C. It costs Bevco 2¢ to‬‬
‫‪produce an ounce of orange soda and 3¢ to produce an ounce of orange juice. Bevco’s‬‬
‫‪marketing department has decided that each 10-oz bottle of Oranj must contain at least 20 mg‬‬
‫‪of vitamin C and at most 4 oz of sugar. Use linear programming to determine how Bevco can‬‬
‫‪meet the marketing department’s requirements at minimum cost.‬‬
‫تصنع شركة ‪ Bevco‬مشروب خفيف بنكهة البرتقال يسمى ‪ Oranj‬وذلك بمزج صودا البرتقال مع عصير البرتقال‪ .‬كل أونصة من‬
‫صودا البرتقال تحتوي على ‪ 0.5‬أونصة من السكر و ‪ 1‬ملغم من فيتامين ‪ .C‬كل أونصة من من عصير البرتقال تحتوي على ‪0.25‬‬
‫أونصة من السكر و ‪ 3‬ملغم من فيتامين ‪ .C‬يكلف شركة ‪2 Bevco‬سنت إلنتاج أونصة واحدة من صودا البرتقال ويكلفها ‪3‬سنت إلنتاج‬
‫أونصة واحدة من عصير البرتقال‪ .‬قرر قسم التسويق في شركة ‪ Bevco‬أن كل قنينة من عصير ‪ Oranj‬سعة ‪ 10‬أونصات بأنه يجب‬
‫أن تحتوي على األقل على ‪20‬ملغم من فيتامين ‪ C‬وعلى األكثر على ‪ 4‬أونصة من السكر‪ .‬إستعمل البرمجة الخطية لتحدد كيف يمكن‬
‫لشركة ‪ Bevco‬أن تلبي متطلبات قسم التسويق بأقل تكلفة ممكنة؟‬
‫‪Solution:‬‬
‫‪Let‬‬
‫‪𝑥1 = number of ounces of orange soda in a bottle of Oranj‬‬
‫‪: 𝑥1‬عدد األونصات من صودا البرتقال في عبوة من األورنج‬

‫‪𝑥2 = number of ounces of orange juice in a bottle of Oranj‬‬

‫‪∶ 𝑥2‬عدد األونصات من عصير البرتقال في عبوة من األورنج‬


‫‪The problem can be modeled as‬‬

‫‪𝑀𝑖𝑛𝑖𝑚𝑖𝑧𝑒 𝑧 = 2𝑥1 + 3𝑥2‬‬


‫‪subject to‬‬

‫‪2‬‬
1 1
𝑥1 + 𝑥2 ≤ 4 (𝑆𝑢𝑔𝑎𝑟 𝑐𝑜𝑛𝑠𝑡𝑟𝑎𝑖𝑛𝑡)
2 4
𝑥1 + 3𝑥2 ≥ 20 (𝑉𝑖𝑡𝑎𝑚𝑖𝑛 𝐶 𝑐𝑜𝑛𝑠𝑡𝑟𝑎𝑖𝑛𝑡)
𝑥1 + 𝑥2 = 10 (10 𝑜𝑧 𝑖𝑛 𝑏𝑜𝑡𝑡𝑙𝑒 𝑜𝑓 𝑂𝑟𝑎𝑛𝑗)
𝑥1 , 𝑥2 ≥ 0

The equation form of the LP problem is


𝑀𝑖𝑛𝑖𝑚𝑖𝑧𝑒 𝑧 = 2𝑥1 + 3𝑥2 + 0𝑠1 + 0𝑠2
subject to
1 1
𝑥1 + 𝑥2 + 𝑠1 = 4 (1)
2 4
𝑥1 + 3𝑥2 − 𝑠2 = 20 (2)
𝑥1 + 𝑥2 = 10 (3)
𝑥1 , 𝑥2 , 𝑠1 , 𝑠2 ≥ 0

Only equation (1) has a slack variable. So artificial variables 𝑅2 and 𝑅3 should be added to the
left-hand side of equations (2) and (3) respectively. Taking into account that this is a
minimization LP problem the coefficient of each 𝑅2 and 𝑅3 in the objective function should be 𝑀
where 𝑀 is a very large positive number. As a result the equation form becomes

‫𝑅للطرف األيسر للمعادلتين‬2 , 𝑅3 ‫ لذلك يجب اضافة متغيرات مصطنعة‬.‫) هي فقط لها متغير مكمل‬1( ‫المعادلة‬

‫ لذا يجب ان يكون‬، ‫ مع األخذ بعين االعتبار أن هذه هي مسألة البرمجة الخطية اليجاد القيمة الصغرى‬.‫االولى والثانية على التوالي‬

.‫هو عدد موجب كبير جدا‬ 𝑀 ‫𝑅 في اقتران الهدف هو 𝑀 بحيث أن‬2 , 𝑅3‫معامل كل من‬

‫لذا الشكل القياسي يصبح بعد اضافة المتغيرات االصطناعية‬

𝑀𝑖𝑛𝑖𝑚𝑖𝑧𝑒 𝑧 = 2𝑥1 + 3𝑥2 + 𝑀𝑅2 + 𝑀𝑅3 + 0𝑠1 + 0𝑠2


subject to
1 1
𝑥1 + 𝑥2 + 𝑠1 =4 (4)
2 4
𝑥1 + 3𝑥2 − 𝑠2 + 𝑅2 = 20 (5)
𝑥1 + 𝑥2 + 𝑅3 = 10 (6)
𝑥1 , 𝑥2 , 𝑠1 , 𝑠2 , 𝑅2 , 𝑅3 ≥ 0

The objective equation can be written as


𝑧 − 2𝑥1 − 3𝑥2 − 𝑀𝑅2 − 𝑀𝑅3 + 0𝑠1 + 0𝑠2 = 0 (7)

3
The simplex tableau will be

Basic 𝑥1 𝑥2 𝑠2 𝑠1 𝑅2 𝑅3 Solution
‫االساس‬ ‫الحل‬
𝑧 −2 −3 0 0 −𝑀 −𝑀 0 𝑧 −row

𝑠1 1 1 0 1 0 0 4 𝑠1 −row
2 4
𝑅2 1 3 −1 0 1 0 20 𝑅2 −row

𝑅3 1 1 0 0 0 1 10 𝑅3 −row
Table 3.4.1

The starting basic variables are 𝑠1 , 𝑅2 , and 𝑅3 with values 4, 20, and 10 respectively. Substituting
these values in the 𝑧-equation above yields that 𝑧 = 30𝑀 which is inconsistent with Table 3.4.1
where 𝑧 = 0. To make the situation consistent we substitute out 𝑅2 = 20 − 𝑥1 − 3𝑥2 + 𝑠2 from
equation (5) and 𝑅3 = 10 − 𝑥1 − 𝑥2 from equation (6) in equation (7). The new objective
equation is

𝑧 + (2𝑀 − 2)𝑥1 + (4𝑀 − 3)𝑥2 − 𝑀𝑠2 + 0𝑠1 = 30𝑀 (8)

‫ السابقة‬z‫ تعويض هذه القيم في معادلة‬.‫ على التوالي‬4, 20, 10 ‫𝑠 للقيم‬1 , 𝑅2 , 𝑅3‫المتغيرات األساسية االبتدائية هي‬

‫ لجعل الوضع متآلفا‬. z=0 ‫ عندما‬3.4.1‫ = 𝑧 والتي هي غير متآلفة مع الجدول‬30𝑀 ‫ثم نحصل على‬

‫𝑅 من المعادلة الخامسة في المعادلة السابعة‬2 = 20 − 𝑥1 − 3𝑥2 + 𝑠2‫نعوض‬

‫𝑅من المعادلة السادسة في المعادلة السابعة‬3 = 10 − 𝑥1 − 𝑥2‫نعوض‬

𝑧 − 2𝑥1 − 3𝑥2 − 𝑀𝑅2 − 𝑀𝑅3 + 0𝑠1 + 0𝑠2 = 0 (7)


𝑧 − 2𝑥1 − 3𝑥2 − 𝑀(20 − 𝑥1 − 3𝑥2 + 𝑠2 ) − 𝑀(10 − 𝑥1 − 𝑥2 ) + 0𝑠1 + 0𝑠2 = 0

‫لذا اقتران الهدف الجديد يصبح كالتالي‬

𝑧 + (2𝑀 − 2)𝑥1 + (4𝑀 − 3)𝑥2 − 𝑀𝑠2 + 0𝑠1 = 30𝑀 (8)

4
The modified simplex tableau is
‫الجدول االبتدائي المعدل هو‬

Basic 𝑥1 𝑥2 𝑠2 𝑠1 𝑅2 𝑅3 Solution
𝑧 2𝑀 − 2 4𝑀 − 3 −𝑀 0 0 0 30𝑀 𝑧 −row

𝑠1 1 1 0 1 0 0 4 𝑠1 −row
2 4
𝑅2 1 3 −1 0 1 0 20 𝑅2 −row
𝑅3 1 1 0 0 0 1 10 𝑅3 −row
Table 3.4.2

The optimality condition in the minimization LP problems states that the most positive variable
coefficient in the 𝑧 −row is the entering variable. It is assumed that 𝑀 is a very large positive
quantity, so 4𝑀 − 3 > 2𝑀 − 2. Thus, 𝑥2 is the entering variable. We apply the feasibility
condition (ratio test) to determine the leaving variable.
z ‫شرط المثالية في مسألة البرمجة الخطية للقيم الصغرى ينص على أن أكبر معامل للمتغير الموجب في الصف‬
4𝑀 − 3 > 2𝑀 − 2 ‫ لذا‬، ‫ كمية موجبة كبيرة جدا‬M‫ على فرض أن‬. ‫هو المتغير الداخل‬
‫ نطبق الشرط (اختبار النسبة) لتحديد المتغير الخارج‬. ‫𝑥 هو المتغير الداخل‬2 ‫لهذا‬

‫الحل‬ Entering 𝑥2 − column Solution Ratio


Basic ‫الحل‬ ‫النسبة‬
𝑠1 1 4 1
4 ÷ = 16
4 4
𝑅2 3 20 20 ÷ 3 ≅ 𝟔. 𝟔𝟕

𝑅3 1 10 10 ÷ 1 = 10
Table 3.4.3

Table 3.4.3 shows that the artificial variable 𝑅2 is the leaving variable. The 𝑥2 −column is the
pivot column and the 𝑅2 −row is the pivot row. Their intersection is the pivot element 3. We

5
‫‪1‬‬
‫‪make the pivot element equals 1 by multiplying the 𝑅2 −row by . The new 𝑅2 −row in the‬‬
‫‪3‬‬
‫‪simplex tableau is shown below‬‬

‫الجدول ‪ 3.4.3‬يبين أن المتغير االصطناعي‪𝑅2‬هو التغير الخارج‪ .‬العمود ‪ 𝑥2‬هو العمود المحوري‬

‫الصف ‪ 𝑅2‬هو الصف المحوري ‪ .‬تقاطعهما هو العنصر المحوري‪ . 3‬نجعل العنصر المحوري يساوي ‪1‬‬
‫‪1‬‬
‫وذلك بضرب الصف‪𝑅2‬بالعدد ‪ .‬الصف الجديد ل ‪ 𝑅2‬يعرض في الجدول التالي‬
‫‪3‬‬

‫‪Basic‬‬ ‫‪𝑥1‬‬ ‫‪𝑥2‬‬ ‫‪𝑠2‬‬ ‫‪𝑠1‬‬ ‫‪𝑅2‬‬ ‫‪𝑅3‬‬ ‫‪Solution‬‬


‫𝑧‬ ‫‪2𝑀 − 2‬‬ ‫‪4𝑀 − 3‬‬ ‫𝑀‪−‬‬ ‫‪0‬‬ ‫‪0‬‬ ‫‪0‬‬ ‫𝑀‪30‬‬ ‫‪𝑧 −row‬‬

‫‪𝑠1‬‬ ‫‪1‬‬ ‫‪1‬‬ ‫‪0‬‬ ‫‪1‬‬ ‫‪0‬‬ ‫‪0‬‬ ‫‪4‬‬ ‫‪𝑠1 −row‬‬
‫‪2‬‬ ‫‪4‬‬
‫𝟐𝑹‬ ‫𝟏‬ ‫𝟏‬ ‫𝟏‬ ‫𝟏 𝟎‬ ‫𝟎‬ ‫𝟎𝟐‬ ‫‪𝑹𝟐 −row‬‬
‫‪−‬‬
‫𝟑‬ ‫𝟑‬ ‫𝟑‬ ‫𝟑‬
‫‪𝑅3‬‬ ‫‪1‬‬ ‫‪1‬‬ ‫‪0‬‬ ‫‪0‬‬ ‫‪0‬‬ ‫‪1‬‬ ‫‪10‬‬ ‫‪𝑅3 −row‬‬
‫‪Table 3.4.4‬‬

‫‪Next we apply elementary row operation of type III to eliminate all entries above and below the‬‬
‫‪pivot element. The resulting tableau is‬‬
‫بعد ذلك نطبق عمليات الصف البسيط من النوع الثالث لحذف كل المدخالت التي هي فوق وتحت العنصر المحوري ‪ .‬ثم نحصل على‬
‫الجدول التالي‬

‫‪Basic‬‬ ‫‪𝑥1‬‬ ‫‪𝑥2‬‬ ‫‪𝑠2‬‬ ‫‪𝑠1‬‬ ‫‪𝑅2‬‬ ‫‪𝑅3‬‬ ‫‪Solution‬‬


‫𝑧‬ ‫‪2𝑀 − 3‬‬ ‫‪0‬‬ ‫‪𝑀−3‬‬ ‫‪0‬‬ ‫𝑀‪3 − 4‬‬ ‫‪0‬‬ ‫‪10𝑀 + 60 𝑧 −row‬‬
‫‪3‬‬ ‫‪3‬‬ ‫‪3‬‬ ‫‪3‬‬

‫‪6‬‬
𝑠1 5 0 1 1 1 0 7 𝑠1 −row

12 12 12 3
𝑥2 1 1 1 0 1 0 20 𝑥2 −row

3 3 3 3
𝑅3 2 0 1 0 1 1 10 𝑅3 −row

3 3 3 3
Table 3.4.5

The optimality condition indicates that 𝑥1 is the entering variable. The ratio test is illustrated in
the following table.

‫ اختبار النسبة موضح في الجدول التالي‬.‫𝑥 هو المتغير الداخل‬1 ‫شرط المثالية يبين أن‬

Basic Entering 𝑥1 − column Solution Ratio


‫االساس‬ ‫الحل‬ ‫النسبة‬
𝑠1 5 7 7 5
÷ = 5.6
12 3 3 12
𝑥2 1 20 20 1
÷ = 20
3 3 3 3
𝑅3 2 10 10 2
÷ =𝟓
3 3 3 3
Table 3.4.6

So the artificial variable 𝑅3 is the leaving variable. We repeat the steps above to make the pivot
element equals 1 and to eliminate all entries above and below it. The resultant simplex tableau
is

1 ‫ نطبق الخطوات السابقة لجعل العنصر المحوري يساوي‬. ‫𝑅 هو المتغير الخارج‬3‫لذا المتغير االصطناعي‬
.‫ثم حذف كل المدخالت فوق وتحت العنصر المحوري‬
‫ثم نحصل على الجدول التالي‬

Basic 𝑥1 𝑥2 𝑠2 𝑠1 𝑅2 𝑅3 Solution
𝑧 0 0 1 0 1 − 2𝑀 3 − 2𝑀 25 𝑧 −row

2 2 2

𝑠1 0 0 1 1 1 5 1 𝑠1 −row
− −
8 8 8 4
7
𝑥2 0 1 1 0 1 1 5 𝑥2 −row
− −
2 2 2
𝑥1 1 0 1 0 1 3 5 𝑥1 −row

2 2 2
Table 3.4.7

All entries in the 𝑧 −row are either zero or negative so the optimality condition assures that the
obtained solution is optimal. Therefore, Bevco can meet the marketing department’s
requirements by mixing 5 oz of orange soda and 5 oz of orange juice at the minimum cost 𝑧 =
1 1 15
25¢. The value 𝑠1 = means that each 10-oz bottle of Oranj contains 4 − = oz of sugar. It
4 4 4
should be noticed that at the optimum solution the value of the artificial variables 𝑅1 and 𝑅2 is
zero. This observation makes sense because these variables are not part of the original LP
problem and their role is to be starting basic variables. If one of the artificial variables has a
positive value in the optimum simplex tableau, then the associated LP problem has infeasible
solution. This case and other cases will be studied in details in the next section.

‫ لهذا شركة بيفكو‬.‫ لذا شرط المثالية يبين أن الحل الناتج هو مثالي‬،‫ هي اما صفرا أو سالبة‬z‫كل المدخالت في الصف‬
‫ اونصات من عصير البرتقال عند أقل تكلفة‬5 ‫ اونصات من صودا البرتقال مع‬5 ‫تقابل احتياجات قسم التسويق بمزج‬
1 15 1
‫ اونصات من السكر‬4 − = ‫ اونصات من البرتقال تحوي‬10 ‫𝑠 تعني أن‬1 = ‫القيمة‬. 𝑧 = 25¢
4 4 4

.‫𝑅 هي صفرا‬1 and 𝑅2 ‫وتجدر اإلشارة إلى أنه في الحل األمثل تكون قيمة المتغيرات االصطناعية‬
.‫هذه المالحظة منطقية ألن هذه المتغيرات ليست جز ًءا من مشكلة البرمجة الخطية األصلية ودورها هو بدء المتغيرات األساسية‬
.‫ فان مشكلة البرمجة الخطية المرتبطة ليس لها حل‬،‫إذا كان ألحد المتغيرات االصطناعية قيمة موجبة في الجدول البسيط األمثل‬
.‫سيتم دراسة هذه الحالة والحاالت األخرى بالتفصيل في القسم التالي‬

8
Course’s Name: Operation Research
Course's Number: 19041225
Instructor : Dr. Basheer Abdallah

Examples on M-Method

Example 1: Use the M-method to solve the following LP model:

𝑀𝑎𝑥𝑖𝑚𝑖𝑧𝑒 𝑧 = 2𝑥1 + 3𝑥2 − 5𝑥3

subject to
𝑥1 + 𝑥2 + 𝑥3 = 7
2𝑥1 − 5𝑥2 + 𝑥3 ≥ 10
𝑥1 , 𝑥2 , 𝑥3 ≥ 0

Solution: The standard equation form is obtained by subtracting a surplus variable 𝑠2 in


the second constraint:
𝑥1 + 𝑥2 + 𝑥3 = 7
2𝑥1 − 5𝑥2 + 𝑥3 − 𝑠2 = 10
𝑥1 , 𝑥2 , 𝑥3 , 𝑠2 ≥ 0

The first and second constraints have no slack variables, so we add artificial variables 𝑅1
and 𝑅2 . The LP problem is maximization so we the coefficients of 𝑅1 and 𝑅2 are – 𝑀, where
𝑀 is a very large positive number. The modified equation form becomes

𝑀𝑎𝑥𝑖𝑚𝑖𝑧𝑒 𝑧 = 2𝑥1 + 3𝑥2 − 5𝑥3 − 𝑀𝑅1 − 𝑀𝑅2

subject to

1
𝑥1 + 𝑥2 + 𝑥3 + 𝑅1 = 7
2𝑥1 − 5𝑥2 + 𝑥3 − 𝑠2 + 𝑅2 = 10
𝑥1 , 𝑥2 , 𝑥3 , 𝑠2 , 𝑅1 , 𝑅2 ≥ 0

We rewrite the objective equation as:

𝑧 − 2𝑥1 − 3𝑥2 + 5𝑥3 + 𝑀𝑅1 + 𝑀𝑅2 = 0 (∗)

From the first constraint equation we have 𝑅1 = 7 − 𝑥1 − 𝑥2 − 𝑥3 .

From the second constraint equation we get 𝑅2 = 10 − 2𝑥1 + 5𝑥2 − 𝑥3 + 𝑠2 .

We substitute out 𝑅1 and 𝑅2 in equation (∗), the resultant 𝑧 −equation is:

𝑧 + (−3𝑀 − 2)𝑥1 + (4𝑀 − 3)𝑥2 + (−2𝑀 + 5)𝑥3 + 𝑀𝑠2 = −17𝑀.

The initial simplex tableau is (Please Check!)

Basic 𝑥1 𝑥2 𝑥3 𝑠2 𝑅1 𝑅2 Solution
𝑧 −3𝑀 − 2 4𝑀 − 3 −2𝑀 + 5 𝑀 0 0 −17𝑀 𝑧 −row

𝑅1 1 1 1 0 1 0 7 𝑅1 −row

𝑅2 2 −5 1 −1 0 1 10 𝑅2 −row

The optimality condition for maximization problems says that the variable with the most
negative coefficient in the 𝑧 −row is the entering variable. So in our case, 𝑥1 is the entering
variable. The ratio test indicates that 𝑅2 is the leaving variable (Why?). The next tableau is
(Please Check!)

Basic 𝑥1 𝑥2 𝑥3 𝑠2 𝑅1 𝑅2 Solution
𝑧 0 7 𝑀 𝑀 0 3𝑀 −2𝑀 + 10 𝑧 −row
− 𝑀−8 − +6 − −1 +1
2 2 2 2

𝑅1 0 7 1 1 1 1 2 𝑅1 −row

2 2 2 2
𝑥1 1 5 1 1 0 1 5 𝑥1 −row
− −
2 2 2 2

2
The optimality condition implies that 𝑥2 is the entering variable (Why?). The ratio test
indicates that 𝑅1 is the leaving variable (Why?). The next tableau is (Please Check!)

Basic 𝑥1 𝑥2 𝑥3 𝑠2 𝑅1 𝑅2 Solution
𝑧 0 0 50 1 16 1 102 𝑧 −row
+𝑀 − +𝑀
7 7 7 7 7

𝑥2 0 1 1 1 2 1 4 𝑥2 −row

7 7 7 7 7
𝑥1 1 0 6 1 5 1 45 𝑥1 −row

7 7 7 7 7

All entries in the 𝑧 −row are either positive or zero, so the solution is optimal. The optimum
102 45 4
solution is 𝑧 = when 𝑥1 = , 𝑥2 = , and 𝑥3 = 𝑠2 = 𝑅1 = 𝑅2 = 0.
7 7 7

Example 2: Consider the following LP problem

𝑀𝑎𝑥𝑖𝑚𝑖𝑧𝑒 𝑧 = 2𝑥1 − 7𝑥2

subject to
−2𝑥1 + 3𝑥2 = 3
4𝑥1 + 5𝑥2 ≥ 10
6𝑥1 + 7𝑥2 ≤ 3
4𝑥1 + 8𝑥2 ≥ 5
𝑥1 , 𝑥2 ≥ 0

a) Develop the 𝑧 − 𝑟𝑜𝑤 after substituting out the artificial variables.


b) Which variable enters first?
c) Which variable leaves first?

Solution:

a) The equation form is


𝑀𝑎𝑥𝑖𝑚𝑖𝑧𝑒 𝑧 = 2𝑥1 − 7𝑥2 − 𝑀𝑅1 − 𝑀𝑅2 − 𝑀𝑅4

subject to

3
−2𝑥1 + 3𝑥2 + 𝑅1 = 3
4𝑥1 + 5𝑥2 − 𝑠2 + 𝑅2 = 10
6𝑥1 + 7𝑥2 + 𝑠3 = 3
4𝑥1 + 8𝑥2 − 𝑠4 + 𝑅4 = 5
𝑥1 , 𝑥2 , 𝑅1 , 𝑅2 , 𝑅4 , 𝑠2 , 𝑠3 , 𝑠4 ≥ 0

We rewrite the objective equation as:

𝑧 − 2𝑥1 + 7𝑥2 + 𝑀𝑅1 + 𝑀𝑅2 + 𝑀𝑅4 = 0 (∗)

From the first constraint equation we have 𝑅1 = 3 + 2𝑥1 − 3𝑥2 .

From the second constraint equation we get 𝑅2 = 10 − 4𝑥1 − 5𝑥2 + 𝑠2 .

From the fourth constraint equation we get 𝑅4 = 5 − 4𝑥1 − 8𝑥2 + 𝑠4

We substitute out 𝑅1 , 𝑅2 and 𝑅4 in equation (∗), the modified 𝑧 −equation is:

𝑧 + (−6𝑀 − 2)𝑥1 + (−16𝑀 + 7)𝑥2 + 𝑀𝑠2 + 𝑀𝑠4 = −18𝑀

b) From the optimality condition and the modified 𝑧 −equation obtained in part (a) above
we get that 𝑥2 enters first.
c) The ratio test shows that 𝑠3 leaves first.

4
Course’s Name: Operation Research
Course's Number: 19041225
Instructor : Dr. Basheer Abdallah

3.4.2 Two-Phase Method

The two-phase method is a development of the 𝑀-method where a penalty 𝑀 is not imposed
on the artificial variables. Instead the method solves the LP problem in two phases:

Phase I: Write the original LP problem in the standard equation form. We modify this form by
adding the necessary artificial variables- say 𝑅1 , 𝑅2 , … , 𝑅𝑘 - to the constraints (exactly as in the
𝑀-method). Next, regardless of whether the original LP problem is maximization or
minimization we replace the original objective equation by

𝑀𝑖𝑛𝑖𝑚𝑖𝑧𝑒 𝑟 = 𝑅1 + 𝑅2 + ⋯ + 𝑅𝑘

We solve the new LP problem and find the optimum solution. If the optimum value of 𝑟 is
positive, then the original LP problem has no feasible solution. Otherwise, proceed to Phase
II.

Phase II: Use the feasible solution from Phase I as a starting basic feasible
solution for the original LP problem and continue with the simplex computations.

‫طريقة المرحلتين‬

‫ حيث ال يتم فرض عقوبة على المتغيرات المصطنعة (الزائفة) في إقتران‬M-method ‫تعتبر طريقة المرحلتين تطويرا لطريقة‬
:‫ بدال من ذلك يتم حل مسألة البرمجة الخطية بمرحلتين‬.‫الهدف‬

slack, surplus and artificial ‫ نجعل مسألة البرمجة الخطية في شكل المعادالت القياسي (وذلك بعد إضافة‬:‫المرحلة األولى‬
max ‫𝑅 إلى 𝑘𝑅 متغيرات مصطنعة لمسألة البرمجة الخطية فإنه بغض النظر عن طبيعة المسألة‬2 ‫𝑅 و‬1 ‫ إذا كانت‬.)variables
‫) للمسألة األصلية باقتران هدف آخر وهو‬objective function( ‫ فإننا نقوم باستبدال اقتران الهدف‬min ‫أو‬
1
‫𝑘𝑅 ‪𝑀𝑖𝑛𝑖𝑚𝑖𝑧𝑒 𝑟 = 𝑅1 + 𝑅2 + ⋯ +‬‬
‫نقوم بحل مسألة البرمجة الخطية الجديدة ونجد الحل المثالي‪ .‬إذا لم تكن جميع قيم المتغيرات المصطنعة تساوي صفرا عند الحل‬
‫المثالي فإنه ال يوجد حل مجدي للمسألة (‪ )infeasible solution‬وال نكمل حل المسألة‪ .‬أما إذا كانت جميع قيم المتغيرات‬
‫المصطنعة تساوي صفرا عند الحل المثالي فإننا ننتقل للمرحلة الثانية‪.‬‬

‫المرحلة الثانية‪ :‬نستخدم الحل المثالي المجدي (‪ )optimal feasible solution‬الناتج من المرحلة األولى كحل أولي نبدأ به‬
‫لحل المسألة األصلية ونواصل باستخدام حسابات سمبلكس‪.‬‬

‫طريقة المرحلتين موضحة في المثال التفصيلي التالي‬

‫‪The two-phase method will be shown in details in the following example.‬‬

‫‪Example 3.4.‬‬
‫‪Apply the two-phase method to solve the LP problem‬‬
‫‪𝑀𝑖𝑛𝑖𝑚𝑖𝑧𝑒 𝑧 = 4𝑥1 + 𝑥2‬‬
‫‪subject to‬‬
‫‪3𝑥1 + 𝑥2 = 3‬‬
‫‪4𝑥1 + 3𝑥2 ≥ 6‬‬
‫‪𝑥1 + 2𝑥2 ≤ 4‬‬
‫‪𝑥1, 𝑥2 ≥ 0‬‬

‫‪Solution:‬‬

‫‪Phase I:‬‬
‫‪The equation form of the LP problem is‬‬

‫‪𝑀𝑖𝑛𝑖𝑛𝑚𝑖𝑧𝑒 𝑧 = 4𝑥1 + 𝑥2 + 0𝑠1 + 0𝑠2‬‬


‫‪subject to‬‬
‫‪3𝑥1 + 𝑥2 = 3‬‬ ‫)‪(1‬‬
‫)‪4𝑥1 + 3𝑥2 − 𝑠1 = 6 (2‬‬
‫)‪𝑥1 + 2𝑥2 + 𝑠2 = 4 (3‬‬
‫‪𝑥1, 𝑥2 , 𝑠1 , 𝑠2 ≥ 0‬‬

‫‪Artificial variables 𝑅1 and 𝑅2 are necessary to be added to equations (1) and (2) respectively,‬‬
‫‪because they have no slack variables. The modified equation form is‬‬

‫‪𝑀𝑖𝑛𝑖𝑚𝑖𝑧𝑒 𝑧 = 4𝑥1 + 𝑥2 + 0𝑠1 + 0𝑠2‬‬

‫‪2‬‬
subject to
3𝑥1 + 𝑥2 + 𝑅1 = 3 (4)
4𝑥1 + 3𝑥2 − 𝑠1 + 𝑅2 = 6 (5)
𝑥1 + 2𝑥2 + 𝑠2 = 4 (6)
𝑥1, 𝑥2 , 𝑠1 , 𝑠2 , 𝑅1 , 𝑅2 ≥ 0

We solve the following LP problem

𝑀𝑖𝑛𝑖𝑚𝑖𝑧𝑒 𝑟 = 𝑅1 + 𝑅2
subject to
3𝑥1 + 𝑥2 + 𝑅1 =3
4𝑥1 + 3𝑥2 − 𝑠1 + 𝑅2 = 6
𝑥1 + 2𝑥2 + 𝑠2 =4
𝑥1, 𝑥2 , 𝑠1 , 𝑠2 , 𝑅1 , 𝑅2 ≥ 0

As in the 𝑀-method we substitute out 𝑅1 = 3 − 3𝑥1 − 𝑥2 and 𝑅2 = 6 − 4𝑥1 − 3𝑥2 + 𝑠1 from


equations (4) and (5) respectively in the objective function 𝑟 = 𝑅1 + 𝑅2 . The objective
equation becomes
𝑟 + 7𝑥1 + 4𝑥2 − 𝑠1 + 0𝑠2 = 9

The initial simplex tableau is

Basic 𝑥1 𝑥2 𝑠1 𝑅1 𝑅2 𝑠2 Solution
𝑟 7 4 −1 0 0 0 9 𝑟 −row

𝑅1 3 1 0 1 0 0 3 𝑅1 −row

𝑅2 4 3 −1 0 1 0 6 𝑅2 −row

𝑠2 1 2 0 0 0 1 4 𝑠2 −row
Table 3.4.8

The optimality condition states that 𝑥1 is the entering variable. Applying the ratio test to
3 6 4
𝑥1 −column entries we get = 1, = 1.5, and = 4. Hence, the leaving variable is 𝑅1 . The
3 4 1
pivot element is the intersection of 𝑅1 −row with 𝑥1 −column which has value 3 in this case.
1
We make the pivot element equals 1 by multiplying the 𝑅1 −row by . After that we eliminate
3
the elements above and below the pivot element. The resultant simplex tableau will be

3
Basic 𝑥1 𝑥2 𝑠1 𝑅1 𝑅2 𝑠2 Solution
𝑟 0 5 −1 7 0 0 2 𝑟 −row

3 3

𝑥1 1 1 0 1 0 0 1 𝑥1 −row
3 3
𝑅2 0 5 −1 4 1 0 2 𝑅2 −row

3 3
𝑠2 0 5 0 1 0 1 3 𝑠2 −row

3 3
Table 3.4.9

The variable 𝑥2 enters the next iteration by optimality condition. Calculating the ratios of
1 5
solution column entries to the corresponding 𝑥2 −column entries we get 1 ÷ = 3, 2 ÷ =
3 3
5
1.2, and 3 ÷ = 1.8. Hence, the artificial variable 𝑅2 leaves next iteration. The pivot element
3
5
is the intersection of 𝑅2 −row with 𝑥2 −column which has value in this case. We make the
3
3
pivot element equals 1 by multiplying the 𝑅2 −row by . After that we eliminate the elements
5
above and below the pivot element. This yields the following simplex tableau.

Basic 𝑥1 𝑥2 𝑠1 𝑅1 𝑅2 𝑠2 Solution
𝑟 0 0 0 −1 −1 0 0 𝑟 −row

𝑥1 1 0 1 3 1 0 3 𝑥1 −row

5 5 5 5
𝑥2 0 1 3 4 3 0 6 𝑥2 −row
− −
5 5 5 5
𝑠2 0 0 1 1 −1 1 1 𝑠2 −row
Table 3.4.10

In the 𝑟 −row all entries are either zero or negative so the optimality condition implies that the
tableau is optimum. The optimum value of 𝑟 is zero, so we can proceed to Phase II. The
3 6
optimum solution 𝑥1 = , 𝑥2 = , and 𝑠2 = 1 serves as the starting feasible basic solution in
5 5
Phase II.

4
Phase II:

After deleting the artificial columns from Table 3.4.10 the original LP problem becomes
𝑀𝑖𝑛𝑖𝑛𝑚𝑖𝑧𝑒 𝑧 = 4𝑥1 + 𝑥2 + 0𝑠1 + 0𝑠2
subject to
1 3
𝑥1 + 𝑠1 = (7)
5 5
3 6
𝑥2 − 𝑠1 = (8)
5 5
𝑠1 + 𝑠2 = 1 (9)
𝑥1, 𝑥2 , 𝑠1 , 𝑠2 ≥ 0

The tableau associated with Phase II problem is thus given as

Basic 𝑥1 𝑥2 𝑠1 𝑠2 Solution
𝑧 −4 −1 0 0 0 𝑧 −row

𝑥1 1 0 1 0 3 𝑥1 −row
5 5
𝑥2 0 1 3 0 6 𝑥2 −row

5 5
𝑠2 0 0 1 1 1 𝑠2 −row
Table 3.4.11
3 6 18
We note here when 𝑥1 = and 𝑥2 = , then 𝑧 = which is inconsistent with Table 3.4.11
5 5 5
because 𝑧 = 0. Again as in the 𝑀-method to remove this inconsistency we substitute out the
variables 𝑥1 and 𝑥2 from equations (7) and (8) respectively into the objective function. The
objective equation turns out

1 18
𝑧 + 0𝑥1 + 0𝑥2 + 𝑠1 + 0𝑠2 =
5 5

The initial simplex tableau is given as

Basic 𝑥1 𝑥2 𝑠1 𝑠2 Solution
𝑧 0 0 1 0 18 𝑧 −row
5 5

5
𝑥1 1 0 1 0 3 𝑥1 −row
5 5
𝑥2 0 1 3 0 6 𝑥2 −row

5 5
𝑠2 0 0 1 1 1 𝑠2 −row
Table 3.4.12

Clearly 𝑠1 is the entering variable. The ratios of solution column entries to the corresponding
3 1 6 3
𝑠1 −column entries are ÷ = 3, ÷ (− ) = −2, and 1 ÷ 1 = 1. Thus, the slack variable 𝑠2
5 5 5 5
leaves next iteration. The pivot element is the intersection of 𝑠2 −row with 𝑠1 −column which
has value 1 in this case. We eliminate the elements above and below the pivot element. This
produces the following simplex tableau.

Basic 𝑥1 𝑥2 𝑠1 𝑠2 Solution
𝑧 0 0 0 1 17 𝑧 −row

5 5

𝑥1 1 0 0 1 2 𝑥1 −row

5 5
𝑥2 0 1 0 3 9 𝑥2 −row
5 5
𝑠1 0 0 1 1 1 𝑠1 −row
Table 3.4.13

All entries in the 𝑧 −row are either zero or negative so the solution is optimum. The optimum
17 2 9
solution is 𝑧 = occurs at 𝑥1 = and 𝑥2 = .
5 5 5

6
Course’s Name: Operation Research
Course's Number: 19041225
Instructor : Dr. Basheer Abdallah

Examples on the Two-Phase Method

Example 1: Use the two-phase method to solve the following LP model:

:‫ استخدم طريقة المرحلتين لحل المسألة التالية‬:1‫مثال‬

𝑀𝑎𝑥𝑖𝑚𝑖𝑧𝑒 𝑧 = 2𝑥1 + 3𝑥2 − 5𝑥3

subject to
𝑥1 + 𝑥2 + 𝑥3 = 7
2𝑥1 − 5𝑥2 + 𝑥3 ≥ 10
𝑥1 , 𝑥2 , 𝑥3 ≥ 0

Solution: ‫الحل‬

‫ا‬

Phase I: The standard equation form is obtained by subtracting a surplus variable 𝑠2 in the
second constraint:

‫ الشكل القياسي للمسألة هو‬:‫المرحلة األولى‬

1
𝑥1 + 𝑥2 + 𝑥3 = 7
2𝑥1 − 5𝑥2 + 𝑥3 − 𝑠2 = 10
𝑥1 , 𝑥2 , 𝑥3 , 𝑠2 ≥ 0

The first and second constraints have no slack variables, so we add artificial variables 𝑅1 and
𝑅2 . The modified constraints are

.𝑅2 ،𝑅1 ‫ لذا نضيف المتغيرات المصطنعة‬، ‫القيد االول والقيد الثاني ليس لهما متغيرات مكملة‬

‫لذا المتغيرات المعدلة هي‬


𝑥1 + 𝑥2 + 𝑥3 + 𝑅1 = 7
2𝑥1 − 5𝑥2 + 𝑥3 − 𝑠2 + 𝑅2 = 10
𝑥1 , 𝑥2 , 𝑥3 , 𝑠2 , 𝑅1 , 𝑅2 ≥ 0

We solve the following LP problem

‫نحل نظام البرمجة الخطية التالي‬

𝑀𝑖𝑛𝑖𝑚𝑖𝑧𝑒 𝑟 = 𝑅1 + 𝑅2
subject to
𝑥1 + 𝑥2 + 𝑥3 + 𝑅1 = 7
2𝑥1 − 5𝑥2 + 𝑥3 − 𝑠2 + 𝑅2 = 10
𝑥1 , 𝑥2 , 𝑥3 , 𝑠2 , 𝑅1 , 𝑅2 ≥ 0

As in the 𝑀-method we substitute out 𝑅1 = 7 − 𝑥1 − 𝑥2 − 𝑥3 and 𝑅2 = 10 − 2𝑥1 + 5𝑥2 − 𝑥3 + 𝑠2


in the objective function 𝑟 = 𝑅1 + 𝑅2 . The objective equation becomes

𝑟 + 3𝑥1 − 4𝑥2 + 2𝑥3 − 𝑠2 = 17

𝑅1 = 7 − 𝑥1 − 𝑥2 − 𝑥3 ، 𝑅2 = 10 − 2𝑥1 + 5𝑥2 − 𝑥3 + 𝑠2 ‫كما هو الحال في طريقة الجزاء نعوض‬

‫اقتران الهدف يصبح كالتالي‬ . 𝑟 = 𝑅1 + 𝑅2 ‫في اقتران الهدف‬

𝑟 + 3𝑥1 − 4𝑥2 + 2𝑥3 − 𝑠2 = 17

The initial simplex tableau is

‫الجدول االبتدائي هو‬

2
Basic 𝑥1 𝑥2 𝑥3 𝑠2 𝑅1 𝑅2 Solution
‫االساس‬ ‫الحل‬
𝑟 3 −4 2 −1 0 0 17 𝑟 −row

𝑅1 1 1 1 0 1 0 7 𝑅1 −row
𝑅2 2 −5 1 −1 0 1 10 𝑅2 −row

‫𝑅 لماذا؟‬2‫ والمتغير الخارج هو‬، 𝑥1 ‫المتغير الداخل هو‬

The entering variable is 𝑥1 . Why? The leaving variable is 𝑅2 . Why?

The next tableau is (Please check!)

‫بعد اجراء عمليات الصف البسيط فنحصل على الجدول الثاني‬

Basic 𝑥1 𝑥2 𝑥3 𝑠2 𝑅1 𝑅2 Solution
𝑟 0 7 1 1 0 3 2 𝑟 −row

2 2 2 2

𝑅1 0 7 1 1 1 1 2 𝑅1 −row

2 2 2 2
𝑥1 1 5 1 1 0 1 5 𝑥1 −row
− −
2 2 2 2

The entering variable is 𝑥2 . Why? The leaving variable is 𝑅1 . Why?

‫𝑅 لماذا؟‬1 ‫ والمتغير الخارج هو‬، 𝑥2 ‫المتغير الداخل هو‬

The next tableau is (Please check!)

‫بعد اجراء عمليات الصف البسيط فنحصل على الجدول الثالث‬

Basic 𝑥1 𝑥2 𝑥3 𝑠2 𝑅1 𝑅2 Solution

3
𝑟 0 0 0 0 −1 −1 0 𝑟 −row

𝑥2 0 1 1 1 2 1 4 𝑥2 −row

7 7 7 7 7
𝑥1 1 0 6 1 5 1 45 𝑥1 −row

7 7 7 7 7
Final Tableau of Phase I

In the 𝑟 −row all entries are either zero or negative so the optimality condition implies that the
tableau is optimum. The optimum value of 𝑟 is zero (because 𝑅1 = 𝑅2 = 0), so we can proceed
45 4
to Phase II. The optimum solution 𝑥1 = , and 𝑥2 = serves as the starting feasible basic
7 7
solution in Phase II.

‫ لذا شرط االمثلية يتضمن ان الجدول يمثل الحل االمثل‬.‫في الصف 𝑟 كل المدخالت هي اما صفر أو سالبة‬

.‫ لذا نستطيع االنتقال الى المرحلة الثانية‬، )𝑅1 = 𝑅2 = 0 ‫ هي صفر (ألن‬r ‫القيمة المثلى ل‬
45 4
.‫𝑥 يخدم كحل اساسي متاح ابتدائي للمرحلة الثانية‬1 = , 𝑥2 = ‫الحل األمثل‬
7 7

Phase II:

:‫المرحلة الثانية‬

After deleting the artificial columns from (Final Tableau of Phase I) the original LP problem
becomes

‫بعد حذف العمود للمتغيرات المصطنعة من (الجدول النهائي للمرحلة األولى) فمسالة البرمجة الخطية تصبح كالتالي‬

𝑀𝑎𝑥𝑖𝑚𝑖𝑧𝑒 𝑧 = 2𝑥1 + 3𝑥2 − 5𝑥3

subject to
1 1 4
𝑥2 + 𝑥3 + 𝑠2 =
7 7 7
6 1 45
𝑥1 + 𝑥3 − 𝑠2 =
7 7 7
𝑥1 , 𝑥2 , 𝑥3 , 𝑠2 ≥ 0

The tableau associated with Phase II problem is thus given as

‫الجدول المرتبط بمسألة المرحلة الثانية يعطى كمايلي‬

4
Basic 𝑥1 𝑥2 𝑥3 𝑠2 Solution
𝑧 −2 −3 5 0 0 𝑧 −row

𝑥2 0 1 1 1 4 𝑥2 −row
7 7 7
𝑥1 1 0 6 1 45 𝑥1 −row

7 7 7

The entering variable is 𝑥2 and the leaving variable is 𝑥2 . Why?

‫𝑥 لماذا؟‬2‫ والمتغير الخارج هو‬، 𝑥2 ‫المتغير الداخل هو‬

The next tableau is (Please check!)

‫بعد اجراء عمليات الصف البسيط فنحصل على الجدول التالي‬

Basic 𝑥1 𝑥2 𝑥3 𝑠2 Solution
𝑧 −2 0 38 3 12 𝑧 −row
7 7 7

𝑥2 0 1 1 1 4 𝑥2 −row
7 7 7
𝑥1 1 0 6 1 45 𝑥1 −row

7 7 7

The entering variable is 𝑥1 and the leaving variable is 𝑥1 . Why?

‫𝑥 لماذا؟‬1 ‫ والمتغير الخارج هو‬، 𝑥1 ‫المتغير الداخل هو‬

The next tableau is (Please check!)

‫بعد اجراء عمليات الصف البسيط فنحصل على الجدول التالي‬

5
Basic 𝑥1 𝑥2 𝑥3 𝑠2 Solution
𝑧 0 0 50 1 102 𝑧 −row
7 7 7

𝑥2 0 1 1 1 4 𝑥2 −row
7 7 7
𝑥1 1 0 6 1 45 𝑥1 −row

7 7 7

All entries in the 𝑧 −row are either positive or zero, so the solution is optimal. The optimum
102 45 4
solution is 𝑧 = when 𝑥1 = , 𝑥2 = , and 𝑥3 = 𝑠2 = 0.
7 7 7

‫ لذا شرط االمثلية يتضمن ان الجدول يمثل الحل االمثل‬.‫في الصف 𝑧 كل المدخالت هي اما صفر أو سالبة‬
45 4 102
𝑥1 = , 𝑥2 = , 𝑥3 = 𝑠2 = 0 ‫= 𝑧 عندما‬ ‫الحل األمثل هو‬
7 7 7

Example 2: Consider the following LP problem

‫ لديك مسألة البرمجة الخطية التالية‬:2‫مثال‬

𝑀𝑎𝑥𝑖𝑚𝑖𝑧𝑒 𝑧 = 2𝑥1 − 7𝑥2

subject to
−2𝑥1 + 3𝑥2 = 3
4𝑥1 + 5𝑥2 ≥ 10
6𝑥1 + 7𝑥2 ≤ 3
4𝑥1 + 8𝑥2 ≥ 5
𝑥1 , 𝑥2 ≥ 0

a) Write the corresponding Phase I objective function.


b) Which variable enters first in Phase I?
c) Which variable leaves first in Phase I?
‫أ)اكتب اقتران الهدف المرتبط بالمرحلة األولى‬
‫ب) حدد المتغير الداخل أوال في المرحلة األولى‬
‫ج) حدد المتغير الخارج أوال في المرحلة األولى‬

6
Solution:

a) The equation form is


‫الشكل القياسي هو‬
𝑀𝑎𝑥𝑖𝑚𝑖𝑧𝑒 𝑧 = 2𝑥1 − 7𝑥2

subject to
−2𝑥1 + 3𝑥2 + 𝑅1 = 3
4𝑥1 + 5𝑥2 − 𝑠2 + 𝑅2 = 10
6𝑥1 + 7𝑥2 + 𝑠3 = 3
4𝑥1 + 8𝑥2 − 𝑠4 + 𝑅4 = 5
𝑥1 , 𝑥2 , 𝑅1 , 𝑅2 , 𝑅4 , 𝑠2 , 𝑠3 , 𝑠4 ≥ 0

The objective function of Phase I is:

‫اقتران الهدف للمرحلة االولى هو‬

𝑀𝑖𝑛𝑖𝑚𝑖𝑧𝑒 𝑟 = 𝑅1 + 𝑅2 + 𝑅4

b) From the first constraint equation we have 𝑅1 = 3 + 2𝑥1 − 3𝑥2 .


From the second constraint equation we get 𝑅2 = 10 − 4𝑥1 − 5𝑥2 + 𝑠2 .
From the fourth constraint equation we get 𝑅4 = 5 − 4𝑥1 − 8𝑥2 + 𝑠4
We substitute out 𝑅1 , 𝑅2 and 𝑅4 in the objective function of Phase I, the modified
𝑟 −equation is:
𝑟 + 6𝑥1 + 16𝑥2 + 𝑠2 + 𝑠4 = 18
From the optimality condition we get that 𝑥2 enters first.
𝑅1 = 3 + 2𝑥1 − 3𝑥2 ‫من معادلة القيد االول نحصل على‬
𝑅2 = 10 − 4𝑥1 − 5𝑥2 + 𝑠2 ‫من معادلة القيد الثاني نحصل على‬
𝑅4 = 5 − 4𝑥1 − 8𝑥2 + 𝑠4‫من معادلة القيدالرابع نحصل على‬

‫ فا قتران الهدف للمرحلة الولى المعدل هو‬، ‫𝑅 في اقتران الهدف للمرحلة االولى‬1 , 𝑅2 , 𝑅4‫نعوض كل من‬
𝑟 + 6𝑥1 + 16𝑥2 + 𝑠2 + 𝑠4 = 18
‫𝑥 وهو المتغير الداخل‬2 ‫من شرط المثالية نحصل على‬
c) The ratio test shows that 𝑠3 leaves first.
‫𝑠 هو المتغير الخارج أوال‬3 ‫اختبار النسبة يبين أن‬

7
Course’s Name: Operation Research
Course's Number: 19041225
Instructor : Dr. Basheer Abdallah

3.5 Special Cases in the Simplex Method, Part I

‫ الجزء األول‬،‫حاالت خاصة في طريقة السمبلكس‬

We have seen in the previous sections that simplex method is an efficient tool for solving linear
programming problems. However, we will deal with four special cases that could appear while
applying simplex method.

1. Degeneracy

2. Alternative optima

3. Unbounded solutions

4. Nonexisting (or infeasible) solutions

‫ ولكن سوف نتعامل مع أربع حاالت‬.‫لقد وجدنا في الدروس السابقة أن طريقة سمبلكس هي أداة فعالة لحل مسائل البرمجة الخطية‬
.‫خاصة يمكن أن تظهر أثناء تطبيق طريقة السمبلكس‬

.‫ حالة االنحالل أو التفسخ‬:‫أوال‬

.‫ حالة الحلول المثالية البديلة‬:‫ثانيا‬

.‫ حالة الحلول الالمحدودة‬:‫ثالثا‬

.)‫ حالة عدم وجود حلول أو حلول غير مجدية(متاحة‬:‫رابعا‬

1
The section gives a theoretical clarification of these situations. It also presents an interpretation
of what these special results mean in a real-life problem.

.‫ وأيضا يعرض تفسير لما تعنيه هذه الحاالت في المسائل الحياتية‬.‫هذا الدرس يقدم توضيح نظري لهذه الحاالت الخاصة‬

In this lecture we investigate the first two special cases and the other cases are left for the
next lecture.

.‫في هذه المحاضرة سنتناول أول حالتين خاصتين وبقية الحاالت متروكة للمحاضرة القادمة بإذن هللا تعالى‬

3.5.1 Degeneracy

In the application of the feasibility condition of the simplex method, a tie for the minimum ratio
may occur and can be broken arbitrarily. When this happens, at least one basic variable will be
zero in the next iteration, and the new solution is said to be degenerate. Degeneracy can cause
the simplex iterations to cycle indefinitely, thus never terminating the algorithm. The condition
also reveals the possibility of at least one redundant constraint. The following example explains
the practical and theoretical impacts of degeneracy.

‫) الخاص بطريقة السمبلكس قد يحدث أن تكون هناك هناك نسبتين متساويتين وأقل‬feasibility condition( ‫عند تطبيق شرط الجدوى‬
basic (‫ فإن متغير أساسي‬،‫ عند حدوث هذا التساوي في النسب‬.-leaving variable ‫أي أنه يوجد خيارين للمتغير المغادر‬- ‫ما يمكن‬
‫ في هذا الوضع يسمى الحل الجديد الناتج بـ"الحل‬،)‫) واحد على األقل ستصبح قيمته صفرا في التكرار التالي (الجدول التالي‬variable
.‫ وبالتالي ال تنتهي الخوارزمية أبدا‬،‫ يمكن أن يؤدي اإلنحالل(التفسخ) إلستمرار تكرارات السمبلكس بشكل دوري‬."‫المنحل أو المتفسخ‬
‫ يوضح‬.‫يمكن أن تفسر هذه الظاهرة في مسائل البرمجة الخطية من الناحية العملية بإمكانية وجود قيد زائد (فائض) واحد على األقل‬
.‫المثال التالي اآلثار العملية والنظرية لإلنحالل‬

Example 3.5.1

𝑀𝑎𝑥𝑖𝑚𝑖𝑧𝑒 𝑧 = 3𝑥1 + 9𝑥2

subject to
𝑥1 + 4𝑥2 ≤ 8
𝑥1 + 2𝑥2 ≤ 4
𝑥1 , 𝑥2 ≥ 0

Using the slack variables 𝑥3 and 𝑥4 , the solution tableaus are

2
‫‪Iteration‬‬ ‫‪Basic‬‬ ‫‪𝑥1‬‬ ‫‪𝑥2‬‬ ‫‪𝑥3‬‬ ‫‪𝑥4‬‬ ‫‪Solution‬‬
‫𝟎‬ ‫𝑧‬ ‫‪−3‬‬ ‫‪−9‬‬ ‫‪0‬‬ ‫‪0‬‬ ‫‪0‬‬
‫‪𝑥2 enters‬‬ ‫‪𝑥3‬‬ ‫‪1‬‬ ‫‪4‬‬ ‫‪1‬‬ ‫‪0‬‬ ‫‪8‬‬
‫‪𝑥3 leaves‬‬ ‫‪𝑥4‬‬ ‫‪1‬‬ ‫‪2‬‬ ‫‪0‬‬ ‫‪1‬‬ ‫‪4‬‬

‫𝟏‬ ‫𝑧‬ ‫‪3‬‬ ‫‪0‬‬ ‫‪9‬‬ ‫‪0‬‬ ‫‪18‬‬


‫‪−‬‬
‫‪4‬‬ ‫‪4‬‬
‫‪𝑥1 enters‬‬ ‫‪𝑥2‬‬ ‫‪1‬‬ ‫‪1‬‬ ‫‪1‬‬ ‫‪0‬‬ ‫‪2‬‬
‫‪4‬‬ ‫‪4‬‬
‫‪𝑥4 leaves‬‬ ‫‪𝑥4‬‬ ‫‪1‬‬ ‫‪0‬‬ ‫‪1‬‬ ‫‪1‬‬ ‫‪0‬‬
‫‪−‬‬
‫‪2‬‬ ‫‪2‬‬

‫𝟐‬ ‫𝑧‬ ‫‪0‬‬ ‫‪3‬‬ ‫‪0‬‬ ‫‪3‬‬ ‫‪18‬‬


‫‪2‬‬ ‫‪2‬‬
‫‪𝑥2‬‬ ‫‪0‬‬ ‫‪1‬‬ ‫‪1‬‬ ‫‪1‬‬ ‫‪2‬‬
‫‪−‬‬
‫‪Optimum‬‬ ‫‪2‬‬ ‫‪2‬‬
‫‪𝑥1‬‬ ‫‪1‬‬ ‫‪0‬‬ ‫‪−1‬‬ ‫‪2‬‬ ‫‪0‬‬
‫‪In iteration 0, 𝑥3 and 𝑥4 tie for the leaving variable, leading to degeneracy in iteration 1 because‬‬
‫‪the basic variable 𝑥4 assumes a zero value. The optimum is attained in one additional iteration.‬‬
‫‪8‬‬ ‫‪4‬‬
‫في التكرار ‪( 0‬الجدول األول)‪ ،‬نالحظ أنه بتطبيق شرط الجدوى ينتج أن النسب متساوية )‪ ( = = 2‬وبالتالي يكون هناك خيارين‬
‫‪4‬‬ ‫‪2‬‬
‫للمتغير المغادر إما ‪ 𝑥3‬أو ‪ .𝑥4‬فلو جعلنا المتغير ‪ 𝑥3‬هو الذي يغادر فسينتج أنه في التكرار ‪( 1‬الجدول الثاني) أصبح المتغير األساسي‬
‫‪ 𝑥4‬قيمته صفرا وهذا ما يؤدي إلى االنحالل (التفسخ)‪ .‬الحل المثالي يتحقق بتكرار إضافي (الجدول الثالث)‪.‬‬

‫‪The graphical solution is shown below.‬‬

‫‪Figure 3.5.1‬‬

‫‪3‬‬
Remarks.

1. Looking at Figure 3.5.1 we see three lines pass through the optimum point (𝑥1 = 0, 𝑥2 = 2).
Because this is a two-dimensional problem, the point is overdetermined, and one of the
constraints is redundant. Redundancy means that an associated constraint can be removed
without changing the solution space. Thus, in Figure 3.5.1, 𝑥1 + 4𝑥2 ≤ 8 is redundant but 𝑥1 +
2𝑥2 ≤ 4 is not. The mere knowledge that some resources are superfluous can be important
during the implementation phase of the solution. The information may also lead to discovering
irregularities in the modeling phase of the solution. Unfortunately, there are no efficient
computational techniques for identifying redundant constraints.

‫ فإن‬، ‫ ألن هذه المسألة ثنائية األبعاد‬.(𝑥1 = 0, 𝑥2 = 2) ‫ نرى ثالثة خطوط تمر عبر النقطة المثلى‬، 3.5.1 ‫ بالنظر إلى الشكل‬.1
‫ وجود قيود فائضة عن الحاجة يعني أنه يمكن إزالة القيد المرتبط دون تغيير‬.‫ وأحد القيود زائدة عن الحاجة‬، ‫النقطة محددة بشكل مفرط‬
.‫𝑥 ليس كذلك‬1 + 2𝑥2 ≤ 4 ‫𝑥 هو قيد زائد عن الحاجة ولكن القيد‬1 + 4𝑥2 ≤ 8 ‫ القيد‬،3.5.1 ‫ في الشكل‬، ‫ وبالتالي‬.‫مساحة الحل‬
‫ضا إلى اكتشاف‬ ً ‫ قد تؤدي المعلومات أي‬.‫مجرد المعرفة بأن بعض الموارد غير ضرورية يمكن أن تكون مهمة خالل مرحلة تنفيذ الحل‬
.‫ ال توجد تقنيات حسابية فعالة لتحديد القيود الزائدة‬، ‫ لسوء الحظ‬.‫المخالفات في مرحلة النمذجة للحل‬

2. From the theoretical standpoint, degeneracy can lead to cycling. In simplex iterations 1 and
2, the objective value does not improve (𝑧 = 18), and it is thus possible for the simplex method
to enter a repetitive sequence of iterations, never improving the objective value and never
satisfying the optimality condition. Cycling may not be a common occurrence, but there have
been reports of it being encountered in practice. Though algorithms have been developed for
eliminating cycling, their use can lead to drastic slowdown in computations and hence they
should not be implemented unless there is evidence that cycling is actually taking place.

‫ ال تتحسن‬، 2 ‫ و‬1 ‫ في التكرارات‬.‫ يمكن أن يؤدي االنحالل إلى إستمرار تكرارات السمبلكس بشكل دوري‬، ‫ من الناحية النظرية‬.2
‫ وبالتالي من الممكن لطريقة سمبلكس الدخول في تكرارت متتابعة وال تتحسن قيمة إقتران الهدف مطلقًا‬، )z = 18( ‫قيمة إقتران الهدف‬
‫ على‬.‫ ولكن كانت هناك تقارير عن حدوثه عمليا‬،‫ قد ال يكون إستمرار التكرارات بشكل دوري حدثًا شائعًا‬.‫وال تحقق أبدًا شرط المثالية‬
‫ إال أن استخدامها يمكن أن يؤدي إلى تباطؤ شديد في الحسابات‬،‫الرغم من أن الخوارزميات قد تم تطويرها للقضاء على هذه الظاهرة‬
.‫وبالتالي ال يجب تنفيذها ما لم يكن هناك دليل على أن هذه الظاهرة ستحدث بالفعل‬

3.5.2 Alternative Optima

4
An LP problem may have an infinite number of alternative optima when the objective function
is parallel to a nonredundant binding constraint (i.e., a constraint that is satisfied as an
equation at the optimal solution). The next example demonstrates the practical significance of
such solutions.

‫قد تحتوي مسألة البرمجة الخطية على عدد النهائي من الحلول المثالية البديلة وذلك عندما يكون إقتران الهدف موازيا ألحد القيود الملزمة‬
.‫ يوضح المثال التالي األهمية العملية لهذه الحلول‬.)‫(أي ظانه قيد يتحقق كمعادلة في الحل األمثل‬

Example 3.5.2

𝑀𝑎𝑥𝑖𝑚𝑖𝑧𝑒 𝑧 = 2𝑥1 + 4𝑥2

subject to
𝑥1 + 2𝑥2 ≤ 5
𝑥1 + 𝑥2 ≤ 4
𝑥1 , 𝑥2 ≥ 0

Figure 3.5.2 below demonstrates how alternative optima can arise in the LP model when the
objective function is parallel to a binding constraint. Any point on the line segment 𝐵𝐶 represents
an alternative optimum with the same objective value 𝑧 = 10.

‫ أدناه كيف يمكن أن تنشأ الحلول المثلى البديلة في نموذج البرمجة الخطية عندما يكون إقتران الهدف موازيا لقيد‬3.5.2 ‫يوضح الشكل‬
ً ‫ تمثل حال مثاليًا‬BC ‫ أي نقطة واقعة على القطعة المستقيمة‬.‫ملزم‬
.z = 10 ‫بديال بنفس قيمة إقتران الهدف‬

5
Figure 3.5.2

The iterations of the model are given by the following tableaus.

Iteration Basic 𝑥1 𝑥2 𝑥3 𝑥4 Solution


𝟎 𝑧 −2 −4 0 0 0
𝑥2 enters 𝑥3 1 2 1 0 5
𝑥3 leaves 𝑥4 1 1 0 1 4

1 (Optimum) 𝑧 0 0 2 0 10
𝑥1 enters 𝑥2 1 1 1 0 5
2 2 2
𝑥4 leaves 𝑥4 1 0 1 1 3

2 2 2

𝟐 𝑧 0 0 2 0 10
Alternative 𝑥2 0 1 1 −1 1
Optimum 𝑥1 1 0 −1 2 3

5
Iteration 1 gives the optimum solution 𝑥1 = 0, 𝑥2 = , and 𝑧 = 10 (point 𝐵 in Figure 3.5.2). The
2
existence of alternative can be detected in the optimal tableau by examining the 𝑧 −equation
coefficients of the nonbasic variables. The zero coefficient of nonbasic 𝑥1 indicates that 𝑥1 can
be made basic, altering the values of the basic variables without changing the value of 𝑧.

6
‫‪Iteration 2 does just that, using 𝑥1 and 𝑥4 as the entering and leaving variables, respectively.‬‬
‫‪The new solution point occurs at (𝑥1 = 3, 𝑥2 = 1, 𝑧 = 10).‬‬
‫‪5‬‬
‫يعطي التكرار ‪ 1‬الحل األمثل ‪( 𝑧 = 10 𝑥1 = 0, 𝑥2 = ,‬النقطة ‪ B‬في الشكل ‪ .)3.5.2‬يمكن اكتشاف وجود حل مثالي بديل من‬
‫‪2‬‬
‫الجدول األمثل من خالل فحص معامالت المعادلة ‪ z‬للمتغيرات غير األساسية‪ .‬يشير المعامل الصفري لـلمتغير غير األساسي ‪ 𝑥1‬إلى‬
‫أنه يمكن جعل المتغير ‪ 𝑥1‬أساسيًا‪ ،‬مما يغير قيم المتغيرات األساسية دون تغيير قيمة ‪ .z‬يقوم التكرار ‪ 2‬بذلك ‪ ،‬باستخدام ‪ 𝑥1‬و ‪𝑥4‬‬
‫كمتغير داخل ومغادر‪ ،‬على التوالي‪ .‬تحدث نقطة الحل األمثل الجديدة عند )‪.(𝑥1 = 3, 𝑥2 = 1, 𝑧 = 10‬‬

‫‪The simplex method deals with corner point optima only—namely points 𝐵 and 𝐶 in the present‬‬
‫‪example. Mathematically, we can determine all the points (𝑥1 , 𝑥2 ) on the line segment 𝐵𝐶 as a‬‬
‫‪5‬‬
‫‪nonnegative weighted average of points 𝐵 (𝑥1 = 0, 𝑥2 = ) and 𝐶(𝑥1 = 3, 𝑥2 = 1)— that is,‬‬
‫‪2‬‬

‫𝛼‪𝑥̂1 = 𝛼(0) + (1 − 𝛼)(3) = 3 − 3‬‬


‫‪5‬‬ ‫‪3 },0 ≤ 𝛼 ≤ 1‬‬
‫𝛼 ‪𝑥̂2 = 𝛼 ( ) + (1 − 𝛼)(1) = 1 +‬‬
‫‪2‬‬ ‫‪2‬‬

‫تتعامل طريقة سمبلكس مع النقاط المثلى الركنية ‪ -‬أي النقطتين ‪ B‬و ‪ C‬في المثال الحالي‪ .‬رياضيا‪ ،‬يمكننا تحديد جميع النقاط‬
‫) ‪ (𝑥1 , 𝑥2‬الواقعة على القطعة المستقيمة ‪ BC‬كما في المعادلة أعاله‪.‬‬

‫‪Remarks.‬‬

‫‪In practice, alternative optima are useful because we can choose from many solutions without‬‬
‫‪experiencing deterioration in the objective value. For instance, in the present example, the‬‬
‫‪solution at 𝐵 shows that activity 2 only is at a positive level. At 𝐶, both activities are at a positive‬‬
‫‪level. If the example represents a product-mix situation, it may be advantageous to market two‬‬
‫‪products instead of one.‬‬

‫من الناحية العملية‪ ،‬تعد النقاط المثلى البديلة مفيدة ألنه يمكننا االختيار من بين العديد من الحلول دون التعرض لتلف قيمة إقتران الهدف‪.‬‬
‫على سبيل المثال‪ ،‬في المثال الحالي‪ ،‬يظهر الحل األمثل عند النقطة ‪ B‬أن النشاط ‪ 2‬فقط يكون بمستوى إيجابي‪ .‬عند النقطة ‪ ،C‬كال‬
‫النشاطين على مستوى إيجابي‪ .‬إذا كان المثال يمثل حالة مزيج لمنتج‪ ،‬فقد يكون من المفيد تسويق منتجين بدالً من واحد (أي النقطة ‪.)C‬‬

‫‪7‬‬
8
Course’s Name: Operation Research
Course's Number: 19041225
Instructor : Dr. Basheer Abdallah

3.5 Special Cases in the Simplex Method, Part II

‫ الجزء الثاني‬،‫حاالت خاصة في طريقة السمبلكس‬

3.5.3 Unbounded Solution ‫حالة الحل غير المحدود‬

In some LP models, the solution space is unbounded in at least one variable—meaning that
variables may be increased indefinitely without violating any of the constraints. The associated
objective value may also be unbounded in this case. An unbounded solution space may signal
that the model is poorly constructed. The most likely irregularity in such models is that some key
constraints have not been accounted for. Another possibility is that estimates of the constraint
coefficients may not be accurate.

‫ مما يعني أنه يمكن زيادة المتغيرات‬- ‫ تكون منطقة الحل غير محدودة في إتجاه متغير واحد على األقل‬،‫في بعض نماذج البرمجة الخطية‬
‫ قد تشير منطقة‬.‫ضا غير محدودة في هذه الحالة‬ ً ‫ قد تكون قيمة اقتران الهدف المرتبطة بها أي‬.‫بشكل المحدود دون اختالل أي من القيود‬
‫ من المخالفات األكثر احتماال في مثل هذه النماذج هو أنه لم يتم حساب بعض‬.‫الحل غير المحدودة إلى أن النموذج أنشئ بطريقة سيئة‬
.‫ االحتمال اآلخر هو أن تقديرات معامالت القيد قد ال تكون دقيقة‬.‫القيود الرئيسية‬

Example 3.5.3

𝑀𝑎𝑥𝑖𝑚𝑖𝑧𝑒 𝑧 = 2𝑥1 + 𝑥2

1
subject to
𝑥1 − 𝑥2 ≤ 10
2𝑥1 ≤ 40
𝑥1 , 𝑥2 ≥ 0

Starting Iteration

Note that 𝑥3 and 𝑥4 are slack variables.

Basic 𝑥1 𝑥2 𝑥3 𝑥4 Solution
𝑧 −2 −1 0 0 0

𝑥3 1 −1 1 0 10
𝑥4 2 0 0 1 40

In the starting tableau, both 𝑥1 and 𝑥2 have negative 𝑧 −equation coefficients—meaning that an
increase in their values will increase the objective value. Although 𝑥1 should be the entering
variable (it has the most negative 𝑧 −coefficient), we note that all the constraint coefficients
under 𝑥2 are ≤ 0—meaning that 𝑥2 can be increased indefinitely without violating any of the
constraints. The result is that 𝑧 can be increased indefinitely. Figure 3.5.3 shows the unbounded
solution space and also that 𝑥2 and 𝑧 can be increased indefinitely.

‫ على‬.‫ مما يعني أن زيادة قيمهما ستزيد قيمة اقتران الهدف‬- z ‫𝑥 معامالت سالبة في صف‬2 ‫𝑥 و‬1 ‫ يكون لكل من‬، ‫في جدول البداية‬
‫ فإننا نالحظ من الجدول أن جميع معامالت القيد‬،)‫ أكثر سالبية‬z ‫𝑥 يجب أن يكون المتغير الداخل (لألن معامله في صف‬1 ‫الرغم من أن‬
‫ والنتيجة هي أنه يمكن‬.‫𝑥 إلى أجل غير مسمى دون اختالل أي من القيود‬2 ‫ مما يعني أنه يمكن زيادة‬- ‫𝑥 هي إما سالبة أو صفر‬2 ‫تحت‬
.‫ إلى أجل غير مسمى‬z ‫𝑥 و‬2 ‫ نطقة الحل غير المحدود وكذلك يمكن زيادة‬3.5.3 ‫ يوضح الشكل‬.‫ بشكل ال محدود‬z ‫زيادة‬

2
Figure 3.5.3

Remark. Had 𝑥1 been selected as the entering variable in the starting iteration (per the optimality
condition), a later iteration would eventually have produced an entering variable with the same
properties as 𝑥2 .

‫ لكان التكرار الالحق قد أنتج في النهاية متغير داخل له‬،)‫𝑥 كمتغير داخل في تكرار البدء (وف ًقا لشرط المثالية‬1 ‫ إذا تم اختيار‬.‫مالحظة‬
.‫أي المدخالت تحته في الجدول إما سالبة أو صفر‬-‫𝑥 المذكورة في الفقرة السابقة‬2 ‫نفس خصائص‬

3.5.4 Infeasible Solution (‫حالة عدم وجود حلول أو حلول غير مجدية(متاحة‬

LP models with inconsistent constraints have no feasible solution. This situation does not occur
if all the constraints are of the type ≤ with nonnegative right-hand sides because the slacks
provide an obvious feasible solution. For other types of constraints, penalized artificial variables
are used to start the solution. If at least one artificial variable is positive in the optimum iteration,
then the LP has no feasible solution. From the practical standpoint, an infeasible space points
to the possibility that the model is not formulated correctly.

‫ ال يحدث هذا الموقف إذا كانت جميع القيود من النوع ≤ التي‬.)‫نماذج البرمجة الخطية ذات القيود غير متناسقة ليس لها حل مجدي (متاح‬
‫ بالنسبة لألنواع األخرى من‬.‫ توفر حالً مجديا (متاحا) و واض ًحا‬slack ‫يكون الطرف األيمن فيها عدد غير سالب وذلك ألن متغيرات‬
3
‫القيود‪ ،‬يتم استخدام المتغيرات االصطناعية (الزائفة) لبدء الحل‪ .‬إذا كان متغير اصطناعي واحد على األقل موجبا في التكرار األمثل‬
‫(الجدول النهائي)‪ ،‬فليس لدى مسألة البرمجة الخطية حل متاح‪ .‬من وجهة النظر العملية‪ ،‬تشير منطقة الحل غير المجدية (المتاحة) إلى‬
‫احتمال عدم صياغة النموذج بشكل صحيح‪.‬‬

‫‪Example 3.5.4‬‬

‫‪Consider the following LP:‬‬

‫‪𝑀𝑖𝑛𝑖𝑚𝑖𝑧𝑒 𝑧 = 2𝑥1 + 3𝑥2‬‬

‫‪subject to‬‬
‫‪1‬‬ ‫‪1‬‬
‫‪𝑥1 + 𝑥2 ≤ 4‬‬
‫‪2‬‬ ‫‪4‬‬
‫‪𝑥1 + 3𝑥2 ≥ 36‬‬
‫‪𝑥1 + 𝑥2 = 10‬‬
‫‪𝑥1 , 𝑥2 , ≥ 0‬‬

‫‪After writing the model in equation form, adding the necessary artificial variables and‬‬
‫‪substituting out these artificial variables from their corresponding constraints into the objective‬‬
‫‪equation as we did before in the 𝑀-method, we obtain the following initial tableau. Please‬‬
‫!‪Check‬‬

‫بعد كتابة النموذج في شكل المعادلة القياسي‪ ،‬وإضافة المتغيرات االصطناعية الضرورية واستبدال هذه المتغيرات االصطناعية من‬
‫قيودها المقابلة في معادلة إقتران الهدف كما فعلنا من قبل في طريقة ‪ ،M‬نحصل على جدول البداية التالي‪ .‬رجاء تأكد من ذلك!‬

‫‪Basic‬‬ ‫‪𝑥1‬‬ ‫‪𝑥2‬‬ ‫‪𝑠2 𝑠1 𝑅2 𝑅3 Solution‬‬ ‫‪Ratio‬‬


‫𝑧‬ ‫‪2𝑀 − 2‬‬ ‫‪4𝑀 − 3 −𝑀 0 0 0‬‬ ‫𝑀‪46‬‬ ‫‪𝑧 −row‬‬

‫‪𝑠1‬‬ ‫‪1‬‬ ‫‪1‬‬ ‫‪0‬‬ ‫‪1‬‬ ‫‪0‬‬ ‫‪0‬‬ ‫‪4‬‬ ‫‪𝑠1 −row‬‬ ‫‪16‬‬
‫‪2‬‬ ‫‪4‬‬
‫‪𝑅2‬‬ ‫‪1‬‬ ‫‪3‬‬ ‫‪−1‬‬ ‫‪0‬‬ ‫‪1‬‬ ‫‪0‬‬ ‫‪36‬‬ ‫‪𝑅2 −row‬‬ ‫‪12‬‬

‫‪𝑅3‬‬ ‫‪1‬‬ ‫‪1‬‬ ‫‪0‬‬ ‫‪0‬‬ ‫‪0‬‬ ‫‪1‬‬ ‫‪10‬‬ ‫‪𝑅3 −row‬‬ ‫‪10‬‬
‫‪Table 3.5.1‬‬

‫‪4‬‬
Because 4𝑀 − 3 > 2𝑀 − 2, the variable 𝑥2 enters the next iteration and becomes a basic
variable. The ratio test indicates that 𝑥2 should be entered in 𝑅3 −row, causing 𝑅3 to leave. After
entering of 𝑥2 , we obtain the tableau in Table 3.5.2. Please Check!

Basi 𝑥1 𝑥2 𝑠2 𝑠1 𝑅2 𝑅3 Solution
c
𝑧 1 − 2𝑀 0 −𝑀 0 0 3 − 4𝑀 30 + 6𝑀 𝑧 −row

𝑠1 1 0 0 1 0 1 3 𝑠1 −row

4 4 2
𝑅2 −2 0 −1 0 1 −3 6 𝑅2 −row

𝑥2 1 1 0 0 0 1 10 𝑥2 −row
Table 3.5.2

Because each variable has a nonpositive coefficient in 𝑧 −row, this is an optimal tableau. The
3
optimal solution indicated by this tableau is 𝑧 = 30 + 6𝑀, 𝑠1 = , 𝑅2 = 6, 𝑥2 = 10, 𝑅3 = 𝑠2 = 𝑥1 =
2
0. An artificial variable 𝑅2 is positive in the optimal tableau. This shows that the original LP has
no feasible solution.

5
Course’s Name: Operation Research
Course's Number: 19041225
Instructor : Dr. Basheer Abdallah

3.6 Sensitivity Analysis, Part I

‫ الجزء األول‬،‫تحليل الحساسية‬

Sensitivity analysis is the investigation of the changes in the optimum solution of an LP model,
when the parameters (input data) of the model can change within certain limits. The aim of this
study is to determine the ranges for the parameters that keep the optimum solution under
control—meaning that the ability to compute the new optimum solution after parameters
modification without solving the modified LP model. In this section we concentrate on the
graphical sensitivity analysis. This implies we only consider two-variable LP models.

‫ عندما يمكن أن تتغير معامالت (بيانات‬،‫تحليل الحساسية هو البحث واالستقصاء في التغييرات في الحل األمثل لنموذج البرمجة الخطية‬
‫ الهدف من هذه الدراسة هو تحديد نطاقات المعامالت التي تحافظ على الحل األمثل تحت السيطرة‬.‫اإلدخال) النموذج ضمن حدود معينة‬
‫ في هذا‬.)‫مما يعني أن القدرة على حساب الحل األمثل الجديد بعد تعديل المعامالت دون حل نموذج البرمجة الخطية المعدل(الجديد‬-
.‫ هذا يعني أننا نتعامل مع نماذج البرمجة الخطية ذات المتغيرين فقط‬.‫الدرس نركز على تحليل الحساسية البياني‬

In this lecture we study sensitivity of the optimum solution to changes in the availability of the
resources (right-hand side of the constraints). Other sensitivity case will be investigated in the
next lecture.

‫ سيتم البحث في حالة حساسية‬.)‫ندرس في هذه المحاضرة حساسية الحل األمثل للتغيرات في توافر الموارد (الطرف اليمين من القيود‬
.‫أخرى في المحاضرة القادمة بإذن هللا تعالى‬

Example 3.6.1

JOBCO manufactures two products on two machines. A unit of product 1 requires 2 hrs on
machine 1 and 1 hr on machine 2. For product 2, one unit requires 1 hr on machine 1 and 3 hrs

1
‫‪on machine 2. The revenues per unit of products 1 and 2 are $30 and $20, respectively. The‬‬
‫‪total daily processing time available for each machine is 8 hrs.‬‬

‫تقوم شركة جوبكو بتصنيع منتجين على آلتين‪ .‬تتطلب وحدة المنتج األول ساعتين على اآللة األولى و ‪ 1‬ساعة على اآللة الثانية‪ .‬بالنسبة‬
‫للمنتج الثاني‪ ،‬تتطلب وحدة واحدة ساعة واحدة على اآللة األولى و ‪ 3‬ساعات على اآللة الثانية‪ .‬تبلغ اإليرادات لكل وحدة من المنتجات‬
‫دوالرا على التوالي‪ .‬إجمالي وقت المعالجة اليومية المتاحة لكل آلة هو ‪ 8‬ساعات‪.‬‬
‫ً‬ ‫دوالرا و ‪20‬‬
‫ً‬ ‫األول و الثاني ‪30 :‬‬

‫‪1. Formulate the LP model for JOBCO.‬‬

‫‪ .1‬قم بصياغة نموذج البرمجة الخطية لشركة جوبكو‪.‬‬

‫‪2. Determine the dual (shadow) price of machine 1 capacity and its feasibility range.‬‬

‫‪ .2‬حدد السعر المزدوج (الظل) لقدرة اآللة األولى ونطاق جدواها‪.‬‬

‫‪3. Determine the dual (shadow) price of machine 2 capacity and its feasibility range.‬‬

‫‪ .3‬حدد السعر المزدوج (الظل) لقدرة اآللة الثانية ونطاق جدواها‪.‬‬

‫‪4. If JOBCO can increase the capacity of both machines, which machine should receive‬‬
‫?‪priority‬‬

‫‪ .4‬إذا كانت شركة جوبكو تستطيع زيادة قدرة كلتا اآللتين‪ ،‬فما اآللة التي يجب أن تحظى باألولوية؟‬

‫‪5. A suggestion is made to increase the capacities of machines 1 and 2 at the additional cost‬‬
‫?‪of $10/hr for each machine. Is this advisable‬‬

‫‪ .5‬تم اقتراح زيادة قدرة اآللتين األولى و الثانية بتكلفة إضافية قدرها ‪ 10‬دوالرات في الساعة لكل آلة‪ .‬هل ينصح بهذا االقتراح؟‬

‫‪6. If the capacity of machine 1 is increased from 8 to 13 hrs, how will this increase impact the‬‬
‫?‪optimum revenue‬‬

‫‪ .6‬إذا تم زيادة قدرة اآللة األولى من ‪ 8‬إلى ‪ 13‬ساعة‪ ،‬فكيف ستؤثر هذه الزيادة على اإليرادات المثلى؟‬

‫‪Solution:‬‬

‫‪1. Let 𝑥1 and 𝑥2 represent the daily number of units of products 1 and 2, respectively. The‬‬
‫‪LP model is given as‬‬
‫الحل‪ :‬نفرض أن ‪ 𝑥1، 𝑥2‬تمثل العدد اليومي من الوحدات للمنتجين األول والثاني على التوالي‪.‬‬

‫النموذج يصبح كالتالي‬

‫‪2‬‬
𝑀𝑎𝑥𝑖𝑚𝑖𝑧𝑒 𝑧 = 30𝑥1 + 20𝑥2

subject to
2𝑥1 + 𝑥2 ≤ 8 (𝑀𝑎𝑐ℎ𝑖𝑛𝑒 1)
𝑥1 + 3𝑥2 ≤ 8 (𝑀𝑎𝑐ℎ𝑖𝑛𝑒 2)
𝑥1 , 𝑥2 ≥ 0

2. Figure 3.6.1 illustrates the change in the optimum solution when changes are made in the
capacity of machine 1. If the daily capacity is increased from 8 to 9 hrs, the new optimum will
move to point 𝐺.

9 ‫ إلى‬8 ‫ إذا تم زيادة القدرة اليومية من‬.‫ التغيير في الحل األمثل عند إجراء تغييرات في قدرة اآللة األولى‬3.6.1 ‫ يوضح الشكل‬.2
.G ‫ فسيتم نقل نقطة الحل األمثل الجديد إلى النقطة‬، ‫ساعات‬

Figure 3.6.1

3
The rate of change in optimum 𝑧 resulting from changing machine 1 capacity from 8 to 9 hrs
can be computed as:

:‫ ساعات على النحو التالي‬9 ‫ إلى‬8 ‫ من‬1 ‫ المثلى الناتجة عن تغيير قدرة اآللة‬z ‫يمكن حساب معدل التغير في قيم‬

𝑅𝑎𝑡𝑒 𝑜𝑓 𝑟𝑒𝑣𝑒𝑛𝑢𝑒 𝑐ℎ𝑎𝑛𝑔𝑒


𝑟𝑒𝑠𝑢𝑙𝑡𝑖𝑛𝑔 𝑓𝑟𝑜𝑚 𝑖𝑛𝑐𝑟𝑒𝑎𝑠𝑖𝑛𝑔 𝑧𝐺 − 𝑧𝐶 142 − 128
( )= = = $14/ℎ𝑟
𝑚𝑎𝑐ℎ𝑖𝑛𝑒 1 𝑐𝑎𝑝𝑎𝑐𝑖𝑡𝑦 𝑏𝑦 1 ℎ𝑟 (𝐶𝑎𝑝𝑎𝑐𝑖𝑡𝑦 𝑐ℎ𝑎𝑛𝑔𝑒) 9−8
(𝑝𝑜𝑖𝑛𝑡 𝐶 𝑡𝑜 𝑝𝑜𝑖𝑛𝑡 𝐺)
𝑧𝐺 −𝑧𝐶 142−128
‫=معدل التغير في االيرادات‬ = = $14/ℎ𝑟
‫التغيرفي القدرة‬ 9−8

The computed rate provides a direct link between the model input (resources) and its output
(total revenue) and it is called the dual (shadow) price. It says that a unit increase (decrease)
in machine 1 capacity will increase (decrease) revenue by $14.

‫مباشرا بين مدخالت النموذج (الموارد) ومخرجاته (إجمالي اإليرادات) ويسمى السعر المزدوج‬ ً ً ‫يوفر معدل التغير المحسوب راب‬
‫طا‬
.‫دوالرا‬
ً 14 ‫ هذا السعر يعني أن زيادة (نقصان) وحدة واحدة في قدرة اآللة األولى ستزيد (ستقلل) اإليرادات بمقدار‬.)‫(الظل‬

Looking again at Figure 3.6.1, we can see that the dual price of $14/ℎ𝑟 remains valid for
changes (increases or decreases) in machine 1 capacity that move its constraint parallel to itself
to any point on the line segment 𝐵𝐹. We compute machine 1 capacities at points 𝐵 and 𝐹 as
follows:

‫دوالرا في الساعة يظل صال ًحا للتغييرات‬


ً 14 ‫ يمكننا أن نرى أن السعر المزدوج الذي يبلغ‬،3.6.1 ‫بالنظر مرة أخرى إلى الشكل‬
‫ نحسب قدرات اآللة‬.BF ‫(الزيادات أو النقصان) في قدرة اآللة األولى طالما أن أي قيد موازي لقيد اآللة األولى يقطع القطعة المستقيمة‬
:‫ على النحو التالي‬F ‫ و‬B ‫األولى عند النقطتين‬

8 8 8
𝑀𝑖𝑛𝑖𝑚𝑢𝑚 𝑚𝑎𝑐ℎ𝑖𝑛𝑒 1 𝑐𝑎𝑝𝑎𝑐𝑖𝑡𝑦 [𝑎𝑡 𝐵 (0, )] = 2 × 0 + 1 × = ℎ𝑟
3 3 3
𝑀𝑖𝑛𝑖𝑚𝑢𝑚 𝑚𝑎𝑐ℎ𝑖𝑛𝑒 1 𝑐𝑎𝑝𝑎𝑐𝑖𝑡𝑦 [𝑎𝑡 𝐹(8, 0)] = 2 × 8 + 1 × 0 = 16 ℎ𝑟

The conclusion is that the dual (shadow) price of $14.00/ℎ𝑟 remains valid only in the range

:‫دوالرا في الساعة يبقى صال ًحا فقط في المدى‬


ً 14.00 )‫االستنتاج هو أن السعر المزدوج (الظل‬
4
‫‪8‬‬
‫𝑟‪ℎ𝑟 ≤ 𝑀𝑎𝑐ℎ𝑖𝑛𝑒 1 𝑐𝑎𝑝𝑎𝑐𝑖𝑡𝑦 ≤ 16 ℎ‬‬
‫‪3‬‬

‫‪Changes outside this range produce a different dual price. So the feasibility range of machine‬‬
‫‪8‬‬
‫‪1 is the closed interval [ , 16].‬‬
‫‪3‬‬

‫‪8‬‬
‫سعرا مزدو ًجا مختلفًا‪ .‬لذا فإن نطاق الجدوى لآللة األولى عبارة عن الفترة المغلقة ]‪[ , 16‬‬
‫ً‬ ‫تنتج التغييرات خارج هذا النطاق‬
‫‪3‬‬

‫‪3. Using similar computations, we can verify that the dual price for machine 2 capacity is $2/ℎ𝑟,‬‬
‫‪and it remains valid for changes in machine 2 capacity within the line segment 𝐷𝐸. Now,‬‬

‫باستخدام حسابات مماثلة‪ ،‬يمكننا التحقق من أن السعر المزدوج لقدرة اآللة الثانية(إذا تم زيادة القدرة اليومية من ‪ 8‬إلى ‪ 9‬ساعات) هو‬
‫‪ 2‬دوالر ‪ /‬ساعة ‪ ،‬ويبقى صال ًحا للتغييرات في قدرة اآللة الثانية ضمن القطعة المستقيمة ‪.DE‬‬
‫𝑟‪𝑀𝑖𝑛𝑖𝑚𝑢𝑚 𝑚𝑎𝑐ℎ𝑖𝑛𝑒 2 𝑐𝑎𝑝𝑎𝑐𝑖𝑡𝑦 [𝑎𝑡 𝐷(4, 0)] = 1 × 4 + 3 × 0 = 4 ℎ‬‬
‫𝑟‪𝑀𝑖𝑛𝑖𝑚𝑢𝑚 𝑚𝑎𝑐ℎ𝑖𝑛𝑒 2 𝑐𝑎𝑝𝑎𝑐𝑖𝑡𝑦 [𝑎𝑡 𝐸(0, 8)] = 1 × 0 + 3 × 8 = 24 ℎ‬‬

‫‪Thus, the dual price of $2/ℎ𝑟 for machine 2 remains applicable for the range‬‬

‫وبالتالي‪ ،‬يبقى السعر المزدوج الذي يبلغ ‪ 2‬دوالر ‪ /‬ساعة لآللة الثانية قابالً للتطبيق على النطاق‬

‫𝑟‪4ℎ𝑟 ≤ 𝑀𝑎𝑐ℎ𝑖𝑛𝑒 2 𝑐𝑎𝑝𝑎𝑐𝑖𝑡𝑦 ≤ 24 ℎ‬‬

‫‪That is, the feasibility range of machine 2 is the closed interval [4, 24].‬‬

‫أي أن نطاق جدوى اآللة الثانية هو الفترة المغلقة [‪.]4،24‬‬

‫‪4. From the dual prices for machines 1 and 2, each additional hour of machine 1 increases‬‬
‫‪revenue by $14, as opposed to only $2 for machine 2. Thus, priority should be given to machine‬‬
‫‪1.‬‬

‫دوالرا‪ ،‬بدالً من ‪2‬‬


‫ً‬ ‫من األسعار المزدوجة لآللتين األولى و الثانية ‪ ،‬تزيد كل ساعة إضافية لقدرة اآللة األولى اإليرادات بمقدار ‪14‬‬
‫دوالرا فقط لآللة الثانية‪ .‬وبالتالي‪ ،‬يجب إعطاء األولوية لآللة األولى‪.‬‬
‫ً‬

‫‪5‬‬
‫‪5. For machine 1, the additional net revenue per hour is 14 − 10 = $4, and for machine 2, the‬‬
‫‪net is $2 − $10 = − $8. Hence, only machine 1 should be considered for capacity increase.‬‬

‫بالنسبة لآللة األولى‪ ،‬يبلغ صافي اإليرادات اإلضافية للساعة ‪ 4‬دوالرات= ‪14 - 10‬‬

‫دوالرا ‪ 2 -‬دوالرات‪.‬‬
‫ً‬ ‫ولآللة الثانية‪ ،‬يكون الصافي ‪ 8-‬دوالرات= ‪10‬‬

‫وبالتالي ‪ ،‬يجب أن تعطى األولوية فقط لآللة األولى لزيادة قدرتها‪.‬‬

‫‪8‬‬
‫‪6. The dual price for machine 1 is $14 and is applicable in the range [ , 16] hr. The proposed‬‬
‫‪3‬‬
‫‪increase to 13 hrs falls within the feasibility range. Hence, the increase in revenue is‬‬
‫= ‪$14(13 − 8) = $70, which means that the total revenue will be increased from $128 to $198‬‬
‫‪($128 + $70).‬‬
‫‪8‬‬
‫السعر المزدوج لآللة ‪ 1‬هو ‪ 14 $‬وهو قابل للتطبيق في النطاق ]‪[ , 16‬ساعة‪ .‬تقع الزيادة المقترحة إلى ‪ 13‬ساعة ضمن نطاق الجدوى‪.‬‬
‫‪3‬‬
‫دوالرا‪ ،‬مما يعني أنه سيتم زيادة إجمالي اإليرادات من ‪128‬‬
‫ً‬ ‫دوالرا *(‪70 = )8 - 13‬‬
‫ً‬ ‫وبالتالي‪ ،‬فإن الزيادة في اإليرادات هي ‪14‬‬
‫دوالرا)‪.‬‬
‫ً‬ ‫دوالرا ‪70 +‬‬
‫ً‬ ‫دوالرا = (‪128‬‬
‫ً‬ ‫دوالرا إلى ‪198‬‬
‫ً‬

‫‪6‬‬
Course’s Name: Operation Research
Course's Number: 19041225
Instructor : Dr. Basheer Abdallah

3.6 Sensitivity Analysis, Part II

‫ الفصل الثاني‬،‫تحليل الحساسية‬

In the previous lecture we studied the sensitivity resulted from changes in


the right-hand side of the constraints. This lecture is a continuation of the
previous one, where we will study sensitivity of the optimum solution to
changes in unit profit or unit cost (coefficients of the objective function).

‫ هذه المحاضرة هي‬.‫درسنا في المحاضرة السابقة الحساسية الناتجة عن التغيرات في الطرف اليمين من القيود‬
‫ حيث سندرس حساسية الحل األمثل للتغيرات في ربح الوحدة أو تكلفة الوحدة‬،‫استكمال للمحاضرة السابقة‬
.)‫(معامالت إقتران الهدف‬

Example 3.6.2

Figure 3.6.2 shows the graphical solution space of the JOBCO problem
presented in Example 3.6.1. The optimum occurs at point 𝐶(𝑥1 = 3.2, 𝑥2 =
1.6, 𝑧 = 128).

‫ يحدث الحد األمثل عند النقطة‬.)3.6.1 ‫ منطقة الحل البيانية لمسألة شركة جوبكو (مثال‬3.6.2 ‫يوضح الشكل‬
.𝐶(𝑥1 = 3.2, 𝑥2 = 1.6, 𝑧 = 128)

1
Figure 3.6.2

𝑐1
1. Determine the optimality range (condition) for that will keep the
𝑐2
optimum unchanged. (Determine the range for the ratio of the unit revenue
-coefficient of the objective function- of product 1 to the unit revenue of
product 2)
𝑐1
‫ (أي أن حدد النطاق لنسبة‬.‫التي ستبقي على نقطة الحل األمثل دون تغيير‬ ‫ حدد نطاق (شرط) األمثلية لـ‬.1
𝑐2
)2 ‫ إلى إيرادات الوحدة للمنتج‬1 ‫ للمنتج‬- ‫ معامل إقتران الهدف‬- ‫إيرادات الوحدة‬

2. Suppose that the unit revenues for products 1 and 2 are changed to $35
and $25, respectively. Will the current optimum remain the same?

‫ هل‬.‫دوالرا على التوالي‬


ً 25 ‫دوالرا و‬
ً 35 ‫ قد تغيرت إلى‬2 ‫ و‬1 ‫ افترض أن إيرادات الوحدة للمنتجات‬.2
‫سيبقى الحل األمثل الحالي هو نفسه؟‬

3. Suppose that the unit revenue of product 2 is fixed at its current value
𝑐2 = $20. What is the associated optimality range for the unit revenue for
product 1, 𝑐1 , that will keep the optimum unchanged?

2
‫ ما هو نطاق األمثلية المرتبط‬.‫دوالرا‬
ً 𝑐2 = 20 ‫ ثابت بقيمته الحالية‬2 ‫ افترض أن إيراد الوحدة للمنتج‬.3
‫ والذي سيبقي على نقطة الحل األمثل دون تغيير؟‬، 𝑐1 ، 1 ‫بإيراد الوحدة للمنتج‬

4. Suppose that the unit revenue of product 1 is fixed at its current value 𝑐1 =
$30. What is the associated optimality range for the unit revenue for product
2, 𝑐2 , that will keep the optimum unchanged?

‫ ما هو نطاق األمثلية المرتبط‬.‫دوالرا‬


ً 𝑐1 = 30 ‫ ثابت بقيمته الحالية‬1 ‫ افترض أن إيراد الوحدة للمنتج‬.4
‫ والذي سيبقي على نقطة الحل األمثل دون تغيير؟‬، 𝑐2 ،2 ‫إليراد الوحدة للمنتج‬

Solution:

1. Changes in revenue units (i.e., objective-function coefficients) will change


the slope of 𝑧. However, as can be seen from the figure, the optimum solution
at point 𝐶 remains unchanged so long as the objective function lies between
lines 𝐵𝐹 and 𝐷𝐸.

،‫ ومع ذلك‬.z ‫ إحداث تغييرات في وحدات اإليرادات (أي معامالت إقتران الهدف) سيؤثر على ميل الخط‬.1
‫ يبقى دون تغيير طالما أن معادلة إقتران الهدف‬C ‫ فإن الحل األمثل عند النقطة‬،‫كما يتضح من الشكل أعاله‬
.DE ‫ و‬BF ‫تقع بين الخطين‬

Let’s write the objective function in the general format:

:‫دعنا نكتب إقتران الهدف بالصيغة العامة‬

𝑀𝑎𝑥𝑖𝑚𝑖𝑧𝑒 𝑧 = 𝑐1 𝑥1 + 𝑐2 𝑥2

Suppose that line 𝑧 is pivoted at 𝐶 and that it can rotate clockwise and
counterclockwise. The optimum solution will remain at point 𝐶 so long as 𝑧 =
𝑐1 𝑥1 + 𝑐2 𝑥2 lies between the two lines 𝑥1 + 3𝑥2 = 8 and 2𝑥1 + 𝑥2 = 8. This
𝑐1 1 2
means that the ratio can vary between and , which yields the optimality
𝑐2 3 1
range is

‫ وأنه يمكن تدويره في اتجاه عقارب الساعة وعكس اتجاه‬C ‫ إرتكز وثبت فقط عند النقطة‬z ‫افترض أن الخط‬
‫𝑐 = 𝑧 يقع بين‬1 𝑥1 + 𝑐2 𝑥2 ‫ طالما أن الخط الذي معادلته‬C ‫ سيظل الحل األمثل عند النقطة‬.‫عقارب الساعة‬

3
2 1 𝑐1
‫ مما‬،, ‫يمكن أن تتفاوت بين و‬ ‫ وهذا يعني أن النسبة‬.2𝑥1 + 𝑥2 = 8 ‫𝑥 و‬1 + 3𝑥2 = 8 ‫الخطين‬
1 3 𝑐2
:‫ينتج عنه نطاق األمثلية‬
1 𝑐1
≤ ≤ 2.
3 𝑐2

2. The new objective function is

𝑀𝑎𝑥𝑖𝑚𝑖𝑧𝑒 𝑧 = 35𝑥1 + 25𝑥2


𝑐1 35 1
The solution at 𝐶 will remain optimal because = = 1.4 ∈ [ , 2]. Notice
𝑐2 25 3
that although the values of the variables at the optimum point 𝐶 remain
unchanged, the optimum value of 𝑧 changes to 35 × (3.20) + 25 × (1.6) =
$152.

𝑐 35 1
‫ الحظ أنه على الرغم من أن قيم المتغيرات‬. 1 = = 1.4 ∈ [ , 2] ‫ هو األمثل ألن‬C ‫سيظل الحل عند‬
𝑐2 25 3
)1.6( × 25 + )3.20( × 35 ‫ تتغير إلى‬z ‫ ولكن القيمة المثلى لـ‬،‫ تبقى دون تغيير‬C ‫عند النقطة المثلى‬
.‫دوالرا‬
ً 152 =

1 𝑐1
3. Substituting 𝑐2 = 20 in the condition ≤ ≤ 2, we get
3 𝑐2

20
≤ 𝑐1 ≤ 40.
3

1 𝑐1
4. Substituting 𝑐1 = 30 in the condition ≤ ≤ 2, we get
3 𝑐2

15 ≤ 𝑐2 ≤ 90.
4
5

You might also like