From f3c932b53aabbd7e7ec2db83ce7aa1adcb985705 Mon Sep 17 00:00:00 2001 From: nanglo123 Date: Wed, 17 Jan 2024 09:53:54 -0500 Subject: [PATCH] Delete example directory and add example sir mdl to module docstring --- .../sources/{vensim/__init__.py => vensim.py} | 5 +- mira/sources/vensim/example_mdl/sir.mdl | 141 ------------------ 2 files changed, 4 insertions(+), 142 deletions(-) rename mira/sources/{vensim/__init__.py => vensim.py} (98%) delete mode 100644 mira/sources/vensim/example_mdl/sir.mdl diff --git a/mira/sources/vensim/__init__.py b/mira/sources/vensim.py similarity index 98% rename from mira/sources/vensim/__init__.py rename to mira/sources/vensim.py index c45c9a785..008d034f0 100644 --- a/mira/sources/vensim/__init__.py +++ b/mira/sources/vensim.py @@ -1,7 +1,10 @@ """This module implements parsing Vensim models by Ventana Systems denoted by the .mdl file and turning them into MIRA template models. + The documentation for vensim models is defined here: -https://www.vensim.com/documentation/sample_models.htm +https://www.vensim.com/documentation/sample_models.html + +SIR mdl file example here: https://www.vensim.com/documentation/sample_models.html """ __all__ = ["template_model_from_mdl_file_url"] diff --git a/mira/sources/vensim/example_mdl/sir.mdl b/mira/sources/vensim/example_mdl/sir.mdl deleted file mode 100644 index 48086fb4b..000000000 --- a/mira/sources/vensim/example_mdl/sir.mdl +++ /dev/null @@ -1,141 +0,0 @@ -{UTF-8} -******************************************************** - .sir -********************************************************~ - This is a standard 'Susceptible - Infectious - Recovered' model. - | - -Contact Infectivity= - 0.3 - ~ Persons/Persons/Day - ~ A joint parameter listing both how many people you contact, and how likely \ - you are to give them the disease. - | - -Duration= - 5 - ~ Days - ~ How long are you infectious for? - | - -Infectious= INTEG ( - Succumbing-Recovering, - 5) - ~ Persons - ~ The population with the disease, manifesting symptoms, and able to \ - transmit it to other people. - | - -Recovered= INTEG ( - Recovering, - 0) - ~ Persons - ~ These people have recovered from the disease. Yay! Nobody dies in this \ - model. - | - -Recovering= - Infectious/Duration - ~ Persons/Day - ~ | - -Succumbing= - Susceptible*Infectious/Total Population * Contact Infectivity - ~ Persons/Day - ~ | - -Susceptible= INTEG ( - -Succumbing, - Total Population) - ~ Persons - ~ The population that has not yet been infected. - | - -Total Population= - 1000 - ~ Persons - ~ This is just a simplification to make it easer to track how many folks \ - there are without having to sum up all the stocks. - | - -******************************************************** - .Control -********************************************************~ - Simulation Control Parameters - | - -FINAL TIME = 100 - ~ Day - ~ The final time for the simulation. - | - -INITIAL TIME = 0 - ~ Day - ~ The initial time for the simulation. - | - -SAVEPER = - TIME STEP - ~ Day [0,?] - ~ The frequency with which output is stored. - | - -TIME STEP = 0.03125 - ~ Day [0,?] - ~ The time step for the simulation. - | - -\\\---/// Sketch information - do not modify anything except names -V300 Do not put anything below this section - it will be ignored -*View 1 -$192-192-192,0,Times New Roman|12||0-0-0|0-0-0|0-0-255|-1--1--1|-1--1--1|72,72,100,0 -10,1,Susceptible,248,267,40,20,3,3,0,0,0,0,0,0 -10,2,Infectious,413,267,40,20,3,3,0,0,0,0,0,0 -10,3,Recovered,579,267,40,20,3,3,0,0,0,0,0,0 -1,4,6,2,4,0,0,22,0,0,0,-1--1--1,,1|(355,268)| -1,5,6,1,100,0,0,22,0,0,0,-1--1--1,,1|(306,268)| -11,6,268,331,268,6,8,34,3,0,0,1,0,0,0 -10,7,Succumbing,331,284,32,8,40,3,0,0,-1,0,0,0 -1,8,10,3,4,0,0,22,0,0,0,-1--1--1,,1|(520,268)| -1,9,10,2,100,0,0,22,0,0,0,-1--1--1,,1|(471,268)| -11,10,236,495,268,6,8,34,3,0,0,1,0,0,0 -10,11,Recovering,495,284,30,8,40,3,0,0,-1,0,0,0 -1,12,2,11,1,0,0,0,0,64,0,-1--1--1,,1|(459,313)| -1,13,1,7,1,0,0,0,0,64,0,-1--1--1,,1|(258,298)| -1,14,2,7,1,0,0,0,0,64,0,-1--1--1,,1|(388,311)| -10,15,Contact Infectivity,263,200,47,8,8,3,0,0,0,0,0,0 -10,16,Total Population,401,200,42,8,8,3,0,0,0,0,0,0 -1,17,15,6,1,0,0,0,0,64,0,-1--1--1,,1|(308,228)| -1,18,16,6,1,0,0,0,0,64,0,-1--1--1,,1|(367,223)| -10,19,Duration,530,200,24,8,8,3,0,0,0,0,0,0 -1,20,19,10,1,0,0,0,0,64,0,-1--1--1,,1|(509,225)| -1,21,16,1,0,0,0,0,0,64,1,-1--1--1,,1|(341,225)| -///---\\\ -:L<%^E!@ -1:Current.vdf -9:Current -22:$,Dollar,Dollars,$s -22:Hour,Hours -22:Month,Months -22:Person,People,Persons -22:Unit,Units -22:Week,Weeks -22:Year,Years -22:Day,Days -15:0,0,0,0,0,0 -19:100,0 -27:2, -34:0, -4:Time -5:Contact Infectivity -35:Date -36:YYYY-MM-DD -37:2000 -38:1 -39:1 -40:4 -41:0 -42:1 -24:0 -25:100 -26:100