Package jline.solvers.fluid
Class FluidTimeoutStop
java.lang.Object
jline.solvers.fluid.FluidTimeoutStop
Halts a fluid ODE integration on the wall-clock time budget
(
options.timeout, armed by the solver's runAnalyzer through
LineTimeout). It is the JAR counterpart of MATLAB's
lineTimeoutOutputFcn: the integration stops at the first accepted
step past the deadline and keeps the path integrated so far, exactly as it
stops at the horizon, so the caller's post-processing sees a shorter
trajectory rather than an exception.
Two hooks, because the two integrator families take different ones. A
Commons Math integrator honours an EventHandler returning
Action.STOP; LSODA discards event and step handlers (they are
empty stubs there) and is stopped through its StepStopCondition
instead. Both are installed only while a finite budget is armed, so an
unbudgeted solve integrates exactly as before.
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanarmed()True while a finite wall-clock budget is armed on this thread.static voidattach(org.apache.commons.math3.ode.FirstOrderIntegrator integrator, double t0, double t1) Adds the budget halt to a Commons Math integrator over the window[t0, t1].static StepStopConditionchain(StepStopCondition other) The stop condition to hand LSODA:other(which may be null) OR the budget.
-
Method Details
-
armed
public static boolean armed()True while a finite wall-clock budget is armed on this thread. -
chain
The stop condition to hand LSODA:other(which may be null) OR the budget. Returnsotherunchanged when no budget is armed. -
attach
public static void attach(org.apache.commons.math3.ode.FirstOrderIntegrator integrator, double t0, double t1) Adds the budget halt to a Commons Math integrator over the window[t0, t1]. The caller is responsible for clearing any handler a shared integrator instance still carries from a previous window. No-op when no budget is armed.
-