Linear optimization: Mathematical formulations of complex problems (How to) 1: Unterschied zwischen den Versionen
[unmarkierte Version] | [unmarkierte Version] |
Mvoltz (Diskussion | Beiträge) |
Mvoltz (Diskussion | Beiträge) |
||
Zeile 1: | Zeile 1: | ||
+ | Authors: M.Caliskan, M.Voltz | ||
+ | |||
== Theory == | == Theory == | ||
In contradiction to simple optimization problems, complex problems are not to solve graphically in 2D because of containing more than 2 variables. The complexity rises with incerasing number of variables and interdependance between them. | In contradiction to simple optimization problems, complex problems are not to solve graphically in 2D because of containing more than 2 variables. The complexity rises with incerasing number of variables and interdependance between them. | ||
− | + | === How to formulate complex problems mathematically === | |
− | + | ||
First of all the problem should be regarded properly and the information should be structured. This helps not to lose the overview caused of the huge amount of information. | First of all the problem should be regarded properly and the information should be structured. This helps not to lose the overview caused of the huge amount of information. | ||
Zeile 20: | Zeile 21: | ||
== Example: Beverage Factory == | == Example: Beverage Factory == | ||
+ | |||
+ | === The "story" === | ||
In a beverage factory are delivered concentrate for the production of coke and orangelemonade soft drinks every day. The storage capacity is limited to 3500 l each. Furthermore, 1000 l of whisky are delivered and can be stored each day. | In a beverage factory are delivered concentrate for the production of coke and orangelemonade soft drinks every day. The storage capacity is limited to 3500 l each. Furthermore, 1000 l of whisky are delivered and can be stored each day. | ||
Zeile 52: | Zeile 55: | ||
− | + | === Mathematical formulations of the example === | |
− | + | ||
After reading the case in the example you can draw the production and selling process in a graph. Don't care about variables now, simply start drawing what you read. | After reading the case in the example you can draw the production and selling process in a graph. Don't care about variables now, simply start drawing what you read. | ||
Zeile 65: | Zeile 67: | ||
Here it could be: | Here it could be: | ||
− | <math>x_1=</math> lemonade concentrate | + | :<math>x_1=</math> lemonade concentrate |
− | <math>x_2=</math> coke concentrate | + | :<math>x_2=</math> coke concentrate |
− | <math>x_3=</math> whisky | + | :<math>x_3=</math> whisky |
− | <math>x_4=</math> coke concentrate used in production | + | :<math>x_4=</math> coke concentrate used in production |
− | <math>x_5=</math> coke concentrate sold to fast food restaurant | + | :<math>x_5=</math> coke concentrate sold to fast food restaurant |
− | <math>x_6=</math> lemonade in liters | + | :<math>x_6=</math> lemonade in liters |
− | <math>x_7=</math> coke for whisky in liters | + | :<math>x_7=</math> coke for whisky in liters |
− | <math>x_8=</math> coke for sale in liters | + | :<math>x_8=</math> coke for sale in liters |
− | <math>x_9=</math> whisky-coke in liters | + | :<math>x_9=</math> whisky-coke in liters |
− | <math>x_{10}=</math> water in liters | + | :<math>x_{10}=</math> water in liters |
− | <math>x_{11}=</math> CO2 in liters | + | :<math>x_{11}=</math> CO2 in liters |
− | <math>x_{12}=</math> can of lemonade | + | :<math>x_{12}=</math> can of lemonade |
− | <math>x_{13}=</math> can of coke | + | :<math>x_{13}=</math> can of coke |
− | <math>x_{14}=</math> can of whisky-coke | + | :<math>x_{14}=</math> can of whisky-coke |
After defining the variables you can start setting up the restrictions. Start with the easy ones like the input factors and then carefully go through the whole graph and set up the relationships between the different variables. | After defining the variables you can start setting up the restrictions. Start with the easy ones like the input factors and then carefully go through the whole graph and set up the relationships between the different variables. | ||
− | 1) <math>x_1\leq3500</math> | + | :1) <math>x_1\leq3500</math> |
− | 2) <math>x_2\leq3500</math> | + | :2) <math>x_2\leq3500</math> |
− | 3) <math>x_3\leq1000</math> | + | :3) <math>x_3\leq1000</math> |
These three restricions express the limited input factors caused by the storage capacity. | These three restricions express the limited input factors caused by the storage capacity. | ||
− | 4) <math>x_2=x_4+100x_5</math> | + | :4) <math>x_2=x_4+100x_5</math> |
This restriction expresses the transfer of the coke concentrate into barrels containing 100 liters. Here is the first trap because in production we have to work in 1 liter steps, the 100 liter barrel is only considered for selling to the fast food restaurant. So we have got <math>x_4</math> in 1 liter, <math>x_5</math> in 100 liters. | This restriction expresses the transfer of the coke concentrate into barrels containing 100 liters. Here is the first trap because in production we have to work in 1 liter steps, the 100 liter barrel is only considered for selling to the fast food restaurant. So we have got <math>x_4</math> in 1 liter, <math>x_5</math> in 100 liters. | ||
There is also the unnecessary information that whisky is transferred into barrels. | There is also the unnecessary information that whisky is transferred into barrels. | ||
− | 5) <math>x_5\leq6</math> | + | :5) <math>x_5\leq6</math> |
− | 6) <math>x_5\in\N</math> | + | :6) <math>x_5\in\N</math> |
This is the limited sale capacity to the restaurant and the constraint that only full barrels are sold. | This is the limited sale capacity to the restaurant and the constraint that only full barrels are sold. | ||
− | 7) <math>x_1=0,3x_6</math> | + | :7) <math>x_1=0,3x_6</math> |
− | 8) <math>x_4=0,35(x_7+x_8)</math> | + | :8) <math>x_4=0,35(x_7+x_8)</math> |
− | 9) <math>x_{10}=0,68x_6+0,63(x_7+x_8)</math> | + | :9) <math>x_{10}=0,68x_6+0,63(x_7+x_8)</math> |
− | 10) <math>x_{11}=0,0002(x_6+x_7+x_8)</math> | + | :10) <math>x_{11}=0,0002(x_6+x_7+x_8)</math> |
− | Those are the mixtures of lemonade and coke. You have to pay attention | + | Those are the mixtures of lemonade and coke. You have to pay attention to the fact that you have to look from the input side, not from the output side. So it's not "Coke consists of 0,63 liters water..." but "The amount of water needed is 0,63 times the amount of coke plus 0,68 times the amount of lemonade." Otherwise you could create output even if the amount of one of the needed ingredients is 0. |
− | 11) <math>x_6+x_7+x_8\leq20000</math> | + | :11) <math>x_6+x_7+x_8\leq20000</math> |
This is the capacity limit of the soft drink plant in liters. | This is the capacity limit of the soft drink plant in liters. | ||
− | 12) <math>x_3=0,4x_9</math> | + | :12) <math>x_3=0,4x_9</math> |
− | 13) <math>x_7=0,6x_9</math> | + | :13) <math>x_7=0,6x_9</math> |
This is the mixture of whisky-coke. You can see again that the input side is considered. | This is the mixture of whisky-coke. You can see again that the input side is considered. | ||
− | 14) <math>x_6=0,3x_{12}</math> | + | :14) <math>x_6=0,3x_{12}</math> |
− | 15) <math>x_8=0,3x_{13}</math> | + | :15) <math>x_8=0,3x_{13}</math> |
− | 16) <math>x_9=0,3x_{14}</math> | + | :16) <math>x_9=0,3x_{14}</math> |
These restricions describe the transfer of the mixed drinks into the cans in the filling plant. Watch the input side! | These restricions describe the transfer of the mixed drinks into the cans in the filling plant. Watch the input side! | ||
− | 17) <math>x_{12}\geq20000</math> | + | :17) <math>x_{12}\geq20000</math> |
Finally this is the satisfaction constraint for the delivery of lemonade to the supermarket. | Finally this is the satisfaction constraint for the delivery of lemonade to the supermarket. | ||
Zeile 152: | Zeile 154: | ||
The contribution margin for the cans of lemonade <math>x_{12}</math> consists of the following elements: | The contribution margin for the cans of lemonade <math>x_{12}</math> consists of the following elements: | ||
− | - selling price per can: 1, | + | :- selling price per can: <math>1,50\$</math> |
− | - material costs per can: 0, | + | :- material costs per can: <math>0,05\$</math> |
− | - price of lemonade concentrate: | + | :- price of lemonade concentrate: <math>12\frac{\$}{\text{l}}</math> |
− | - price of water: 0, | + | :- price of water: <math>0,20\frac{\$}{\text{l}}</math> |
− | - price of CO2: | + | :- price of CO2: <math>70\frac{\$}{\text{bottle}}</math> (Attention, it's a trap!) |
So we can set up the formula: | So we can set up the formula: | ||
<math>CM_{Lemonade}=1,50\$-0,05\$-0,3(0,3\text{l}\cdot12\frac{\$}{\text{l}}+0,68\text{l}\cdot0,20\frac{\$}{\text{l}}+0,0002\text{l}\cdot\frac{70\frac{\$}{\text{bottle}}}{20\frac{\text{l}}{\text{bottle}}})</math> | <math>CM_{Lemonade}=1,50\$-0,05\$-0,3(0,3\text{l}\cdot12\frac{\$}{\text{l}}+0,68\text{l}\cdot0,20\frac{\$}{\text{l}}+0,0002\text{l}\cdot\frac{70\frac{\$}{\text{bottle}}}{20\frac{\text{l}}{\text{bottle}}})</math> |
Version vom 28. Juni 2013, 15:24 Uhr
Authors: M.Caliskan, M.Voltz
Inhaltsverzeichnis
Theory
In contradiction to simple optimization problems, complex problems are not to solve graphically in 2D because of containing more than 2 variables. The complexity rises with incerasing number of variables and interdependance between them.
How to formulate complex problems mathematically
First of all the problem should be regarded properly and the information should be structured. This helps not to lose the overview caused of the huge amount of information.
In the next step it could be useful to transform the text-based information into a graph if it is possible. So you can easily comprehend the processes and go through the problem step by step.
After that you should define the variables. Clear assignments like input and output factors can be set directly as well as all other arrows of the graph can be equipped with variables. Some of these variables could lead to equations in the formulation and could be cleared while setting up the restrictions. So you don't have to worry about having to much variables.
Now you can formulate the restrictions. You have to use the information in the graph in combination with further information given in the text or additional tables. Beware of traps like information that is implied by the text and not written out or information not needed to solve the problem.
As a last step you have to set up the objective function. Though it could be different types of objective functions like minimizing cost or maximizing profit or contribution margin you have to look carefully what is asked of you. For the case of maximizing the contribution margin you have to set up the cost and earnings for each output factor step by step.
Then you should have a well formulated mathematical model for a complex problem.
Example: Beverage Factory
The "story"
In a beverage factory are delivered concentrate for the production of coke and orangelemonade soft drinks every day. The storage capacity is limited to 3500 l each. Furthermore, 1000 l of whisky are delivered and can be stored each day.
The concentrates are transferred into barrels with a capacity of 100 l for further transportation. The Whisky is transferred into 50 l barrels. Beneath the use in production the "coke-concentrate" is also sold to a fast-food restaurant for 1500€ per barrel. The factory can sell up to 6 barrels to the fast-food restaurant every day. Only full barrels are sold.
In the soft drink plant the concentrate, water and CO2 are mixed to coke and lemonade. The CO2 bottles have a capacity of 20 l each. Water is available to infinity. The capacity of the production is limited to 20000 l of soft drinks each day. The mixture of 1 l of lemonade consists of 0,3 l orange lemonade concentrate, 0,68 l water and 0,0002 l CO2. The mixture of 1 l of coke consists of 0,35 l coke concentrate, 0,63 l water and 0,0002 l CO2.
A part of the produced coke soft drink is transferred to the long drink plant where it is mixed with whisky. Each liter of whisky-coke consists of 40% of whisky and 60% of coke
After the production the drinks are filled into cans with a capacity of 0,3 l. The material cost for each can are 0,05€.
20000 cans of orange lemonade have to be sold to a supermarket due to a delivery contract.
The purchase prices for the other ressources are: - orange concentrate: 12 €/l - coke concentrate: 10 €/l - water: 0,2 €/l - CO2: 70 €/bottle - whisky: 20 €/l
The cans are sold for: - lemonade: 1,50€ - coke: 1,7€ - whisky-coke: 4,50€
Every can produced is sold.
How many cans of each product have to be produced and sold to maximize the contribution margin?
Mathematical formulations of the example
After reading the case in the example you can draw the production and selling process in a graph. Don't care about variables now, simply start drawing what you read. In the example you can detect four nodes (storage, longdrink plant, soft drink plant and filling plant), many connections between them in form of arrows (because the edges have to be directed here) as well as three input factors and four output factors.
Now there is a proper graph for the processes you can go through the text again and start to define the variables.
Go through the text again and mark the arrows with the variables you have found.
Here it could be:
- lemonade concentrate
- coke concentrate
- whisky
- coke concentrate used in production
- coke concentrate sold to fast food restaurant
- lemonade in liters
- coke for whisky in liters
- coke for sale in liters
- whisky-coke in liters
- water in liters
- CO2 in liters
- can of lemonade
- can of coke
- can of whisky-coke
After defining the variables you can start setting up the restrictions. Start with the easy ones like the input factors and then carefully go through the whole graph and set up the relationships between the different variables.
- 1) Fehler beim Parsen (http://mathoid.testme.wmflabs.org Serverantwort ist ungültiges JSON.): x_1\leq3500
- 2) Fehler beim Parsen (http://mathoid.testme.wmflabs.org Serverantwort ist ungültiges JSON.): x_2\leq3500
- 3) Fehler beim Parsen (http://mathoid.testme.wmflabs.org Serverantwort ist ungültiges JSON.): x_3\leq1000
These three restricions express the limited input factors caused by the storage capacity.
- 4)
This restriction expresses the transfer of the coke concentrate into barrels containing 100 liters. Here is the first trap because in production we have to work in 1 liter steps, the 100 liter barrel is only considered for selling to the fast food restaurant. So we have got in 1 liter, in 100 liters. There is also the unnecessary information that whisky is transferred into barrels.
- 5) Fehler beim Parsen (http://mathoid.testme.wmflabs.org Serverantwort ist ungültiges JSON.): x_5\leq6
- 6) Fehler beim Parsen (http://mathoid.testme.wmflabs.org Serverantwort ist ungültiges JSON.): x_5\in\N
This is the limited sale capacity to the restaurant and the constraint that only full barrels are sold.
- 7)
- 8)
- 9)
- 10)
Those are the mixtures of lemonade and coke. You have to pay attention to the fact that you have to look from the input side, not from the output side. So it's not "Coke consists of 0,63 liters water..." but "The amount of water needed is 0,63 times the amount of coke plus 0,68 times the amount of lemonade." Otherwise you could create output even if the amount of one of the needed ingredients is 0.
- 11) Fehler beim Parsen (http://mathoid.testme.wmflabs.org Serverantwort ist ungültiges JSON.): x_6+x_7+x_8\leq20000
This is the capacity limit of the soft drink plant in liters.
- 12)
- 13)
This is the mixture of whisky-coke. You can see again that the input side is considered.
- 14)
- 15)
- 16)
These restricions describe the transfer of the mixed drinks into the cans in the filling plant. Watch the input side!
- 17) Fehler beim Parsen (http://mathoid.testme.wmflabs.org Serverantwort ist ungültiges JSON.): x_{12}\geq20000
Finally this is the satisfaction constraint for the delivery of lemonade to the supermarket.
You may have recognized that there is no compulsive need for the variable because it could be replaced by . Now we have proper restrictions and can go on setting up the objective function.
The contribution margin for the cans of lemonade consists of the following elements:
- - selling price per can:
- - material costs per can:
- - price of lemonade concentrate:
- - price of water:
- - price of CO2: (Attention, it's a trap!)
So we can set up the formula:
Fehler beim Parsen (http://mathoid.testme.wmflabs.org Serverantwort ist ungültiges JSON.): CM_{Lemonade}=1,50\$-0,05\$-0,3(0,3\text{l}\cdot12\frac{\$}{\text{l}}+0,68\text{l}\cdot0,20\frac{\$}{\text{l}}+0,0002\text{l}\cdot\frac{70\frac{\$}{\text{bottle}}}{20\frac{\text{l}}{\text{bottle}}})