# New package for piecewise deterministic Markov processes

**URL:** <https://discourse.julialang.org/t/new-package-for-piecewise-deterministic-markov-processes/18311>\
**Category:** Package Announcements\
**Created:** [December 5, 2018, 11:32am UTC](https://discourse.julialang.org/t/new-package-for-piecewise-deterministic-markov-processes/18311 "2018-12-05T11:32:19Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![rveltz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rveltz/32/2707_2.png) [@rveltz](https://discourse.julialang.org/u/rveltz)\
**Post date:** [December 5, 2018, 11:32am UTC](https://discourse.julialang.org/t/new-package-for-piecewise-deterministic-markov-processes/18311/1 "2018-12-05T11:32:19Z")

</div>

Hi,

I am happy to announce a package [PiecewiseDeterministicMarkovProcesses.jl](https://github.com/rveltz/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,

---

<div class="post-metadata">

**Author:** ![Seif\_Shebl](https://avatars.discourse-cdn.com/v4/letter/s/eada6e/32.png) [@Seif\_Shebl](https://discourse.julialang.org/u/Seif_Shebl)\
**Post date:** [December 5, 2018, 2:57pm UTC](https://discourse.julialang.org/t/new-package-for-piecewise-deterministic-markov-processes/18311/2 "2018-12-05T14:57:12Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![rveltz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rveltz/32/2707_2.png) [@rveltz](https://discourse.julialang.org/u/rveltz)\
**Post date:** [December 5, 2018, 4:33pm UTC](https://discourse.julialang.org/t/new-package-for-piecewise-deterministic-markov-processes/18311/3 "2018-12-05T16:33:18Z")

</div>

> [@Seif\_Shebl](#):
>
> Excellent work

thank you!

> [@Seif\_Shebl](#):
>
> but the name is too heavy,

Well… see for yourself [here](https://github.com/JuliaLang/METADATA.jl/pull/19741)

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [December 5, 2018, 4:43pm UTC](https://discourse.julialang.org/t/new-package-for-piecewise-deterministic-markov-processes/18311/4 "2018-12-05T16:43:00Z")

</div>

> [@Seif\_Shebl](#):
>
> name is too heavy, `PiecewiseDeterministicMarkovProcesses.jl` , you may think of a shorter alternative

I think long, descriptive names are [favored](https://julialang.github.io/Pkg.jl/dev/creating-packages/#Package-naming-guidelines-1) in the general registry, as they aid discoverability and avoid collisions.

One can always do

```julia
const PDMP = PiecewiseDeterministicMarkovProcesses

```

after importing.

---

<div class="post-metadata">

**Author:** ![tlienart](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tlienart/32/7640_2.png) [@tlienart](https://discourse.julialang.org/u/tlienart)\
**Post date:** [December 6, 2018, 10:08am UTC](https://discourse.julialang.org/t/new-package-for-piecewise-deterministic-markov-processes/18311/5 "2018-12-06T10:08:17Z")

</div>

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 🙂

Good work with the package release @rveltz!

---

<div class="post-metadata">

**Author:** ![rveltz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rveltz/32/2707_2.png) [@rveltz](https://discourse.julialang.org/u/rveltz)\
**Post date:** [December 6, 2018, 12:29pm UTC](https://discourse.julialang.org/t/new-package-for-piecewise-deterministic-markov-processes/18311/6 "2018-12-06T12:29:11Z")

</div>

> [@tlienart](#):
>
> PDSampler

Oh I did not know this one…

---

<div class="post-metadata">

**Author:** ![rveltz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rveltz/32/2707_2.png) [@rveltz](https://discourse.julialang.org/u/rveltz)\
**Post date:** [December 11, 2018, 10:43pm UTC](https://discourse.julialang.org/t/new-package-for-piecewise-deterministic-markov-processes/18311/7 "2018-12-11T22:43:52Z")

</div>

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

```julia
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

```

---

<div class="post-metadata">

**Author:** ![jlapeyre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jlapeyre/32/4514_2.png) [@jlapeyre](https://discourse.julialang.org/u/jlapeyre)\
**Post date:** [December 12, 2018, 10:02am UTC](https://discourse.julialang.org/t/new-package-for-piecewise-deterministic-markov-processes/18311/8 "2018-12-12T10:02:04Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [December 12, 2018, 11:30am UTC](https://discourse.julialang.org/t/new-package-for-piecewise-deterministic-markov-processes/18311/9 "2018-12-12T11:30:24Z")

</div>

> [@rveltz](#):
>
> I dont understand why travis is not able to build it anymore.

This: [https://github.com/rveltz/PiecewiseDeterministicMarkovProcesses.jl/blob/cd87b24ae3f65b5ac6ab562ebe0d977481937b7b/Project.toml#L2](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](https://github.com/JuliaRegistries/General/blob/787ccae8afcfa2ce3c6df66d7f9b7564b5fb0b08/P/PiecewiseDeterministicMarkovProcesses/Package.toml#L2). The package manager should definitely handle this failure mode better.

---

<div class="post-metadata">

**Author:** ![rveltz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rveltz/32/2707_2.png) [@rveltz](https://discourse.julialang.org/u/rveltz)\
**Post date:** [December 12, 2018, 11:40am UTC](https://discourse.julialang.org/t/new-package-for-piecewise-deterministic-markov-processes/18311/10 "2018-12-12T11:40:27Z")

</div>

Oh,

So I can just change this [uuid](https://github.com/rveltz/PiecewiseDeterministicMarkovProcesses.jl/blob/cd87b24ae3f65b5ac6ab562ebe0d977481937b7b/Project.toml#L2)?

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [December 12, 2018, 11:49am UTC](https://discourse.julialang.org/t/new-package-for-piecewise-deterministic-markov-processes/18311/11 "2018-12-12T11:49:06Z")

</div>

> [@rveltz](#):
>
> So I can just change this [uuid](https://github.com/rveltz/PiecewiseDeterministicMarkovProcesses.jl/blob/cd87b24ae3f65b5ac6ab562ebe0d977481937b7b/Project.toml#L2)?

Yes.

---

<div class="post-metadata">

**Author:** ![rveltz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rveltz/32/2707_2.png) [@rveltz](https://discourse.julialang.org/u/rveltz)\
**Post date:** [December 12, 2018, 7:32pm UTC](https://discourse.julialang.org/t/new-package-for-piecewise-deterministic-markov-processes/18311/12 "2018-12-12T19:32:31Z")

</div>

looks like it worked. tahnk you!
