Package rinde.sim.util

Examples of rinde.sim.util.TimeWindow


      }
      final String xy = reader.nextString();
      final String[] parts = xy.split(",");
      final long x = Long.parseLong(parts[0]);
      final long y = Long.parseLong(parts[1]);
      return new TimeWindow(x, y);
    }
View Full Code Here


    // System.out.println(deliverLeft);
    // }

    // System.out.println(pickRight - pickLeft);
    return ImmutableList
        .of(new TimeWindow(pickLeft, pickRight), new TimeWindow(deliverLeft,
            deliverRight));
  }
View Full Code Here

    // System.out.println(deliverRemainingTime);
    // System.out.println(deliverLeft);
    // }

    return ImmutableList
        .of(new TimeWindow(pickLeft, pickRight), new TimeWindow(deliverLeft,
            deliverRight));
  }
View Full Code Here

  static class LoadPart {
    private final double load;
    private final TimeWindow tw;

    LoadPart(long st, long end, double value) {
      tw = new TimeWindow(st, end);
      load = value;
    }
View Full Code Here

      }
      final String xy = reader.nextString();
      final String[] parts = xy.split(",");
      final long x = Long.parseLong(parts[0]);
      final long y = Long.parseLong(parts[1]);
      return new TimeWindow(x, y);
    }
View Full Code Here

          scenarioLength > maxRequiredTime,
          "The scenario length must be long enough such that there is enough time for a vehicle to service a pickup at one end of the environment and to service a delivery at an opposite end of the environment and be back in time at the depot.");

      final VehicleDTO vehicleDto = new VehicleDTO(depotLocation,
          vehicleSpeed,
          VEHICLE_CAPACITY, new TimeWindow(0, scenarioLength));

      if (arrivalTimesGenerator == null) {
        arrivalTimesGenerator = new PoissonProcessArrivalTimes(
            latestOrderAnnounceTime,
            globalAnnouncementIntensity, ordersPerAnnouncement);
View Full Code Here

  @Test
  public void simpleScenario() throws IOException {
    final Gendreau06Scenario scenario = create(2, minutes(15),
        new AddParcelEvent(new ParcelDTO(new Point(2, 1), new Point(4, 1),
            new TimeWindow(0, 720000), new TimeWindow(5, 720000), 0, 0, 0, 0)));
    final StatisticsDTO dto = runProblem(scenario, useGui);

    // the second truck will turn around just one tick distance before
    // reaching the package. the reason is that it is too late since the
    // first truck will pickup the parcel.
View Full Code Here

   */
  @Test
  public void overtimeScenario() {
    final Gendreau06Scenario scenario = create(1, minutes(6),
        new AddParcelEvent(new ParcelDTO(new Point(2, 1), new Point(4, 1),
            new TimeWindow(0, minutes(12)), new TimeWindow(5, minutes(12)), 0,
            0, 0, 0)));
    final StatisticsDTO dto = runProblem(scenario, useGui);

    assertTrue(dto.simFinish);
    assertEquals(6, dto.totalDistance, EPSILON);
View Full Code Here

  }

  static AddParcelEvent parcelEvent(double x1, double y1, double x2, double y2,
      long tw1b, long tw1e, long tw2b, long tw2e) {
    return new AddParcelEvent(new ParcelDTO(new Point(x1, y1),
        new Point(x2, y2), new TimeWindow(tw1b, tw1e), new TimeWindow(tw2b,
            tw2e), 0, 0, 0, 0));
  }
View Full Code Here

TOP

Related Classes of rinde.sim.util.TimeWindow

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.