@cryptic.ax issue with the new MTK v10? We should allow this as an alternative steady state definition.
But for now, removing the t-dependence is fine.
using ModelingToolkit
using ModelingToolkit: t_nounits as t, D_nounits as D
@component function my_func(;name)
para = @parameters begin
p
end
vars = @variables begin
x,
y
end
eqs = [
x^2 ~ y^2 - p^2,
]
return System(eqs,vars,para,name=name)
end
@named sys = my_func()
sys_ = mtkcompile(sys,fully_determined = false)
using NonlinearSolve
prob = NonlinearLeastSquaresProblem(sys_,[sys_.y => 1.0,sys_.x => 0, sys_.p => 2])
sol = solve(prob)