-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
9 changed files
with
35 additions
and
43 deletions.
There are no files selected for viewing
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
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
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
Binary file not shown.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
model epid | ||
|
||
parameter Real total_pop = 700; | ||
parameter Real total_pop = 763; | ||
parameter Real infection_rate = 2.0; | ||
parameter Real healing_rate = 0.5; | ||
|
||
Real infected; | ||
Real susceptible; | ||
Real removed; | ||
|
||
parameter Real infection_rate = 0.007; | ||
parameter Real healing_rate = 0.02; | ||
|
||
initial equation | ||
infected = 1; | ||
removed = 0; | ||
total_pop = infected + susceptible + removed; | ||
|
||
equation | ||
der(susceptible) = - infection_rate*infected*susceptible; | ||
der(infected) = infection_rate*infected*susceptible - healing_rate*infected; | ||
der(removed) = healing_rate*infected; | ||
der(susceptible) = - infection_rate * infected * susceptible / total_pop; | ||
der(infected) = infection_rate * infected * susceptible / total_pop - | ||
healing_rate * infected; | ||
der(removed) = healing_rate * infected; | ||
|
||
annotation( | ||
experiment(StartTime = 0, StopTime = 50, Tolerance = 1e-6, Interval = 0.1)); | ||
experiment(StartTime = 0.0, StopTime = 200.0, Tolerance = 1e-6, Interval = 0.1)); | ||
end epid; |
Binary file not shown.
Binary file not shown.
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