IBM ILOG Dispatcher User's Manual > The Basics > Multiple Tours per Vehicle > 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             _restoreSolution;
  IloVisitArray       _orderedVisitArray;

public:
  RoutingSolver(RoutingModel mdl);
  ~RoutingSolver() {}
  void    insertAllReturnVisits ();
  void    orderVisits (IloVisitArray visitArray,
                      IloDispatcherGraph graph);
  bool    insertCustomerVisits ();
  void    improveWithNhood();
  void    printInformation(const char* =0) const;

};

There are several important differences between the RoutingSolver class used in a standard VRP and the RoutingSolver class used in this problem. There is an additional data member, _orderedVisitArray, an instance of IloVisitArray that will be used in the submodel. In the submodel, the visits in the _unorderedVisitArray created in the RoutingModel class will be ordered and added to the _orderedVisitArray created in the RoutingSolver class.

You do not use a single function to find the first solution, as you have in the previous lessons in this part. Instead, the first solution is generated using three functions: insertAllReturnVisits, orderVisits, and insertCustomerVisits. These functions are explained in the following sections.