Professional Documents
Culture Documents
ملخص 1 (Operation Research) -
ملخص 1 (Operation Research) -
ملخص 1 (Operation Research) -
Introduction
طريقة تحليلية لحل المشكالت واتخاذ القرار تفيد في إدارة المؤسسات:بحوث العمليات
1
اختيار ادخال البيانات المناسبة:الخطوة الرابعة
3
Course’s Name: Operation Research
Course's Number: 19041225
Instructor : Dr. Basheer Abdallah
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)
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
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
𝑥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.
Now, we want to find the intersection between equation (1) and equation(2)
2𝑥1 + 𝑥2 = 4 …(1)
𝑥1 + 2𝑥2 = 5 …(2)
−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)
−𝑥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.
Now, we want to find the intersection between equation (1) and equation(2)
6𝑥1 + 4𝑥2 = 24 …(1)
𝑥1 + 2𝑥2 = 6 …(2)
−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
𝑥2 = 2 …(4)
𝑥2 = 2 …(4)
The feasible region is shown in the following figure for the inequalities(1) ,(2),(3)
and (4)
3
𝑧|𝐶(3, 3
)
= 5(3) + 4(2 ) = 21
2
يمكن تحويل متباينات القيد (الشرط) على شكل (≥( الى معادلة وذلك بطرح:ملحوظة
( الى الطرف األيسرsurplus variable) المتغير الفائض
اذا كان المتغير غير مقيد فانه يمكن تحويله الى متغير محددوذلك بالتعويض عنه:ملحوظة
بمتغيرين مقيدين
اذا كان 𝑖𝑥 متغير غير مقيد فانه يمكن كتابته كمايلي:مثال
𝑥𝑖 = 𝑥𝑖 + − 𝑥𝑖 − , 𝑥𝑖 + , 𝑥𝑖 − ≥ 0
Example: Convert the LPmodel into standard form
Min 𝑧 = 2𝑥1 + 4𝑥2
بحيث أن
𝑥1 + 2𝑥2 = 10 …(1)
−2𝑥1 + 3𝑥2 ≤ −5 …(2)
𝑥1 𝑢𝑛𝑟𝑒𝑠𝑡𝑟𝑖𝑐𝑡𝑒𝑑 …(5)
𝑥2 ≥ 0 …(6)
𝑛
𝑛!
𝐶𝑚 =
𝑚! (𝑛 − 𝑚)!
𝑥1 , 𝑥2 ≥ 0 …(3)
Solution: m = 2 equations and n = 4 variables
𝑥1 , 𝑥2 ≥ 0 …(3)
Solution:
𝑠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
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)
The path is 𝐴 → 𝐵 → 𝐶
الشكل ()1
المسار هو 𝐶 → 𝐵 → 𝐴
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
𝑠1 , 𝑠2 ,𝑥1 , 𝑥2 ≥ 0 …(3)
𝑠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
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
−𝑥1 + 𝑥2 ≤ 1 …(3)
𝑥2 ≤ 2 …(4)
𝑥1 , 𝑥2 ≥ 0 …(5)
−𝑥1 + 𝑥2 + 𝑠3 = 1 …(3)
𝑥2 + 𝑠4 = 2 …(4)
𝑥1 , 𝑥2 , 𝑠1, 𝑠2 , 𝑠3 , 𝑠4 ≥ 0 …(5)
the starting simplex tableau is
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
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
1 1
𝑥1 + 𝑥2 ≤ 4 (𝑆𝑢𝑔𝑎𝑟 𝑐𝑜𝑛𝑠𝑡𝑟𝑎𝑖𝑛𝑡)
2 4
𝑥1 + 3𝑥2 ≥ 20 (𝑉𝑖𝑡𝑎𝑚𝑖𝑛 𝐶 𝑐𝑜𝑛𝑠𝑡𝑟𝑎𝑖𝑛𝑡)
𝑥1 + 𝑥2 = 10 (10 𝑜𝑧 𝑖𝑛 𝑏𝑜𝑡𝑡𝑙𝑒 𝑜𝑓 𝑂𝑟𝑎𝑛𝑗)
𝑥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معامل كل من
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
السابقةz تعويض هذه القيم في معادلة. على التوالي4, 20, 10 𝑠 للقيم1 , 𝑅2 , 𝑅3المتغيرات األساسية االبتدائية هي
لجعل الوضع متآلفا. z=0 عندما3.4.1 = 𝑧 والتي هي غير متآلفة مع الجدول30𝑀 ثم نحصل على
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 لهذا
𝑅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
𝑠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
بعد ذلك نطبق عمليات الصف البسيط من النوع الثالث لحذف كل المدخالت التي هي فوق وتحت العنصر المحوري .ثم نحصل على
الجدول التالي
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 شرط المثالية يبين أن
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
subject to
𝑥1 + 𝑥2 + 𝑥3 = 7
2𝑥1 − 5𝑥2 + 𝑥3 ≥ 10
𝑥1 , 𝑥2 , 𝑥3 ≥ 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
subject to
1
𝑥1 + 𝑥2 + 𝑥3 + 𝑅1 = 7
2𝑥1 − 5𝑥2 + 𝑥3 − 𝑠2 + 𝑅2 = 10
𝑥1 , 𝑥2 , 𝑥3 , 𝑠2 , 𝑅1 , 𝑅2 ≥ 0
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
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
Solution:
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
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
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الناتج من المرحلة األولى كحل أولي نبدأ به
لحل المسألة األصلية ونواصل باستخدام حسابات سمبلكس.
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
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
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
𝑀𝑖𝑛𝑖𝑚𝑖𝑧𝑒 𝑟 = 𝑅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
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
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
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
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
subject to
𝑥1 + 𝑥2 + 𝑥3 + 𝑅1 = 7
2𝑥1 − 5𝑥2 + 𝑥3 − 𝑠2 + 𝑅2 = 10
𝑥1 , 𝑥2 , 𝑥3 , 𝑠2 , 𝑅1 , 𝑅2 ≥ 0
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
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
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
بعد حذف العمود للمتغيرات المصطنعة من (الجدول النهائي للمرحلة األولى) فمسالة البرمجة الخطية تصبح كالتالي
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
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
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
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
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
6
Solution:
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
𝑀𝑖𝑛𝑖𝑚𝑖𝑧𝑒 𝑟 = 𝑅1 + 𝑅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
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
ولكن سوف نتعامل مع أربع حاالت.لقد وجدنا في الدروس السابقة أن طريقة سمبلكس هي أداة فعالة لحل مسائل البرمجة الخطية
.خاصة يمكن أن تظهر أثناء تطبيق طريقة السمبلكس
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
subject to
𝑥1 + 4𝑥2 ≤ 8
𝑥1 + 2𝑥2 ≤ 4
𝑥1 , 𝑥2 ≥ 0
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
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( قيمة إقتران الهدف
على. ولكن كانت هناك تقارير عن حدوثه عمليا، قد ال يكون إستمرار التكرارات بشكل دوري حدثًا شائعًا.وال تحقق أبدًا شرط المثالية
إال أن استخدامها يمكن أن يؤدي إلى تباطؤ شديد في الحسابات،الرغم من أن الخوارزميات قد تم تطويرها للقضاء على هذه الظاهرة
.وبالتالي ال يجب تنفيذها ما لم يكن هناك دليل على أن هذه الظاهرة ستحدث بالفعل
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
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
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
تتعامل طريقة سمبلكس مع النقاط المثلى الركنية -أي النقطتين 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
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
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
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نحصل على جدول البداية التالي .رجاء تأكد من ذلك!
𝑠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
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 :
2. Determine the dual (shadow) price of machine 1 capacity and its feasibility range.
3. Determine the dual (shadow) price of machine 2 capacity and its feasibility range.
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 يمكن حساب معدل التغير في قيم
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:
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
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دوالر /ساعة لآللة الثانية قابالً للتطبيق على النطاق
That is, the feasibility range of machine 2 is the closed interval [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.
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
هذه المحاضرة هي.درسنا في المحاضرة السابقة الحساسية الناتجة عن التغيرات في الطرف اليمين من القيود
حيث سندرس حساسية الحل األمثل للتغيرات في ربح الوحدة أو تكلفة الوحدة،استكمال للمحاضرة السابقة
.)(معامالت إقتران الهدف
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?
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?
Solution:
، ومع ذلك.z إحداث تغييرات في وحدات اإليرادات (أي معامالت إقتران الهدف) سيؤثر على ميل الخط.1
يبقى دون تغيير طالما أن معادلة إقتران الهدفC فإن الحل األمثل عند النقطة،كما يتضح من الشكل أعاله
.DE وBF تقع بين الخطين
𝑀𝑎𝑥𝑖𝑚𝑖𝑧𝑒 𝑧 = 𝑐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
𝑐 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