AlgebraicJulia / AlgebraicJulia/Structured-Epidemic-Modeling

Problem wiring a simple SEIR model

オープン
#7 コメント 7 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Jupyter Notebook
スター
16
フォーク
5
PR マージ指標
30日以内にマージされた PR はありません

説明

For some reason, the following code for an SEIR model wires E to R, rather than I to R. Can anyone spot where I'm going wrong?

```julia
using AlgebraicPetri,AlgebraicPetri.TypedPetri
using Catlab, Catlab.CategoricalAlgebra, Catlab.Programs
using Catlab.WiringDiagrams, Catlab.Graphics
using AlgebraicDynamics.UWDDynam

epi_transitions = LabelledPetriNet(
[:Pop],
:infection=>((:Pop, :Pop)=>(:Pop, :Pop)),
:progression=>(:Pop=>:Pop),
:recovery=>(:Pop=>:Pop)
)

seir_uwd = @relation () where (S::Pop, E::Pop, I::Pop, R::Pop) begin
infection(S, I, E, I)
progression(E, I)
recovery(I, R)
end
seir_acst = oapply_typed(epi_transitions, seir_uwd, [:β, :δ, :γ])
seir_lpn = dom(seir_acst)
Graph(seir_lpn)
```

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。