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

LP Problem Formulation

The document outlines the formulation of multiple Linear Programming (LP) problems, including cost minimization for aluminum production and trail mix ingredients, as well as a portfolio optimization problem for maximizing interest earned while adhering to investment constraints. It also details a shift scheduling problem for a hospital to determine the minimum number of nurses required based on demand across different time periods. Each problem includes decision variables, objective functions, and constraints that can be solved using various methods such as the Simplex method or software tools like Excel Solver and Python.

Uploaded by

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

LP Problem Formulation

The document outlines the formulation of multiple Linear Programming (LP) problems, including cost minimization for aluminum production and trail mix ingredients, as well as a portfolio optimization problem for maximizing interest earned while adhering to investment constraints. It also details a shift scheduling problem for a hospital to determine the minimum number of nurses required based on demand across different time periods. Each problem includes decision variables, objective functions, and constraints that can be solved using various methods such as the Simplex method or software tools like Excel Solver and Python.

Uploaded by

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

LP Problem Formulation

Uploaded image
Formulate LP problem

The problem can be formulated as a Linear Programming (LP) problem as follows:

Decision Variables:

Let:

x1 = Number of days mill 1 operates


x2 = Number of days mill 2 operates


Objective Function (Minimize Cost):

Minimize Z = 6000x1 + 7000x2 ​ ​

where Z is the total operating cost.

Constraints:

1. High-grade aluminum requirement (at least 12 tons):

6x1 + 2x2 ≥ 12
​ ​

2. Medium-grade aluminum requirement (at least 8 tons):

2x1 + 2x2 ≥ 8
​ ​

3. Low-grade aluminum requirement (at least 5 tons):

4x1 + 10x2 ≥ 5
​ ​

4. Non-negativity constraint:

x1 , x2 ≥ 0
​ ​

This LP problem can be solved using the Simplex method or any linear programming solver such as
Excel Solver, Python (PuLP), or MATLAB.

Uploaded image
This too

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 1/10
This problem can be formulated as a Linear Programming (LP) model to minimize the cost of
producing the trail mix while meeting the minimum nutritional requirements.

Decision Variables:

Let:

x1 = Kg of raisins used

x2 = Kg of flakes used

x3 = Kg of walnuts used

Objective Function (Minimize Cost):

Minimize Z = 500x1 + 400x2 + 600x3


​ ​ ​

where Z is the total cost.

Constraints:

1. Vitamins Requirement (at least 20 grams):

50x1 + 75x2 + 60x3 ≥ 20


​ ​

2. Minerals Requirement (at least 10 grams):

15x1 + 10x2 + 5x3 ≥ 10 ​ ​

3. Calories Requirement (at least 600 calories):

1000x1 + 400x2 + 1200x3 ≥ 600


​ ​

4. Non-negativity Constraints:

x1 , x2 , x3 ≥ 0
​ ​ ​

This LP problem can be solved using Simplex Method, Excel Solver, Python (PuLP), or MATLAB to
determine the optimal mix of ingredients at the lowest cost. Let me know if you want me to solve it for
you! 🚀

Uploaded image
Investment
Int. earned
Risk Score
Large Cap Stocks
19%
1.7
Corporate Bonds
10%

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 2/10
1.2
Gold Stocks
18%
3.7
Platinum Stocks
12%
2.4
Mortgage Securities
8%
2
Construction Loans
15%
2.9

Solve the above

This is a Portfolio Optimization Problem that can be formulated as a Linear Programming (LP) model
to maximize the interest earned while satisfying the diversification and risk constraints.

Decision Variables

Let:

x1 = Amount invested in Large Cap Stocks


x2 = Amount invested in Corporate Bonds


x3 = Amount invested in Gold Stocks


x4 = Amount invested in Platinum Stocks


x5 = Amount invested in Mortgage Securities


x6 = Amount invested in Construction Loans


Objective Function (Maximize Interest Earned)

Maximize Z = 0.19x1 + 0.10x2 + 0.18x3 + 0.12x4 + 0.08x5 + 0.15x6


​ ​ ​ ​ ​ ​

Constraints

1. Total Investment Budget Constraint

x1 + x2 + x3 + x4 + x5 + x6 = 5, 000, 000
​ ​ ​ ​ ​ ​

2. Diversification Constraints
No more than 25% of total investment in any single type:

xi ≤ 0.25(5, 000, 000) = 1, 250, 000,


​ ∀i = 1, 2, 3, 4, 5, 6

At least 30% in precious metal stocks (Gold + Platinum):

x3 + x4 ≥ 0.30(5, 000, 000) = 1, 500, 000


​ ​

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 3/10
At least 45% in Large Cap Stocks + Corporate Bonds:

x1 + x2 ≥ 0.45(5, 000, 000) = 2, 250, 000


​ ​

3. Average Risk Constraint (must be ≤ 2)


The weighted average risk must be ≤ 2:

1.7x1 + 1.2x2 + 3.7x3 + 2.4x4 + 2.0x5 + 2.9x6


≤2
​ ​ ​ ​ ​ ​

5, 000, 000

Multiplying by 5,000,000 to remove fraction:

1.7x1 + 1.2x2 + 3.7x3 + 2.4x4 + 2.0x5 + 2.9x6 ≤ 10, 000, 000


​ ​ ​ ​ ​ ​

4. Non-Negativity Constraints

x1 , x2 , x3 , x4 , x5 , x6 ≥ 0
​ ​ ​ ​ ​ ​

This LP problem can be solved using Excel Solver, Python (PuLP), or MATLAB. Do you want me to solve
it for you using Python?🚀

Couldn't understand this part:

Average Risk Constraint (must be ≤ 2)

The weighted average risk must be ≤ 2:


1.7
𝑥
1
+
1.2
𝑥
2
+
3.7
𝑥
3
+
2.4
𝑥
4
+
2.0
𝑥
5
+
2.9
𝑥
6
5

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 4/10
,
000
,
000

2
5,000,000
1.7x
1

+1.2x
2

+3.7x
3

+2.4x
4

+2.0x
5

+2.9x
6

≤2
Multiplying by 5,000,000 to remove fraction:
1.7
𝑥
1
+
1.2
𝑥
2
+
3.7
𝑥
3
+
2.4
𝑥
4
+
2.0
𝑥
5
+
2.9
𝑥
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 5/10
6

10
,
000
,
000
1.7x
1

+1.2x
2

+3.7x
3

+2.4x
4

+2.0x
5

+2.9x
6

≤10,000,000

Let me clarify the average risk constraint for you.

Understanding the Average Risk Constraint

The weighted average risk score of the total investment must be 2 or less.

Each type of investment has a risk score associated with it:

Large Cap Stocks → 1.7


Corporate Bonds → 1.2
Gold Stocks → 3.7
Platinum Stocks → 2.4
Mortgage Securities → 2.0
Construction Loans → 2.9

If you invest x1 in Large Cap Stocks, x2 in Corporate Bonds, and so on, then the total risk contribution
​ ​

of each investment is the amount invested multiplied by its risk score.


The weighted average risk score of the portfolio is given by:

1.7x1 + 1.2x2 + 3.7x3 + 2.4x4 + 2.0x5 + 2.9x6


≤2
​ ​ ​ ​ ​ ​

5, 000, 000

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 6/10
This means the total risk contribution divided by the total investment (Rs. 5 million) should be at most
2.

Simplifying the Constraint

To remove the fraction, multiply both sides by 5,000,000:

1.7x1 + 1.2x2 + 3.7x3 + 2.4x4 + 2.0x5 + 2.9x6 ≤ 10, 000, 000


​ ​ ​ ​ ​ ​

Now, this constraint ensures that the weighted risk does not exceed the given limit.

Does this explanation make sense now? Let me know if you need further clarification! 😊

A hospital has the following requirements for nurses:


0200 – 0600 30
0600 – 1000 50
1000-1400 60
1400-1800 50
1800-2200 40
2200-0200 20
Nurses report to the hospital wards at the beginning of each period and work for 8 consecutive
hours. The hospital wants to determine the minimum number of nurses required to run all the
departments smoothly. Formulate the LP model of the problem.

This problem is a shift scheduling problem and can be formulated as a linear programming (LP)
model. We define decision variables, objective function, and constraints based on the hospital's nurse
demand and shift requirements.

Decision Variables

Let xi represent the number of nurses starting their 8-hour shift at the beginning of time period i:

x1 = Number of nurses starting at 0200 hrs


x2 = Number of nurses starting at 0600 hrs


x3 = Number of nurses starting at 1000 hrs


x4 = Number of nurses starting at 1400 hrs


x5 = Number of nurses starting at 1800 hrs


x6 = Number of nurses starting at 2200 hrs


Each nurse works for 8 consecutive hours.

Objective Function

Minimize the total number of nurses:

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 7/10
min Z = x1 + x2 + x3 + x4 + x5 + x6
​ ​ ​ ​ ​ ​

where Z is the total number of nurses required.

Constraints

The number of nurses available during each 4-hour period must meet or exceed the required demand.

1. For 0200 – 0600 (30 nurses required)


Nurses working this period start at 0200 and 2200:

x1 + x6 ≥ 30
​ ​

2. For 0600 – 1000 (50 nurses required)


Nurses working this period start at 0200 and 0600:

x1 + x2 ≥ 50
​ ​

3. For 1000 – 1400 (60 nurses required)


Nurses working this period start at 0600 and 1000:

x2 + x3 ≥ 60
​ ​

4. For 1400 – 1800 (50 nurses required)


Nurses working this period start at 1000 and 1400:

x3 + x4 ≥ 50
​ ​

5. For 1800 – 2200 (40 nurses required)


Nurses working this period start at 1400 and 1800:

x4 + x5 ≥ 40
​ ​

6. For 2200 – 0200 (20 nurses required)


Nurses working this period start at 1800 and 2200:

x5 + x6 ≥ 20
​ ​

Final LP Formulation

min Z = x1 + x2 + x3 + x4 + x5 + x6
​ ​ ​ ​ ​ ​

Subject to:

x1 + x6 ≥ 30
​ ​

x1 + x2 ≥ 50
​ ​

x2 + x3 ≥ 60
​ ​

x3 + x4 ≥ 50
​ ​

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 8/10
x4 + x5 ≥ 40
​ ​

x5 + x6 ≥ 20
​ ​

x1 , x2 , x3 , x4 , x5 , x6 ≥ 0 (non-negative constraints)
​ ​ ​ ​ ​ ​

Next Steps

This LP model can be solved using Simplex method, Excel Solver, or Python (PuLP/CVXOPT) to
determine the minimum number of nurses required while meeting all shift constraints.

Would you like me to implement and solve this using Python? 🚀

Cant understand below:

For 0200 – 0600 (30 nurses required)


Nurses working this period start at 0200 and 2200:

𝑥
1
+
𝑥
6

30
x
1

+x
6

≥30

Let me break it down step by step.

Understanding the Shift Coverage

Each nurse works for 8 consecutive hours after they start their shift. So, for each 4-hour period, we
need to check which shifts are still active and count the nurses available.

Step-by-Step Breakdown for the 02:00 - 06:00 Period

We need at least 30 nurses available between 02:00 - 06:00.

Which shifts cover this period?

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 9/10
Nurses who start their shift at 02:00 will work from 02:00 to 10:00.
Nurses who start their shift at 22:00 (previous day) will work from 22:00 to 06:00.

Thus, nurses starting at 02:00 ( x1 ) and 22:00 ( x6 ) are the ones working in the 02:00 - 06:00 period.
​ ​

Formulating the Constraint

To meet the hospital's demand of 30 nurses in this period, we ensure that the sum of nurses from these
shifts is at least 30:

x1 + x6 ≥ 30
​ ​

This means:

The number of nurses who start at 02:00 (x1 ) ​

Plus the number of nurses who started at 22:00 (previous day) (x6 ) ​

Must be at least 30 to meet the demand.

Let me know if this explanation is clearer! 😊

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 10/10

You might also like