Presentation 3,
5.3
P.Srijith Reddy,
EE19BTECH11041,
Dept. of Electrical
Engg.,
Presentation 3, IIT Hyderabad.
5.3 Outline
Problem
Solution
P.Srijith Reddy, Plot
EE19BTECH11041,
Dept. of Electrical Engg.,
IIT Hyderabad.
September 3, 2019
1/7
Presentation 3,
5.3
P.Srijith Reddy,
EE19BTECH11041,
Dept. of Electrical
Engg.,
IIT Hyderabad.
Problem Outline
Problem
Solution
Plot
Solution
Plot
2/7
Presentation 3,
Problem Statement 5.3
P.Srijith Reddy,
EE19BTECH11041,
Dept. of Electrical
Engg.,
Obtain a solution to the following IIT Hyderabad.
Outline
max 6x1 + 5x2 (2.1) Problem
x
Solution
with constraints Plot
x1 + x2 ≤ 5 (2.2)
3x1 + 2x2 ≤ 12 (2.3)
where x1 , x2 ≥ 0 (2.4)
using cvxpy.
3/7
Presentation 3,
Solution 5.3
P.Srijith Reddy,
EE19BTECH11041,
Dept. of Electrical
Engg.,
The given problem is expressed as follows IIT Hyderabad.
Outline
max cx such that (3.1) Problem
x
Solution
Ax ≤ b (3.2) Plot
and
x1 , x2 ≥ 0 (3.3)
where
1 1 5 x
,x = 1 .
c = 6 5 ,A = ,b = (3.4)
3 2 12 x2
4/7
Presentation 3,
5.3
P.Srijith Reddy,
From eq(3.2) EE19BTECH11041,
Dept. of Electrical
x ≤ A−1 b (3.5) Engg.,
IIT Hyderabad.
−1
1 1 5
⇒x≤ (3.6) Outline
3 2 12 Problem
Solution
2 −1
Plot
−3 1
5
⇒x≤ (3.7)
(1 × 2 − 3 × 1) 12
−2 1 5
⇒x≤ (3.8)
3 −1 12
−2 × 5 + 1 × 12
⇒x≤ (3.9)
3 × 5 + (−1 × 12)
5/7
Presentation 3,
5.3
2
⇒x≤ (3.10) P.Srijith Reddy,
3 EE19BTECH11041,
Dept. of Electrical
Engg.,
Multiplying c on both sides of inequality IIT Hyderabad.
2 Outline
cx ≤ c (3.11)
3 Problem
Solution
Therefore Plot
2
cx ≤ 6 5 (3.12)
3
⇒ cx ≤ 27 (3.13)
The maximum value of cx is 27 and is attained when
2
x= (3.14)
3
i.e x1 = 2, x2 = 3
which also satisfies eq(3.3).
6/7
Presentation 3,
Plot 5.3
P.Srijith Reddy,
The code in EE19BTECH11041,
Dept. of Electrical
https://github.com/SRIJITH01/Srijith/blob/master/presentation3.py Engg.,
IIT Hyderabad.
plots Fig. 1. Outline
Problem
Solution
Plot
Figure: Graphical representation .
7/7