Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
BridgingBot
@GitterIRCbot

[slack] <torkel.loman> @isaacsas There's some support. E.g. this quick example:
```using ModelingToolkit
import HomotopyContinuation
const HC = HomotopyContinuation

Define a MT nonlinear system

@variables x y z
@parameters σ ρ β

eqs = [0 ~ σ(y-x),
0 ~ x
(ρ-z)-y,
0 ~ xy - βz]
ns = NonlinearSystem(eqs, [x,y,z], [σ,ρ,β])

convert variables and parametrs from nonlinear system to HC vars

hc_vars = HC.Variable.(Symbol.(ns.states))
hc_params = HC.Variable.(Symbol.(http://ns.ps))

Now we just would need to evaluate the nonlinear system at (hc_vars, hc_params)

However this seems to be possibel without actually compiling a function (sigh...)

nlsys_func = generate_function(ns, [x,y,z], [σ,ρ,β], expression=Val{false})[1]

hc_eqs = nlsys_func(hc_vars, hc_params)
HC.System(hc_eqs; variables = hc_vars, parameters = hc_params)```
I can probably be made more streamlined though.

Had some home written functions for this kind of stuff, but haven't used in a year. They worked for me, but wasn't really happy enough with them to make something of them for the main package. You are right though, conservationlaws are around so pretty much everything is in place to make it work.

BridgingBot
@GitterIRCbot
This message was deleted

[slack] <Amir Abbasi> Hi All! I am trying to save derivative of a variable by defining a saving callback when I am solving a set of ODE's with different initial conditions using parallel ensemble simulations. The (not) working example that I have borrowed from DifferentialEquations.jl is
```using Distributed
using DifferentialEquations
using Plots

addprocs()
@everywhere using DifferentialEquations
prob = ODEProblem((u,p,t)->1.01u,[0.0, 1.0, 2.0],(0.0,1.0))
@everywhere function prob_func(prob,i,repeat)
remake(prob,u0=rand()*prob.u0)
end

saved_values = SavedValues(Float64,Vector)
cb = SavingCallback((u,t,integrator) ->[u[1],u[2],u[3],get_du(integrator)[3]], saved_values, saveat = 0.1:0.2:1.0)

ensemble_prob = EnsembleProblem(prob,prob_func=prob_func)
sim = solve(ensemble_prob,Tsit5(),EnsembleDistributed(),callback = cb,trajectories=10)
saved_values```
Do you have any suggestions?

BridgingBot
@GitterIRCbot
[slack] <chrisrackauckas> you cannot distribute one global
[slack] <chrisrackauckas> it needs to be built as part of the prob_func if you're doing that
[slack] <chrisrackauckas> though this doesn't really seem necessary since if you're doing a dense save then you might as well just sol(t,Val{1}) for the derivative anyways.
BridgingBot
@GitterIRCbot
[slack] <isaacsas> Getting back the steady-state / stability stuff would be great at some point if it can be made to work robustly. I’m fine leaving the more complicated bifurcation analysis out for now / leaving it to BifrucationKit.
BridgingBot
@GitterIRCbot
[slack] <Amir Abbasi> Perfect! I managed to implement it and it works fine!
BridgingBot
@GitterIRCbot
[slack] <mcabbott> Does anyone who knows about MTK / Symbolics care to comment on these test failures? https://github.com/JuliaDiff/DiffRules.jl/pull/66/checks?check_run_id=3520209421#step:6:801
BridgingBot
@GitterIRCbot
[slack] <Amir Abbasi> I am running an parallel ensemble simulation of three coupled SDEs with additive noise term. I need really large number of iterations for each run of ensemble to reach to my desired result. In my ensemble I have 100 trajectories. Is it preferred to use DiffEqGPU to gain more speed or not?
BridgingBot
@GitterIRCbot
[slack] <chrisrackauckas> Maybe. Depends on the cost of f and g
BridgingBot
@GitterIRCbot
[slack] <Qiyao Wei> Hi all, I have a general question about visualization of ODE solvers---usually we would declare an ODE equation (e.g. wrap ODEProblem), and call solve() with a chosen solver. My question is, are there tutorial examples for visualizing the solution steps taken during the solve() function? For example, I can solve a NonLinearProblem() with NewtonRaphson()---can I visualize what's going on (steps, scheduling, etc) during the solve() process? Thanks!
BridgingBot
@GitterIRCbot
This message was deleted
BridgingBot
@GitterIRCbot
[slack] <Kim Laberinto (he/him)> Forward Euler Diagram from Youtube Video: "Numerical Analysis - Forward Euler Method" by Engineering Made Easy: https://files.slack.com/files-pri/T68168MUP-F02DKCUFGM9/download/screenshot_20210906-230439.png
BridgingBot
@GitterIRCbot

[slack] <Kim Laberinto (he/him)> Were there any particular ODE solver algorithms that you were interested in visualizing? If so, maybe you could mention which one you are interested in and maybe someone might know how to visualize that. From my understanding DiffEq uses many different algorithms to numerically solve ODEs.

On a general level, are you familiar with the Forward Euler Method, a basic method for finding numerical solutions to differential equations? I think it has a nice visualization to see what its doing at each step. Basically calculating the slope at this time using the current-time estimated value using that slope as an approximation during the entire duration to the next timesteo.

Unfortunately that's the limit of my knowledge/education. I know that DiffEq implements many different much more advanced D.E. solving techniques but I have no idea how to visualize what those advanced techniques are doing.

I also would be interested in learning more about how those can be visualized.

BridgingBot
@GitterIRCbot
This message was deleted

[slack] <Qiyao Wei> Yeah I think the Euler method is a great place to start, visualizing the slopes and how much of an update step to take. I'm not sure if people have already done that visualization in Julia though, so it would be great if someone can point to resources.

Going further, it would be incredibly helpful if someone could recommend visualizations of e.g. DynamicSS(Tsit5()) for solving steady state problems, or NewtonRaphson() for NonLinearProblem(). Many thanks in advance for the help!

BridgingBot
@GitterIRCbot
[slack] <chrisrackauckas> You can take the integrator object and plot it's values over the iterations. Or you can do a phase space plot
BridgingBot
@GitterIRCbot
[slack] <Ricardo M. S. Rosa> Has anybody gotten his hand on this new book by Higham and Kloeden on SDE (“An Introduction to the Numerical Simulation of Stochastic Differential Equations”)? I am interested in teaching an advanced undergraduate course on RODE and SDE (that is the best way to learn…) and I am wondering whether this would be suitable. At the moment, I am leaning towards Neckel and Rupp’s book, which is freely available online. Another option is Han and Kloeden’s book. Any comments (or other suggestions) are appreciated.
[slack] <Ricardo M. S. Rosa> I couldn’t even find the table of contents of teh Higham-Kloeden
BridgingBot
@GitterIRCbot
[slack] <pure_interpeter> Problem identified: SciML/DiffEqOperators.jl#472
BridgingBot
@GitterIRCbot
[slack] <chrisrackauckas> Not yet. I was offered the opportunity to add Julia code to the book, but that would take too much time haha
BridgingBot
@GitterIRCbot
[slack] <Ricardo M. S. Rosa> Thanks. I plan to have the students implement the codes in Julia and make a repo out of it. It could be a start. But I need to figure out whether this book would be suitable for them or too advanced.
[slack] <Ricardo M. S. Rosa> By the way, any missing algorithm for SDE or RODE in SciML that would be worth adding? I could make it into a project for the course.
BridgingBot
@GitterIRCbot
[slack] <chrisrackauckas> probably none in that book are missing
BridgingBot
@GitterIRCbot
[slack] <Ricardo M. S. Rosa> Ok, that is good, actually. 😅
BridgingBot
@GitterIRCbot
[slack] <contradict> This tutorial has a nice example of manually stepping an integrator: https://www.youtube.com/watch?v=L-gyDvhjzGQ
BridgingBot
@GitterIRCbot
[slack] <verma.shwetank22> Julia crashes when doing parameter estimation using diffeqflix. Full details on julia discourse
https://discourse.julialang.org/t/julia-crashes-when-doing-parameter-estimation-for-a-differential-equation-in-vscode/67859?u=shwetank_verma
BridgingBot
@GitterIRCbot
[slack] <Brian Groenke> The exit code indicates memory corruption. Are you using any unsafe pointers or arrays? Also, you should try to add some more details to that post, like the output of versioninfo() and whether or not there were any stacktraces or log files dumped before the process terminated.
[slack] <Brian Groenke> You should also check to make sure all of your array sizing and indexing is correct. I think out-of-bounds array access with @inbounds can produce crashes like this.
BridgingBot
@GitterIRCbot
[slack] <verma.shwetank22> Added the version info in the post. I am not using @inbounds in the problem
BridgingBot
@GitterIRCbot

[slack] <Qiyao Wei> Hi all, I am trying to follow this tutorial to plot an integrator object (https://diffeq.sciml.ai/stable/basics/integrator/), but received the following error. For completeness, I also post the segment of code where I use the plot function. Any help is appreciated. Thanks a lot!
ERROR: LoadError: MethodError: no method matching interpret_vars(::Nothing, ::ODESolution{Float32, 2, Vector{Vector{Float32}}, Nothing, Nothing, Vector{Float32}, Vector{Vector{Vector{Float32}}}, ODEProblem{Vector{Float32}, Tuple{Float32, Float32}, false, Vector{Float32}, ODEFunction{false, var"#dudt_#31"{Vector{Int64}}, UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, Tsit5, OrdinaryDiffEq.InterpolationData{ODEFunction{false, var"#dudt_#31"{Vector{Int64}}, UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Vector{Float32}}, Vector{Float32}, Vector{Vector{Vector{Float32}}}, OrdinaryDiffEq.Tsit5ConstantCache{Float32, Float32}}, DiffEqBase.DEStats}) Closest candidates are: interpret_vars(::Any, ::Any, ::Any) at /Users/qiyaowei/.julia/packages/SciMLBase/UIp7W/src/solutions/solution_interface.jl:387 Stacktrace: [1] macro expansion @ ~/.julia/packages/SciMLBase/UIp7W/src/integrator_interface.jl:487 [inlined] [2] apply_recipe(plotattributes::AbstractDict{Symbol, Any}, integrator::SciMLBase.DEIntegrator) @ SciMLBase ~/.julia/packages/RecipesBase/3fzVq/src/RecipesBase.jl:283 [3] _process_userrecipes!(plt::Any, plotattributes::Any, args::Any) @ RecipesPipeline ~/.julia/packages/RecipesPipeline/i2bA0/src/user_recipe.jl:36 [4] recipe_pipeline!(plt::Any, plotattributes::Any, args::Any) @ RecipesPipeline ~/.julia/packages/RecipesPipeline/i2bA0/src/RecipesPipeline.jl:70 [5] _plot!(plt::Plots.Plot, plotattributes::Any, args::Any) @ Plots ~/.julia/packages/Plots/4UbNP/src/plot.jl:208 [6] plot(args::Any; kw::Any) @ Plots ~/.julia/packages/Plots/4UbNP/src/plot.jl:91 [7] plot(args::Any) @ Plots ~/.julia/packages/Plots/4UbNP/src/plot.jl:85 [8] solve_ss(x::Vector{Int64}) @ Main ~/julia/simpleDEQ.jl:40 [9] (::var"#32#33")() @ Main ~/julia/simpleDEQ.jl:85 [10] top-level scope @ ~/julia/simpleDEQ.jl:93 [11] include(fname::String) @ Base.MainInclude ./client.jl:444 [12] top-level scope @ none:1
```function solvess(x)
z = re(p)(x)
function dudt
(u, _p, t)

    # Solving the equation f(u) - u = du = 0
    re(_p)(u+x) - u
end
ss = ODEProblem(dudt_, z, tspan, p)
xx = solve(ss, Tsit5(), u0=z, abstol=Float32(1e-5), reltol=Float32(1e-5), tspan=1.0f0).u
integrator = init(ss,Tsit5();dt=1//2^(4),tstops=[0.5])
pyplot(show=true)
plot(integrator)
for i in integrator
  display(plot!(integrator,vars=(0,1),legend=false))
end
step!(integrator); plot!(integrator,vars=(0,1),legend=false)
savefig("iteratorplot.png")

end```

BridgingBot
@GitterIRCbot
[slack] <verma.shwetank22> I keep getting this warning everytime I use diffeqflux. Any fixes?: https://files.slack.com/files-pri/T68168MUP-F02DV1ZCKMZ/download/capture3.png
[slack] <verma.shwetank22> I keep getting this warning. Any fixes?: https://files.slack.com/files-pri/T68168MUP-F02E7LDLU65/download/image_from_ios.jpg
[slack] <verma.shwetank22> Any fixes for this?
using DiffEqFlux
WARNING: could not import DistributionsAD._mv_categorical_logpdf into ReverseDiffX
BridgingBot
@GitterIRCbot
[slack] <chrisrackauckas> @devmotion do you know about this one?
BridgingBot
@GitterIRCbot
[slack] <devmotion> It was fixed a while ago and should not happen with more recent versions of DistributionsAD. In any case, the warning can be ignored, it's just caused by an import statement that was accidentally not removed.
BridgingBot
@GitterIRCbot
[slack] <chrisrackauckas> I'll need to take a deeper look at integrator + SteadyStateProblem. I assumed it would work by composition, but it might need something.
BridgingBot
@GitterIRCbot
[slack] <Qiyao Wei> Hey Chris! I’m actually not sure if this is a steady state issue though... in the code I changed the original SteadyStateProblem wrapper to ODEProblem, which is why I assumed it would work xD
[slack] <chrisrackauckas> I won't be able to look at it for a bit.
BridgingBot
@GitterIRCbot
[slack] <tshort> The upcoming Modelica Conference has a lot of Julia content. See the Monday, September 20th schedule at https://2021.international.conference.modelica.org/Documents/Modelica2021_program.pdf. Does anyone know what timezone is used there?
BridgingBot
@GitterIRCbot

[slack] <gideon.simpson> so i updated on 1.6.2, and now the following is happening:
```julia> using DifferentialEquations
[ Info: Precompiling DifferentialEquations [0c46a032-eb83-5123-abaf-570d42b7fbaa]

signal (11): Segmentation fault: 11
in expression starting at /Users/gideonsimpson/.julia/packages/DiffEqBase/OPDgm/src/DiffEqBase.jl:15
jl_deserialize_value at /Applications/Julia-1.6.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.6.dylib (unknown line)
jl_deserialize_value at /Applications/Julia-1.6.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.6.dylib (unknown line)
jl_deserialize_value at /Applications/Julia-1.6.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.6.dylib (unknown line)
jl_deserialize_value at /Applications/Julia-1.6.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.6.dylib (unknown line)
jl_deserialize_value at /Applications/Julia-1.6.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.6.dylib (unknown line)
jl_deserialize_value at /Applications/Julia-1.6.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.6.dylib (unknown line)
jl_deserialize_value at /Applications/Julia-1.6.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.6.dylib (unknown line)
jl_deserialize_value at /Applications/Julia-1.6.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.6.dylib (unknown line)
jl_deserialize_value at /Applications/Julia-1.6.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.6.dylib (unknown line)
jl_deserialize_value at /Applications/Julia-1.6.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.6.dylib (unknown line)
jl_deserialize_value at /Applications/Julia-1.6.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.6.dylib (unknown line)
jl_deserialize_value at /Applications/Julia-1.6.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.6.dylib (unknown line)
jl_deserialize_value_array at /Applications/Julia-1.6.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.6.dylib (unknown line)```
there's a lot more

BridgingBot
@GitterIRCbot
[slack] <chrisrackauckas> is this the generic binary?
BridgingBot
@GitterIRCbot

[slack] <verma.shwetank22> An update to this issue that I posted here earlier:
SciML/DiffEqFlux.jl#619
I ran this in Atom/Juno and now I am getting this error:
```Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
Exception: EXCEPTION_ACCESS_VIOLATION at 0x7ff919a74408 -- RtlSetUserValueHeap at C:\Windows\SYSTEM32\ntdll.dll (unknown line)
in expression starting at C:\Users\verma\OneDrive\Desktop\Modelling\SPM.jl:140
RtlSetUserValueHeap at C:\Windows\SYSTEM32\ntdll.dll (unknown line)
RtlAllocateHeap at C:\Windows\SYSTEM32\ntdll.dll (unknown line)
RtlAllocateHeap at C:\Windows\SYSTEM32\ntdll.dll (unknown line)
malloc at C:\Windows\System32\msvcrt.dll (unknown line)

Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
Exception: EXCEPTION_ACCESS_VIOLATION at 0x7ff919a9e3cb --```
I ran sfc /scannow and it said windows has fixed some files. I ran Atom again and this time it just closed without putting any message

BridgingBot
@GitterIRCbot
[slack] <Emir Hadzic> Quick questions I got the diffeq function f(du,u,p,t) and u is a matrix that I want to allocate into a variables so
fMB = u[1,:] . Is this the best way to do it or is there a better way?
BridgingBot
@GitterIRCbot
[slack] <chrisrackauckas> fMB = @view u[1,:]
BridgingBot
@GitterIRCbot
[slack] <Emir Hadzic> thank you
Takuya Iwanaga
@ConnectedSystems
Hello! Could someone point me to a DOI to cite for GlobalSensitivity.jl?
jjalora
@jjalora
Hi guys! I recently discovered diffeqpy and I was wondering how it was possible to specify options with a "colon" e.g. de.CVODE_BDF(linear_solver=':GMRES')? I couldn't find any documentation on how to do this so if anyone could point that out, I'd greatly appreciate it. Thanks!