Class FluidTimeoutStop

java.lang.Object
jline.solvers.fluid.FluidTimeoutStop

public final class FluidTimeoutStop extends Object
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 Type
    Method
    Description
    static boolean
    True while a finite wall-clock budget is armed on this thread.
    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 stop condition to hand LSODA: other (which may be null) OR the budget.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • armed

      public static boolean armed()
      True while a finite wall-clock budget is armed on this thread.
    • chain

      public static StepStopCondition chain(StepStopCondition other)
      The stop condition to hand LSODA: other (which may be null) OR the budget. Returns other unchanged 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.