Package rinde.sim.pdptw.common

Examples of rinde.sim.pdptw.common.RouteFollowingVehicle$WaitAtService


  private static final class VehicleCreator implements Creator<AddVehicleEvent> {
    VehicleCreator() {}

    @Override
    public boolean create(Simulator sim, AddVehicleEvent event) {
      return sim.register(new RouteFollowingVehicle(event.vehicleDTO, false));
    }
View Full Code Here


    sim.register(new DefaultPDPModel());
    sim.register(new PDPRoadModel(new PlaneRoadModel(new Point(0, 0),
        new Point(10, 10), 50), false));
    sim.configure();

    final RouteFollowingVehicle rfv = new RouteFollowingVehicle(new VehicleDTO(
        new Point(1, 1), 50, 10, new TimeWindow(0, 1000000)), false);
    final Depot depot = new DefaultDepot(new Point(5, 5));

    final DefaultParcel dp1 = new DefaultParcel(new ParcelDTO(new Point(2, 2),
        new Point(3, 3), new TimeWindow(0, 1000), new TimeWindow(0, 1000), 0,
        0L, 5L, 5L));
    final DefaultParcel dp2 = new DefaultParcel(new ParcelDTO(new Point(2, 2),
        new Point(3, 3), new TimeWindow(0, 1000), new TimeWindow(0, 1000), 0,
        0L, 5L, 5L));

    sim.register(depot);
    sim.register(rfv);
    sim.register(dp1);
    sim.register(dp2);

    rfv.setRoute(asList(dp1, dp2));

    while (rfv.getRoute().size() > 0) {
      sim.tick();
    }

    final SimulationConverter simConv = Solvers.converterBuilder().with(sim)
        .build();
View Full Code Here

TOP

Related Classes of rinde.sim.pdptw.common.RouteFollowingVehicle$WaitAtService

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.