Package rinde.sim.pdptw.common

Examples of rinde.sim.pdptw.common.VehicleDTO


  public void testIO() {
    final ScenarioBuilder sb = new ScenarioBuilder(PDPScenarioEvent.ADD_DEPOT,
        PDPScenarioEvent.ADD_PARCEL, PDPScenarioEvent.ADD_VEHICLE,
        PDPScenarioEvent.TIME_OUT);

    sb.addEvent(new AddVehicleEvent(100, new VehicleDTO(new Point(7, 7), 7d, 2,
        new TimeWindow(0, 1000L))));
    sb.addEvent(new AddDepotEvent(76, new Point(3, 3)));
    sb.addEvent(new AddVehicleEvent(125, new VehicleDTO(new Point(6, 9), 3d, 1,
        new TimeWindow(500, 10000L))));
    sb.addEvent(new AddParcelEvent(ParcelDTO
        .builder(new Point(0, 0), new Point(1, 1))
        .pickupTimeWindow(new TimeWindow(2500, 10000))
        .deliveryTimeWindow(new TimeWindow(5000, 10000))
View Full Code Here


   * {@link Solvers#computeStats(GlobalStateObject, ImmutableList)} method
   * produces the same result when providing decomposed state objects.
   */
  @Test
  public void convertDecompositionTest() {
    final VehicleDTO vd1 = new VehicleDTO(
        new Point(5, 5), 30, 0,
        new TimeWindow(100L, 100000L));

    final ParcelDTO a = ParcelDTO.builder(new Point(0, 0), new Point(10, 10))
        .pickupTimeWindow(new TimeWindow(0, 30))
View Full Code Here

    assertEquals(expected.size(), states.size());

    for (int i = 0; i < expected.size(); i++) {

      final TestVehicle vehicle = expected.get(i);
      final VehicleDTO dto = vehicle.dto;
      final VehicleStateObject vs = states.get(i);

      assertEquals(dto.availabilityTimeWindow, vs.availabilityTimeWindow);
      assertEquals(dto.capacity, vs.capacity);
      assertEquals(dto.speed, vs.speed, 0);
View Full Code Here

  static class TestVehicle extends DefaultVehicle {
    public final VehicleDTO dto;

    TestVehicle(Point start) {
      super(new VehicleDTO(start, .1, 1, TW));
      dto = getDTO();
    }
View Full Code Here

  }

  static class TestVehicle extends RouteFollowingVehicle {

    TestVehicle(Point start) {
      super(new VehicleDTO(start, 30, 1, new TimeWindow(0, 1000)), false);
    }
View Full Code Here

    final Point depotPosition = new Point(2.0, 2.5);
    final double truckSpeed = 30;
    sb.addEvent(new AddDepotEvent(-1, depotPosition));
    for (int i = 0; i < vehicles; i++) {
      sb.addEvent(new AddVehicleEvent(-1, new VehicleDTO(depotPosition,
          truckSpeed, 0, new TimeWindow(0, totalTime))));
    }
    sb.addEvents(parcels.get(online));
    sb.addEvent(new TimedEvent(TIME_OUT, totalTime));
View Full Code Here

  }

  @Test(expected = IllegalArgumentException.class)
  @SuppressWarnings("null")
  public void validateZeroSpeed() {
    final VehicleDTO dto1 = new VehicleDTO(null, 0, 1, null);
    final VehicleStateObject vs1 = new VehicleStateObject(dto1, null, null, 0,
        null, null);
    final GlobalStateObject state = new GlobalStateObject(null,
        ImmutableList.of(vs1), 0, null, null, null);
    SolverValidator.validateInputs(state);
View Full Code Here

    return new ParcelDTO(new Point(0, 0), new Point(0, 0), TimeWindow.ALWAYS,
        TimeWindow.ALWAYS, 0, 0, 0, 0);
  }

  static VehicleDTO vdto() {
    return new VehicleDTO(new Point(0, 0), 1, 1, TimeWindow.ALWAYS);
  }
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,
View Full Code Here

    // for (int i = 0; i < numVehicles; i++) {
    // sb.addEvent(new AddVehicleEvent(0, new VehicleDTO(coordinates.get(0),
    // 1.0, capacity, timeWindow)));
    // }
    final VehicleDTO defaultVehicle = new VehicleDTO(coordinates.get(0), 1.0,
        capacity, timeWindow);

    // Nr. des Pickup-Orts; Nr. des Delivery-Orts; untere Zeitfenstergrenze
    // Pickup; obere Zeitfenstergrenze Pickup; untere Zeitfenstergrenze
    // Delivery; obere Zeitfenstergrenze Delivery; benötigte Kapazität;
View Full Code Here

TOP

Related Classes of rinde.sim.pdptw.common.VehicleDTO

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.