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

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

class Depot {
private:
  IloEnv             _env;
  IloNode            _node;
  IloInt             _nbOfTrucks;
  IloInt             _capacity;
  IloNum             _openTime;
  IloNum             _closeTime;
  IloVehicleArray    _vehicles;
  IloVisitArray      _visits;
  IloModel           _model;
  IloNHood           _nhood;
  IloMetaHeuristic   _mh;
public:
  Depot(IloEnv env, const char *name, IloNum x, IloNum y,
        IloInt nbOfTrucks, IloInt capacity,
        IloNum openTime, IloNum closeTime
        );
  ~Depot();

  const char* getName() const { return _node.getName();}
  void add(IloExtractable ex) { _model.add(ex); }
  void add(IloVehicle vehicle) { _vehicles.add(vehicle); _model.add(vehicle); }
  IloModel getModel() const { return _model; }
  IloBool improve(IloSolver solver, IloRoutingSolution rs, IloGoal g);
  void fillModel(IloRoutingSolution rs);

  void createVehicles(IloDimension2 time, IloDimension2 length, IloDimension1 
weight);
  IloVehicle createOneVehicle(IloInt vehicleIndex,
                              IloDimension2 time,
                              IloDimension2 length,
                              IloDimension1 weight);
};