Skip to content

Commit 1046ca6

Browse files
committed
(#2) Add tables for the example to make the problem more clear
1 parent 36fa94b commit 1046ca6

File tree

2 files changed

+26
-4
lines changed

2 files changed

+26
-4
lines changed

paper/paper.bib

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ @misc{gurobi-optimods
4343

4444
@misc{Graphs2021,
4545
author = {Fairbanks, James and Besan{\c{c}}on, Mathieu and Simon, Sch{\"o}lly and Hoffiman, J{\'u}lio and Eubank, Nick and Karpinski, Stefan},
46-
title = {JuliaGraphs/Graphs.jl: an optimized graphs package for the Julia programming language},
46+
title = {JuliaGraphs/Graphs.jl: an optimized graphs package for the {J}ulia programming language},
4747
year = 2021,
4848
url = {https://github.com/JuliaGraphs/Graphs.jl/}
4949
}

paper/paper.md

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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
4657
julia> 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

6991
Our deepest appreciation goes to the Julia core and package developers for creating such a powerful computational tool and supportive environment.

0 commit comments

Comments
 (0)