title: Time Minimization in Vehicle Routing (VRP)
body: <p>I am solving a vehicle routing problem and the simple optimization function is </p>
  
  <p>Minimize: 
  Sum of all the vehicle tour distances </p>
  
  <p>which in AMPL seems something like this</p>
  
  <pre><code>minimize objective_function:
      sum {i in city, j in city,k in vehicle} x[i,j,k]*D[i,j];
  </code></pre>
  
  <p>Where x is a binary matrix marking tours for individual vehicles  and D is the distance matrix</p>
  
  <p>What I want to do is Minimize the time taken by the fleet to complete the operation. Where time is computed as distance over speed "<code>D[i,j]/S</code>".
  Any suggestions how I should add this to the current objective function? 
  What I have done so far is change my objective function to this</p>
  
  <pre><code>minimize objective_function:
      sum {i in city, j in city,k in vehicle} x[i,j,k]*(D[i,j]/S[k]);
  </code></pre>
  
  <p>This gives me the sum of all the times taken by each vehicle. But since time for all vehicles starts in parallel I need to just pick the maximum out of each vehicle's time. That will be the time for the completion of the whole mission. Have to code it in AMPL for solving using CPLEX.</p>