Package rinde.sim.pdptw.common

Examples of rinde.sim.pdptw.common.StatisticsDTO


          .getOutputs().get(0);

      assertEquals(obj.computeCost(results.results.get(0).stats),
          objValInMinutes, 0.2);

      final StatisticsDTO stats = Solvers.computeStats(solverInput,
          solverOutput);
      assertTrue(stats.toString(), obj.isValidResult(stats));
      assertEquals(objValInMinutes, obj.computeCost(stats), 0.1);
      assertEquals(objValInMinutes,
          decomposedCost(solverInput, solverOutput, obj), 0.01);
    }
  }
View Full Code Here


        .<ImmutableList<ParcelDTO>> builder()
        .add(ImmutableList.<ParcelDTO> of(a, b, c, c, b))
        .add(ImmutableList.<ParcelDTO> of(d, d))
        .build();

    final StatisticsDTO stats = Solvers.computeStats(state, routes);
    final ObjectiveFunction objFunc = new Gendreau06ObjectiveFunction();
    final double cost = objFunc.computeCost(stats);

    final double cost0 = objFunc.computeCost(Solvers.computeStats(
        state.withSingleVehicle(0),
View Full Code Here

    @Override
    public SimulationResult call() {
      try {
        final DynamicPDPTWProblem prob = init(scenario, configuration, seed,
            showGui, uiCreator);
        final StatisticsDTO stats = prob.simulate();

        @Nullable
        Object data = null;
        if (postProcessor != null) {
          data = postProcessor.collectResults(prob.getSimulator());
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.
    final double distInOneTick = 30.0 / 3600.0;
View Full Code Here

  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);
    assertEquals(1, dto.totalDeliveries);
    assertEquals(minutes(6) - 1000, dto.overTime);
View Full Code Here

  @Test
  public void tardinessScenario() {
    final Gendreau06Scenario scenario = create(1, minutes(12), /* */
        parcelEvent(2, 3, 2, 1, 0, seconds(15), 0, minutes(9)), /* */
        parcelEvent(3, 3, 3, 1, 0, minutes(3), 0, minutes(4)));
    final StatisticsDTO dto = runProblem(scenario, useGui);
    assertTrue(dto.simFinish); // the vehicles have returned to the depot
                               // just before the TIME_OUT event, but the
                               // simulation continues until the end of the
                               // scenario.
    assertEquals(6, dto.totalDistance, EPSILON);
View Full Code Here

TOP

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

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.