@@ -38,9 +38,20 @@ Although the majority of computations are performed by the HiGHS optimizer [@HiG
3838
3939# An Example
4040
41- The example below defines a linear transportation problem with a given matrix
42- of transportation costs between sources and targets, demand vector of targets, and
43- supply vector of sources.
41+ The example shown in ** Table 1** defines a linear transportation problem with a given matrix
42+ of transportation costs between three sources and four targets, demand values of targets, and
43+ supply values of sources.
44+
45+ | | Target 1 | Target 2 | Target 3 | Target 4 | Supply |
46+ | :-------- | :-------: | :-------: | :-------: | :-------: | :------: |
47+ | Source 1 | 1 | 5 | 7 | 8 | 100 |
48+ | Source 2 | 2 | 6 | 4 | 9 | 100 |
49+ | Source 3 | 3 | 10 | 11 | 12 | 200 |
50+ | Demand | 100 | 100 | 100 | 100 | |
51+
52+ Table: Example transportation problem
53+
54+ The Julia formulation of the problem is given below.
4455
4556``` Julia
4657julia> problem = TransportationProblem (
@@ -64,6 +75,17 @@ julia> result.solution
6475[0.0 100.0 0.0 0.0 ; 0.0 0.0 100.0 0.0 ; 100.0 - 0.0 - 0.0 100.0 ]
6576```
6677
78+ The ` solution ` matrix represents the amounts sent from the sources to corresponding targets. ** Table 2** represents the problem with its solution:
79+
80+ | | Target 1 | Target 2 | Target 3 | Target 4 | Supply |
81+ | :-------- | :-------: | :-------: | :-------: | :-------: | :------: |
82+ | Source 1 | 1 | 5 (100) | 7 | 8 | 100 |
83+ | Source 2 | 2 | 6 | 4 (100) | 9 | 100 |
84+ | Source 3 | 3 (100) | 10 | 11 | 12 (100) | 200 |
85+ | Demand | 100 | 100 | 100 | 100 | |
86+
87+ Table: Example transportation problem with its solution
88+
6789# Acknowledgements
6890
6991Our deepest appreciation goes to the Julia core and package developers for creating such a powerful computational tool and supportive environment.
0 commit comments