}
public double g(double t, double[] y) throws EventException {
double middle = (pb.getInitialTime() + pb.getFinalTime()) / 2;
double offset = t - middle;
if (offset > 0) {
throw new EventException("Evaluation failed for argument = {0}", t);
}
return offset;
}
public void resetState(double t, double[] y) {
}