This repository contains my simulation course exercises and other experimentations. I am generally using it as my Julia scratchpad. I’ll refactor out some of its parts when I should have the time.
The things of interest in it currently include:
An elaborate infectious disease model (which is remarkable in that it runs in a continuous mode, unlike most simulations that run in discrete steps)
You need Julia v1.5 installed. You can copy my environment from this commit. The .julia
directory needs to be in your HOME
directory (i.e., at ~/.julia
).
The model was tested with this commit, though I recommend just using the latest commit. Do not use the readme from that commit, always use the latest master commit for the readme.
- Go to the project directory:
cd ./project/
- Start a Julia REPL:
julia
- Source the code:
include("./prj.jl")
- Now you can run the models. There are a few sample runs with the command that runs them in the project’s Telegram channel, since Github doesn’t show videos. I have also included a few screenshots below.
withMW(m3_2_1,0.2; discrete_opt=1//24, visualize=true, c=100, initialPeople=gp_H_dV, isolationProbability=0.9, smallGridMode=0, daysInSec=1, simDuration=3000, tracking=true)
See the full video.
withMW(m3_1_2,0.2; discrete_opt=1//24, visualize=true, c=500, isolationProbability=0.3, smallGridMode=10, daysInSec=10, simDuration=1500, tracking=true)
See full video.
The code is at exercises/ising.jl. The generated pictures and videos are at art/ising/.
The code needs refactoring, it’s currently at line 108, @plot drawP2D(G=(λ) -> imgrate …. You can see examples at art/2d/. Most generated files have the code that generated them as their filename, or in a companion file with the same name as them. These code fragments might still have used an older API or a global variable, so they might not be copy-pasteable.
You can generally browse art/ to see some stuff generated here.
Dual-licensed under MIT and GPL v3 or later. The generated media are also licensed under CC0.