Last active
June 9, 2023 08:56
-
-
Save olekscode/b981a6173059964185b21bfe8c1f6c7a to your computer and use it in GitHub Desktop.
Example of running a Cormas simulation in Pharo 11 without UI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"Run this in Pharo 11" | |
"Load Cormas without UI" | |
Metacello new | |
onConflictUseLoaded; | |
onWarningLog; | |
repository: 'github://cormas/cormas:v0.5'; | |
baseline: 'Cormas'; | |
load: #Core. | |
"Load the SEIR model" | |
Metacello new | |
onConflictUseLoaded; | |
baseline: 'REDModel'; | |
repository: 'github://olekscode/REDEpidemiologicalModel'; | |
load. | |
"Initialize the model" | |
model := REDModel new. | |
model initSimulation. | |
"Run simulation for 730 days" | |
(1 to: 730) | |
do: [ :step | model runStep ] | |
displayingProgress: [ :step | 'Simulation step ', step asString ]. | |
"Inspect the model" | |
model inspect. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment