(self, h, pcoeff, icoeff, dcoeff, order=1, accept_safety=0.81, eps=1e-8)
| 304 | class PIDStepSizeController: |
| 305 | """A PID controller for ODE adaptive step size control.""" |
| 306 | def __init__(self, h, pcoeff, icoeff, dcoeff, order=1, accept_safety=0.81, eps=1e-8): |
| 307 | self.h = h |
| 308 | self.b1 = (pcoeff + icoeff + dcoeff) / order |
| 309 | self.b2 = -(pcoeff + 2 * dcoeff) / order |
| 310 | self.b3 = dcoeff / order |
| 311 | self.accept_safety = accept_safety |
| 312 | self.eps = eps |
| 313 | self.errs = [] |
| 314 | |
| 315 | def limiter(self, x): |
| 316 | return 1 + math.atan(x - 1) |
nothing calls this directly
no outgoing calls
no test coverage detected