Yingbo Ma
Yingbo Ma
> Is it possible to just cache that function internally after the first call to sol[capacitor.v], so subsequent calls are fast? That's exactly what it does, and it's still slow...
It should be ```julia julia> @connector function VectorConnector(;name, N = 10) sts = @variables u[1:N](t) ODESystem(Equation[], t, mapreduce(collect, vcat, sts), []; name=name) end VectorConnector (generic function with 1 method) ```
Symbolics seems to give the wrong Jacobian. With https://github.com/SciML/ModelingToolkit.jl/pull/1521 I get ```julia julia> prob_simplified_jacSparse = ODEProblem(sys_simplified, Pair[], tspan, params, jac=true, sparse=true); julia> sol_simplified_jacSparse = solve(prob_simplified_jacSparse, QBDF()); ERROR: LinearAlgebra.SingularException(0) Stacktrace: ......
The `x` in `subcomp` is not the same as the `x` in `comp`, so the default map for `simp` is ```julia julia> ModelingToolkit.defaults(simp) Dict{Term{Real, Nothing}, Any} with 2 entries: sub1₊y(t)...
Ah, this is a known problem. When the variable with initial condition is reduced by the system, we need to "backsolve" the non-reduced variable. This is not always doable. I...
To clarify, we only need to reduce away the linear algebraic equations in the linearized model instead of trying to solve nonlinear algebraic equations.
Unfortunately, complex number support in MTK is still lacking, as a work-around, you can use ```julia using ModelingToolkit, OrdinaryDiffEq @parameters t C Δ η_0 v_syn k @variables Z(t) g(t) #...
Do you mean ```julia W = (1 .- conj.(sol[Z]))./(1 .+ conj.(sol[Z])) pdict = Dict(p) R = (1/(pdict[C]*pi))*(W+conj.(W))/2 ψ = log.(sol[Z]./R)/im ``` Note that `C` is a symbolic parameter not a...
Is there any update on this? It would be really nice to have this feature in vscode's terminal.
For me as well, the CPU usage is really high after joining a live share session.