title: OR-Tools - Minimize area covered by every route
body: <p>I'm using the VRP from OR-Tools to generate routes for hundreds of deliveries in a city. All the packages are picked up in the same location. Currently, I'm minimizing the sum of distances and constraining the number of deliveries per route.</p>
  <p>I'd like to add a new cost in the cost function to minimize the area that every route covers. The reason behind is that many routes overlap in the same areas and I would like to have all the deliveries of every route in the smallest area as possible. This could help couriers to deliver only in very specific areas of the city.</p>
  <p>My idea of a basic implementation was to create two dimensions to track the min and the max longitude and latitude from the first delivery of every route to the last one (i.e., without considering the depot). Then, I would add a cost based on the difference of the max &amp; min.</p>
  <p>However, I don't find a way to store the min &amp; max value of a dimension. As far as I know, the dimension callbacks are stateless and don't depend on previous connections between deliveries and so it can't be done this way.</p>
  <p>Any suggestion to accomplish this or something similar?</p>