IBM ILOG Dispatcher User's Manual > The Basics > Minimizing the Number of Vehicles > Solve > Declare the RoutingSolver class

The code for the declaration of the class RoutingSolver is provided for you:

class RoutingSolver {
  IloEnv              _env;
  IloModel            _mdl;
  IloSolver           _solver;
  IloDispatcher       _dispatcher;
  IloRoutingSolution  _solution;
  IloGoal             _instantiateCost;
  IloGoal             _generateGoal;
  IloGoal             _restoreSolution;
  IloVehicle    getShortestRoute ();

public:
  RoutingSolver(RoutingModel mdl);
  ~RoutingSolver() {}
  IloBool findFirstSolution ();
  void improveWithNhood ();
  void closeEmptyVehicles ();
  void reduceActiveVehicles ();
  void printInformation(const char* =0) const;
};

There are only a few differences between the RoutingSolver class used in a standard VRP and the RoutingSolver class used in this problem. There are three additional member functions: getShortestRoute, closeEmptyVehicles, and reduceActiveVehicles. These member functions are explained in the following sections.