# ModelingToolkit 9.39 is broken, 9.40.1 works well

**URL:** <https://discourse.julialang.org/t/modelingtoolkit-9-39-is-broken-9-40-1-works-well/119670>\
**Category:** Modelling & Simulations\
**Tags:** package, modelingtoolkit\
**Created:** [September 21, 2024, 10:32am UTC](https://discourse.julialang.org/t/modelingtoolkit-9-39-is-broken-9-40-1-works-well/119670 "2024-09-21T10:32:54Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [September 21, 2024, 1:39pm UTC](https://discourse.julialang.org/t/modelingtoolkit-9-39-is-broken-9-40-1-works-well/119670/5 "2024-09-21T13:39:59Z")

</div>

I updated the branch `broken` of the repo `Tethers.jl` to use MTK 9.40.1, and I can run the example now. But I get a warning that I did NOT get with the older MTK version:

```julia
julia> include("src/Tether_01.jl")
┌ Warning: Initialization system is overdetermined. 1 equations for 0 unknowns. Initialization will default to using least squares. To suppress this warning pass warn_initialize_determined = false. To make this warning into an error, pass fully_determined = true
└ @ ModelingToolkit ~/.julia/packages/ModelingToolkit/AS70O/src/systems/diffeqs/abstractodesystem.jl:1465
  3.125912 seconds (4.50 M allocations: 295.207 MiB, 2.24% gc time, 99.99% compilation time)
OK

```

Any idea why?

My code:

```julia
# Example one: Falling mass.
using ModelingToolkit, OrdinaryDiffEq, ControlPlots
using ModelingToolkit: t_nounits as t, D_nounits as D

G_EARTH::Vector{Float64} = [0.0, 0.0, -9.81] # gravitational acceleration [m/s²]

# definiting the model
@variables pos(t)[1:3] = [0.0, 0.0, 0.0]
@variables vel(t)[1:3] = [0.0, 0.0, 50.0] 
@variables acc(t)[1:3] = [0.0, 0.0, -9.81] 

eqs = vcat(D(pos) ~ vel,
           D(vel) ~ acc,
           acc ~ G_EARTH)

@named sys = ODESystem(eqs, t)
simple_sys = structural_simplify(sys)

# running the simulation
duration = 10.0
dt = 0.02
tol = 1e-6
ts = 0:dt:duration

prob = ODEProblem(simple_sys, nothing, (0.0, duration))
@time sol = solve(prob, Rodas5(), dt=dt, abstol=tol, reltol=tol, saveat=ts)

# plotting the result
X = sol.t
POS_Z = stack(sol[pos], dims=1)[:,3]
VEL_Z = stack(sol[vel], dims=1)[:,3]

p = plot(X, POS_Z, VEL_Z; xlabel="time [s]", ylabels=["pos_z [m]", "vel_z [m/s]"], 
         labels=["pos_z [m]", "vel_z [m/s]"], fig="falling mass")
display(p)

```

---

_[View the full topic](https://discourse.julialang.org/t/modelingtoolkit-9-39-is-broken-9-40-1-works-well/119670)._
