Explanation of Constraint Expressions¶
This section provides a more intuitive explanation using concrete examples.
The following is an example of a variable assignment that satisfies the constraint conditions,
summarized
in a table for each vehicle. The horizontal axis represents the alphabetical name of the city (the
depot
is the starting point), and the vertical axis represents the order of the cities to be visited (0
means
departing from the depot, 9 means arriving at the depot at the end). If a square in the table is $1$,
it
means that the vehicle will visit the city.
$x_{i,j,1}$ |
depot |
A |
B |
C |
D |
E |
F |
G |
H |
I |
0 (start) |
1 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
1 |
0 |
1 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
2 |
0 |
0 |
0 |
1 |
0 |
0 |
0 |
0 |
0 |
0 |
3 |
0 |
0 |
0 |
0 |
0 |
1 |
0 |
0 |
0 |
0 |
4 |
0 |
0 |
0 |
0 |
0 |
0 |
1 |
0 |
0 |
0 |
5 |
1 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
6 |
1 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
7 |
1 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
8 |
1 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
9 (end) |
1 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
$x_{i,j,2}$ |
depot |
A |
B |
C |
D |
E |
F |
G |
H |
I |
0 (start) |
1 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
1 |
1 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
2 |
1 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
3 |
1 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
4 |
0 |
0 |
1 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
5 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
1 |
0 |
0 |
6 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
1 |
7 |
1 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
8 |
1 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
9 (end) |
1 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
$x_{i,j,3}$ |
depot |
A |
B |
C |
D |
E |
F |
G |
H |
I |
0 (start) |
1 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
1 |
0 |
0 |
0 |
0 |
1 |
0 |
0 |
0 |
0 |
0 |
2 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
1 |
0 |
3 |
1 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
4 |
1 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
5 |
1 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
6 |
1 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
7 |
1 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
8 |
1 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
9 (end) |
1 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
The above-mentioned constraint "2: Vehicle $k$ visits only one $i$th location" corresponds to a
single
"$1$" appearing in each row (horizontal line) of the above decision variable table and can be
expressed by
the following equation:
$$
\sum_{j=0}^N x_{i,j,k} = 1 \quad (i \in \{1, \dots, L\}, k \in \{0, \dots, K-1\})
$$
Also, the constraint "3: City $j$ (excluding the depot) is visited exactly once by any vehicle"
corresponds to a single "$1$" appearing in each column (vertical line) except the depot for all
vehicles
combined, and can be expressed as follows:
$$
\sum_{i=1}^L \sum_{k=0}^{K-1} x_{i,j,k}=1 \quad (j \in \{1, \dots, N\})
$$
While these constraints ensure that each city is visited exactly once by any vehicle, the formulation
allows that the delivery depot to be visited any number of times. Therefore, post-processing is
performed
so that each vehicle visits a depot only twice, once at the start of the delivery and once at the end
of
the delivery. If the solution is supposed to stay in the depot except at the start of delivery ($i =
0$)
or at the end of delivery ($i=L+1$), we ignore the situation $i$.