github SciML/ModelingToolkit.jl v11.42.0

one hour ago

ModelingToolkit v11.42.0

Diff since v11.41.0

Added

  • A System can now carry its own time span, and every time-dependent problem constructor falls back to it when the caller omits one:

    @mtkcompile sys = System([D(x) ~ -x], t; tspan = (0.0, 5.0))
    prob = ODEProblem(sys, [])              # tspan == (0.0, 5.0)
    prob = ODEProblem(sys, [], (0.0, 2.0))  # an explicit time span still wins

    This covers ODEProblem, DAEProblem, DDEProblem, SDEProblem, SDDEProblem, BVProblem, DiscreteProblem and ImplicitDiscreteProblem. Omitting the time span for a system that does not carry one throws MissingTspanError, which names the system and both ways to fix it, rather than silently building a problem with a nothing time span.

    JumpProblem deliberately keeps its required time span: a two-argument method with an untyped operating point is ambiguous with JumpProcesses.JumpProblem(prob, jumps...).

    This adds no new accessor. get_tspan and has_tspan already existed and were already public; only the field behind them was missing. The field itself and the constructor defaults shipped in ModelingToolkitBase 1.69.0 (#5085, originally #5027 by @carldlund); this release raises the ModelingToolkitBase floor to 1.69 so that a ModelingToolkit user is guaranteed to have them.

Fixed

  • mtkcompile no longer drops a system's time span when the system has Brownian variables (#5091). That path rebuilds the System field by field rather than through @set!, so it silently lost the field while keeping tstops. It is only reachable with ModelingToolkit itself loaded, so the ModelingToolkitBase test suite could not catch it; the regression test now runs from the root InterfaceII group.

Changed

  • ModelingToolkitBase compat floor 1.64 → 1.69, required because src/systems/systems.jl now passes tspan to the System constructor.

Downstream packages that want to rely on a system carrying its own time span should depend on ModelingToolkit 11.42.0 rather than 11.41: an 11.41 user can resolve ModelingToolkitBase 1.68 and not have the field at all.

🤖 Posted by an AI agent (Claude Code, model claude-opus-5) on behalf of Chris Rackauckas.

https://claude.ai/code/session_01H5RuLDtEazwTKPkNbPeZVu

Merged pull requests:

Closed issues:

  • Symbolic tspan (#847)

Don't miss a new ModelingToolkit.jl release

NewReleases is sending notifications on new releases.