New package for piecewise deterministic Markov processes

Hi,

I am happy to announce a package PiecewiseDeterministicMarkovProcesses.jl to simulate ODE with stochastic jumps.

A lot of effort has been put to remove unncessary allocations, to make it fast and precise (in term of sampling of the process). It builds upon DifferentialEquations.

Best,

7 Likes

Excellent work, but the name is too heavy, PiecewiseDeterministicMarkovProcesses.jl, you may think of a shorter alternative. Thank you anyway.

thank you!

Well… see for yourself here

I think long, descriptive names are favored in the general registry, as they aid discoverability and avoid collisions.

One can always do

const PDMP = PiecewiseDeterministicMarkovProcesses

after importing.

4 Likes

Also there’s an anectodal other package related to piecewise deterministic samplers (PDSampler.jl) which are typically also referred to as PDMPs so I guess short names can quickly get confusing :slight_smile:

Good work with the package release @rveltz!

Oh I did not know this one…

1 Like

I dont understand why travis is not able to build it anymore. Has someone encountered this error?

Installed PiecewiseDeterministicMarkovProcesses ─ v0.0.1
  Building CodecZlib → `~/.julia/packages/CodecZlib/DAjXH/deps/build.log`
ERROR: MethodError: no method matching haskey(::Nothing, ::String)
Closest candidates are:
  haskey(!Matched::Base.Iterators.Pairs, ::Any) at iterators.jl:247
  haskey(!Matched::Dict, ::Any) at dict.jl:546
  haskey(!Matched::Base.ImmutableDict, ::Any) at dict.jl:731
  ...
Stacktrace:
 [1] (::getfield(Pkg.Operations, Symbol("##39#43")){Bool,getfield(Pkg.Operations, Symbol("##67#69")){Pkg.Types.Context,getfield(Pkg.Operations, Symbol("##66#68")){Pkg.Types.Context,Cmd}},Pkg.Types.Context,Pkg.Types.PackageSpec,Pkg.Types.Context})(::String) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/Operations.jl:895
 [2] mktempdir(::getfield(Pkg.Operations, Symbol("##39#43")){Bool,getfield(Pkg.Operations, Symbol("##67#69")){Pkg.Types.Context,getfield(Pkg.Operations, Symbol("##66#68")){Pkg.Types.Context,Cmd}},Pkg.Types.Context,Pkg.Types.PackageSpec,Pkg.Types.Context}, ::String) at ./file.jl:576
 [3] mktempdir at ./file.jl:574 [inlined]
 [4] #with_dependencies_loadable_at_toplevel#37(::Bool, ::Function, ::getfield(Pkg.Operations, Symbol("##67#69")){Pkg.Types.Context,getfield(Pkg.Operations, Symbol("##66#68")){Pkg.Types.Context,Cmd}}, ::Pkg.Types.Context, ::Pkg.Types.PackageSpec) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/Operations.jl:868
 [5] #with_dependencies_loadable_at_toplevel at ./none:0 [inlined]
 [6] macro expansion at ./logging.jl:309 [inlined]
 [7] #test#65(::Bool, ::Function, ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/Operations.jl:1321
 [8] #test at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:0 [inlined]
 [9] #test#42(::Bool, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:273
 [10] #test at ./none:0 [inlined]
 [11] #test#41 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:255 [inlined]
 [12] #test at ./none:0 [inlined]
 [13] #test#40 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:254 [inlined]
 [14] #test at ./none:0 [inlined]
 [15] #test#39 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:253 [inlined]
 [16] (::getfield(Pkg.API, Symbol("#kw##test")))(::NamedTuple{(:coverage,),Tuple{Bool}}, ::typeof(Pkg.API.test), ::String) at ./none:0
 [17] top-level scope at none:0

In early summer or so, I encountered what is probably the same error. IIRC something asks for a package that is not in a list of packages and this is the error that results. I neglected to open an issue (again, my best recollection) saying that this condition should be checked and a more informative error thrown.

This: https://github.com/rveltz/PiecewiseDeterministicMarkovProcesses.jl/blob/cd87b24ae3f65b5ac6ab562ebe0d977481937b7b/Project.toml#L2 should match this: https://github.com/JuliaRegistries/General/blob/787ccae8afcfa2ce3c6df66d7f9b7564b5fb0b08/P/PiecewiseDeterministicMarkovProcesses/Package.toml#L2. The package manager should definitely handle this failure mode better.

Oh,

So I can just change this uuid?

Yes.

looks like it worked. tahnk you!