IBM ILOG Dispatcher User's Manual > Transportation Industry Solutions > Pickup and Delivery by Multiple Vehicles from Multiple Depots > Solve > Declare the RoutingSolver class

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

class RoutingSolver {
  RoutingModel&        _routing;
  IloModel            _mdl;
  IloSolver           _solver;
  IloDispatcher       _dispatcher;
  IloRoutingSolution  _solution;
  IloGoal             _instantiateCost;
  IloGoal             _restoreSolution;
  IloGoal             _fsGoal;
  IloNHood            _nhood;
  IloMetaHeuristic    _greedy;
  IloGoal             _move;

public:
  RoutingSolver(RoutingModel& routingModel);
  ~RoutingSolver() {}

  IloEnv getEnv() const { return _mdl.getEnv();}
  void syncSolution(IloModel mdl, IloSolution s, IloGoal g);
  void syncSolution();
  IloBool findFirstSolution();
  IloBool improveDepots();
  IloBool improvePlan();
  void printInformation() const;
};

There are several important differences between the RoutingSolver class used in a standard PDP and the RoutingSolver class used in this problem. These include several member functions used in the iterative solution process: syncSolution, improveDepots, and improvePlan.