Problem summary :
A complete problem description is given here
Given a description of city streets and a number of Street View cars (cars that captures pictures as they move around) available for a period of time, your task is to schedule the movement of the cars to maximize the total length of city streets that were traversed at least once.
The city is represented by a graph, the nodes of which represent city junctions and are connected with edges representing the streets.
Streets are modeled as straight segments connecting two junctions. Each street has three properties: direction length( the distance in meters that a StreetView car covers while moving through the street) and the time in seconds that a StreetView car takes to traverse the street. Each pair of junctions is connected by at most one street. Each street connects two different junctions. The graph is not necessarily planar (due to bridges and tunnels).
We have a fleet of $N=8$ cars, all located at the junction $S$ at the beginning of the game. All car movement scheduled in the itinerary has to complete in $T$ seconds (or less) a car cannot be in transit when the time runs out.
The objective function is the total length of all streets that were traversed by at least one car of their fleet at least once. Traversing a street that was already traversed multiple times (including traversing a bi-directional street in the opposite direction) does not increase the objective function.
There is a single data file that is available here.(The number of junctions is $11348$ and the number of edges is $2\,\times$ number of streets (since I'm orienting them) which is equal to $2\times17958$)
Model for a single car :
The aim is to find a formulation that can lead to a solution using a commercial/open source solver. My idea is to write a model for a single car by taking $T := 8T$, then I need to divide the path obtained into 8 different paths for the 8 cars.
- $G= (V,E)$ is a graph where $V$ is the set of junctions in the city and $E$ is the set of oriented edges (I redefine it by setting $t_e = \infty$ if it's one way, it's not oriented in the statement)
- for every $e = (u,v) \in E$, $t_e$ is the cost(time) of the road ($t_e = \infty$ if it's one-way) and $l_e$ is its length.
- $T$ time limit for each car
- $v_s$ the starting junction
Variables:
- $\forall v \in V, f_v := 1$ if the car stops at $v$ and $0$ otherwise.
- $\forall e \in E, x_e :=1$ if the road $e$ is taken in picture and $0$ otherwise.
- $\forall e \in E, y_e$ indicates the number of times of passing this edge
Constraints for a single car:
$\forall e = (u,v) \in E, x_e \leq y_e$ (to take a picture we must pass by the street !)
$\forall e =(u,v) \in E, x_{(u,v)} + x_{(v,u)} \leq 1$
$\sum\limits_{e \in E} y_e t_e \leq T$ (meaning that the path should be finished within $T$)
$\forall v_i \in V, v_i \neq v_s,$ \begin{align}\sum\limits_{\,\,\,e \in E\\ e=(u,v_i)} y_e &= \sum\limits_{\,\,\,e' \in E, \\e' = (v_i,u)} y_{e'} + f_{v_i}\\\sum_{\,\,\,e \in E \\ e =(v_s,v)} y_e &= \sum_{\,\,\,e' \in E \\ e'=(v,v_s)} y_{e'} + f_{v_s} + 1\end{align}
$\sum\limits_{v \in V} f_v = 1$ (a unique end)
The two last constraints but one guarantee that there is no "jumping".
Objective function: $\max \sum\limits_{e \in E} x_e l_e$
Questions
I have three questions:
If I set $T = 8T$, and implement the model, it will give one big path. How to split it to find a path for each car?
The number of junctions is $11348$ and the number of edges is $2\,\times$ number of streets (since I'm orienting them) which is equal to $2\times17958$. Someone told me that there is a lot of variables and it can't be solved with MIP solver. Do you think it's true? what are the limits of MIP solvers?
Is there a way to make the model better (from a computational point of view)?