FirstOrderIntegrator integ = new DormandPrince54Integrator(minStep, maxStep,
scalAbsoluteTolerance,
scalRelativeTolerance);
integ.addStepHandler(new VariableHandler());
double stopTime = integ.integrate(pb, pb.getInitialTime(), pb.getInitialState(),
pb.getFinalTime(), new double[pb.getDimension()]);
assertEquals(pb.getFinalTime(), stopTime, 1.0e-10);
}
private static class KeplerHandler implements StepHandler {