Skip to content

Commit

Permalink
Adopt new flow (#49)
Browse files Browse the repository at this point in the history
Closes #44
  • Loading branch information
fivegrant authored Jun 14, 2023
1 parent d03e7e1 commit 820ce6d
Show file tree
Hide file tree
Showing 22 changed files with 659 additions and 455 deletions.
43 changes: 1 addition & 42 deletions Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

julia_version = "1.9.0"
manifest_format = "2.0"
project_hash = "9438c2e78a398947c9977dd003134cd71965f264"
project_hash = "87b470058e1cefd35fc06bc6f3913025a7740d82"

[[deps.ADTypes]]
git-tree-sha1 = "dcfdf328328f2645531c4ddebf841228aef74130"
Expand All @@ -21,12 +21,6 @@ git-tree-sha1 = "6252039f98492252f9e47c312c8ffda0e3b9e78d"
uuid = "ae81ac8f-d209-56e5-92de-9978fef736f9"
version = "0.1.3+0"

[[deps.AWS]]
deps = ["Base64", "Compat", "Dates", "Downloads", "GitHub", "HTTP", "IniFile", "JSON", "MbedTLS", "Mocking", "OrderedCollections", "Random", "SHA", "Sockets", "URIs", "UUIDs", "XMLDict"]
git-tree-sha1 = "2b82cf89e8a028dec40fcd6f6d9c0406a25907d7"
uuid = "fbe9abb3-538b-5e4e-ba9e-bc94f4f92ebc"
version = "1.87.0"

[[deps.AbstractAlgebra]]
deps = ["GroupsCore", "InteractiveUtils", "LinearAlgebra", "MacroTools", "Random", "RandomExtensions", "SparseArrays", "Test"]
git-tree-sha1 = "3ee5c58774f4487a5bf2bb05e39d91ff5022b4cc"
Expand Down Expand Up @@ -730,12 +724,6 @@ git-tree-sha1 = "c1d06d129da9f55715c6c212866f5b1bddc5fa00"
uuid = "e2ba6199-217a-4e67-a87a-7c52f15ade04"
version = "0.1.9"

[[deps.EzXML]]
deps = ["Printf", "XML2_jll"]
git-tree-sha1 = "0fa3b52a04a4e210aeb1626def9c90df3ae65268"
uuid = "8f5d6c58-4d21-5cfd-889c-e3ad7ee6a615"
version = "1.1.0"

[[deps.FFMPEG]]
deps = ["FFMPEG_jll"]
git-tree-sha1 = "b57e3acbe22f8484b4b5ff66a7499717fe1a9cc8"
Expand Down Expand Up @@ -919,12 +907,6 @@ git-tree-sha1 = "9b02998aba7bf074d14de89f9d37ca24a1a0b046"
uuid = "78b55507-aeef-58d4-861c-77aaff3498b1"
version = "0.21.0+0"

[[deps.GitHub]]
deps = ["Base64", "Dates", "HTTP", "JSON", "MbedTLS", "Sockets", "SodiumSeal", "URIs"]
git-tree-sha1 = "5688002de970b9eee14b7af7bbbd1fdac10c9bbe"
uuid = "bc5e4493-9b4d-5f90-b8aa-2b2bcaad7a26"
version = "5.8.2"

[[deps.Glib_jll]]
deps = ["Artifacts", "Gettext_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Libiconv_jll", "Libmount_jll", "PCRE2_jll", "Pkg", "Zlib_jll"]
git-tree-sha1 = "d3b3624125c1474292d0d8ed0f65554ac37ddb23"
Expand Down Expand Up @@ -1023,11 +1005,6 @@ git-tree-sha1 = "5cd07aab533df5170988219191dfad0519391428"
uuid = "d25df0c9-e2be-5dd7-82c8-3ad0b3e990b9"
version = "0.1.3"

[[deps.IniFile]]
git-tree-sha1 = "f550e6e32074c939295eb5ea6de31849ac2c9625"
uuid = "83e8ac13-25f8-5344-8a64-a9f2b223428f"
version = "0.5.1"

[[deps.InitialValues]]
git-tree-sha1 = "4da0f88e9a39111c2fa3add390ab15f3a44f3ca3"
uuid = "22cec73e-a1b8-11e9-2c92-598750a2cf9c"
Expand Down Expand Up @@ -2292,12 +2269,6 @@ version = "1.5.0"
[[deps.Sockets]]
uuid = "6462fe0b-24de-5631-8697-dd941f90decc"

[[deps.SodiumSeal]]
deps = ["Base64", "Libdl", "libsodium_jll"]
git-tree-sha1 = "80cef67d2953e33935b41c6ab0a178b9987b1c99"
uuid = "2133526b-2bfb-4018-ac12-889fb3908a75"
version = "0.1.1"

[[deps.SortingAlgorithms]]
deps = ["DataStructures"]
git-tree-sha1 = "a4ada03f999bd01b3a25dcaa30b2d929fe537e00"
Expand Down Expand Up @@ -2738,12 +2709,6 @@ git-tree-sha1 = "93c41695bc1c08c46c5899f4fe06d6ead504bb73"
uuid = "02c8fc9c-b97f-50b9-bbe4-9be30ff0a78a"
version = "2.10.3+0"

[[deps.XMLDict]]
deps = ["EzXML", "IterTools", "OrderedCollections"]
git-tree-sha1 = "d9a3faf078210e477b291c79117676fca54da9dd"
uuid = "228000da-037f-5747-90a9-8195ccbf91a5"
version = "0.4.1"

[[deps.XSLT_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgcrypt_jll", "Libgpg_error_jll", "Libiconv_jll", "Pkg", "XML2_jll", "Zlib_jll"]
git-tree-sha1 = "91844873c4085240b95e795f692c4cec4d805f8a"
Expand Down Expand Up @@ -2946,12 +2911,6 @@ git-tree-sha1 = "94d180a6d2b5e55e447e2d27a29ed04fe79eb30c"
uuid = "b53b4c65-9356-5827-b1ea-8c7a1a84506f"
version = "1.6.38+0"

[[deps.libsodium_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "848ab3d00fe39d6fbc2a8641048f8f272af1c51e"
uuid = "a9144af2-ca23-56d9-984f-0d03f7b5ccf8"
version = "1.0.20+0"

[[deps.libvorbis_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Ogg_jll", "Pkg"]
git-tree-sha1 = "b910cb81ef3fe6e78bf6acee440bda86fd6ae00c"
Expand Down
1 change: 0 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ version = "0.6.0"

[deps]
AMQPClient = "79c8b4cd-a41a-55fa-907c-fab5288e1383"
AWS = "fbe9abb3-538b-5e4e-ba9e-bc94f4f92ebc"
AlgebraicPetri = "4f99eebe-17bf-4e98-b6a1-2c4f205a959b"
Bijections = "e2ed5e7c-b2de-5872-ae92-c73ca462fb04"
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
Expand Down
1 change: 1 addition & 0 deletions docker/Dockerfile.api
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ RUN julia -e 'using Pkg; Pkg.instantiate();'
COPY src/ /simulation-service/src/
RUN julia -e 'using Pkg; Pkg.resolve();'

COPY paths.yaml /simulation-service/
# Launch simulation-service
EXPOSE 8080
CMD [ "julia", "--threads", "4", "-e", "using SimulationService; SimulationService.start!(); while true sleep(10000) end" ]
92 changes: 92 additions & 0 deletions examples/dataset.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
timestep,S,E,I,R,D
0.0,0.49457800495224524,0.26745259325403603,0.4497387877393193,0.32807705995998604,0.8545934885162726
1.0,0.4665022246157727,0.15226661609143755,0.282128632173281,0.5819467770808255,0.9115956844605425
2.0,0.44995568708559147,0.0870753734907285,0.17176626841178605,0.7388229924583731,0.9468196129753799
3.0,0.4402579969265885,0.049958082609506564,0.10268280170774824,0.8334700316632883,0.9680710215147275
4.0,0.4345928780439725,0.02873264900876653,0.060681564306912315,0.8897296629609703,0.9807031801012375
5.0,0.43129133897514976,0.016554961390151432,0.03559634907740039,0.9228561146017267,0.9881411703774309
6.0,0.42937079614049717,0.00955084027561801,0.020781137104605475,0.9422429917414922,0.9924941691596463
7.0,0.42825523174624236,0.005515226366193871,0.012094002808321005,0.9535438792052197,0.9950315942958823
8.0,0.42760803965578864,0.003187203614737658,0.007024405738798128,0.9601135757214116,0.996506709691123
9.0,0.42723286848143166,0.0018428391922203655,0.004074861364167079,0.9639265223459347,0.9973628430381053
10.0,0.42701542110237617,0.001065625665672367,0.002361473964384682,0.966138016624911,0.997859397064515
11.0,0.42688949053651354,0.0006163374574758091,0.0013677486708266896,0.9674192754645957,0.9981470822924473
12.0,0.4268166164339979,0.0003566562089632792,0.0007921677242322537,0.968160893781643,0.9983136002730226
13.0,0.426774399020502,0.00020632531989352596,0.0004585439285171233,0.9685905857420082,0.9984100804109383
14.0,0.4267499641987114,0.00011936317441910912,0.00026537658614250037,0.9688393044325163,0.9984659260300698
15.0,0.4267358390828414,6.911064486184507e-5,0.00015368573473018547,0.9689830886008763,0.9984982103585492
16.0,0.42672764295323584,3.995637251879534e-5,8.886936321230337e-5,0.9690665218374893,0.9985169438954028
17.0,0.42672291793839023,2.315252702782855e-5,5.149885891478391e-5,0.969114621277837,0.9985277438196892
18.0,0.42672016837248206,1.3374421742842271e-5,2.975169371631378e-5,0.9691426114006284,0.9985340285332894
19.0,0.4267185903383033,7.76324275234401e-6,1.72697551963783e-5,0.96915867560426,0.9985376354813472
20.0,0.42671766524571453,4.473700806675521e-6,9.952514996761569e-6,0.9691680929676613,0.9985397499926799
21.0,0.4267171396866097,2.605039389810057e-6,5.795292710617236e-6,0.9691734431227009,0.9985409512804482
22.0,0.4267168292213564,1.5011076626621485e-6,3.339530654332321e-6,0.9691766036403886,0.9985416609217972
23.0,0.4267166503308677,8.650367137104304e-7,1.9244997328791993e-6,0.9691784247361698,0.998542069818375
24.0,0.4267165513975358,5.133018515249044e-7,1.1418963787668045e-6,0.9691794318721828,0.9985422959539103
25.0,0.42671648849345345,2.8961248029392266e-7,6.443470300592253e-7,0.9691800722327397,0.9985424397361555
26.0,0.4267164534150905,1.6488872179188643e-7,3.668730947050761e-7,0.9691804293288433,0.9985425199161089
27.0,0.4267164363527159,1.0425224374051472e-7,2.3187776609803832e-7,0.9691806030229255,0.9985425589162079
28.0,0.4267164237650669,5.94635822904114e-8,1.323403435661362e-7,0.969180731164592,0.9985425876882744
29.0,0.42671641532016785,2.938997840309349e-8,6.558731960133238e-8,0.9691808171332872,0.9985426069911061
30.0,0.4267164119320277,1.7383990307292018e-8,3.8745941399490847e-8,0.9691808516243932,0.9985426147355065
31.0,0.42671641142993344,1.567980166379535e-8,3.4693296446806386e-8,0.9691808567356694,0.9985426158831582
32.0,0.4267164097239014,9.397997811086657e-9,2.141426794359566e-8,0.9691808741029923,0.9985426197826998
33.0,0.4267164077513253,1.6630451169718799e-9,6.5322673177872115e-9,0.9691808941837284,0.998542624291493
34.0,0.4267164068327058,-1.7144298561756136e-9,-6.228678598180968e-10,0.969180903535234,0.998542626391217
35.0,0.42671640713709813,1.995841690399913e-10,9.531889471946351e-10,0.9691809004365325,0.9985426256954555
36.0,0.4267164080167858,4.441082888563269e-9,6.797923212261653e-9,0.9691808914813484,0.9985426236847188
37.0,0.42671640835547514,3.2138485814499743e-9,1.190846777114169e-8,0.9691808880335046,0.9985426229105632
38.0,0.42671641412844163,-2.6272280610911653e-8,1.0758565137248983e-7,0.9691808292649736,0.9985426097150731
39.0,0.42671642043471775,-5.7124386784960156e-8,2.107435751597396e-7,0.9691807650673759,0.9985425953005771
40.0,0.42671642069465143,-6.101555879931584e-8,2.1761506634755097e-7,0.9691807624212634,0.9985425947064368
41.0,0.42671641308224717,-2.98748098503364e-8,9.919283597417899e-8,0.9691808399151859,0.9985426121064
42.0,0.42671640052516574,2.41129225278762e-8,-9.87705210985136e-8,0.9691809677456914,0.9985426408086006
43.0,0.4267163907047244,6.850677646347266e-8,-2.557625261850519e-7,0.9691810677173265,0.998542663255558
44.0,0.42671639824152524,4.377942441187322e-8,-1.4462071904623285e-7,0.9691809909931911,0.9985426460284376
45.0,0.4267165177761834,-3.5045943998565953e-7,1.6201571649468285e-6,0.9691797741428834,0.9985423728050674
46.0,0.426716582914649,-5.657635155369028e-7,2.5823127375500367e-6,0.9691791110412861,0.9985422239167021
47.0,0.426716469373307,-1.9999268662048253e-7,9.147186185214705e-7,0.9691802668813723,0.9985424834412481
48.0,0.4267162674880653,4.53529758154388e-7,-2.0535417063955472e-6,0.9691823220506339,0.9985429448951083
49.0,0.42671627788979505,4.201179072135318e-7,-1.900860288767501e-6,0.9691822161561675,0.9985429211182781
50.0,0.42671649186340843,-2.7150027993614184e-7,1.2440747380756681e-6,0.9691800379462864,0.9985424320377062
51.0,0.4267164371442758,-9.590264835717333e-8,4.410989446171615e-7,0.9691805949726369,0.9985425571086503
52.0,0.42671627454943717,4.2799006477805363e-7,-1.9470013902130833e-6,0.9691822501358911,0.9985429287478564
53.0,0.4267164118674504,-1.515429881156514e-8,7.058019617525471e-8,0.9691808522520705,0.998542614876441
54.0,0.4267164314292611,-7.842218520117033e-8,3.5813674655576225e-7,0.9691806531145852,0.9985425701634516
55.0,0.4267163402967335,2.1536057882219336e-7,-9.805249063054177e-7,0.9691815808243099,0.9985427784651432
56.0,0.4267164064309929,2.026849024044358e-9,-8.917426690141202e-9,0.969180907581668,0.998542627299776
57.0,0.4267164283592435,-6.872496312372469e-8,3.1325564224967763e-7,0.969180684354161,0.9985425771777755
58.0,0.4267163726304823,1.1096730955813961e-7,-5.053996636778452e-7,0.9691812516656547,0.9985427045580763
59.0,0.4267164022669418,1.5383256861379745e-8,-7.001281739503044e-8,0.9691809499676411,0.9985426368168369
60.0,0.4267164303322644,-7.51289506815351e-8,3.42286373147847e-7,0.9691806642650668,0.9985425726671056
61.0,0.42671639252407795,4.678946740843496e-8,-2.1312670437383657e-7,0.9691810491487283,0.9985426590862899
62.0,0.4267163906803671,5.2732295751289435e-8,-2.40207629435881e-7,0.9691810679165382,0.9985426633002876
63.0,0.42671643093445266,-7.707951798376247e-8,3.51143486333012e-7,0.9691806581331516,0.9985425712902867
64.0,0.4267164128814658,-1.8863795872089294e-8,8.593863522149074e-8,0.9691808419110224,0.9985426125545317
65.0,0.42671637686662756,9.727501741359907e-8,-4.4313284520207667e-7,0.9691812085384706,0.9985426948745889
66.0,0.4267164200453857,-4.196688650706194e-8,1.9118201954589875e-7,0.9691807689818369,0.9985425961795036
67.0,0.42671643358050243,-8.561468651784963e-8,3.900185546253598e-7,0.9691806311955823,0.9985425652419063
68.0,0.4267163868830551,6.497344448890763e-8,-2.9598552756642434e-7,0.9691811065713162,0.9985426719795709
69.0,0.4267163912524428,5.0882866998259076e-8,-2.317959767734765e-7,0.9691810620904003,0.9985426619921258
70.0,0.42671644043115114,-1.0770701760595323e-7,4.906592850593068e-7,0.969180561455502,0.9985425495829385
71.0,0.4267164167376279,-3.130102261908867e-8,1.425919497941743e-7,0.9691808026534119,0.9985426037398922
72.0,0.4267163669919889,1.291167181759515e-7,-5.881901500074731e-7,0.9691813090586004,0.9985427174447016
73.0,0.4267164200016294,-4.1827178724749095e-8,1.9054393033467677e-7,0.9691807694245668,0.9985425962789112
74.0,0.42671644240995465,-1.1408876512607039e-7,5.19730932389067e-7,0.9691805413101093,0.9985425450596278
75.0,0.4267163840322124,7.416555460008109e-8,-3.3786040346975136e-7,0.9691811355893997,0.9985426784950959
76.0,0.42671638308439874,7.72215823075342e-8,-3.5178174842226147e-7,0.9691811452364474,0.998542680661179
77.0,0.42671644336728115,-1.1717662911843815e-7,5.337977747629874e-7,0.969180531562473,0.9985425428709592
78.0,0.42671641776404695,-3.461230115131663e-8,1.5767640473892867e-7,0.9691807922007798,0.9985426013929286
79.0,0.4267163612928776,1.4749353363619526e-7,-6.719051144173975e-7,0.9691813670703036,0.9985427304702585
80.0,0.4267164203694237,-4.3014784946728866e-8,1.9595428752147932e-7,0.9691807656757546,0.9985425954371782
81.0,0.4267164406054988,-1.0827141116253247e-7,4.932300540646792e-7,0.9691805596746412,0.9985425491830761
82.0,0.4267163787730171,9.112354076019481e-8,-4.151121391980163e-7,0.9691811891224043,0.9985426905150361
83.0,0.42671638837990683,6.01430724791526e-8,-2.73980456025726e-7,0.9691810913234238,0.998542668555912
84.0,0.4267164428101249,-1.1538169475281397e-7,5.256211091987005e-7,0.96918053722903,0.9985425441432898
85.0,0.4267164096512028,-8.452095193740493e-9,3.85038789026454e-8,0.969180874783399,0.9985426199354737
86.0,0.42671636500544596,1.3551953690584167e-7,-6.173575814057123e-7,0.9691813292713266,0.998542721983131
87.0,0.42671642647384933,-6.270190499547489e-8,2.856388664368029e-7,0.9691807035280883,0.9985425814829599
88.0,0.4267164339544428,-8.682512094420266e-8,3.9553170304887336e-7,0.96918062737645,0.998542564384384
89.0,0.4267163734271133,1.083610174179625e-7,-4.936373932413709e-7,0.9691812435379789,0.9985427027331426
90.0,0.42671638393595407,7.447198602603216e-8,-3.392558129647435e-7,0.9691811365573083,0.9985426787124235
1 change: 1 addition & 0 deletions examples/example-model.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"T":[{"tname":"exp"},{"tname":"conv"},{"tname":"rec"},{"tname":"death"}],"S":[{"sname":"S"},{"sname":"E"},{"sname":"I"},{"sname":"R"},{"sname":"D"}],"I":[{"it":1,"is":1},{"it":1,"is":3},{"it":2,"is":2},{"it":3,"is":3},{"it":4,"is":3}],"O":[{"ot":1,"os":2},{"ot":1,"os":3},{"ot":2,"os":3},{"ot":3,"os":4},{"ot":4,"os":5}]}
Loading

0 comments on commit 820ce6d

Please sign in to comment.