/** * Wraps the specified solver in a {@link SolverDebugger} instance to allow * easier debugging of a solver. * @param s The solver to wrap. * @param print Whether debug printing should be enabled. * @return The wrapped solver. */ public static SolverDebugger wrap(Solver s, boolean print) { return new SolverDebugger(s, print); } }
final SolverDebugger solver = dsc.solver; final int n = solver.getInputs().size(); assertEquals(n, arraysSolver.getInputs().size()); assertEquals(n, solver.getOutputs().size()); assertEquals(n, arraysSolver.getOutputs().size()); final GlobalStateObject solverInput = solver.getInputs().get(i); .getOutputs().get(i); final SolutionObject[] sols = arraysSolver.getOutputs().get(i); final MVArraysObject arrInput = arraysSolver.getInputs().get(i);
/** * 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); }
final double objValInMinutes = converter.convert(objVal); final GlobalStateObject solverInput = dsc.solver.getInputs().get(0); final ImmutableList<ImmutableList<Parcel>> solverOutput = dsc.solver .getOutputs().get(0);