Package rinde.sim.scenario

Examples of rinde.sim.scenario.ScenarioBuilder.build()


        .pickupDuration(200)
        .deliveryDuration(800)
        .build()));
    sb.addEvent(new TimedEvent(PDPScenarioEvent.TIME_OUT, 200000));

    final VanLon14Scenario s = sb
        .build(new ScenarioCreator<VanLon14Scenario>() {
          @Override
          public VanLon14Scenario create(List<TimedEvent> eventList,
              Set<Enum<?>> eventTypes) {
            return new VanLon14Scenario(eventList, new TimeWindow(0, 10),
View Full Code Here


    sb.addEvent(new AddParcelEvent(new ParcelDTO(new Point(0, 0), new Point(1,
        1), new TimeWindow(2500, 10000), new TimeWindow(5000, 10000), 0, 2400,
        200, 800)));
    sb.addEvent(new TimedEvent(PDPScenarioEvent.TIME_OUT, 200000));

    final TestScenario s = sb.build(new ScenarioCreator<TestScenario>() {
      @Override
      public TestScenario create(List<TimedEvent> eventList,
          Set<Enum<?>> eventTypes) {
        return new TestScenario(eventList, new TimeWindow(0, 1000), 1000L, SI
            .MILLI(SI.SECOND), TestProblemClass.TEST);
View Full Code Here

          truckSpeed, 0, new TimeWindow(0, totalTime))));
    }
    sb.addEvents(parcels.get(online));
    sb.addEvent(new TimedEvent(TIME_OUT, totalTime));

    return sb.build(new ScenarioCreator<Gendreau06Scenario>() {
      @Override
      public Gendreau06Scenario create(List<TimedEvent> eventList,
          Set<Enum<?>> eventTypes) {
        return new Gendreau06Scenario(eventList, eventTypes, tickSize,
            problemClass, instanceNumber, allowDiversion);
View Full Code Here

      sb.addEvent(new AddParcelEvent(o));
    }
    ordersFileReader.close();

    return sb.build(new ScenarioCreator<FabriRechtScenario>() {
      @Override
      public FabriRechtScenario create(List<TimedEvent> eventList,
          Set<Enum<?>> eventTypes) {
        return new FabriRechtScenario(eventList, eventTypes, min, max,
            timeWindow, defaultVehicle);
View Full Code Here

              .serviceDuration(serviceTime)
              .build()));
    }
    sb.addEvent(new TimedEvent(PDPScenarioEvent.TIME_OUT, length));
    if (scenarioCreator != null) {
      return sb.build(new FactoryWrapper<T>(scenarioCreator, this, num));
    }
    else {
      return (T) sb.build();
    }
  }
View Full Code Here

    sb.addEvent(new TimedEvent(PDPScenarioEvent.TIME_OUT, length));
    if (scenarioCreator != null) {
      return sb.build(new FactoryWrapper<T>(scenarioCreator, this, num));
    }
    else {
      return (T) sb.build();
    }
  }

  public static ImmutableList<Long> convert(List<Double> in) {
    final ImmutableList.Builder<Long> builder = ImmutableList.builder();
View Full Code Here

        .setNumVehicles(numTrucks)
        .parse().get(0);
    final ScenarioBuilder sb = new ScenarioBuilder(gs.getPossibleEventTypes());
    sb.addEvents(gs.asList());
    sb.addEvents(parcels);
    return sb.build(new ScenarioCreator<Gendreau06Scenario>() {
      @Override
      public Gendreau06Scenario create(List<TimedEvent> eventList,
          Set<Enum<?>> eventTypes) {
        return GendreauTestUtil.create(eventList, eventTypes, 1000);
      }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.