IBM ILOG Dispatcher User's Manual > The Basics > Solving a Vehicle Routing Problem > Solve > Define the printInformation function

The printInformation function displays the routing plans found during the first solution generation and solution improvement phases and their costs. This function also displays information about the search, including number of variables, number of constraints, elapsed time since creation of search, number of fails, and number of choice points. The number of choice points is linked to the number of explored alternatives in the search tree. The number of fails is the number of incorrect decisions at choice points.

This code is provided for you:

void RoutingSolver::printInformation(const char* heading) const {
  if(heading)
      _solver.out()<<heading<<endl;
  _solver.printInformation();
  _dispatcher.printInformation();
  _solver.out() << "===============" << endl
    << "Cost         : " << _dispatcher.getTotalCost() << endl
    << "Number of vehicles used : "
    << _dispatcher.getNumberOfVehiclesUsed() << endl
    << "Solution     : " << endl
    << _dispatcher << endl;
}