Skip to content

My Julia megarepo; an infectious disease model, a Poisson picture redrawing filter, a colorful animator of a 2D ising model, and more.

Notifications You must be signed in to change notification settings

NightMachinery/stochastic

Repository files navigation

My Julia Megarepo

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)

Quickstart: The Infectious Disease Model

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.

Screenshots

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.

readme.org_imgs/20200817_170159_YrPf7a.png

readme.org_imgs/20200817_170215_9mnH1i.png

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.

readme.org_imgs/mpv-shot0001.jpg

readme.org_imgs/20200817_170448_0pvUbq.png

A happily-colored ising model

The code is at exercises/ising.jl. The generated pictures and videos are at art/ising/.

readme.org_imgs/ising_d4.mp4

art/ising/d4_rev.png

art/ising/intense_pink.png

An image redrawing filter using Poisson processes

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.

readme.org_imgs/20200817_181209_T1fIpC.png

readme.org_imgs/20200817_181229_8ZwVZQ.png

readme.org_imgs/20200817_181039_EHCgcR.png

readme.org_imgs/20200817_182034_zli1Dr.png

readme.org_imgs/20200817_180422_Ps0b2O.png

readme.org_imgs/20200817_180544_HUj7eO.png

Misc stuff

You can generally browse art/ to see some stuff generated here.

art/S2.png

art/photo_2020-04-26_02-58-12.jpg

art/S1_Eye_C1.png

art/photo_2020-04-26_02-58-21.jpg

art/stair/seismic.png

art/triangles/flag.png

art/photo_2020-04-26_02-58-17.jpg

Licenses

Dual-licensed under MIT and GPL v3 or later. The generated media are also licensed under CC0.

About

My Julia megarepo; an infectious disease model, a Poisson picture redrawing filter, a colorful animator of a 2D ising model, and more.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages