Download presentation
Presentation is loading. Please wait.
1
So far all our functions were linear. In many situations, it might not be the case. Example: Production cost. – c 1 = $11/unit for first 5 items – c 2 = $8/unit for next 4 items – c 3 = $5/unit for next 7 items – c 4 = $7/unit for next 10 items The cost of producing x items is an example of so-called piecewise linear function:
2
How to include piecewise linear cost functions in an objective function of LP? Idea: Introduce a new variable for each cost segment. For i=1,2,3,4 y i = number of items produced at cost c i Then the total number of items is x = y 1 +y 2 +y 3 +y 4. We need constraints 0 y 1 5, 0 y 2 4, 0 y 3 7, 0 y 4 10,(*) and the production cost in the objective function is 11y 1 + 8y 2 + 5y 3 + 7y 4 What is the shortcoming of this model?
3
We should require that –y 2 >0 implies that y 1 =5(1) –y 3 >0 implies that y 2 =4(2) –y 4 >0 implies that y 3 =7(3) Introduce new variables to translate these requirements into linear constraints. For i=1,2,3,4, Proper constraints relating w i and y i will provide that requirements (1)-(3) are satisfied. y 2 4w 1 and 5w 1 y 1 provide (1) y 3 7w 2 and 4w 2 y 2 provide (2) y 4 10w 3 and 7w 3 y 3 provide (3)
4
Summarizing, the bound constraints in (*) should be substituted with 5w 1 y 1 5, 4w 2 y 2 4w 1, 7w 3 y 3 7w 2, 0 y 4 10w 3. Generalizing, suppose we have k segments with lengths L 1, L 2, …, L k. Then the necessary constraints: L 1 w 1 y 1 L 1, L i w i y i L i w i-1 for i = 2, …, k-1 0 y k L k w k-1
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.