Let us consider a constrained optimization problem in the form
A car importer is planning to import two models of JDM cars. In one shipment he can transport 60 cars and investment of 50 million CZK. The purchase price of the two models is 2.5 million and 0.5 million CZK. He then expects a profit of 250 thousand CZK per unit sold of the first model and 75 thousand CZK of the second model. How many units of each model should he buy to maximize his profit, expecting every car will be sold?
We have a network (represented as directed graph). The graph has a "Source" of a medium (it can be for example gas, water or electricity) and Sink with additional nodes in between. All edges between source and sink has defined maximal capacity.
graph LR;
A["Source"];
D["Sink"];
A-->|"10"|B1;
A-->|"8"|B2;
A-->|"5"|C1;
B1-->|"6"|C1;
B1-->|"2"|C2;
B2-->|"4"|C1;
B2-->|"5"|C2;
C1-->|"8"|D;
C2-->|"9"|D;
What is the maximum amount medium we can transmit through the sink?
Let us first define our optimization variables
graph LR;
A["Source"];
D["Sink"];
A-->|"x₂ ≤ 10"|B1;
A-->|"x₃ ≤ 8"|B2;
A-->|"x₁ ≤ 5"|C1;
B1-->|"x₄ ≤ 6"|C1;
B1-->|"x₅ ≤ 2"|C2;
B2-->|"x₆ ≤ 4"|C1;
B2-->|"x₇ ≤ 5"|C2;
C1-->|"x₈ ≤ 8"|D;
C2-->|"x₉ ≤ 9"|D;
we may then write the problem as
where
Let us consider a constrained optimization problem in the form
where
We have three power plants each producing electricity to satisfy the demand of
1 | 20 | 5 | 0.02 | 200 | 1000 |
2 | 25 | 4 | 0.015 | 300 | 1500 |
3 | 30 | 3 | 0.01 | 100 | 800 |