Package rinde.sim.pdptw.gendreau06

Examples of rinde.sim.pdptw.gendreau06.Gendreau06ObjectiveFunction.computeCost()


      final GlobalStateObject solverInput = dsc.solver.getInputs().get(0);
      final ImmutableList<ImmutableList<ParcelDTO>> solverOutput = dsc.solver
          .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));
View Full Code Here


          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

      final double travelTime = obj.travelTime(stats);

      assertEquals(arrOverTime, obj.overTime(stats), 0.001);
      assertEquals(arrTravelTime, travelTime, 0.01);
      assertEquals(arrTardiness, tardiness, 0.001);
      assertEquals(arrObjVal, obj.computeCost(stats), 0.01);
      assertEquals(arrObjVal,
          decomposedCost(solverInput, solverOutput, obj), 0.01);
    }
  }
View Full Code Here

        .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),
        ImmutableList.of(routes.get(0))));
    final double cost1 = objFunc.computeCost(Solvers.computeStats(
View Full Code Here

    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),
        ImmutableList.of(routes.get(0))));
    final double cost1 = objFunc.computeCost(Solvers.computeStats(
        state.withSingleVehicle(1),
        ImmutableList.of(routes.get(1))));
View Full Code Here

    final double cost = objFunc.computeCost(stats);

    final double cost0 = objFunc.computeCost(Solvers.computeStats(
        state.withSingleVehicle(0),
        ImmutableList.of(routes.get(0))));
    final double cost1 = objFunc.computeCost(Solvers.computeStats(
        state.withSingleVehicle(1),
        ImmutableList.of(routes.get(1))));
    assertEquals(cost, cost0 + cost1, 0.001);
  }
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.