-
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.
- Loading branch information
1 parent
6716944
commit 22f3ae5
Showing
5 changed files
with
31 additions
and
29 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
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; |