/** * Create a new instance using the specified time unit and seed. * @param arrSolver The {@link MultiVehicleArraysSolver} that is used for * solving. * @param timeUnit The time unit to use for the underlying * {@link RandomMVArraysSolver}. */ public DebugSolverCreator(MultiVehicleArraysSolver arrSolver, Unit<Duration> timeUnit) { arraysSolver = ArraysSolverDebugger.wrap( ArraysSolverValidator.wrap(arrSolver), false); solver = SolverDebugger.wrap(SolverValidator .wrap(new MultiVehicleSolverAdapter(arraysSolver, timeUnit)), false); }
@Test public void testWrapSingle() { final SingleVehicleArraysSolver s = wrap(new FakeSingleSolver( new SolutionObject(new int[] {0, 1, 2, 3}, new int[] {0, 10, 100, 108}, 238))); s.solve(travelTimes, new int[4], new int[4], new int[][] {}, new int[4], null); }
@Test public void testWrapMulti() { TestUtil.testPrivateConstructor(ArraysSolverValidator.class); final MultiVehicleArraysSolver s = wrap(new FakeMultiSolver( new SolutionObject[] {new SolutionObject(new int[] {0, 1, 2, 3}, new int[] {0, 10, 100, 108}, 228)})); s.solve(travelTimes, new int[4], new int[4], new int[][] {}, new int[4], new int[2][4], new int[][] {{0, 1}, {0, 2}}, new int[2], new int[2], null); }
.wrap(new FakeMultiSolver(new SolutionObject[] {sol1, sol2}));
@Override public Solver get(long seed) { return SolverValidator.wrap(new MultiVehicleSolverAdapter( ArraysSolverValidator.wrap(new RandomMVArraysSolver( new MersenneTwister(seed))), SI.MILLI(SI.SECOND))); } };