1 Vehicle Routing Application of MWIS

Given an undirected graph \(G=(V,E)\) where V is its set of nodes and E its set of edges, a subset of nodes \(S \subseteq V\) is an independent set if the elements of S are pairwise nonadjacent in G. If w(v) is the weight of node \(v \in V\), the weight of independent set S is \(W(S) = \sum _{v \in S} w(v)\). In the maximum weight independent set (MWIS) problem we seek an independent set \(S^*\) such that \(W(S^*) \ge W(S)\) for all independent sets \(S \subseteq V\) in G [1]. This optimization problem is NP-hard [2] and it is often solved using heuristic algorithms [3].

We provide a collection of instances of an MWIS problem that appeared as subproblems in algorithms solving real-life long-haul vehicle routing problems at Amazon. Our goal is to enhance the set of benchmark instances available to algorithm researchers working on MWIS. Our instances differ from other publicly available instances and the new collection includes some large instances.

To gain intuition into the application, consider a stochastic heuristic for the problem. This heuristic produces different solutions for different pseudo-random generator seeds. Each solution consists of a set of routes. We want to recombine routes from multiple solutions to obtain a better solution.

Each route consists of a driver and a set of loads assigned to the driver. A subset of routes is feasible if no two routes in the subset share a driver or a load. Each route has a weight. The objective function is the sum of route weights. The problem is to find a feasible solution of the maximum total weight.

To state this problem as MWIS, we build a conflict graph as follows. Nodes of the graph correspond to routes and weights correspond to route weights. We connect two nodes by an edge if the corresponding routes have a conflict, i.e., they share a driver or a load.

Table 1 List of VR instances in the library. For each of the 38 instances, the table lists the instance name, the number of nodes and edges in the conflict graph, the total weight of a starting solution, the linear programming (LP) upper bound, the compressed tar files of the directory with the files that define the instance, and the size (in Mbytes) of the compressed tar file

Our application has additional information that one can (optionally) use in an algorithm. First, we have a good initial solution, the best of the solutions we combine. We provide initial solutions for our instances. One can use this solution to possibly warm-start a MWIS algorithm.

Second, we have information about many cliques in the conflict graph. For a fixed load (or driver), nodes corresponding to the routes containing the load (driver) form a clique: every pair of such nodes is connected. This allows us to use the well-known clique integer linear programming (ILP) formulation of the problem:

$$\begin{aligned} \max&\sum _{v\in V} w_v x_v \\ \text {subject to}&\\&C_2, C_3, \ldots , C_k, \\&x_v \in \{0,1\}, \forall \; v \in V, \end{aligned}$$

where \(C_2, C_3, \ldots , C_k\) are, respectively, the sets of 2-clique, 3-clique\(, \ldots ,\) and k-clique inequalities. In general, for maximal cliques Q of size k, we have the set of k-clique inequalities

$$\begin{aligned} \sum _{ v \in Q} x_v \le 1,\; \text{ for } \text{ all } \text{ maximal } \text{ cliques } \text{ Q } \text{ of } \text{ size } \text{ k }. \end{aligned}$$

One can solve a linear programming (LP) relaxation of the problem, which assigns each node a value in the closed real interval [0, 1]. Note that the objective function of the LP relaxation provides an upper bound on the corresponding MWIS solution value. We provide both the cliques and the relaxed LP solutions with our instances.

Table 1 lists the instances we provide and includes the graph size, the initial solution value, and the relaxed LP bound. To compute the LP bounds we did not make use of all k-clique inequalities, for \(k > 2\) but rather only a subset of them, specified in instance file cliques.txt.

2 Input Graph Format

We place each instance in a separate directory containing several files with instance name, graph edge set, node weights, clique information, and relaxed LP solution values. Directory names correspond to the instance names. Next we describe the file formats.

For an undirected, node-weighted graph \(G=(V,E,w)\) with n nodes, m edges and integral node IDs from [1, n], we give the following files:

  • instance_name.txt - Name of the instance.

  • conflict_graph.txt - Edges of G. The file has a total of \(m + 1\) lines. The first line gives the numbers of nodes and edges: “\(n\;m\)”. Each of the lines \(2, \ldots , m+1\) describes an edge \(e = (u,v) \in E\) as “\(u\;v\)”.

  • node_weights.txt - Node weights. The file has a total of n lines, each describing the weight of node \(v \in V\) as “\(v\;w(v)\)”. The weights are integers.

  • solution.txt - Initial solution for warm start. It contains one line per node in the initial solution, giving its node index: if a node v is in the solution, the file contains a line with “v” in it.

  • cliques.txt - Set of cliques in G. For each clique \(C=\{c_1,c_2,\dots ,c_k\}\), the file contains one line as “\(c_1\;c_2\;\dots \;c_k\)”.

  • lploads.txt - Solution for the relaxed LP problem for the MWIS problem on the clique graph, where each node \(v \in V\) has a relaxed LP value \(l(v) \in [0,1]\). The file has n lines, each with the LP value of a node \(v\in V\) as “\(v\;l(v)\)”, where l(v) is a floating point number.

The files conflict_graph.txt and node_weights.txt are needed by any MWIS algorithm. The other files are optional.

Note that some of our graphs are large, with the compressed tar file being over 1 GB in size. To represent the total weight of a solution, 32-bit integers are insufficient. An implementation needs to use 64-bit integers or doubles to represent the weight of these independent sets.

3 Downloading the Instances

The full set of 38 instances can be downloaded as gzipped tar files from the AWS OpenData site:


using the AWS command line interface (CLI) [4].

Instruction on installation of AWS CLI can be found in [4]. As an example, installation on MacOS can be done using Terminal with the commands

curl "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "AWSCLIV2.pkg" sudo installer -pkg AWSCLIV2.pkg -target /

To list the contents of the repository using AWS CLI, run the command

aws s3 ls s3://mwis-vr-instances/ --no-sign-request

To download an instance, say file MT-W-01.tar.gz, from the repository using AWS CLI, run the command

aws s3 cp s3://mwis-vr-instances/MT-W-01.tar.gz . --no-sign-request

4 Concluding Remarks

In this paper, we introduce a set of large-scale maximum weight independent set instances arising in a real-world vehicle routing application. Our goal in making these instances available to other researchers is that progress can be made in the field. Other researchers can try their existing MWIS solvers on these instances and can be motivated to develop new solvers for them.