Lecture 03
Lecture 03
Spring 2023
Optimization
• The action of making the best or most effective use of a situation or resource.
• Trying to do the best thing in the given constraints
Money Constraints
• Trying to do the best you can with what you have
Optimization
Goal: To optimize some thing (function f),
• maximize f or minimize f
• Number of good production in a factory ( we want to maximize it)
• The fuel consumption or production cost in the same factory ( we want to minimize it)
• J = f(x)
• Function f may depend on one or many different variables
Constraints
• Limitation of restriction
X=
…… are the decision variables 3
F(s)= Feasible Set
= All possible values of decision vector X such that all Infeasible 2
constraints are met Feasible Set
In order to satisfy 1
F(s)= X | all constraints are satisfied constraint 1, we have to
be on the right side
𝒙𝟏
1 2 3
Anything in this region will satisfy all the constraints
Example1: Find the Number whose sum is 60 and its product is maximum
Example2: Find the Number whose difference is 40 and its product is minimum
Example3: Find the dimension of a rectangle with a parameter of 200 ft and an area as large as possible
L
Perameter= 2L+ 200= 2L+ 100= L+ 100-W= L
Area= L* W W
Area= (100-W )* L
0= (100-
W= 50
L=50
Y= mx+
d
C=5 For x, put y = 0 in equation 1 x= -1.6 y
x
2 2 2
𝑥 + 𝑦 =𝑑 (2)
(𝑥 + 9 𝑥 +15) =0
𝑑′ =
√ 𝑥 2+(3 𝑥 +5)2
1 0 𝑥+15=0 𝑥=−1.5 𝑦 =0.5
Linear Programming Optimization
Z= 2x+
27 P(0,9)
Minimize Z
P(?,?) P(2,3)
Constraints
13
P(8,0) 16
3 𝑥 + 6 𝑦 =24 , 𝑥=8 𝑦 =4
𝑦 =− 3 𝑥 +9 , 𝑥=3 𝑦 =9
3 𝑥 + 6(− 3 𝑥+9)=24 , 3 𝑥 − 18 𝑥 +54=24 , −15 𝑥=− 30 , 𝑥=2 𝑦 =3
Take these vertices put them in objective functions to get the minimum value
Example 2: A company makes 2 type of computers X and Y. This company can make a total of 80 computers per day and has
240 hours available per day. It takes 2 hours to make X and 6 hours to make computer Y. The profit on computer X and 80 $ and
on Computer Y is 120 $. How many of each should be made to maximize the profit.
P= 80x+
Constraints
4 800
P(0,40) 7 200
P(?,?) P(60,20)
0 0 𝑇𝑒𝑠𝑡 𝑓𝑜𝑟 0,0
P(0,0) 6080
2040 100 120
𝑥=120 0 𝑇𝑒𝑠𝑡 𝑓𝑜𝑟 0,0 P(80,0)
6 400
For intersection point solve the 2 equations 0 0
Take these vertices put them in objective functions to get the maximum value
P= 80x+