<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://www.simulace.info/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Toscool</id>
	<title>Simulace.info - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://www.simulace.info/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Toscool"/>
	<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php/Special:Contributions/Toscool"/>
	<updated>2026-07-27T12:48:01Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.1</generator>
	<entry>
		<id>http://www.simulace.info/index.php?title=Mixed_strategy&amp;diff=21142</id>
		<title>Mixed strategy</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Mixed_strategy&amp;diff=21142"/>
		<updated>2021-01-23T13:07:26Z</updated>

		<summary type="html">&lt;p&gt;Toscool: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; align=right width=&amp;quot;220&amp;quot;&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; width=&amp;quot;50px&amp;quot; |John Forbes Nash Jr.&lt;br /&gt;
|- &lt;br /&gt;
| [[File:Nash.jpg|200px|left]]&lt;br /&gt;
|-&lt;br /&gt;
| '''Born:''' &lt;br /&gt;
* June 13, 1928&lt;br /&gt;
'''Died:''' &lt;br /&gt;
* May 13, 2015 (aged 86)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
John Forbes Nash Jr. was an American mathematician who made fundamental contributions mainly to [[Game_theory|Game theory]]. Nash's work has provided insight into the factors that govern chance and decision-making inside complex systems found in everyday life&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* A '''pure strategy''' is an unconditional, defined choice that a person makes in a situation or game.&lt;br /&gt;
* A '''mixed strategy''' is an assignment of probability to all choices in the strategy set. &lt;br /&gt;
&lt;br /&gt;
=== History ===&lt;br /&gt;
The concept of a mixed-strategy was introduced by John von Neumann and Oskar Morgenstern in their 1944 book ''The Theory of Games and Economic Behavior''&amp;lt;ref name=&amp;quot;john&amp;quot; /&amp;gt;, but their analysis was restricted to the zero-sum games. They showed that a mixed-strategy Nash equilibrium will always exist for any zero-sum game with a finite set of actions. &lt;br /&gt;
&lt;br /&gt;
In his famous paper in 1950, John Forbes Nash go further and proved that there is an equilibrium for '''every finite game''' and not only the zero-sum game. Now we can divide Nash equilibria into two types. &lt;br /&gt;
*Pure strategy Nash equilibria are Nash equilibria where all players are playing pure strategies. &lt;br /&gt;
*Mixed strategy Nash equilibria are equilibria where at least one player is playing a mixed strategy.&lt;br /&gt;
&lt;br /&gt;
=== Definition ===&lt;br /&gt;
Mixed strategy:&lt;br /&gt;
if the player &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; has &amp;lt;math&amp;gt;K&amp;lt;/math&amp;gt; strategies &amp;lt;math&amp;gt;si1, si2, ...siK&amp;lt;/math&amp;gt; available, a mixed strategy is a distribution of probabilities &amp;lt;math&amp;gt;pi=(pi1, pi2, ...piK)&amp;lt;/math&amp;gt; where &amp;lt;math&amp;gt;pi1&amp;lt;/math&amp;gt; is the probability for &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; to choose the strategy &amp;lt;math&amp;gt;si1&amp;lt;/math&amp;gt;. Also because the mixed strategy is a distribution of probability there is: &lt;br /&gt;
&amp;lt;math&amp;gt;\sum_{j=1}^K pij = 1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Nash equilibrium in mixed strategy===&lt;br /&gt;
&lt;br /&gt;
A mixed strategy Nash equilibrium involves at least one player playing a '''randomized''' strategy and no player being able to increase his or her expected payoff by playing an alternate strategy. A [[Nash_equilibrium|Nash equilibrium]] in which no player randomizes is called a pure strategy Nash equilibrium.&lt;br /&gt;
&lt;br /&gt;
==Matching pennies game==&lt;br /&gt;
&lt;br /&gt;
=== Definition ===&lt;br /&gt;
&lt;br /&gt;
Matching pennies is the name for a simple game used in game theory. It is played between two players. Each player has a penny and must secretly turn the penny to heads or tails. The players then reveal their choices simultaneously. If the pennies match (both heads or both tails), then Row keeps both pennies, so wins one from Column (+1 for Row, −1 for Column). If the pennies do not match (one heads and one tails) Column keeps both pennies, so receives one from Row. The following table display the game.&lt;br /&gt;
&lt;br /&gt;
[[File:Penny1.jpeg|400px|center]]&lt;br /&gt;
&lt;br /&gt;
===Mixed strategy in Matching pennies===&lt;br /&gt;
&lt;br /&gt;
Suppose that Row believes Column plays Heads with probability &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt;. If Row plays Heads, he gets 1 with probability &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; and –1 with probability &amp;lt;math&amp;gt;(1-p)&amp;lt;/math&amp;gt;. His expected profit will be &amp;lt;math&amp;gt; 1p - 1(1-p) = 2p - 1 &amp;lt;/math&amp;gt;. This is summarized in Figure below &amp;quot;Mixed strategy in matching pennies&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[File:Penny2.jpeg|400px|center]]&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;2p - 1 &amp;gt; 1 - 2p&amp;lt;/math&amp;gt;, then Row is better off, on average, playing Heads than Tails. Similarly.&lt;br /&gt;
If, on the other hand, &amp;lt;math&amp;gt;2p - 1 = 1 - 2p&amp;lt;/math&amp;gt; it gives '''&amp;lt;math&amp;gt;p=1/2&amp;lt;/math&amp;gt;'''. Then Row gets the same payoff no matter what Row does. In this case, Row could play Heads, could play Tails, or could flip a coin and randomize Row’s play.&lt;br /&gt;
&lt;br /&gt;
Note that randomization requires equality of expected payoffs. If a player is supposed to '''randomize''' over strategy A or strategy B, then both of these strategies must produce the same expected payoff. Otherwise, the player would prefer one of them and wouldn’t play the other.&lt;br /&gt;
&lt;br /&gt;
==Battle of the sexes game==&lt;br /&gt;
&lt;br /&gt;
=== Definition ===&lt;br /&gt;
&lt;br /&gt;
The battle of sexes is a two-players coordination game in the [[Game_theory|Game theory]]. In this game there is one man and one woman, the woman prefers going to a ballet and the man prefers going to a baseball game. The nuance here is that they both prefers to go together rather than going alone to his/her prefered activity. The game is described in the table below.&lt;br /&gt;
&lt;br /&gt;
[[File:Battle1.jpg|400px|center]]&lt;br /&gt;
&lt;br /&gt;
We can highlight the two pure Nash equilibrium: (Ballet, Ballet) and (Baseball, Baseball) you can find them by using the [[Nash_equilibrium|Nash equilibrium]] course. &lt;br /&gt;
&lt;br /&gt;
===Mixed strategy in battle of the sexes===&lt;br /&gt;
&lt;br /&gt;
To find the mixed strategy we need to assign some probabilities to each situation. Let '''&amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt;''' be the probability for the '''woman''' to go to the '''baseball''' game and '''&amp;lt;math&amp;gt;q&amp;lt;/math&amp;gt;''' the probability for the '''men''' to go to the '''baseball''' game. The computations with the expected payoffs for each situation is display below.&lt;br /&gt;
&lt;br /&gt;
[[File:Battle2.jpg|400px|center]]&lt;br /&gt;
&lt;br /&gt;
The payoff calculations are the same as for the [[#Matching_pennies|Matching pennies]].&lt;br /&gt;
For example, if the man goes to the baseball game:&lt;br /&gt;
* He gets 3 when the woman goes also to the Baseball game, with a &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; probability.&lt;br /&gt;
* He gets 1 when the woman goes to the Ballet, with a &amp;lt;math&amp;gt;1-p&amp;lt;/math&amp;gt; probability.&lt;br /&gt;
The expected payoff is then just the product of the probability and the payoff, for example for the first row the expected payoff is then &amp;lt;math&amp;gt;3p + 1(1-p) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A key aspect in the mixed strategy is the '''indifference''' of choosing one or another choice for a player. In the mixed strategy game the Man has to be indifferent between going to the Baseball game and to the Ballet. This indifference or randomization between the choices of a player is expressed mathematically in our example for the man by  &amp;lt;math&amp;gt;1+2p = 2-2p&amp;lt;/math&amp;gt; which yields &amp;lt;math&amp;gt;p = 1/4 &amp;lt;/math&amp;gt;. Then if the Woman is going to the Baseball game 1/4 of the time, the Man will be willing to randomize which event he attends. Similar calculation are done for all possibilities and we multiply the probabilities:&lt;br /&gt;
* &amp;lt;math&amp;gt;p * q&amp;lt;/math&amp;gt; &lt;br /&gt;
* &amp;lt;math&amp;gt;q * (1-p)&amp;lt;/math&amp;gt; &lt;br /&gt;
* &amp;lt;math&amp;gt;(1-q) * p&amp;lt;/math&amp;gt; &lt;br /&gt;
* &amp;lt;math&amp;gt;(1-q) * (1-p)&amp;lt;/math&amp;gt; &lt;br /&gt;
We obtain the following table:&lt;br /&gt;
&lt;br /&gt;
[[File:Ballet3.jpg|400px|center]]&lt;br /&gt;
&lt;br /&gt;
We can note that 9 times over 16 the mixed strategy is (Baseball, Ballet) and it means that they are not together. Even if this mixed strategy Nash equilibrium seems to be undesirable, it's a [[Nash_equilibrium|Nash equilibrium]] as there is no improvement possible based on the behavior of the other party. This lack of coordination is often a feature of mixed strategy equilibrium. We can now consider another game where a failure of coordination makes more sense, the chicken game.&lt;br /&gt;
&lt;br /&gt;
==Chicken game==&lt;br /&gt;
&lt;br /&gt;
=== Definition ===&lt;br /&gt;
&lt;br /&gt;
[[File:Chicken1.jpeg|500px|center]]&lt;br /&gt;
&lt;br /&gt;
The chicken game is a game in which two players drive two very fast cars towards each other from opposite ends of a long straight road. If one of them swerves before the other, he is called a chicken and will have a payoff of -1. Of course, if neither swerves, they will crash and will get both -4. This is the worst possible payoff. The best payoff is to have your opponent be the chicken, so we assign this a value 1. The last possibility is that both drivers swerve. Then, neither has less honor than the other, so this is a better option than being the chicken. We could assign a payoff matrix to this:&lt;br /&gt;
&lt;br /&gt;
[[File:Chicken2.jpg|400px|center]]&lt;br /&gt;
&lt;br /&gt;
There is again two pure Nash equilibrium here: (Swerve, Don't) and (Don't, Swerve), you can find them by using the [[Nash_equilibrium|Nash equilibrium]] course.&lt;br /&gt;
&lt;br /&gt;
===Mixed strategy in Chicken game===&lt;br /&gt;
&lt;br /&gt;
To find the mixed strategy equilibrium we need to assign the same probabilities as for the [[#Mixed strategy in battle of the sexes|Battle of the sexes]]. We can find the table of calculation below.&lt;br /&gt;
&lt;br /&gt;
[[File:Chicken3.png|400px|center]]&lt;br /&gt;
&lt;br /&gt;
In order to find the mixed strategy equilibrium we have to calculate what probabilities &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;q&amp;lt;/math&amp;gt; are required to have '''randomized''' choices. The same logic as for the [[#Mixed strategy in battle of the sexes|Battle of the sexes]] is applied, we calculate: &amp;lt;math&amp;gt;0p -1(1-p) = 1p -4(1-p)&amp;lt;/math&amp;gt; and get the optimal probabilities: '''&amp;lt;math&amp;gt;p=3/4&amp;lt;/math&amp;gt;''' and '''&amp;lt;math&amp;gt;q=3/4&amp;lt;/math&amp;gt;'''. We just have to '''multiply''' these probabilities to obtain the table below.&lt;br /&gt;
&lt;br /&gt;
[[File:Chicken4.png|400px|center]]&lt;br /&gt;
&lt;br /&gt;
We can note that the probability of a collision (Don't, Don't) is just 1/16 in the mixed strategy equilibrium. In the chicken game the mixed strategy equilibrium is more likely than in the [[#Mixed strategy in battle of the sexes|Battle of the sexes]]. The whole point in this game is to find out who will yield, which means that it isn't known in advance. This means that the mixed strategy equilibrium is the more reasonable equilibrium.&lt;br /&gt;
&lt;br /&gt;
==Rock, paper, scissors==&lt;br /&gt;
&lt;br /&gt;
=== Definition ===&lt;br /&gt;
&lt;br /&gt;
“Rock, paper, scissors” is a child’s game in which two children use their hands to simultaneously choose paper, scissors, or rock. The nature of the payoffs is that paper beats rock, rock beats scissors, and scissors beats paper. This game has the structure that is illustrated below.&lt;br /&gt;
&lt;br /&gt;
[[File:Bart1.png|400px|center]]&lt;br /&gt;
&lt;br /&gt;
We can note that in the game between Bart and Lisa there is '''no pure Nash equilibrium''', because the gains are directly opposed. if Bart received a big utility, Lisa received a small one. If one player knows what will do his opponent, he will directly win. That is why the game has no Nash equilibrium in '''pure strategy'''.&lt;br /&gt;
&lt;br /&gt;
===Mixed strategy in Rock, paper, scissors===&lt;br /&gt;
&lt;br /&gt;
'''The mixed strategy in this game give you the opportunity to protect yourself against the other.'''&lt;br /&gt;
* If Bart choose always Rock, Lisa will always play Paper and Bart will have a utility of -1 with certainty.&lt;br /&gt;
* If Bart choose Rock or Paper with a probability of 0.5, Lisa who knows, will play Paper all the time and Bart will get an expected utility of: &amp;lt;math&amp;gt; 0.5 * 0 + 0.5 * (-1) = -0.5&amp;lt;/math&amp;gt;.&lt;br /&gt;
* The best strategy for Bart is to choose a probability &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; for which Lisa is '''indifferent''' between choosing Rock, Paper or Scissors. In this case Bart will play Rock, Paper and Scissor with a probability of 1/3 and then Lisa and Bart will both have a utility of&amp;lt;math&amp;gt;(1/3) * 1 + (1/3) * 0 + (1/3) * (-1) = 0&amp;lt;/math&amp;gt;. &lt;br /&gt;
By choosing a mixed strategy for which Lisa is '''indifferent''' between choosing Rock, Paper or Scissors, Bart can increase his utility.&lt;br /&gt;
&lt;br /&gt;
== References and Sources ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref name=&amp;quot;john&amp;quot; &amp;gt;John Von Neumann, Oskar Morgenstern. Theory of Games and Economic Behavior. 1944. Book review: https://www.ams.org/journals/bull/1945-51-07/S0002-9904-1945-08391-8/S0002-9904-1945-08391-8.pdf.&amp;lt;/ref&amp;gt;,&lt;br /&gt;
&amp;lt;ref name=&amp;quot;Nash&amp;quot;&amp;gt;John Forbes Nash Jr, Non-cooperative games. Article 1950. https://www.jstor.org/stable/1969529?seq=1&amp;lt;/ref&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
https://cs.stanford.edu/people/eroberts/courses/soco/projects/1998-99/game-theory/chicken.html&lt;br /&gt;
&lt;br /&gt;
https://en.wikipedia.org/wiki/Strategy_(game_theory)&lt;br /&gt;
&lt;br /&gt;
https://saylordotorg.github.io/text_introduction-to-economic-analysis/s17-03-mixed-strategies.html&lt;br /&gt;
&lt;br /&gt;
https://en.wikipedia.org/wiki/Theory_of_Games_and_Economic_Behavior&lt;br /&gt;
&lt;br /&gt;
https://www.jstor.org/stable/1969529?seq=1&lt;/div&gt;</summary>
		<author><name>Toscool</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=WS_2020/2021&amp;diff=20363</id>
		<title>WS 2020/2021</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=WS_2020/2021&amp;diff=20363"/>
		<updated>2021-01-17T11:22:06Z</updated>

		<summary type="html">&lt;p&gt;Toscool: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Semestral papers from winter term 2020/2021. Please, put here links to the pages with your paper. First you need to have your [[Assignments WS 2020/2021|assignment approved]]&lt;br /&gt;
&lt;br /&gt;
[http://www.simulace.info/index.php/Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread Impact of late lockdown and hospital capacity on 19-COVID spread] , Thomas BAEUMLIN [[User:Toscool|Toscool]] ([[User talk:Toscool|talk]]) 16:15, 7 January 2020 (CET)&lt;/div&gt;</summary>
		<author><name>Toscool</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Mixed_strategy&amp;diff=20325</id>
		<title>Mixed strategy</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Mixed_strategy&amp;diff=20325"/>
		<updated>2021-01-08T13:23:16Z</updated>

		<summary type="html">&lt;p&gt;Toscool: /* Mixed strategy in Rock, paper, scissors */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; align=right width=&amp;quot;220&amp;quot;&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; width=&amp;quot;50px&amp;quot; |John Forbes Nash Jr.&lt;br /&gt;
|- &lt;br /&gt;
| [[File:Nash.jpg|200px|left]]&lt;br /&gt;
|-&lt;br /&gt;
| '''Born:''' &lt;br /&gt;
* June 13, 1928&lt;br /&gt;
'''Died:''' &lt;br /&gt;
* May 13, 2015 (aged 86)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
John Forbes Nash Jr. was an American mathematician who made fundamental contributions mainly to [[Game_theory|Game theory]]. Nash's work has provided insight into the factors that govern chance and decision-making inside complex systems found in everyday life&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* A '''pure strategy''' is an unconditional, defined choice that a person makes in a situation or game.&lt;br /&gt;
* A '''mixed strategy''' is an assignment of probability to all choices in the strategy set. &lt;br /&gt;
&lt;br /&gt;
=== History ===&lt;br /&gt;
The concept of a mixed-strategy was introduced by John von Neumann and Oskar Morgenstern in their 1944 book ''The Theory of Games and Economic Behavior''&amp;lt;ref name=&amp;quot;john&amp;quot; /&amp;gt;, but their analysis was restricted to the zero-sum games. They showed that a mixed-strategy Nash equilibrium will always exist for any zero-sum game with a finite set of actions. &lt;br /&gt;
&lt;br /&gt;
In his famous paper in 1950, John Forbes Nash go further and proved that there is an equilibrium for '''every finite game''' and not only the zero-sum game. Now we can divide Nash equilibria into two types. &lt;br /&gt;
*Pure strategy Nash equilibria are Nash equilibria where all players are playing pure strategies. &lt;br /&gt;
*Mixed strategy Nash equilibria are equilibria where at least one player is playing a mixed strategy.&lt;br /&gt;
&lt;br /&gt;
=== Definition ===&lt;br /&gt;
Mixed strategy:&lt;br /&gt;
if the player &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; has &amp;lt;math&amp;gt;K&amp;lt;/math&amp;gt; strategies &amp;lt;math&amp;gt;si1, si2, ...siK&amp;lt;/math&amp;gt; available, a mixed strategy is a distribution of probabilities &amp;lt;math&amp;gt;pi=(pi1, pi2, ...piK)&amp;lt;/math&amp;gt; where &amp;lt;math&amp;gt;pi1&amp;lt;/math&amp;gt; is the probability for &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; to choose the strategy &amp;lt;math&amp;gt;si1&amp;lt;/math&amp;gt;. Also because the mixed strategy is a distribution of probability there is: &lt;br /&gt;
&amp;lt;math&amp;gt;\sum_{j=1}^K pij = 1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Nash equilibrium in mixed strategy===&lt;br /&gt;
&lt;br /&gt;
A mixed strategy Nash equilibrium involves at least one player playing a '''randomized''' strategy and no player being able to increase his or her expected payoff by playing an alternate strategy. A [[Nash_equilibrium|Nash equilibrium]] in which no player randomizes is called a pure strategy Nash equilibrium.&lt;br /&gt;
&lt;br /&gt;
==Matching pennies game==&lt;br /&gt;
&lt;br /&gt;
=== Definition ===&lt;br /&gt;
&lt;br /&gt;
Matching pennies is the name for a simple game used in game theory. It is played between two players. Each player has a penny and must secretly turn the penny to heads or tails. The players then reveal their choices simultaneously. If the pennies match (both heads or both tails), then Row keeps both pennies, so wins one from Column (+1 for Row, −1 for Column). If the pennies do not match (one heads and one tails) Column keeps both pennies, so receives one from Row. The following table display the game.&lt;br /&gt;
&lt;br /&gt;
[[File:Penny1.jpeg|400px|center]]&lt;br /&gt;
&lt;br /&gt;
===Mixed strategy in Matching pennies===&lt;br /&gt;
&lt;br /&gt;
Suppose that Row believes Column plays Heads with probability &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt;. If Row plays Heads, he gets 1 with probability &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; and –1 with probability &amp;lt;math&amp;gt;(1-p)&amp;lt;/math&amp;gt;. His expected profit will be &amp;lt;math&amp;gt; 1p - 1(1-p) = 2p - 1 &amp;lt;/math&amp;gt;. This is summarized in Figure below &amp;quot;Mixed strategy in matching pennies&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[File:Penny2.jpeg|400px|center]]&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;2p - 1 &amp;gt; 1 - 2p&amp;lt;/math&amp;gt;, then Row is better off, on average, playing Heads than Tails. Similarly.&lt;br /&gt;
If, on the other hand, &amp;lt;math&amp;gt;2p - 1 = 1 - 2p&amp;lt;/math&amp;gt; it gives '''&amp;lt;math&amp;gt;p=1/2&amp;lt;/math&amp;gt;'''. Then Row gets the same payoff no matter what Row does. In this case, Row could play Heads, could play Tails, or could flip a coin and randomize Row’s play.&lt;br /&gt;
&lt;br /&gt;
Note that randomization requires equality of expected payoffs. If a player is supposed to '''randomize''' over strategy A or strategy B, then both of these strategies must produce the same expected payoff. Otherwise, the player would prefer one of them and wouldn’t play the other.&lt;br /&gt;
&lt;br /&gt;
==Battle of the sexes game==&lt;br /&gt;
&lt;br /&gt;
=== Definition ===&lt;br /&gt;
&lt;br /&gt;
The battle of sexes is a two-players coordination game in the [[Game_theory|Game theory]]. In this game there is one man and one woman, the woman prefers going to a ballet and the man prefers going to a baseball game. The nuance here is that they both prefers to go together rather than going alone to his/her prefered activity. The game is described in the table below.&lt;br /&gt;
&lt;br /&gt;
[[File:Battle1.jpg|400px|center]]&lt;br /&gt;
&lt;br /&gt;
We can highlight the two pure Nash equilibrium: (Ballet, Ballet) and (Baseball, Baseball) you can find them by using the [[Nash_equilibrium|Nash equilibrium]] course. &lt;br /&gt;
&lt;br /&gt;
===Mixed strategy in battle of the sexes===&lt;br /&gt;
&lt;br /&gt;
To find the mixed strategy we need to assign some probabilities to each situation. Let '''&amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt;''' be the probability for the '''woman''' to go to the '''baseball''' game and '''&amp;lt;math&amp;gt;q&amp;lt;/math&amp;gt;''' the probability for the '''men''' to go to the '''baseball''' game. The computations with the expected payoffs for each situation is display below.&lt;br /&gt;
&lt;br /&gt;
[[File:Battle2.jpg|400px|center]]&lt;br /&gt;
&lt;br /&gt;
The payoff calculations are the same as for the [[#Matching_pennies|Matching pennies]].&lt;br /&gt;
For example, if the man goes to the baseball game:&lt;br /&gt;
* He gets 3 when the woman goes also to the Baseball game, with a &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; probability.&lt;br /&gt;
* He gets 1 when the woman goes to the Ballet, with a &amp;lt;math&amp;gt;1-p&amp;lt;/math&amp;gt; probability.&lt;br /&gt;
The expected payoff is then just the product of the probability and the payoff, for example for the first row the expected payoff is then &amp;lt;math&amp;gt;3p + 1(1-p) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A key aspect in the mixed strategy is the '''indifference''' of choosing one or another choice for a player. In the mixed strategy game the Man has to be indifferent between going to the Baseball game and to the Ballet. This indifference or randomization between the choices of a player is expressed mathematically in our example for the man by  &amp;lt;math&amp;gt;1+2p = 2-2p&amp;lt;/math&amp;gt; which yields &amp;lt;math&amp;gt;p = 1/4 &amp;lt;/math&amp;gt;. Then if the Woman is going to the Baseball game 1/4 of the time, the Man will be willing to randomize which event he attends. Similar calculation are done for all possibilities and we multiply the probabilities:&lt;br /&gt;
* &amp;lt;math&amp;gt;p * q&amp;lt;/math&amp;gt; &lt;br /&gt;
* &amp;lt;math&amp;gt;q * (1-p)&amp;lt;/math&amp;gt; &lt;br /&gt;
* &amp;lt;math&amp;gt;(1-q) * p&amp;lt;/math&amp;gt; &lt;br /&gt;
* &amp;lt;math&amp;gt;(1-q) * (1-p)&amp;lt;/math&amp;gt; &lt;br /&gt;
We obtain the following table:&lt;br /&gt;
&lt;br /&gt;
[[File:Ballet3.jpg|400px|center]]&lt;br /&gt;
&lt;br /&gt;
We can note that 9 times over 16 the mixed strategy is (Baseball, Ballet) and it means that they are not together. Even if this mixed strategy Nash equilibrium seems to be undesirable, it's a [[Nash_equilibrium|Nash equilibrium]] as there is no improvement possible based on the behavior of the other party. This lack of coordination is often a feature of mixed strategy equilibrium. We can now consider another game where a failure of coordination makes more sense, the chicken game.&lt;br /&gt;
&lt;br /&gt;
==Chicken game==&lt;br /&gt;
&lt;br /&gt;
=== Definition ===&lt;br /&gt;
&lt;br /&gt;
[[File:Chicken1.jpeg|500px|center]]&lt;br /&gt;
&lt;br /&gt;
The chicken game is a game in which two players drive two very fast cars towards each other from opposite ends of a long straight road. If one of them swerves before the other, he is called a chicken and will have a payoff of -1. Of course, if neither swerves, they will crash and will get both -4. This is the worst possible payoff. The best payoff is to have your opponent be the chicken, so we assign this a value 1. The last possibility is that both drivers swerve. Then, neither has less honor than the other, so this is a better option than being the chicken. We could assign a payoff matrix to this:&lt;br /&gt;
&lt;br /&gt;
[[File:Chicken2.jpg|400px|center]]&lt;br /&gt;
&lt;br /&gt;
There is again two pure Nash equilibrium here: (Swerve, Don't) and (Don't, Swerve), you can find them by using the [[Nash_equilibrium|Nash equilibrium]] course.&lt;br /&gt;
&lt;br /&gt;
===Mixed strategy in Chicken game===&lt;br /&gt;
&lt;br /&gt;
To find the mixed strategy equilibrium we need to assign the same probabilities as for the [[#Mixed strategy in battle of the sexes|Battle of the sexes]]. We can find the table of calculation below.&lt;br /&gt;
&lt;br /&gt;
[[File:Chicken3.png|400px|center]]&lt;br /&gt;
&lt;br /&gt;
In order to find the mixed strategy equilibrium we have to calculate what probabilities &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;q&amp;lt;/math&amp;gt; are required to have '''randomized''' choices. The same logic as for the [[#Mixed strategy in battle of the sexes|Battle of the sexes]] is applied, we calculate: &amp;lt;math&amp;gt;0p -1(1-p) = 1p -4(1-p)&amp;lt;/math&amp;gt; and get the optimal probabilities: '''&amp;lt;math&amp;gt;p=3/4&amp;lt;/math&amp;gt;''' and '''&amp;lt;math&amp;gt;q=3/4&amp;lt;/math&amp;gt;'''. We just have to '''multiply''' these probabilities to obtain the table below.&lt;br /&gt;
&lt;br /&gt;
[[File:Chicken4.png|400px|center]]&lt;br /&gt;
&lt;br /&gt;
We can note that the probability of a collision (Don't, Don't) is just 1/16 in the mixed strategy equilibrium. In the chicken game the mixed strategy equilibrium is more likely than in the [[#Mixed strategy in battle of the sexes|Battle of the sexes]]. The whole point in this game is to find out who will yield, which means that it isn't known in advance. This means that the mixed strategy equilibrium is the more reasonable equilibrium.&lt;br /&gt;
&lt;br /&gt;
==Rock, paper, scissors==&lt;br /&gt;
&lt;br /&gt;
=== Definition ===&lt;br /&gt;
&lt;br /&gt;
“Rock, paper, scissors” is a child’s game in which two children use their hands to simultaneously choose paper, scissors, or rock. The nature of the payoffs is that paper beats rock, rock beats scissors, and scissors beats paper. This game has the structure that is illustrated below.&lt;br /&gt;
&lt;br /&gt;
[[File:Bart1.png|400px|center]]&lt;br /&gt;
&lt;br /&gt;
We can note that in the game between Bart and Lisa there is '''no pure Nash equilibrium''', because the gains are directly opposed. if Bart received a big utility, Lisa received a small one. If one player knows what will do his opponent, he will directly win. That is why the game has no Nash equilibrium in '''pure strategy'''.&lt;br /&gt;
&lt;br /&gt;
===Mixed strategy in Rock, paper, scissors===&lt;br /&gt;
&lt;br /&gt;
'''The mixed strategy in this game give you the opportunity to protect yourself against the other.'''&lt;br /&gt;
* If Bart choose always Rock, Lisa will always play Paper and Bart will have a utility of -1 with certainty.&lt;br /&gt;
* If Bart choose Rock or Paper with a probability of 0.5, Lisa who knows, will play Paper all the time and Bart will get an expected utility of: &amp;lt;math&amp;gt; 0.5 * 0 + 0.5 * (-1) = -0.5&amp;lt;/math&amp;gt;.&lt;br /&gt;
* The best strategy for Bart is to choose a probability &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; for which Lisa is '''indifferent''' between choosing Rock, Paper or Scissors. In this case Bart will play Rock, Paper and Scissor with a probability of 1/3 and then Lisa and Bart will both have a utility of&amp;lt;math&amp;gt;(1/3) * 1 + (1/3) * 0 + (1/3) * (-1) = 0&amp;lt;/math&amp;gt;. &lt;br /&gt;
By choosing a mixed strategy for which Lisa is '''indifferent''' between choosing Rock, Paper or Scissors, Bart can increase his utility.&lt;br /&gt;
&lt;br /&gt;
== References and Sources ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref name=&amp;quot;john&amp;quot; &amp;gt;John Von Neumann, Oskar Morgenstern. Theory of Games and Economic Behavior. 1944. Book review: https://www.ams.org/journals/bull/1945-51-07/S0002-9904-1945-08391-8/S0002-9904-1945-08391-8.pdf.&amp;lt;/ref&amp;gt;,&lt;br /&gt;
&amp;lt;ref name=&amp;quot;Nash&amp;quot;&amp;gt;John Forbes Nash Jr, Non-cooperative games. Article 1950. https://www.jstor.org/stable/1969529?seq=1&amp;lt;/ref&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
https://cs.stanford.edu/people/eroberts/courses/soco/projects/1998-99/game-theory/chicken.html&lt;br /&gt;
https://en.wikipedia.org/wiki/Strategy_(game_theory)&lt;br /&gt;
https://saylordotorg.github.io/text_introduction-to-economic-analysis/s17-03-mixed-strategies.html&lt;br /&gt;
https://en.wikipedia.org/wiki/Theory_of_Games_and_Economic_Behavior&lt;br /&gt;
https://www.jstor.org/stable/1969529?seq=1&lt;/div&gt;</summary>
		<author><name>Toscool</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Mixed_strategy&amp;diff=20324</id>
		<title>Mixed strategy</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Mixed_strategy&amp;diff=20324"/>
		<updated>2021-01-08T13:22:54Z</updated>

		<summary type="html">&lt;p&gt;Toscool: /* Mixed strategy in Rock, paper, scissors */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; align=right width=&amp;quot;220&amp;quot;&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; width=&amp;quot;50px&amp;quot; |John Forbes Nash Jr.&lt;br /&gt;
|- &lt;br /&gt;
| [[File:Nash.jpg|200px|left]]&lt;br /&gt;
|-&lt;br /&gt;
| '''Born:''' &lt;br /&gt;
* June 13, 1928&lt;br /&gt;
'''Died:''' &lt;br /&gt;
* May 13, 2015 (aged 86)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
John Forbes Nash Jr. was an American mathematician who made fundamental contributions mainly to [[Game_theory|Game theory]]. Nash's work has provided insight into the factors that govern chance and decision-making inside complex systems found in everyday life&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* A '''pure strategy''' is an unconditional, defined choice that a person makes in a situation or game.&lt;br /&gt;
* A '''mixed strategy''' is an assignment of probability to all choices in the strategy set. &lt;br /&gt;
&lt;br /&gt;
=== History ===&lt;br /&gt;
The concept of a mixed-strategy was introduced by John von Neumann and Oskar Morgenstern in their 1944 book ''The Theory of Games and Economic Behavior''&amp;lt;ref name=&amp;quot;john&amp;quot; /&amp;gt;, but their analysis was restricted to the zero-sum games. They showed that a mixed-strategy Nash equilibrium will always exist for any zero-sum game with a finite set of actions. &lt;br /&gt;
&lt;br /&gt;
In his famous paper in 1950, John Forbes Nash go further and proved that there is an equilibrium for '''every finite game''' and not only the zero-sum game. Now we can divide Nash equilibria into two types. &lt;br /&gt;
*Pure strategy Nash equilibria are Nash equilibria where all players are playing pure strategies. &lt;br /&gt;
*Mixed strategy Nash equilibria are equilibria where at least one player is playing a mixed strategy.&lt;br /&gt;
&lt;br /&gt;
=== Definition ===&lt;br /&gt;
Mixed strategy:&lt;br /&gt;
if the player &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; has &amp;lt;math&amp;gt;K&amp;lt;/math&amp;gt; strategies &amp;lt;math&amp;gt;si1, si2, ...siK&amp;lt;/math&amp;gt; available, a mixed strategy is a distribution of probabilities &amp;lt;math&amp;gt;pi=(pi1, pi2, ...piK)&amp;lt;/math&amp;gt; where &amp;lt;math&amp;gt;pi1&amp;lt;/math&amp;gt; is the probability for &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; to choose the strategy &amp;lt;math&amp;gt;si1&amp;lt;/math&amp;gt;. Also because the mixed strategy is a distribution of probability there is: &lt;br /&gt;
&amp;lt;math&amp;gt;\sum_{j=1}^K pij = 1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Nash equilibrium in mixed strategy===&lt;br /&gt;
&lt;br /&gt;
A mixed strategy Nash equilibrium involves at least one player playing a '''randomized''' strategy and no player being able to increase his or her expected payoff by playing an alternate strategy. A [[Nash_equilibrium|Nash equilibrium]] in which no player randomizes is called a pure strategy Nash equilibrium.&lt;br /&gt;
&lt;br /&gt;
==Matching pennies game==&lt;br /&gt;
&lt;br /&gt;
=== Definition ===&lt;br /&gt;
&lt;br /&gt;
Matching pennies is the name for a simple game used in game theory. It is played between two players. Each player has a penny and must secretly turn the penny to heads or tails. The players then reveal their choices simultaneously. If the pennies match (both heads or both tails), then Row keeps both pennies, so wins one from Column (+1 for Row, −1 for Column). If the pennies do not match (one heads and one tails) Column keeps both pennies, so receives one from Row. The following table display the game.&lt;br /&gt;
&lt;br /&gt;
[[File:Penny1.jpeg|400px|center]]&lt;br /&gt;
&lt;br /&gt;
===Mixed strategy in Matching pennies===&lt;br /&gt;
&lt;br /&gt;
Suppose that Row believes Column plays Heads with probability &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt;. If Row plays Heads, he gets 1 with probability &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; and –1 with probability &amp;lt;math&amp;gt;(1-p)&amp;lt;/math&amp;gt;. His expected profit will be &amp;lt;math&amp;gt; 1p - 1(1-p) = 2p - 1 &amp;lt;/math&amp;gt;. This is summarized in Figure below &amp;quot;Mixed strategy in matching pennies&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[File:Penny2.jpeg|400px|center]]&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;2p - 1 &amp;gt; 1 - 2p&amp;lt;/math&amp;gt;, then Row is better off, on average, playing Heads than Tails. Similarly.&lt;br /&gt;
If, on the other hand, &amp;lt;math&amp;gt;2p - 1 = 1 - 2p&amp;lt;/math&amp;gt; it gives '''&amp;lt;math&amp;gt;p=1/2&amp;lt;/math&amp;gt;'''. Then Row gets the same payoff no matter what Row does. In this case, Row could play Heads, could play Tails, or could flip a coin and randomize Row’s play.&lt;br /&gt;
&lt;br /&gt;
Note that randomization requires equality of expected payoffs. If a player is supposed to '''randomize''' over strategy A or strategy B, then both of these strategies must produce the same expected payoff. Otherwise, the player would prefer one of them and wouldn’t play the other.&lt;br /&gt;
&lt;br /&gt;
==Battle of the sexes game==&lt;br /&gt;
&lt;br /&gt;
=== Definition ===&lt;br /&gt;
&lt;br /&gt;
The battle of sexes is a two-players coordination game in the [[Game_theory|Game theory]]. In this game there is one man and one woman, the woman prefers going to a ballet and the man prefers going to a baseball game. The nuance here is that they both prefers to go together rather than going alone to his/her prefered activity. The game is described in the table below.&lt;br /&gt;
&lt;br /&gt;
[[File:Battle1.jpg|400px|center]]&lt;br /&gt;
&lt;br /&gt;
We can highlight the two pure Nash equilibrium: (Ballet, Ballet) and (Baseball, Baseball) you can find them by using the [[Nash_equilibrium|Nash equilibrium]] course. &lt;br /&gt;
&lt;br /&gt;
===Mixed strategy in battle of the sexes===&lt;br /&gt;
&lt;br /&gt;
To find the mixed strategy we need to assign some probabilities to each situation. Let '''&amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt;''' be the probability for the '''woman''' to go to the '''baseball''' game and '''&amp;lt;math&amp;gt;q&amp;lt;/math&amp;gt;''' the probability for the '''men''' to go to the '''baseball''' game. The computations with the expected payoffs for each situation is display below.&lt;br /&gt;
&lt;br /&gt;
[[File:Battle2.jpg|400px|center]]&lt;br /&gt;
&lt;br /&gt;
The payoff calculations are the same as for the [[#Matching_pennies|Matching pennies]].&lt;br /&gt;
For example, if the man goes to the baseball game:&lt;br /&gt;
* He gets 3 when the woman goes also to the Baseball game, with a &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; probability.&lt;br /&gt;
* He gets 1 when the woman goes to the Ballet, with a &amp;lt;math&amp;gt;1-p&amp;lt;/math&amp;gt; probability.&lt;br /&gt;
The expected payoff is then just the product of the probability and the payoff, for example for the first row the expected payoff is then &amp;lt;math&amp;gt;3p + 1(1-p) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A key aspect in the mixed strategy is the '''indifference''' of choosing one or another choice for a player. In the mixed strategy game the Man has to be indifferent between going to the Baseball game and to the Ballet. This indifference or randomization between the choices of a player is expressed mathematically in our example for the man by  &amp;lt;math&amp;gt;1+2p = 2-2p&amp;lt;/math&amp;gt; which yields &amp;lt;math&amp;gt;p = 1/4 &amp;lt;/math&amp;gt;. Then if the Woman is going to the Baseball game 1/4 of the time, the Man will be willing to randomize which event he attends. Similar calculation are done for all possibilities and we multiply the probabilities:&lt;br /&gt;
* &amp;lt;math&amp;gt;p * q&amp;lt;/math&amp;gt; &lt;br /&gt;
* &amp;lt;math&amp;gt;q * (1-p)&amp;lt;/math&amp;gt; &lt;br /&gt;
* &amp;lt;math&amp;gt;(1-q) * p&amp;lt;/math&amp;gt; &lt;br /&gt;
* &amp;lt;math&amp;gt;(1-q) * (1-p)&amp;lt;/math&amp;gt; &lt;br /&gt;
We obtain the following table:&lt;br /&gt;
&lt;br /&gt;
[[File:Ballet3.jpg|400px|center]]&lt;br /&gt;
&lt;br /&gt;
We can note that 9 times over 16 the mixed strategy is (Baseball, Ballet) and it means that they are not together. Even if this mixed strategy Nash equilibrium seems to be undesirable, it's a [[Nash_equilibrium|Nash equilibrium]] as there is no improvement possible based on the behavior of the other party. This lack of coordination is often a feature of mixed strategy equilibrium. We can now consider another game where a failure of coordination makes more sense, the chicken game.&lt;br /&gt;
&lt;br /&gt;
==Chicken game==&lt;br /&gt;
&lt;br /&gt;
=== Definition ===&lt;br /&gt;
&lt;br /&gt;
[[File:Chicken1.jpeg|500px|center]]&lt;br /&gt;
&lt;br /&gt;
The chicken game is a game in which two players drive two very fast cars towards each other from opposite ends of a long straight road. If one of them swerves before the other, he is called a chicken and will have a payoff of -1. Of course, if neither swerves, they will crash and will get both -4. This is the worst possible payoff. The best payoff is to have your opponent be the chicken, so we assign this a value 1. The last possibility is that both drivers swerve. Then, neither has less honor than the other, so this is a better option than being the chicken. We could assign a payoff matrix to this:&lt;br /&gt;
&lt;br /&gt;
[[File:Chicken2.jpg|400px|center]]&lt;br /&gt;
&lt;br /&gt;
There is again two pure Nash equilibrium here: (Swerve, Don't) and (Don't, Swerve), you can find them by using the [[Nash_equilibrium|Nash equilibrium]] course.&lt;br /&gt;
&lt;br /&gt;
===Mixed strategy in Chicken game===&lt;br /&gt;
&lt;br /&gt;
To find the mixed strategy equilibrium we need to assign the same probabilities as for the [[#Mixed strategy in battle of the sexes|Battle of the sexes]]. We can find the table of calculation below.&lt;br /&gt;
&lt;br /&gt;
[[File:Chicken3.png|400px|center]]&lt;br /&gt;
&lt;br /&gt;
In order to find the mixed strategy equilibrium we have to calculate what probabilities &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;q&amp;lt;/math&amp;gt; are required to have '''randomized''' choices. The same logic as for the [[#Mixed strategy in battle of the sexes|Battle of the sexes]] is applied, we calculate: &amp;lt;math&amp;gt;0p -1(1-p) = 1p -4(1-p)&amp;lt;/math&amp;gt; and get the optimal probabilities: '''&amp;lt;math&amp;gt;p=3/4&amp;lt;/math&amp;gt;''' and '''&amp;lt;math&amp;gt;q=3/4&amp;lt;/math&amp;gt;'''. We just have to '''multiply''' these probabilities to obtain the table below.&lt;br /&gt;
&lt;br /&gt;
[[File:Chicken4.png|400px|center]]&lt;br /&gt;
&lt;br /&gt;
We can note that the probability of a collision (Don't, Don't) is just 1/16 in the mixed strategy equilibrium. In the chicken game the mixed strategy equilibrium is more likely than in the [[#Mixed strategy in battle of the sexes|Battle of the sexes]]. The whole point in this game is to find out who will yield, which means that it isn't known in advance. This means that the mixed strategy equilibrium is the more reasonable equilibrium.&lt;br /&gt;
&lt;br /&gt;
==Rock, paper, scissors==&lt;br /&gt;
&lt;br /&gt;
=== Definition ===&lt;br /&gt;
&lt;br /&gt;
“Rock, paper, scissors” is a child’s game in which two children use their hands to simultaneously choose paper, scissors, or rock. The nature of the payoffs is that paper beats rock, rock beats scissors, and scissors beats paper. This game has the structure that is illustrated below.&lt;br /&gt;
&lt;br /&gt;
[[File:Bart1.png|400px|center]]&lt;br /&gt;
&lt;br /&gt;
We can note that in the game between Bart and Lisa there is '''no pure Nash equilibrium''', because the gains are directly opposed. if Bart received a big utility, Lisa received a small one. If one player knows what will do his opponent, he will directly win. That is why the game has no Nash equilibrium in '''pure strategy'''.&lt;br /&gt;
&lt;br /&gt;
==Mixed strategy in Rock, paper, scissors==&lt;br /&gt;
&lt;br /&gt;
'''The mixed strategy in this game give you the opportunity to protect yourself against the other.'''&lt;br /&gt;
* If Bart choose always Rock, Lisa will always play Paper and Bart will have a utility of -1 with certainty.&lt;br /&gt;
* If Bart choose Rock or Paper with a probability of 0.5, Lisa who knows, will play Paper all the time and Bart will get an expected utility of: &amp;lt;math&amp;gt; 0.5 * 0 + 0.5 * (-1) = -0.5&amp;lt;/math&amp;gt;.&lt;br /&gt;
* The best strategy for Bart is to choose a probability &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; for which Lisa is '''indifferent''' between choosing Rock, Paper or Scissors. In this case Bart will play Rock, Paper and Scissor with a probability of 1/3 and then Lisa and Bart will both have a utility of&amp;lt;math&amp;gt;(1/3) * 1 + (1/3) * 0 + (1/3) * (-1) = 0&amp;lt;/math&amp;gt;. &lt;br /&gt;
By choosing a mixed strategy for which Lisa is '''indifferent''' between choosing Rock, Paper or Scissors, Bart can increase his utility.&lt;br /&gt;
&lt;br /&gt;
== References and Sources ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref name=&amp;quot;john&amp;quot; &amp;gt;John Von Neumann, Oskar Morgenstern. Theory of Games and Economic Behavior. 1944. Book review: https://www.ams.org/journals/bull/1945-51-07/S0002-9904-1945-08391-8/S0002-9904-1945-08391-8.pdf.&amp;lt;/ref&amp;gt;,&lt;br /&gt;
&amp;lt;ref name=&amp;quot;Nash&amp;quot;&amp;gt;John Forbes Nash Jr, Non-cooperative games. Article 1950. https://www.jstor.org/stable/1969529?seq=1&amp;lt;/ref&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
https://cs.stanford.edu/people/eroberts/courses/soco/projects/1998-99/game-theory/chicken.html&lt;br /&gt;
https://en.wikipedia.org/wiki/Strategy_(game_theory)&lt;br /&gt;
https://saylordotorg.github.io/text_introduction-to-economic-analysis/s17-03-mixed-strategies.html&lt;br /&gt;
https://en.wikipedia.org/wiki/Theory_of_Games_and_Economic_Behavior&lt;br /&gt;
https://www.jstor.org/stable/1969529?seq=1&lt;/div&gt;</summary>
		<author><name>Toscool</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Mixed_strategy&amp;diff=20323</id>
		<title>Mixed strategy</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Mixed_strategy&amp;diff=20323"/>
		<updated>2021-01-08T13:19:50Z</updated>

		<summary type="html">&lt;p&gt;Toscool: /* Definition */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; align=right width=&amp;quot;220&amp;quot;&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; width=&amp;quot;50px&amp;quot; |John Forbes Nash Jr.&lt;br /&gt;
|- &lt;br /&gt;
| [[File:Nash.jpg|200px|left]]&lt;br /&gt;
|-&lt;br /&gt;
| '''Born:''' &lt;br /&gt;
* June 13, 1928&lt;br /&gt;
'''Died:''' &lt;br /&gt;
* May 13, 2015 (aged 86)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
John Forbes Nash Jr. was an American mathematician who made fundamental contributions mainly to [[Game_theory|Game theory]]. Nash's work has provided insight into the factors that govern chance and decision-making inside complex systems found in everyday life&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* A '''pure strategy''' is an unconditional, defined choice that a person makes in a situation or game.&lt;br /&gt;
* A '''mixed strategy''' is an assignment of probability to all choices in the strategy set. &lt;br /&gt;
&lt;br /&gt;
=== History ===&lt;br /&gt;
The concept of a mixed-strategy was introduced by John von Neumann and Oskar Morgenstern in their 1944 book ''The Theory of Games and Economic Behavior''&amp;lt;ref name=&amp;quot;john&amp;quot; /&amp;gt;, but their analysis was restricted to the zero-sum games. They showed that a mixed-strategy Nash equilibrium will always exist for any zero-sum game with a finite set of actions. &lt;br /&gt;
&lt;br /&gt;
In his famous paper in 1950, John Forbes Nash go further and proved that there is an equilibrium for '''every finite game''' and not only the zero-sum game. Now we can divide Nash equilibria into two types. &lt;br /&gt;
*Pure strategy Nash equilibria are Nash equilibria where all players are playing pure strategies. &lt;br /&gt;
*Mixed strategy Nash equilibria are equilibria where at least one player is playing a mixed strategy.&lt;br /&gt;
&lt;br /&gt;
=== Definition ===&lt;br /&gt;
Mixed strategy:&lt;br /&gt;
if the player &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; has &amp;lt;math&amp;gt;K&amp;lt;/math&amp;gt; strategies &amp;lt;math&amp;gt;si1, si2, ...siK&amp;lt;/math&amp;gt; available, a mixed strategy is a distribution of probabilities &amp;lt;math&amp;gt;pi=(pi1, pi2, ...piK)&amp;lt;/math&amp;gt; where &amp;lt;math&amp;gt;pi1&amp;lt;/math&amp;gt; is the probability for &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; to choose the strategy &amp;lt;math&amp;gt;si1&amp;lt;/math&amp;gt;. Also because the mixed strategy is a distribution of probability there is: &lt;br /&gt;
&amp;lt;math&amp;gt;\sum_{j=1}^K pij = 1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Nash equilibrium in mixed strategy===&lt;br /&gt;
&lt;br /&gt;
A mixed strategy Nash equilibrium involves at least one player playing a '''randomized''' strategy and no player being able to increase his or her expected payoff by playing an alternate strategy. A [[Nash_equilibrium|Nash equilibrium]] in which no player randomizes is called a pure strategy Nash equilibrium.&lt;br /&gt;
&lt;br /&gt;
==Matching pennies game==&lt;br /&gt;
&lt;br /&gt;
=== Definition ===&lt;br /&gt;
&lt;br /&gt;
Matching pennies is the name for a simple game used in game theory. It is played between two players. Each player has a penny and must secretly turn the penny to heads or tails. The players then reveal their choices simultaneously. If the pennies match (both heads or both tails), then Row keeps both pennies, so wins one from Column (+1 for Row, −1 for Column). If the pennies do not match (one heads and one tails) Column keeps both pennies, so receives one from Row. The following table display the game.&lt;br /&gt;
&lt;br /&gt;
[[File:Penny1.jpeg|400px|center]]&lt;br /&gt;
&lt;br /&gt;
===Mixed strategy in Matching pennies===&lt;br /&gt;
&lt;br /&gt;
Suppose that Row believes Column plays Heads with probability &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt;. If Row plays Heads, he gets 1 with probability &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; and –1 with probability &amp;lt;math&amp;gt;(1-p)&amp;lt;/math&amp;gt;. His expected profit will be &amp;lt;math&amp;gt; 1p - 1(1-p) = 2p - 1 &amp;lt;/math&amp;gt;. This is summarized in Figure below &amp;quot;Mixed strategy in matching pennies&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[File:Penny2.jpeg|400px|center]]&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;2p - 1 &amp;gt; 1 - 2p&amp;lt;/math&amp;gt;, then Row is better off, on average, playing Heads than Tails. Similarly.&lt;br /&gt;
If, on the other hand, &amp;lt;math&amp;gt;2p - 1 = 1 - 2p&amp;lt;/math&amp;gt; it gives '''&amp;lt;math&amp;gt;p=1/2&amp;lt;/math&amp;gt;'''. Then Row gets the same payoff no matter what Row does. In this case, Row could play Heads, could play Tails, or could flip a coin and randomize Row’s play.&lt;br /&gt;
&lt;br /&gt;
Note that randomization requires equality of expected payoffs. If a player is supposed to '''randomize''' over strategy A or strategy B, then both of these strategies must produce the same expected payoff. Otherwise, the player would prefer one of them and wouldn’t play the other.&lt;br /&gt;
&lt;br /&gt;
==Battle of the sexes game==&lt;br /&gt;
&lt;br /&gt;
=== Definition ===&lt;br /&gt;
&lt;br /&gt;
The battle of sexes is a two-players coordination game in the [[Game_theory|Game theory]]. In this game there is one man and one woman, the woman prefers going to a ballet and the man prefers going to a baseball game. The nuance here is that they both prefers to go together rather than going alone to his/her prefered activity. The game is described in the table below.&lt;br /&gt;
&lt;br /&gt;
[[File:Battle1.jpg|400px|center]]&lt;br /&gt;
&lt;br /&gt;
We can highlight the two pure Nash equilibrium: (Ballet, Ballet) and (Baseball, Baseball) you can find them by using the [[Nash_equilibrium|Nash equilibrium]] course. &lt;br /&gt;
&lt;br /&gt;
===Mixed strategy in battle of the sexes===&lt;br /&gt;
&lt;br /&gt;
To find the mixed strategy we need to assign some probabilities to each situation. Let '''&amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt;''' be the probability for the '''woman''' to go to the '''baseball''' game and '''&amp;lt;math&amp;gt;q&amp;lt;/math&amp;gt;''' the probability for the '''men''' to go to the '''baseball''' game. The computations with the expected payoffs for each situation is display below.&lt;br /&gt;
&lt;br /&gt;
[[File:Battle2.jpg|400px|center]]&lt;br /&gt;
&lt;br /&gt;
The payoff calculations are the same as for the [[#Matching_pennies|Matching pennies]].&lt;br /&gt;
For example, if the man goes to the baseball game:&lt;br /&gt;
* He gets 3 when the woman goes also to the Baseball game, with a &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; probability.&lt;br /&gt;
* He gets 1 when the woman goes to the Ballet, with a &amp;lt;math&amp;gt;1-p&amp;lt;/math&amp;gt; probability.&lt;br /&gt;
The expected payoff is then just the product of the probability and the payoff, for example for the first row the expected payoff is then &amp;lt;math&amp;gt;3p + 1(1-p) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A key aspect in the mixed strategy is the '''indifference''' of choosing one or another choice for a player. In the mixed strategy game the Man has to be indifferent between going to the Baseball game and to the Ballet. This indifference or randomization between the choices of a player is expressed mathematically in our example for the man by  &amp;lt;math&amp;gt;1+2p = 2-2p&amp;lt;/math&amp;gt; which yields &amp;lt;math&amp;gt;p = 1/4 &amp;lt;/math&amp;gt;. Then if the Woman is going to the Baseball game 1/4 of the time, the Man will be willing to randomize which event he attends. Similar calculation are done for all possibilities and we multiply the probabilities:&lt;br /&gt;
* &amp;lt;math&amp;gt;p * q&amp;lt;/math&amp;gt; &lt;br /&gt;
* &amp;lt;math&amp;gt;q * (1-p)&amp;lt;/math&amp;gt; &lt;br /&gt;
* &amp;lt;math&amp;gt;(1-q) * p&amp;lt;/math&amp;gt; &lt;br /&gt;
* &amp;lt;math&amp;gt;(1-q) * (1-p)&amp;lt;/math&amp;gt; &lt;br /&gt;
We obtain the following table:&lt;br /&gt;
&lt;br /&gt;
[[File:Ballet3.jpg|400px|center]]&lt;br /&gt;
&lt;br /&gt;
We can note that 9 times over 16 the mixed strategy is (Baseball, Ballet) and it means that they are not together. Even if this mixed strategy Nash equilibrium seems to be undesirable, it's a [[Nash_equilibrium|Nash equilibrium]] as there is no improvement possible based on the behavior of the other party. This lack of coordination is often a feature of mixed strategy equilibrium. We can now consider another game where a failure of coordination makes more sense, the chicken game.&lt;br /&gt;
&lt;br /&gt;
==Chicken game==&lt;br /&gt;
&lt;br /&gt;
=== Definition ===&lt;br /&gt;
&lt;br /&gt;
[[File:Chicken1.jpeg|500px|center]]&lt;br /&gt;
&lt;br /&gt;
The chicken game is a game in which two players drive two very fast cars towards each other from opposite ends of a long straight road. If one of them swerves before the other, he is called a chicken and will have a payoff of -1. Of course, if neither swerves, they will crash and will get both -4. This is the worst possible payoff. The best payoff is to have your opponent be the chicken, so we assign this a value 1. The last possibility is that both drivers swerve. Then, neither has less honor than the other, so this is a better option than being the chicken. We could assign a payoff matrix to this:&lt;br /&gt;
&lt;br /&gt;
[[File:Chicken2.jpg|400px|center]]&lt;br /&gt;
&lt;br /&gt;
There is again two pure Nash equilibrium here: (Swerve, Don't) and (Don't, Swerve), you can find them by using the [[Nash_equilibrium|Nash equilibrium]] course.&lt;br /&gt;
&lt;br /&gt;
===Mixed strategy in Chicken game===&lt;br /&gt;
&lt;br /&gt;
To find the mixed strategy equilibrium we need to assign the same probabilities as for the [[#Mixed strategy in battle of the sexes|Battle of the sexes]]. We can find the table of calculation below.&lt;br /&gt;
&lt;br /&gt;
[[File:Chicken3.png|400px|center]]&lt;br /&gt;
&lt;br /&gt;
In order to find the mixed strategy equilibrium we have to calculate what probabilities &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;q&amp;lt;/math&amp;gt; are required to have '''randomized''' choices. The same logic as for the [[#Mixed strategy in battle of the sexes|Battle of the sexes]] is applied, we calculate: &amp;lt;math&amp;gt;0p -1(1-p) = 1p -4(1-p)&amp;lt;/math&amp;gt; and get the optimal probabilities: '''&amp;lt;math&amp;gt;p=3/4&amp;lt;/math&amp;gt;''' and '''&amp;lt;math&amp;gt;q=3/4&amp;lt;/math&amp;gt;'''. We just have to '''multiply''' these probabilities to obtain the table below.&lt;br /&gt;
&lt;br /&gt;
[[File:Chicken4.png|400px|center]]&lt;br /&gt;
&lt;br /&gt;
We can note that the probability of a collision (Don't, Don't) is just 1/16 in the mixed strategy equilibrium. In the chicken game the mixed strategy equilibrium is more likely than in the [[#Mixed strategy in battle of the sexes|Battle of the sexes]]. The whole point in this game is to find out who will yield, which means that it isn't known in advance. This means that the mixed strategy equilibrium is the more reasonable equilibrium.&lt;br /&gt;
&lt;br /&gt;
==Mixed strategy in Rock, paper, scissors==&lt;br /&gt;
&lt;br /&gt;
=== Definition ===&lt;br /&gt;
&lt;br /&gt;
“Rock, paper, scissors” is a child’s game in which two children use their hands to simultaneously choose paper, scissors, or rock. The nature of the payoffs is that paper beats rock, rock beats scissors, and scissors beats paper. This game has the structure that is illustrated below.&lt;br /&gt;
&lt;br /&gt;
[[File:Bart1.png|400px|center]]&lt;br /&gt;
&lt;br /&gt;
We can note that in the game between Bart and Lisa there is '''no pure Nash equilibrium''', because the gains are directly opposed. if Bart received a big utility, Lisa received a small one. If one player knows what will do his opponent, he will directly win. That is why the game has no Nash equilibrium in '''pure strategy'''.&lt;br /&gt;
&lt;br /&gt;
'''The mixed strategy in this game give you the opportunity to protect yourself against the other.'''&lt;br /&gt;
* If Bart choose always Rock, Lisa will always play Paper and Bart will have a utility of -1 with certainty.&lt;br /&gt;
* If Bart choose Rock or Paper with a probability of 0.5, Lisa who knows, will play Paper all the time and Bart will get an expected utility of: &amp;lt;math&amp;gt; 0.5 * 0 + 0.5 * (-1) = -0.5&amp;lt;/math&amp;gt;.&lt;br /&gt;
* The best strategy for Bart is to choose a probability &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; for which Lisa is '''indifferent''' between choosing Rock, Paper or Scissors. In this case Bart will play Rock, Paper and Scissor with a probability of 1/3 and then Lisa and Bart will both have a utility of&amp;lt;math&amp;gt;(1/3) * 1 + (1/3) * 0 + (1/3) * (-1) = 0&amp;lt;/math&amp;gt;. &lt;br /&gt;
By choosing a mixed strategy for which Lisa is '''indifferent''' between choosing Rock, Paper or Scissors, Bart can increase his utility.&lt;br /&gt;
&lt;br /&gt;
== References and Sources ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref name=&amp;quot;john&amp;quot; &amp;gt;John Von Neumann, Oskar Morgenstern. Theory of Games and Economic Behavior. 1944. Book review: https://www.ams.org/journals/bull/1945-51-07/S0002-9904-1945-08391-8/S0002-9904-1945-08391-8.pdf.&amp;lt;/ref&amp;gt;,&lt;br /&gt;
&amp;lt;ref name=&amp;quot;Nash&amp;quot;&amp;gt;John Forbes Nash Jr, Non-cooperative games. Article 1950. https://www.jstor.org/stable/1969529?seq=1&amp;lt;/ref&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
https://cs.stanford.edu/people/eroberts/courses/soco/projects/1998-99/game-theory/chicken.html&lt;br /&gt;
https://en.wikipedia.org/wiki/Strategy_(game_theory)&lt;br /&gt;
https://saylordotorg.github.io/text_introduction-to-economic-analysis/s17-03-mixed-strategies.html&lt;br /&gt;
https://en.wikipedia.org/wiki/Theory_of_Games_and_Economic_Behavior&lt;br /&gt;
https://www.jstor.org/stable/1969529?seq=1&lt;/div&gt;</summary>
		<author><name>Toscool</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Mixed_strategy&amp;diff=20322</id>
		<title>Mixed strategy</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Mixed_strategy&amp;diff=20322"/>
		<updated>2021-01-08T13:14:53Z</updated>

		<summary type="html">&lt;p&gt;Toscool: /* Definition */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; align=right width=&amp;quot;220&amp;quot;&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; width=&amp;quot;50px&amp;quot; |John Forbes Nash Jr.&lt;br /&gt;
|- &lt;br /&gt;
| [[File:Nash.jpg|200px|left]]&lt;br /&gt;
|-&lt;br /&gt;
| '''Born:''' &lt;br /&gt;
* June 13, 1928&lt;br /&gt;
'''Died:''' &lt;br /&gt;
* May 13, 2015 (aged 86)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
John Forbes Nash Jr. was an American mathematician who made fundamental contributions mainly to [[Game_theory|Game theory]]. Nash's work has provided insight into the factors that govern chance and decision-making inside complex systems found in everyday life&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* A '''pure strategy''' is an unconditional, defined choice that a person makes in a situation or game.&lt;br /&gt;
* A '''mixed strategy''' is an assignment of probability to all choices in the strategy set. &lt;br /&gt;
&lt;br /&gt;
=== History ===&lt;br /&gt;
The concept of a mixed-strategy was introduced by John von Neumann and Oskar Morgenstern in their 1944 book ''The Theory of Games and Economic Behavior''&amp;lt;ref name=&amp;quot;john&amp;quot; /&amp;gt;, but their analysis was restricted to the zero-sum games. They showed that a mixed-strategy Nash equilibrium will always exist for any zero-sum game with a finite set of actions. &lt;br /&gt;
&lt;br /&gt;
In his famous paper in 1950, John Forbes Nash go further and proved that there is an equilibrium for '''every finite game''' and not only the zero-sum game. Now we can divide Nash equilibria into two types. &lt;br /&gt;
*Pure strategy Nash equilibria are Nash equilibria where all players are playing pure strategies. &lt;br /&gt;
*Mixed strategy Nash equilibria are equilibria where at least one player is playing a mixed strategy.&lt;br /&gt;
&lt;br /&gt;
=== Definition ===&lt;br /&gt;
Mixed strategy:&lt;br /&gt;
if the player &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; has &amp;lt;math&amp;gt;K&amp;lt;/math&amp;gt; strategies &amp;lt;math&amp;gt;si1, si2, ...siK&amp;lt;/math&amp;gt; available, a mixed strategy is a distribution of probabilities &amp;lt;math&amp;gt;pi=(pi1, pi2, ...piK)&amp;lt;/math&amp;gt; where &amp;lt;math&amp;gt;pi1&amp;lt;/math&amp;gt; is the probability for &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; to choose the strategy &amp;lt;math&amp;gt;si1&amp;lt;/math&amp;gt;. Also because the mixed strategy is a distribution of probability there is: &lt;br /&gt;
&amp;lt;math&amp;gt;\sum_{j=1}^K pij = 1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Nash equilibrium in mixed strategy===&lt;br /&gt;
&lt;br /&gt;
A mixed strategy Nash equilibrium involves at least one player playing a '''randomized''' strategy and no player being able to increase his or her expected payoff by playing an alternate strategy. A [[Nash_equilibrium|Nash equilibrium]] in which no player randomizes is called a pure strategy Nash equilibrium.&lt;br /&gt;
&lt;br /&gt;
==Matching pennies game==&lt;br /&gt;
&lt;br /&gt;
=== Definition ===&lt;br /&gt;
&lt;br /&gt;
Matching pennies is the name for a simple game used in game theory. It is played between two players. Each player has a penny and must secretly turn the penny to heads or tails. The players then reveal their choices simultaneously. If the pennies match (both heads or both tails), then Row keeps both pennies, so wins one from Column (+1 for Row, −1 for Column). If the pennies do not match (one heads and one tails) Column keeps both pennies, so receives one from Row. The following table display the game.&lt;br /&gt;
&lt;br /&gt;
[[File:Penny1.jpeg|400px|center]]&lt;br /&gt;
&lt;br /&gt;
===Mixed strategy in Matching pennies===&lt;br /&gt;
&lt;br /&gt;
Suppose that Row believes Column plays Heads with probability &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt;. If Row plays Heads, he gets 1 with probability &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; and –1 with probability &amp;lt;math&amp;gt;(1-p)&amp;lt;/math&amp;gt;. His expected profit will be &amp;lt;math&amp;gt; 1p - 1(1-p) = 2p - 1 &amp;lt;/math&amp;gt;. This is summarized in Figure below &amp;quot;Mixed strategy in matching pennies&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[File:Penny2.jpeg|400px|center]]&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;2p - 1 &amp;gt; 1 - 2p&amp;lt;/math&amp;gt;, then Row is better off, on average, playing Heads than Tails. Similarly.&lt;br /&gt;
If, on the other hand, &amp;lt;math&amp;gt;2p - 1 = 1 - 2p&amp;lt;/math&amp;gt; it gives '''&amp;lt;math&amp;gt;p=1/2&amp;lt;/math&amp;gt;'''. Then Row gets the same payoff no matter what Row does. In this case, Row could play Heads, could play Tails, or could flip a coin and randomize Row’s play.&lt;br /&gt;
&lt;br /&gt;
Note that randomization requires equality of expected payoffs. If a player is supposed to '''randomize''' over strategy A or strategy B, then both of these strategies must produce the same expected payoff. Otherwise, the player would prefer one of them and wouldn’t play the other.&lt;br /&gt;
&lt;br /&gt;
==Battle of the sexes game==&lt;br /&gt;
&lt;br /&gt;
=== Definition ===&lt;br /&gt;
&lt;br /&gt;
The battle of sexes is a two-players coordination game in the [[Game_theory|Game theory]]. In this game there is one man and one woman, the woman prefers going to a ballet and the man prefers going to a baseball game. The nuance here is that they both prefers to go together rather than going alone to his/her prefered activity. The game is described in the table below.&lt;br /&gt;
&lt;br /&gt;
[[File:Battle1.jpg|400px|center]]&lt;br /&gt;
&lt;br /&gt;
We can highlight the two pure Nash equilibrium: (Ballet, Ballet) and (Baseball, Baseball) you can find them by using the [[Nash_equilibrium|Nash equilibrium]] course. &lt;br /&gt;
&lt;br /&gt;
===Mixed strategy in battle of the sexes===&lt;br /&gt;
&lt;br /&gt;
To find the mixed strategy we need to assign some probabilities to each situation. Let '''&amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt;''' be the probability for the '''woman''' to go to the '''baseball''' game and '''&amp;lt;math&amp;gt;q&amp;lt;/math&amp;gt;''' the probability for the '''men''' to go to the '''baseball''' game. The computations with the expected payoffs for each situation is display below.&lt;br /&gt;
&lt;br /&gt;
[[File:Battle2.jpg|400px|center]]&lt;br /&gt;
&lt;br /&gt;
The payoff calculations are the same as for the [[#Matching_pennies|Matching pennies]].&lt;br /&gt;
For example, if the man goes to the baseball game:&lt;br /&gt;
* He gets 3 when the woman goes also to the Baseball game, with a &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; probability.&lt;br /&gt;
* He gets 1 when the woman goes to the Ballet, with a &amp;lt;math&amp;gt;1-p&amp;lt;/math&amp;gt; probability.&lt;br /&gt;
The expected payoff is then just the product of the probability and the payoff, for example for the first row the expected payoff is then &amp;lt;math&amp;gt;3p + 1(1-p) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A key aspect in the mixed strategy is the '''indifference''' of choosing one or another choice for a player. In the mixed strategy game the Man has to be indifferent between going to the Baseball game and to the Ballet. This indifference or randomization between the choices of a player is expressed mathematically in our example for the man by  &amp;lt;math&amp;gt;1+2p = 2-2p&amp;lt;/math&amp;gt; which yields &amp;lt;math&amp;gt;p = 1/4 &amp;lt;/math&amp;gt;. Then if the Woman is going to the Baseball game 1/4 of the time, the Man will be willing to randomize which event he attends. Similar calculation are done for all possibilities and we multiply the probabilities:&lt;br /&gt;
* &amp;lt;math&amp;gt;p * q&amp;lt;/math&amp;gt; &lt;br /&gt;
* &amp;lt;math&amp;gt;q * (1-p)&amp;lt;/math&amp;gt; &lt;br /&gt;
* &amp;lt;math&amp;gt;(1-q) * p&amp;lt;/math&amp;gt; &lt;br /&gt;
* &amp;lt;math&amp;gt;(1-q) * (1-p)&amp;lt;/math&amp;gt; &lt;br /&gt;
We obtain the following table:&lt;br /&gt;
&lt;br /&gt;
[[File:Ballet3.jpg|400px|center]]&lt;br /&gt;
&lt;br /&gt;
We can note that 9 times over 16 the mixed strategy is (Baseball, Ballet) and it means that they are not together. Even if this mixed strategy Nash equilibrium seems to be undesirable, it's a [[Nash_equilibrium|Nash equilibrium]] as there is no improvement possible based on the behavior of the other party. This lack of coordination is often a feature of mixed strategy equilibrium. We can now consider another game where a failure of coordination makes more sense, the chicken game.&lt;br /&gt;
&lt;br /&gt;
==Chicken game==&lt;br /&gt;
&lt;br /&gt;
=== Definition ===&lt;br /&gt;
&lt;br /&gt;
[[File:Chicken1.jpeg|500px|center]]&lt;br /&gt;
&lt;br /&gt;
The chicken game in which two players drive two very fast cars towards each other from opposite ends of a long straight road. If one of them swerves before the other, he is called a chicken and will have a payoff of -1. Of course, if neither swerves, they will crash and will get both -4. This is the worst possible payoff. The best payoff is to have your opponent be the chicken, so we assign this a value 1. The last possibility is that both drivers swerve. Then, neither has less honor than the other, so this is a better option than being the chicken. We could assign a payoff matrix to this:&lt;br /&gt;
&lt;br /&gt;
[[File:Chicken2.jpg|400px|center]]&lt;br /&gt;
&lt;br /&gt;
There is again two pure Nash equilibrium here: (Swerve, Don't) and (Don't, Swerve), you can find them by using the [[Nash_equilibrium|Nash equilibrium]] course. &lt;br /&gt;
&lt;br /&gt;
===Mixed strategy in Chicken game===&lt;br /&gt;
&lt;br /&gt;
To find the mixed strategy equilibrium we need to assign the same probabilities as for the [[#Mixed strategy in battle of the sexes|Battle of the sexes]]. We can find the table of calculation below.&lt;br /&gt;
&lt;br /&gt;
[[File:Chicken3.png|400px|center]]&lt;br /&gt;
&lt;br /&gt;
In order to find the mixed strategy equilibrium we have to calculate what probabilities &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;q&amp;lt;/math&amp;gt; are required to have '''randomized''' choices. The same logic as for the [[#Mixed strategy in battle of the sexes|Battle of the sexes]] is applied, we calculate: &amp;lt;math&amp;gt;0p -1(1-p) = 1p -4(1-p)&amp;lt;/math&amp;gt; and get the optimal probabilities: '''&amp;lt;math&amp;gt;p=3/4&amp;lt;/math&amp;gt;''' and '''&amp;lt;math&amp;gt;q=3/4&amp;lt;/math&amp;gt;'''. We just have to '''multiply''' these probabilities to obtain the table below.&lt;br /&gt;
&lt;br /&gt;
[[File:Chicken4.png|400px|center]]&lt;br /&gt;
&lt;br /&gt;
We can note that the probability of a collision (Don't, Don't) is just 1/16 in the mixed strategy equilibrium. In the chicken game the mixed strategy equilibrium is more likely than in the [[#Mixed strategy in battle of the sexes|Battle of the sexes]]. The whole point in this game is to find out who will yield, which means that it isn't known in advance. This means that the mixed strategy equilibrium is the more reasonable equilibrium.&lt;br /&gt;
&lt;br /&gt;
==Mixed strategy in Rock, paper, scissors==&lt;br /&gt;
&lt;br /&gt;
=== Definition ===&lt;br /&gt;
&lt;br /&gt;
“Rock, paper, scissors” is a child’s game in which two children use their hands to simultaneously choose paper, scissors, or rock. The nature of the payoffs is that paper beats rock, rock beats scissors, and scissors beats paper. This game has the structure that is illustrated below.&lt;br /&gt;
&lt;br /&gt;
[[File:Bart1.png|400px|center]]&lt;br /&gt;
&lt;br /&gt;
We can note that in the game between Bart and Lisa there is '''no pure Nash equilibrium''', because the gains are directly opposed. if Bart received a big utility, Lisa received a small one. If one player knows what will do his opponent, he will directly win. That is why the game has no Nash equilibrium in '''pure strategy'''.&lt;br /&gt;
&lt;br /&gt;
'''The mixed strategy in this game give you the opportunity to protect yourself against the other.'''&lt;br /&gt;
* If Bart choose always Rock, Lisa will always play Paper and Bart will have a utility of -1 with certainty.&lt;br /&gt;
* If Bart choose Rock or Paper with a probability of 0.5, Lisa who knows, will play Paper all the time and Bart will get an expected utility of: &amp;lt;math&amp;gt; 0.5 * 0 + 0.5 * (-1) = -0.5&amp;lt;/math&amp;gt;.&lt;br /&gt;
* The best strategy for Bart is to choose a probability &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; for which Lisa is '''indifferent''' between choosing Rock, Paper or Scissors. In this case Bart will play Rock, Paper and Scissor with a probability of 1/3 and then Lisa and Bart will both have a utility of&amp;lt;math&amp;gt;(1/3) * 1 + (1/3) * 0 + (1/3) * (-1) = 0&amp;lt;/math&amp;gt;. &lt;br /&gt;
By choosing a mixed strategy for which Lisa is '''indifferent''' between choosing Rock, Paper or Scissors, Bart can increase his utility.&lt;br /&gt;
&lt;br /&gt;
== References and Sources ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref name=&amp;quot;john&amp;quot; &amp;gt;John Von Neumann, Oskar Morgenstern. Theory of Games and Economic Behavior. 1944. Book review: https://www.ams.org/journals/bull/1945-51-07/S0002-9904-1945-08391-8/S0002-9904-1945-08391-8.pdf.&amp;lt;/ref&amp;gt;,&lt;br /&gt;
&amp;lt;ref name=&amp;quot;Nash&amp;quot;&amp;gt;John Forbes Nash Jr, Non-cooperative games. Article 1950. https://www.jstor.org/stable/1969529?seq=1&amp;lt;/ref&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
https://cs.stanford.edu/people/eroberts/courses/soco/projects/1998-99/game-theory/chicken.html&lt;br /&gt;
https://en.wikipedia.org/wiki/Strategy_(game_theory)&lt;br /&gt;
https://saylordotorg.github.io/text_introduction-to-economic-analysis/s17-03-mixed-strategies.html&lt;br /&gt;
https://en.wikipedia.org/wiki/Theory_of_Games_and_Economic_Behavior&lt;br /&gt;
https://www.jstor.org/stable/1969529?seq=1&lt;/div&gt;</summary>
		<author><name>Toscool</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Mixed_strategy&amp;diff=20321</id>
		<title>Mixed strategy</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Mixed_strategy&amp;diff=20321"/>
		<updated>2021-01-08T13:12:09Z</updated>

		<summary type="html">&lt;p&gt;Toscool: /* History */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; align=right width=&amp;quot;220&amp;quot;&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; width=&amp;quot;50px&amp;quot; |John Forbes Nash Jr.&lt;br /&gt;
|- &lt;br /&gt;
| [[File:Nash.jpg|200px|left]]&lt;br /&gt;
|-&lt;br /&gt;
| '''Born:''' &lt;br /&gt;
* June 13, 1928&lt;br /&gt;
'''Died:''' &lt;br /&gt;
* May 13, 2015 (aged 86)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
John Forbes Nash Jr. was an American mathematician who made fundamental contributions mainly to [[Game_theory|Game theory]]. Nash's work has provided insight into the factors that govern chance and decision-making inside complex systems found in everyday life&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* A '''pure strategy''' is an unconditional, defined choice that a person makes in a situation or game.&lt;br /&gt;
* A '''mixed strategy''' is an assignment of probability to all choices in the strategy set. &lt;br /&gt;
&lt;br /&gt;
=== History ===&lt;br /&gt;
The concept of a mixed-strategy was introduced by John von Neumann and Oskar Morgenstern in their 1944 book ''The Theory of Games and Economic Behavior''&amp;lt;ref name=&amp;quot;john&amp;quot; /&amp;gt;, but their analysis was restricted to the zero-sum games. They showed that a mixed-strategy Nash equilibrium will always exist for any zero-sum game with a finite set of actions. &lt;br /&gt;
&lt;br /&gt;
In his famous paper in 1950, John Forbes Nash go further and proved that there is an equilibrium for '''every finite game''' and not only the zero-sum game. Now we can divide Nash equilibria into two types. &lt;br /&gt;
*Pure strategy Nash equilibria are Nash equilibria where all players are playing pure strategies. &lt;br /&gt;
*Mixed strategy Nash equilibria are equilibria where at least one player is playing a mixed strategy.&lt;br /&gt;
&lt;br /&gt;
=== Definition ===&lt;br /&gt;
Mixed strategy:&lt;br /&gt;
if the player &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; has &amp;lt;math&amp;gt;K&amp;lt;/math&amp;gt; strategies &amp;lt;math&amp;gt;si1, si2, ...siK&amp;lt;/math&amp;gt; available, a mixed strategy is a distribution of probabilities &amp;lt;math&amp;gt;pi=(pi1, pi2, ...piK)&amp;lt;/math&amp;gt; where &amp;lt;math&amp;gt;pi1&amp;lt;/math&amp;gt; is the probability for &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; to choose the strategy &amp;lt;math&amp;gt;si1&amp;lt;/math&amp;gt;&lt;br /&gt;
As the mixed strategy is a distribution of probability there is: &lt;br /&gt;
&amp;lt;math&amp;gt;\sum_{j=1}^K pij = 1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Nash equilibrium in mixed strategy===&lt;br /&gt;
&lt;br /&gt;
A mixed strategy Nash equilibrium involves at least one player playing a '''randomized''' strategy and no player being able to increase his or her expected payoff by playing an alternate strategy. A [[Nash_equilibrium|Nash equilibrium]] in which no player randomizes is called a pure strategy Nash equilibrium.&lt;br /&gt;
&lt;br /&gt;
==Matching pennies game==&lt;br /&gt;
&lt;br /&gt;
=== Definition ===&lt;br /&gt;
&lt;br /&gt;
Matching pennies is the name for a simple game used in game theory. It is played between two players. Each player has a penny and must secretly turn the penny to heads or tails. The players then reveal their choices simultaneously. If the pennies match (both heads or both tails), then Row keeps both pennies, so wins one from Column (+1 for Row, −1 for Column). If the pennies do not match (one heads and one tails) Column keeps both pennies, so receives one from Row. The following table display the game.&lt;br /&gt;
&lt;br /&gt;
[[File:Penny1.jpeg|400px|center]]&lt;br /&gt;
&lt;br /&gt;
===Mixed strategy in Matching pennies===&lt;br /&gt;
&lt;br /&gt;
Suppose that Row believes Column plays Heads with probability &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt;. If Row plays Heads, he gets 1 with probability &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; and –1 with probability &amp;lt;math&amp;gt;(1-p)&amp;lt;/math&amp;gt;. His expected profit will be &amp;lt;math&amp;gt; 1p - 1(1-p) = 2p - 1 &amp;lt;/math&amp;gt;. This is summarized in Figure below &amp;quot;Mixed strategy in matching pennies&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[File:Penny2.jpeg|400px|center]]&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;2p - 1 &amp;gt; 1 - 2p&amp;lt;/math&amp;gt;, then Row is better off, on average, playing Heads than Tails. Similarly.&lt;br /&gt;
If, on the other hand, &amp;lt;math&amp;gt;2p - 1 = 1 - 2p&amp;lt;/math&amp;gt; it gives '''&amp;lt;math&amp;gt;p=1/2&amp;lt;/math&amp;gt;'''. Then Row gets the same payoff no matter what Row does. In this case, Row could play Heads, could play Tails, or could flip a coin and randomize Row’s play.&lt;br /&gt;
&lt;br /&gt;
Note that randomization requires equality of expected payoffs. If a player is supposed to '''randomize''' over strategy A or strategy B, then both of these strategies must produce the same expected payoff. Otherwise, the player would prefer one of them and wouldn’t play the other.&lt;br /&gt;
&lt;br /&gt;
==Battle of the sexes game==&lt;br /&gt;
&lt;br /&gt;
=== Definition ===&lt;br /&gt;
&lt;br /&gt;
The battle of sexes is a two-players coordination game in the [[Game_theory|Game theory]]. In this game there is one man and one woman, the woman prefers going to a ballet and the man prefers going to a baseball game. The nuance here is that they both prefers to go together rather than going alone to his/her prefered activity. The game is described in the table below.&lt;br /&gt;
&lt;br /&gt;
[[File:Battle1.jpg|400px|center]]&lt;br /&gt;
&lt;br /&gt;
We can highlight the two pure Nash equilibrium: (Ballet, Ballet) and (Baseball, Baseball) you can find them by using the [[Nash_equilibrium|Nash equilibrium]] course. &lt;br /&gt;
&lt;br /&gt;
===Mixed strategy in battle of the sexes===&lt;br /&gt;
&lt;br /&gt;
To find the mixed strategy we need to assign some probabilities to each situation. Let '''&amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt;''' be the probability for the '''woman''' to go to the '''baseball''' game and '''&amp;lt;math&amp;gt;q&amp;lt;/math&amp;gt;''' the probability for the '''men''' to go to the '''baseball''' game. The computations with the expected payoffs for each situation is display below.&lt;br /&gt;
&lt;br /&gt;
[[File:Battle2.jpg|400px|center]]&lt;br /&gt;
&lt;br /&gt;
The payoff calculations are the same as for the [[#Matching_pennies|Matching pennies]].&lt;br /&gt;
For example, if the man goes to the baseball game:&lt;br /&gt;
* He gets 3 when the woman goes also to the Baseball game, with a &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; probability.&lt;br /&gt;
* He gets 1 when the woman goes to the Ballet, with a &amp;lt;math&amp;gt;1-p&amp;lt;/math&amp;gt; probability.&lt;br /&gt;
The expected payoff is then just the product of the probability and the payoff, for example for the first row the expected payoff is then &amp;lt;math&amp;gt;3p + 1(1-p) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A key aspect in the mixed strategy is the '''indifference''' of choosing one or another choice for a player. In the mixed strategy game the Man has to be indifferent between going to the Baseball game and to the Ballet. This indifference or randomization between the choices of a player is expressed mathematically in our example for the man by  &amp;lt;math&amp;gt;1+2p = 2-2p&amp;lt;/math&amp;gt; which yields &amp;lt;math&amp;gt;p = 1/4 &amp;lt;/math&amp;gt;. Then if the Woman is going to the Baseball game 1/4 of the time, the Man will be willing to randomize which event he attends. Similar calculation are done for all possibilities and we multiply the probabilities:&lt;br /&gt;
* &amp;lt;math&amp;gt;p * q&amp;lt;/math&amp;gt; &lt;br /&gt;
* &amp;lt;math&amp;gt;q * (1-p)&amp;lt;/math&amp;gt; &lt;br /&gt;
* &amp;lt;math&amp;gt;(1-q) * p&amp;lt;/math&amp;gt; &lt;br /&gt;
* &amp;lt;math&amp;gt;(1-q) * (1-p)&amp;lt;/math&amp;gt; &lt;br /&gt;
We obtain the following table:&lt;br /&gt;
&lt;br /&gt;
[[File:Ballet3.jpg|400px|center]]&lt;br /&gt;
&lt;br /&gt;
We can note that 9 times over 16 the mixed strategy is (Baseball, Ballet) and it means that they are not together. Even if this mixed strategy Nash equilibrium seems to be undesirable, it's a [[Nash_equilibrium|Nash equilibrium]] as there is no improvement possible based on the behavior of the other party. This lack of coordination is often a feature of mixed strategy equilibrium. We can now consider another game where a failure of coordination makes more sense, the chicken game.&lt;br /&gt;
&lt;br /&gt;
==Chicken game==&lt;br /&gt;
&lt;br /&gt;
=== Definition ===&lt;br /&gt;
&lt;br /&gt;
[[File:Chicken1.jpeg|500px|center]]&lt;br /&gt;
&lt;br /&gt;
The chicken game in which two players drive two very fast cars towards each other from opposite ends of a long straight road. If one of them swerves before the other, he is called a chicken and will have a payoff of -1. Of course, if neither swerves, they will crash and will get both -4. This is the worst possible payoff. The best payoff is to have your opponent be the chicken, so we assign this a value 1. The last possibility is that both drivers swerve. Then, neither has less honor than the other, so this is a better option than being the chicken. We could assign a payoff matrix to this:&lt;br /&gt;
&lt;br /&gt;
[[File:Chicken2.jpg|400px|center]]&lt;br /&gt;
&lt;br /&gt;
There is again two pure Nash equilibrium here: (Swerve, Don't) and (Don't, Swerve), you can find them by using the [[Nash_equilibrium|Nash equilibrium]] course. &lt;br /&gt;
&lt;br /&gt;
===Mixed strategy in Chicken game===&lt;br /&gt;
&lt;br /&gt;
To find the mixed strategy equilibrium we need to assign the same probabilities as for the [[#Mixed strategy in battle of the sexes|Battle of the sexes]]. We can find the table of calculation below.&lt;br /&gt;
&lt;br /&gt;
[[File:Chicken3.png|400px|center]]&lt;br /&gt;
&lt;br /&gt;
In order to find the mixed strategy equilibrium we have to calculate what probabilities &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;q&amp;lt;/math&amp;gt; are required to have '''randomized''' choices. The same logic as for the [[#Mixed strategy in battle of the sexes|Battle of the sexes]] is applied, we calculate: &amp;lt;math&amp;gt;0p -1(1-p) = 1p -4(1-p)&amp;lt;/math&amp;gt; and get the optimal probabilities: '''&amp;lt;math&amp;gt;p=3/4&amp;lt;/math&amp;gt;''' and '''&amp;lt;math&amp;gt;q=3/4&amp;lt;/math&amp;gt;'''. We just have to '''multiply''' these probabilities to obtain the table below.&lt;br /&gt;
&lt;br /&gt;
[[File:Chicken4.png|400px|center]]&lt;br /&gt;
&lt;br /&gt;
We can note that the probability of a collision (Don't, Don't) is just 1/16 in the mixed strategy equilibrium. In the chicken game the mixed strategy equilibrium is more likely than in the [[#Mixed strategy in battle of the sexes|Battle of the sexes]]. The whole point in this game is to find out who will yield, which means that it isn't known in advance. This means that the mixed strategy equilibrium is the more reasonable equilibrium.&lt;br /&gt;
&lt;br /&gt;
==Mixed strategy in Rock, paper, scissors==&lt;br /&gt;
&lt;br /&gt;
=== Definition ===&lt;br /&gt;
&lt;br /&gt;
“Rock, paper, scissors” is a child’s game in which two children use their hands to simultaneously choose paper, scissors, or rock. The nature of the payoffs is that paper beats rock, rock beats scissors, and scissors beats paper. This game has the structure that is illustrated below.&lt;br /&gt;
&lt;br /&gt;
[[File:Bart1.png|400px|center]]&lt;br /&gt;
&lt;br /&gt;
We can note that in the game between Bart and Lisa there is '''no pure Nash equilibrium''', because the gains are directly opposed. if Bart received a big utility, Lisa received a small one. If one player knows what will do his opponent, he will directly win. That is why the game has no Nash equilibrium in '''pure strategy'''.&lt;br /&gt;
&lt;br /&gt;
'''The mixed strategy in this game give you the opportunity to protect yourself against the other.'''&lt;br /&gt;
* If Bart choose always Rock, Lisa will always play Paper and Bart will have a utility of -1 with certainty.&lt;br /&gt;
* If Bart choose Rock or Paper with a probability of 0.5, Lisa who knows, will play Paper all the time and Bart will get an expected utility of: &amp;lt;math&amp;gt; 0.5 * 0 + 0.5 * (-1) = -0.5&amp;lt;/math&amp;gt;.&lt;br /&gt;
* The best strategy for Bart is to choose a probability &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; for which Lisa is '''indifferent''' between choosing Rock, Paper or Scissors. In this case Bart will play Rock, Paper and Scissor with a probability of 1/3 and then Lisa and Bart will both have a utility of&amp;lt;math&amp;gt;(1/3) * 1 + (1/3) * 0 + (1/3) * (-1) = 0&amp;lt;/math&amp;gt;. &lt;br /&gt;
By choosing a mixed strategy for which Lisa is '''indifferent''' between choosing Rock, Paper or Scissors, Bart can increase his utility.&lt;br /&gt;
&lt;br /&gt;
== References and Sources ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref name=&amp;quot;john&amp;quot; &amp;gt;John Von Neumann, Oskar Morgenstern. Theory of Games and Economic Behavior. 1944. Book review: https://www.ams.org/journals/bull/1945-51-07/S0002-9904-1945-08391-8/S0002-9904-1945-08391-8.pdf.&amp;lt;/ref&amp;gt;,&lt;br /&gt;
&amp;lt;ref name=&amp;quot;Nash&amp;quot;&amp;gt;John Forbes Nash Jr, Non-cooperative games. Article 1950. https://www.jstor.org/stable/1969529?seq=1&amp;lt;/ref&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
https://cs.stanford.edu/people/eroberts/courses/soco/projects/1998-99/game-theory/chicken.html&lt;br /&gt;
https://en.wikipedia.org/wiki/Strategy_(game_theory)&lt;br /&gt;
https://saylordotorg.github.io/text_introduction-to-economic-analysis/s17-03-mixed-strategies.html&lt;br /&gt;
https://en.wikipedia.org/wiki/Theory_of_Games_and_Economic_Behavior&lt;br /&gt;
https://www.jstor.org/stable/1969529?seq=1&lt;/div&gt;</summary>
		<author><name>Toscool</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Mixed_strategy&amp;diff=20320</id>
		<title>Mixed strategy</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Mixed_strategy&amp;diff=20320"/>
		<updated>2021-01-08T13:09:53Z</updated>

		<summary type="html">&lt;p&gt;Toscool: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; align=right width=&amp;quot;220&amp;quot;&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; width=&amp;quot;50px&amp;quot; |John Forbes Nash Jr.&lt;br /&gt;
|- &lt;br /&gt;
| [[File:Nash.jpg|200px|left]]&lt;br /&gt;
|-&lt;br /&gt;
| '''Born:''' &lt;br /&gt;
* June 13, 1928&lt;br /&gt;
'''Died:''' &lt;br /&gt;
* May 13, 2015 (aged 86)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
John Forbes Nash Jr. was an American mathematician who made fundamental contributions mainly to [[Game_theory|Game theory]]. Nash's work has provided insight into the factors that govern chance and decision-making inside complex systems found in everyday life&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* A '''pure strategy''' is an unconditional, defined choice that a person makes in a situation or game.&lt;br /&gt;
* A '''mixed strategy''' is an assignment of probability to all choices in the strategy set. &lt;br /&gt;
&lt;br /&gt;
=== History ===&lt;br /&gt;
The concept of a mixed-strategy was introduced by John von Neumann and Oskar Morgenstern in their 1944 book ''The Theory of Games and Economic Behavior''&amp;lt;ref name=&amp;quot;john&amp;quot; /&amp;gt;, but their analysis was restricted to the special case of zero-sum games. They showed that a mixed-strategy Nash equilibrium will exist for any zero-sum game with a finite set of actions. &lt;br /&gt;
&lt;br /&gt;
In his famous paper in 1950, John Forbes Nash go further and proved that there is an equilibrium for '''every finite game'''. It can divide Nash equilibria into two types. Pure strategy Nash equilibria are Nash equilibria where all players are playing pure strategies. Mixed strategy Nash equilibria are equilibria where at least one player is playing a mixed strategy. &lt;br /&gt;
&lt;br /&gt;
=== Definition ===&lt;br /&gt;
Mixed strategy:&lt;br /&gt;
if the player &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; has &amp;lt;math&amp;gt;K&amp;lt;/math&amp;gt; strategies &amp;lt;math&amp;gt;si1, si2, ...siK&amp;lt;/math&amp;gt; available, a mixed strategy is a distribution of probabilities &amp;lt;math&amp;gt;pi=(pi1, pi2, ...piK)&amp;lt;/math&amp;gt; where &amp;lt;math&amp;gt;pi1&amp;lt;/math&amp;gt; is the probability for &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; to choose the strategy &amp;lt;math&amp;gt;si1&amp;lt;/math&amp;gt;&lt;br /&gt;
As the mixed strategy is a distribution of probability there is: &lt;br /&gt;
&amp;lt;math&amp;gt;\sum_{j=1}^K pij = 1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Nash equilibrium in mixed strategy===&lt;br /&gt;
&lt;br /&gt;
A mixed strategy Nash equilibrium involves at least one player playing a '''randomized''' strategy and no player being able to increase his or her expected payoff by playing an alternate strategy. A [[Nash_equilibrium|Nash equilibrium]] in which no player randomizes is called a pure strategy Nash equilibrium.&lt;br /&gt;
&lt;br /&gt;
==Matching pennies game==&lt;br /&gt;
&lt;br /&gt;
=== Definition ===&lt;br /&gt;
&lt;br /&gt;
Matching pennies is the name for a simple game used in game theory. It is played between two players. Each player has a penny and must secretly turn the penny to heads or tails. The players then reveal their choices simultaneously. If the pennies match (both heads or both tails), then Row keeps both pennies, so wins one from Column (+1 for Row, −1 for Column). If the pennies do not match (one heads and one tails) Column keeps both pennies, so receives one from Row. The following table display the game.&lt;br /&gt;
&lt;br /&gt;
[[File:Penny1.jpeg|400px|center]]&lt;br /&gt;
&lt;br /&gt;
===Mixed strategy in Matching pennies===&lt;br /&gt;
&lt;br /&gt;
Suppose that Row believes Column plays Heads with probability &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt;. If Row plays Heads, he gets 1 with probability &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; and –1 with probability &amp;lt;math&amp;gt;(1-p)&amp;lt;/math&amp;gt;. His expected profit will be &amp;lt;math&amp;gt; 1p - 1(1-p) = 2p - 1 &amp;lt;/math&amp;gt;. This is summarized in Figure below &amp;quot;Mixed strategy in matching pennies&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[File:Penny2.jpeg|400px|center]]&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;2p - 1 &amp;gt; 1 - 2p&amp;lt;/math&amp;gt;, then Row is better off, on average, playing Heads than Tails. Similarly.&lt;br /&gt;
If, on the other hand, &amp;lt;math&amp;gt;2p - 1 = 1 - 2p&amp;lt;/math&amp;gt; it gives '''&amp;lt;math&amp;gt;p=1/2&amp;lt;/math&amp;gt;'''. Then Row gets the same payoff no matter what Row does. In this case, Row could play Heads, could play Tails, or could flip a coin and randomize Row’s play.&lt;br /&gt;
&lt;br /&gt;
Note that randomization requires equality of expected payoffs. If a player is supposed to '''randomize''' over strategy A or strategy B, then both of these strategies must produce the same expected payoff. Otherwise, the player would prefer one of them and wouldn’t play the other.&lt;br /&gt;
&lt;br /&gt;
==Battle of the sexes game==&lt;br /&gt;
&lt;br /&gt;
=== Definition ===&lt;br /&gt;
&lt;br /&gt;
The battle of sexes is a two-players coordination game in the [[Game_theory|Game theory]]. In this game there is one man and one woman, the woman prefers going to a ballet and the man prefers going to a baseball game. The nuance here is that they both prefers to go together rather than going alone to his/her prefered activity. The game is described in the table below.&lt;br /&gt;
&lt;br /&gt;
[[File:Battle1.jpg|400px|center]]&lt;br /&gt;
&lt;br /&gt;
We can highlight the two pure Nash equilibrium: (Ballet, Ballet) and (Baseball, Baseball) you can find them by using the [[Nash_equilibrium|Nash equilibrium]] course. &lt;br /&gt;
&lt;br /&gt;
===Mixed strategy in battle of the sexes===&lt;br /&gt;
&lt;br /&gt;
To find the mixed strategy we need to assign some probabilities to each situation. Let '''&amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt;''' be the probability for the '''woman''' to go to the '''baseball''' game and '''&amp;lt;math&amp;gt;q&amp;lt;/math&amp;gt;''' the probability for the '''men''' to go to the '''baseball''' game. The computations with the expected payoffs for each situation is display below.&lt;br /&gt;
&lt;br /&gt;
[[File:Battle2.jpg|400px|center]]&lt;br /&gt;
&lt;br /&gt;
The payoff calculations are the same as for the [[#Matching_pennies|Matching pennies]].&lt;br /&gt;
For example, if the man goes to the baseball game:&lt;br /&gt;
* He gets 3 when the woman goes also to the Baseball game, with a &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; probability.&lt;br /&gt;
* He gets 1 when the woman goes to the Ballet, with a &amp;lt;math&amp;gt;1-p&amp;lt;/math&amp;gt; probability.&lt;br /&gt;
The expected payoff is then just the product of the probability and the payoff, for example for the first row the expected payoff is then &amp;lt;math&amp;gt;3p + 1(1-p) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A key aspect in the mixed strategy is the '''indifference''' of choosing one or another choice for a player. In the mixed strategy game the Man has to be indifferent between going to the Baseball game and to the Ballet. This indifference or randomization between the choices of a player is expressed mathematically in our example for the man by  &amp;lt;math&amp;gt;1+2p = 2-2p&amp;lt;/math&amp;gt; which yields &amp;lt;math&amp;gt;p = 1/4 &amp;lt;/math&amp;gt;. Then if the Woman is going to the Baseball game 1/4 of the time, the Man will be willing to randomize which event he attends. Similar calculation are done for all possibilities and we multiply the probabilities:&lt;br /&gt;
* &amp;lt;math&amp;gt;p * q&amp;lt;/math&amp;gt; &lt;br /&gt;
* &amp;lt;math&amp;gt;q * (1-p)&amp;lt;/math&amp;gt; &lt;br /&gt;
* &amp;lt;math&amp;gt;(1-q) * p&amp;lt;/math&amp;gt; &lt;br /&gt;
* &amp;lt;math&amp;gt;(1-q) * (1-p)&amp;lt;/math&amp;gt; &lt;br /&gt;
We obtain the following table:&lt;br /&gt;
&lt;br /&gt;
[[File:Ballet3.jpg|400px|center]]&lt;br /&gt;
&lt;br /&gt;
We can note that 9 times over 16 the mixed strategy is (Baseball, Ballet) and it means that they are not together. Even if this mixed strategy Nash equilibrium seems to be undesirable, it's a [[Nash_equilibrium|Nash equilibrium]] as there is no improvement possible based on the behavior of the other party. This lack of coordination is often a feature of mixed strategy equilibrium. We can now consider another game where a failure of coordination makes more sense, the chicken game.&lt;br /&gt;
&lt;br /&gt;
==Chicken game==&lt;br /&gt;
&lt;br /&gt;
=== Definition ===&lt;br /&gt;
&lt;br /&gt;
[[File:Chicken1.jpeg|500px|center]]&lt;br /&gt;
&lt;br /&gt;
The chicken game in which two players drive two very fast cars towards each other from opposite ends of a long straight road. If one of them swerves before the other, he is called a chicken and will have a payoff of -1. Of course, if neither swerves, they will crash and will get both -4. This is the worst possible payoff. The best payoff is to have your opponent be the chicken, so we assign this a value 1. The last possibility is that both drivers swerve. Then, neither has less honor than the other, so this is a better option than being the chicken. We could assign a payoff matrix to this:&lt;br /&gt;
&lt;br /&gt;
[[File:Chicken2.jpg|400px|center]]&lt;br /&gt;
&lt;br /&gt;
There is again two pure Nash equilibrium here: (Swerve, Don't) and (Don't, Swerve), you can find them by using the [[Nash_equilibrium|Nash equilibrium]] course. &lt;br /&gt;
&lt;br /&gt;
===Mixed strategy in Chicken game===&lt;br /&gt;
&lt;br /&gt;
To find the mixed strategy equilibrium we need to assign the same probabilities as for the [[#Mixed strategy in battle of the sexes|Battle of the sexes]]. We can find the table of calculation below.&lt;br /&gt;
&lt;br /&gt;
[[File:Chicken3.png|400px|center]]&lt;br /&gt;
&lt;br /&gt;
In order to find the mixed strategy equilibrium we have to calculate what probabilities &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;q&amp;lt;/math&amp;gt; are required to have '''randomized''' choices. The same logic as for the [[#Mixed strategy in battle of the sexes|Battle of the sexes]] is applied, we calculate: &amp;lt;math&amp;gt;0p -1(1-p) = 1p -4(1-p)&amp;lt;/math&amp;gt; and get the optimal probabilities: '''&amp;lt;math&amp;gt;p=3/4&amp;lt;/math&amp;gt;''' and '''&amp;lt;math&amp;gt;q=3/4&amp;lt;/math&amp;gt;'''. We just have to '''multiply''' these probabilities to obtain the table below.&lt;br /&gt;
&lt;br /&gt;
[[File:Chicken4.png|400px|center]]&lt;br /&gt;
&lt;br /&gt;
We can note that the probability of a collision (Don't, Don't) is just 1/16 in the mixed strategy equilibrium. In the chicken game the mixed strategy equilibrium is more likely than in the [[#Mixed strategy in battle of the sexes|Battle of the sexes]]. The whole point in this game is to find out who will yield, which means that it isn't known in advance. This means that the mixed strategy equilibrium is the more reasonable equilibrium.&lt;br /&gt;
&lt;br /&gt;
==Mixed strategy in Rock, paper, scissors==&lt;br /&gt;
&lt;br /&gt;
=== Definition ===&lt;br /&gt;
&lt;br /&gt;
“Rock, paper, scissors” is a child’s game in which two children use their hands to simultaneously choose paper, scissors, or rock. The nature of the payoffs is that paper beats rock, rock beats scissors, and scissors beats paper. This game has the structure that is illustrated below.&lt;br /&gt;
&lt;br /&gt;
[[File:Bart1.png|400px|center]]&lt;br /&gt;
&lt;br /&gt;
We can note that in the game between Bart and Lisa there is '''no pure Nash equilibrium''', because the gains are directly opposed. if Bart received a big utility, Lisa received a small one. If one player knows what will do his opponent, he will directly win. That is why the game has no Nash equilibrium in '''pure strategy'''.&lt;br /&gt;
&lt;br /&gt;
'''The mixed strategy in this game give you the opportunity to protect yourself against the other.'''&lt;br /&gt;
* If Bart choose always Rock, Lisa will always play Paper and Bart will have a utility of -1 with certainty.&lt;br /&gt;
* If Bart choose Rock or Paper with a probability of 0.5, Lisa who knows, will play Paper all the time and Bart will get an expected utility of: &amp;lt;math&amp;gt; 0.5 * 0 + 0.5 * (-1) = -0.5&amp;lt;/math&amp;gt;.&lt;br /&gt;
* The best strategy for Bart is to choose a probability &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; for which Lisa is '''indifferent''' between choosing Rock, Paper or Scissors. In this case Bart will play Rock, Paper and Scissor with a probability of 1/3 and then Lisa and Bart will both have a utility of&amp;lt;math&amp;gt;(1/3) * 1 + (1/3) * 0 + (1/3) * (-1) = 0&amp;lt;/math&amp;gt;. &lt;br /&gt;
By choosing a mixed strategy for which Lisa is '''indifferent''' between choosing Rock, Paper or Scissors, Bart can increase his utility.&lt;br /&gt;
&lt;br /&gt;
== References and Sources ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref name=&amp;quot;john&amp;quot; &amp;gt;John Von Neumann, Oskar Morgenstern. Theory of Games and Economic Behavior. 1944. Book review: https://www.ams.org/journals/bull/1945-51-07/S0002-9904-1945-08391-8/S0002-9904-1945-08391-8.pdf.&amp;lt;/ref&amp;gt;,&lt;br /&gt;
&amp;lt;ref name=&amp;quot;Nash&amp;quot;&amp;gt;John Forbes Nash Jr, Non-cooperative games. Article 1950. https://www.jstor.org/stable/1969529?seq=1&amp;lt;/ref&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
https://cs.stanford.edu/people/eroberts/courses/soco/projects/1998-99/game-theory/chicken.html&lt;br /&gt;
https://en.wikipedia.org/wiki/Strategy_(game_theory)&lt;br /&gt;
https://saylordotorg.github.io/text_introduction-to-economic-analysis/s17-03-mixed-strategies.html&lt;br /&gt;
https://en.wikipedia.org/wiki/Theory_of_Games_and_Economic_Behavior&lt;br /&gt;
https://www.jstor.org/stable/1969529?seq=1&lt;/div&gt;</summary>
		<author><name>Toscool</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Mixed_strategy&amp;diff=20319</id>
		<title>Mixed strategy</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Mixed_strategy&amp;diff=20319"/>
		<updated>2021-01-08T13:09:31Z</updated>

		<summary type="html">&lt;p&gt;Toscool: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; align=right width=&amp;quot;220&amp;quot;&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; width=&amp;quot;50px&amp;quot; |John Forbes Nash Jr.&lt;br /&gt;
|- &lt;br /&gt;
| [[File:Nash.jpg|200px|left]]&lt;br /&gt;
|-&lt;br /&gt;
| '''Born:''' &lt;br /&gt;
* June 13, 1928&lt;br /&gt;
'''Died:''' &lt;br /&gt;
* May 13, 2015 (aged 86)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
John Forbes Nash Jr. was an American mathematician who made fundamental contributions mainly to [[Game_theory|Game theory]]. Nash's work has provided insight into the factors that govern chance and decision-making inside complex systems found in everyday life&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== History ===&lt;br /&gt;
* A '''pure strategy''' is an unconditional, defined choice that a person makes in a situation or game.&lt;br /&gt;
* A '''mixed strategy''' is an assignment of probability to all choices in the strategy set. &lt;br /&gt;
&lt;br /&gt;
The concept of a mixed-strategy was introduced by John von Neumann and Oskar Morgenstern in their 1944 book ''The Theory of Games and Economic Behavior''&amp;lt;ref name=&amp;quot;john&amp;quot; /&amp;gt;, but their analysis was restricted to the special case of zero-sum games. They showed that a mixed-strategy Nash equilibrium will exist for any zero-sum game with a finite set of actions. &lt;br /&gt;
&lt;br /&gt;
In his famous paper in 1950, John Forbes Nash go further and proved that there is an equilibrium for '''every finite game'''. It can divide Nash equilibria into two types. Pure strategy Nash equilibria are Nash equilibria where all players are playing pure strategies. Mixed strategy Nash equilibria are equilibria where at least one player is playing a mixed strategy. &lt;br /&gt;
&lt;br /&gt;
=== Definition ===&lt;br /&gt;
Mixed strategy:&lt;br /&gt;
if the player &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; has &amp;lt;math&amp;gt;K&amp;lt;/math&amp;gt; strategies &amp;lt;math&amp;gt;si1, si2, ...siK&amp;lt;/math&amp;gt; available, a mixed strategy is a distribution of probabilities &amp;lt;math&amp;gt;pi=(pi1, pi2, ...piK)&amp;lt;/math&amp;gt; where &amp;lt;math&amp;gt;pi1&amp;lt;/math&amp;gt; is the probability for &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; to choose the strategy &amp;lt;math&amp;gt;si1&amp;lt;/math&amp;gt;&lt;br /&gt;
As the mixed strategy is a distribution of probability there is: &lt;br /&gt;
&amp;lt;math&amp;gt;\sum_{j=1}^K pij = 1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Nash equilibrium in mixed strategy===&lt;br /&gt;
&lt;br /&gt;
A mixed strategy Nash equilibrium involves at least one player playing a '''randomized''' strategy and no player being able to increase his or her expected payoff by playing an alternate strategy. A [[Nash_equilibrium|Nash equilibrium]] in which no player randomizes is called a pure strategy Nash equilibrium.&lt;br /&gt;
&lt;br /&gt;
==Matching pennies game==&lt;br /&gt;
&lt;br /&gt;
=== Definition ===&lt;br /&gt;
&lt;br /&gt;
Matching pennies is the name for a simple game used in game theory. It is played between two players. Each player has a penny and must secretly turn the penny to heads or tails. The players then reveal their choices simultaneously. If the pennies match (both heads or both tails), then Row keeps both pennies, so wins one from Column (+1 for Row, −1 for Column). If the pennies do not match (one heads and one tails) Column keeps both pennies, so receives one from Row. The following table display the game.&lt;br /&gt;
&lt;br /&gt;
[[File:Penny1.jpeg|400px|center]]&lt;br /&gt;
&lt;br /&gt;
===Mixed strategy in Matching pennies===&lt;br /&gt;
&lt;br /&gt;
Suppose that Row believes Column plays Heads with probability &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt;. If Row plays Heads, he gets 1 with probability &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; and –1 with probability &amp;lt;math&amp;gt;(1-p)&amp;lt;/math&amp;gt;. His expected profit will be &amp;lt;math&amp;gt; 1p - 1(1-p) = 2p - 1 &amp;lt;/math&amp;gt;. This is summarized in Figure below &amp;quot;Mixed strategy in matching pennies&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[File:Penny2.jpeg|400px|center]]&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;2p - 1 &amp;gt; 1 - 2p&amp;lt;/math&amp;gt;, then Row is better off, on average, playing Heads than Tails. Similarly.&lt;br /&gt;
If, on the other hand, &amp;lt;math&amp;gt;2p - 1 = 1 - 2p&amp;lt;/math&amp;gt; it gives '''&amp;lt;math&amp;gt;p=1/2&amp;lt;/math&amp;gt;'''. Then Row gets the same payoff no matter what Row does. In this case, Row could play Heads, could play Tails, or could flip a coin and randomize Row’s play.&lt;br /&gt;
&lt;br /&gt;
Note that randomization requires equality of expected payoffs. If a player is supposed to '''randomize''' over strategy A or strategy B, then both of these strategies must produce the same expected payoff. Otherwise, the player would prefer one of them and wouldn’t play the other.&lt;br /&gt;
&lt;br /&gt;
==Battle of the sexes game==&lt;br /&gt;
&lt;br /&gt;
=== Definition ===&lt;br /&gt;
&lt;br /&gt;
The battle of sexes is a two-players coordination game in the [[Game_theory|Game theory]]. In this game there is one man and one woman, the woman prefers going to a ballet and the man prefers going to a baseball game. The nuance here is that they both prefers to go together rather than going alone to his/her prefered activity. The game is described in the table below.&lt;br /&gt;
&lt;br /&gt;
[[File:Battle1.jpg|400px|center]]&lt;br /&gt;
&lt;br /&gt;
We can highlight the two pure Nash equilibrium: (Ballet, Ballet) and (Baseball, Baseball) you can find them by using the [[Nash_equilibrium|Nash equilibrium]] course. &lt;br /&gt;
&lt;br /&gt;
===Mixed strategy in battle of the sexes===&lt;br /&gt;
&lt;br /&gt;
To find the mixed strategy we need to assign some probabilities to each situation. Let '''&amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt;''' be the probability for the '''woman''' to go to the '''baseball''' game and '''&amp;lt;math&amp;gt;q&amp;lt;/math&amp;gt;''' the probability for the '''men''' to go to the '''baseball''' game. The computations with the expected payoffs for each situation is display below.&lt;br /&gt;
&lt;br /&gt;
[[File:Battle2.jpg|400px|center]]&lt;br /&gt;
&lt;br /&gt;
The payoff calculations are the same as for the [[#Matching_pennies|Matching pennies]].&lt;br /&gt;
For example, if the man goes to the baseball game:&lt;br /&gt;
* He gets 3 when the woman goes also to the Baseball game, with a &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; probability.&lt;br /&gt;
* He gets 1 when the woman goes to the Ballet, with a &amp;lt;math&amp;gt;1-p&amp;lt;/math&amp;gt; probability.&lt;br /&gt;
The expected payoff is then just the product of the probability and the payoff, for example for the first row the expected payoff is then &amp;lt;math&amp;gt;3p + 1(1-p) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A key aspect in the mixed strategy is the '''indifference''' of choosing one or another choice for a player. In the mixed strategy game the Man has to be indifferent between going to the Baseball game and to the Ballet. This indifference or randomization between the choices of a player is expressed mathematically in our example for the man by  &amp;lt;math&amp;gt;1+2p = 2-2p&amp;lt;/math&amp;gt; which yields &amp;lt;math&amp;gt;p = 1/4 &amp;lt;/math&amp;gt;. Then if the Woman is going to the Baseball game 1/4 of the time, the Man will be willing to randomize which event he attends. Similar calculation are done for all possibilities and we multiply the probabilities:&lt;br /&gt;
* &amp;lt;math&amp;gt;p * q&amp;lt;/math&amp;gt; &lt;br /&gt;
* &amp;lt;math&amp;gt;q * (1-p)&amp;lt;/math&amp;gt; &lt;br /&gt;
* &amp;lt;math&amp;gt;(1-q) * p&amp;lt;/math&amp;gt; &lt;br /&gt;
* &amp;lt;math&amp;gt;(1-q) * (1-p)&amp;lt;/math&amp;gt; &lt;br /&gt;
We obtain the following table:&lt;br /&gt;
&lt;br /&gt;
[[File:Ballet3.jpg|400px|center]]&lt;br /&gt;
&lt;br /&gt;
We can note that 9 times over 16 the mixed strategy is (Baseball, Ballet) and it means that they are not together. Even if this mixed strategy Nash equilibrium seems to be undesirable, it's a [[Nash_equilibrium|Nash equilibrium]] as there is no improvement possible based on the behavior of the other party. This lack of coordination is often a feature of mixed strategy equilibrium. We can now consider another game where a failure of coordination makes more sense, the chicken game.&lt;br /&gt;
&lt;br /&gt;
==Chicken game==&lt;br /&gt;
&lt;br /&gt;
=== Definition ===&lt;br /&gt;
&lt;br /&gt;
[[File:Chicken1.jpeg|500px|center]]&lt;br /&gt;
&lt;br /&gt;
The chicken game in which two players drive two very fast cars towards each other from opposite ends of a long straight road. If one of them swerves before the other, he is called a chicken and will have a payoff of -1. Of course, if neither swerves, they will crash and will get both -4. This is the worst possible payoff. The best payoff is to have your opponent be the chicken, so we assign this a value 1. The last possibility is that both drivers swerve. Then, neither has less honor than the other, so this is a better option than being the chicken. We could assign a payoff matrix to this:&lt;br /&gt;
&lt;br /&gt;
[[File:Chicken2.jpg|400px|center]]&lt;br /&gt;
&lt;br /&gt;
There is again two pure Nash equilibrium here: (Swerve, Don't) and (Don't, Swerve), you can find them by using the [[Nash_equilibrium|Nash equilibrium]] course. &lt;br /&gt;
&lt;br /&gt;
===Mixed strategy in Chicken game===&lt;br /&gt;
&lt;br /&gt;
To find the mixed strategy equilibrium we need to assign the same probabilities as for the [[#Mixed strategy in battle of the sexes|Battle of the sexes]]. We can find the table of calculation below.&lt;br /&gt;
&lt;br /&gt;
[[File:Chicken3.png|400px|center]]&lt;br /&gt;
&lt;br /&gt;
In order to find the mixed strategy equilibrium we have to calculate what probabilities &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;q&amp;lt;/math&amp;gt; are required to have '''randomized''' choices. The same logic as for the [[#Mixed strategy in battle of the sexes|Battle of the sexes]] is applied, we calculate: &amp;lt;math&amp;gt;0p -1(1-p) = 1p -4(1-p)&amp;lt;/math&amp;gt; and get the optimal probabilities: '''&amp;lt;math&amp;gt;p=3/4&amp;lt;/math&amp;gt;''' and '''&amp;lt;math&amp;gt;q=3/4&amp;lt;/math&amp;gt;'''. We just have to '''multiply''' these probabilities to obtain the table below.&lt;br /&gt;
&lt;br /&gt;
[[File:Chicken4.png|400px|center]]&lt;br /&gt;
&lt;br /&gt;
We can note that the probability of a collision (Don't, Don't) is just 1/16 in the mixed strategy equilibrium. In the chicken game the mixed strategy equilibrium is more likely than in the [[#Mixed strategy in battle of the sexes|Battle of the sexes]]. The whole point in this game is to find out who will yield, which means that it isn't known in advance. This means that the mixed strategy equilibrium is the more reasonable equilibrium.&lt;br /&gt;
&lt;br /&gt;
==Mixed strategy in Rock, paper, scissors==&lt;br /&gt;
&lt;br /&gt;
=== Definition ===&lt;br /&gt;
&lt;br /&gt;
“Rock, paper, scissors” is a child’s game in which two children use their hands to simultaneously choose paper, scissors, or rock. The nature of the payoffs is that paper beats rock, rock beats scissors, and scissors beats paper. This game has the structure that is illustrated below.&lt;br /&gt;
&lt;br /&gt;
[[File:Bart1.png|400px|center]]&lt;br /&gt;
&lt;br /&gt;
We can note that in the game between Bart and Lisa there is '''no pure Nash equilibrium''', because the gains are directly opposed. if Bart received a big utility, Lisa received a small one. If one player knows what will do his opponent, he will directly win. That is why the game has no Nash equilibrium in '''pure strategy'''.&lt;br /&gt;
&lt;br /&gt;
'''The mixed strategy in this game give you the opportunity to protect yourself against the other.'''&lt;br /&gt;
* If Bart choose always Rock, Lisa will always play Paper and Bart will have a utility of -1 with certainty.&lt;br /&gt;
* If Bart choose Rock or Paper with a probability of 0.5, Lisa who knows, will play Paper all the time and Bart will get an expected utility of: &amp;lt;math&amp;gt; 0.5 * 0 + 0.5 * (-1) = -0.5&amp;lt;/math&amp;gt;.&lt;br /&gt;
* The best strategy for Bart is to choose a probability &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; for which Lisa is '''indifferent''' between choosing Rock, Paper or Scissors. In this case Bart will play Rock, Paper and Scissor with a probability of 1/3 and then Lisa and Bart will both have a utility of&amp;lt;math&amp;gt;(1/3) * 1 + (1/3) * 0 + (1/3) * (-1) = 0&amp;lt;/math&amp;gt;. &lt;br /&gt;
By choosing a mixed strategy for which Lisa is '''indifferent''' between choosing Rock, Paper or Scissors, Bart can increase his utility.&lt;br /&gt;
&lt;br /&gt;
== References and Sources ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref name=&amp;quot;john&amp;quot; &amp;gt;John Von Neumann, Oskar Morgenstern. Theory of Games and Economic Behavior. 1944. Book review: https://www.ams.org/journals/bull/1945-51-07/S0002-9904-1945-08391-8/S0002-9904-1945-08391-8.pdf.&amp;lt;/ref&amp;gt;,&lt;br /&gt;
&amp;lt;ref name=&amp;quot;Nash&amp;quot;&amp;gt;John Forbes Nash Jr, Non-cooperative games. Article 1950. https://www.jstor.org/stable/1969529?seq=1&amp;lt;/ref&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
https://cs.stanford.edu/people/eroberts/courses/soco/projects/1998-99/game-theory/chicken.html&lt;br /&gt;
https://en.wikipedia.org/wiki/Strategy_(game_theory)&lt;br /&gt;
https://saylordotorg.github.io/text_introduction-to-economic-analysis/s17-03-mixed-strategies.html&lt;br /&gt;
https://en.wikipedia.org/wiki/Theory_of_Games_and_Economic_Behavior&lt;br /&gt;
https://www.jstor.org/stable/1969529?seq=1&lt;/div&gt;</summary>
		<author><name>Toscool</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Mixed_strategy&amp;diff=20318</id>
		<title>Mixed strategy</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Mixed_strategy&amp;diff=20318"/>
		<updated>2021-01-08T13:09:00Z</updated>

		<summary type="html">&lt;p&gt;Toscool: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; align=right width=&amp;quot;220&amp;quot;&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; width=&amp;quot;50px&amp;quot; |John Forbes Nash Jr.&lt;br /&gt;
|- &lt;br /&gt;
| [[File:Nash.jpg|200px|left]]&lt;br /&gt;
|-&lt;br /&gt;
| '''Born:''' &lt;br /&gt;
* June 13, 1928&lt;br /&gt;
'''Died:''' &lt;br /&gt;
* May 13, 2015 (aged 86)&lt;br /&gt;
&lt;br /&gt;
=== History ===&lt;br /&gt;
John Forbes Nash Jr. was an American mathematician who made fundamental contributions mainly to [[Game_theory|Game theory]]. Nash's work has provided insight into the factors that govern chance and decision-making inside complex systems found in everyday life&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* A '''pure strategy''' is an unconditional, defined choice that a person makes in a situation or game.&lt;br /&gt;
* A '''mixed strategy''' is an assignment of probability to all choices in the strategy set. &lt;br /&gt;
&lt;br /&gt;
The concept of a mixed-strategy was introduced by John von Neumann and Oskar Morgenstern in their 1944 book ''The Theory of Games and Economic Behavior''&amp;lt;ref name=&amp;quot;john&amp;quot; /&amp;gt;, but their analysis was restricted to the special case of zero-sum games. They showed that a mixed-strategy Nash equilibrium will exist for any zero-sum game with a finite set of actions. &lt;br /&gt;
&lt;br /&gt;
In his famous paper in 1950, John Forbes Nash go further and proved that there is an equilibrium for '''every finite game'''. It can divide Nash equilibria into two types. Pure strategy Nash equilibria are Nash equilibria where all players are playing pure strategies. Mixed strategy Nash equilibria are equilibria where at least one player is playing a mixed strategy. &lt;br /&gt;
&lt;br /&gt;
=== Definition ===&lt;br /&gt;
Mixed strategy:&lt;br /&gt;
if the player &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; has &amp;lt;math&amp;gt;K&amp;lt;/math&amp;gt; strategies &amp;lt;math&amp;gt;si1, si2, ...siK&amp;lt;/math&amp;gt; available, a mixed strategy is a distribution of probabilities &amp;lt;math&amp;gt;pi=(pi1, pi2, ...piK)&amp;lt;/math&amp;gt; where &amp;lt;math&amp;gt;pi1&amp;lt;/math&amp;gt; is the probability for &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; to choose the strategy &amp;lt;math&amp;gt;si1&amp;lt;/math&amp;gt;&lt;br /&gt;
As the mixed strategy is a distribution of probability there is: &lt;br /&gt;
&amp;lt;math&amp;gt;\sum_{j=1}^K pij = 1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Nash equilibrium in mixed strategy===&lt;br /&gt;
&lt;br /&gt;
A mixed strategy Nash equilibrium involves at least one player playing a '''randomized''' strategy and no player being able to increase his or her expected payoff by playing an alternate strategy. A [[Nash_equilibrium|Nash equilibrium]] in which no player randomizes is called a pure strategy Nash equilibrium.&lt;br /&gt;
&lt;br /&gt;
==Matching pennies game==&lt;br /&gt;
&lt;br /&gt;
=== Definition ===&lt;br /&gt;
&lt;br /&gt;
Matching pennies is the name for a simple game used in game theory. It is played between two players. Each player has a penny and must secretly turn the penny to heads or tails. The players then reveal their choices simultaneously. If the pennies match (both heads or both tails), then Row keeps both pennies, so wins one from Column (+1 for Row, −1 for Column). If the pennies do not match (one heads and one tails) Column keeps both pennies, so receives one from Row. The following table display the game.&lt;br /&gt;
&lt;br /&gt;
[[File:Penny1.jpeg|400px|center]]&lt;br /&gt;
&lt;br /&gt;
===Mixed strategy in Matching pennies===&lt;br /&gt;
&lt;br /&gt;
Suppose that Row believes Column plays Heads with probability &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt;. If Row plays Heads, he gets 1 with probability &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; and –1 with probability &amp;lt;math&amp;gt;(1-p)&amp;lt;/math&amp;gt;. His expected profit will be &amp;lt;math&amp;gt; 1p - 1(1-p) = 2p - 1 &amp;lt;/math&amp;gt;. This is summarized in Figure below &amp;quot;Mixed strategy in matching pennies&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[File:Penny2.jpeg|400px|center]]&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;2p - 1 &amp;gt; 1 - 2p&amp;lt;/math&amp;gt;, then Row is better off, on average, playing Heads than Tails. Similarly.&lt;br /&gt;
If, on the other hand, &amp;lt;math&amp;gt;2p - 1 = 1 - 2p&amp;lt;/math&amp;gt; it gives '''&amp;lt;math&amp;gt;p=1/2&amp;lt;/math&amp;gt;'''. Then Row gets the same payoff no matter what Row does. In this case, Row could play Heads, could play Tails, or could flip a coin and randomize Row’s play.&lt;br /&gt;
&lt;br /&gt;
Note that randomization requires equality of expected payoffs. If a player is supposed to '''randomize''' over strategy A or strategy B, then both of these strategies must produce the same expected payoff. Otherwise, the player would prefer one of them and wouldn’t play the other.&lt;br /&gt;
&lt;br /&gt;
==Battle of the sexes game==&lt;br /&gt;
&lt;br /&gt;
=== Definition ===&lt;br /&gt;
&lt;br /&gt;
The battle of sexes is a two-players coordination game in the [[Game_theory|Game theory]]. In this game there is one man and one woman, the woman prefers going to a ballet and the man prefers going to a baseball game. The nuance here is that they both prefers to go together rather than going alone to his/her prefered activity. The game is described in the table below.&lt;br /&gt;
&lt;br /&gt;
[[File:Battle1.jpg|400px|center]]&lt;br /&gt;
&lt;br /&gt;
We can highlight the two pure Nash equilibrium: (Ballet, Ballet) and (Baseball, Baseball) you can find them by using the [[Nash_equilibrium|Nash equilibrium]] course. &lt;br /&gt;
&lt;br /&gt;
===Mixed strategy in battle of the sexes===&lt;br /&gt;
&lt;br /&gt;
To find the mixed strategy we need to assign some probabilities to each situation. Let '''&amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt;''' be the probability for the '''woman''' to go to the '''baseball''' game and '''&amp;lt;math&amp;gt;q&amp;lt;/math&amp;gt;''' the probability for the '''men''' to go to the '''baseball''' game. The computations with the expected payoffs for each situation is display below.&lt;br /&gt;
&lt;br /&gt;
[[File:Battle2.jpg|400px|center]]&lt;br /&gt;
&lt;br /&gt;
The payoff calculations are the same as for the [[#Matching_pennies|Matching pennies]].&lt;br /&gt;
For example, if the man goes to the baseball game:&lt;br /&gt;
* He gets 3 when the woman goes also to the Baseball game, with a &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; probability.&lt;br /&gt;
* He gets 1 when the woman goes to the Ballet, with a &amp;lt;math&amp;gt;1-p&amp;lt;/math&amp;gt; probability.&lt;br /&gt;
The expected payoff is then just the product of the probability and the payoff, for example for the first row the expected payoff is then &amp;lt;math&amp;gt;3p + 1(1-p) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A key aspect in the mixed strategy is the '''indifference''' of choosing one or another choice for a player. In the mixed strategy game the Man has to be indifferent between going to the Baseball game and to the Ballet. This indifference or randomization between the choices of a player is expressed mathematically in our example for the man by  &amp;lt;math&amp;gt;1+2p = 2-2p&amp;lt;/math&amp;gt; which yields &amp;lt;math&amp;gt;p = 1/4 &amp;lt;/math&amp;gt;. Then if the Woman is going to the Baseball game 1/4 of the time, the Man will be willing to randomize which event he attends. Similar calculation are done for all possibilities and we multiply the probabilities:&lt;br /&gt;
* &amp;lt;math&amp;gt;p * q&amp;lt;/math&amp;gt; &lt;br /&gt;
* &amp;lt;math&amp;gt;q * (1-p)&amp;lt;/math&amp;gt; &lt;br /&gt;
* &amp;lt;math&amp;gt;(1-q) * p&amp;lt;/math&amp;gt; &lt;br /&gt;
* &amp;lt;math&amp;gt;(1-q) * (1-p)&amp;lt;/math&amp;gt; &lt;br /&gt;
We obtain the following table:&lt;br /&gt;
&lt;br /&gt;
[[File:Ballet3.jpg|400px|center]]&lt;br /&gt;
&lt;br /&gt;
We can note that 9 times over 16 the mixed strategy is (Baseball, Ballet) and it means that they are not together. Even if this mixed strategy Nash equilibrium seems to be undesirable, it's a [[Nash_equilibrium|Nash equilibrium]] as there is no improvement possible based on the behavior of the other party. This lack of coordination is often a feature of mixed strategy equilibrium. We can now consider another game where a failure of coordination makes more sense, the chicken game.&lt;br /&gt;
&lt;br /&gt;
==Chicken game==&lt;br /&gt;
&lt;br /&gt;
=== Definition ===&lt;br /&gt;
&lt;br /&gt;
[[File:Chicken1.jpeg|500px|center]]&lt;br /&gt;
&lt;br /&gt;
The chicken game in which two players drive two very fast cars towards each other from opposite ends of a long straight road. If one of them swerves before the other, he is called a chicken and will have a payoff of -1. Of course, if neither swerves, they will crash and will get both -4. This is the worst possible payoff. The best payoff is to have your opponent be the chicken, so we assign this a value 1. The last possibility is that both drivers swerve. Then, neither has less honor than the other, so this is a better option than being the chicken. We could assign a payoff matrix to this:&lt;br /&gt;
&lt;br /&gt;
[[File:Chicken2.jpg|400px|center]]&lt;br /&gt;
&lt;br /&gt;
There is again two pure Nash equilibrium here: (Swerve, Don't) and (Don't, Swerve), you can find them by using the [[Nash_equilibrium|Nash equilibrium]] course. &lt;br /&gt;
&lt;br /&gt;
===Mixed strategy in Chicken game===&lt;br /&gt;
&lt;br /&gt;
To find the mixed strategy equilibrium we need to assign the same probabilities as for the [[#Mixed strategy in battle of the sexes|Battle of the sexes]]. We can find the table of calculation below.&lt;br /&gt;
&lt;br /&gt;
[[File:Chicken3.png|400px|center]]&lt;br /&gt;
&lt;br /&gt;
In order to find the mixed strategy equilibrium we have to calculate what probabilities &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;q&amp;lt;/math&amp;gt; are required to have '''randomized''' choices. The same logic as for the [[#Mixed strategy in battle of the sexes|Battle of the sexes]] is applied, we calculate: &amp;lt;math&amp;gt;0p -1(1-p) = 1p -4(1-p)&amp;lt;/math&amp;gt; and get the optimal probabilities: '''&amp;lt;math&amp;gt;p=3/4&amp;lt;/math&amp;gt;''' and '''&amp;lt;math&amp;gt;q=3/4&amp;lt;/math&amp;gt;'''. We just have to '''multiply''' these probabilities to obtain the table below.&lt;br /&gt;
&lt;br /&gt;
[[File:Chicken4.png|400px|center]]&lt;br /&gt;
&lt;br /&gt;
We can note that the probability of a collision (Don't, Don't) is just 1/16 in the mixed strategy equilibrium. In the chicken game the mixed strategy equilibrium is more likely than in the [[#Mixed strategy in battle of the sexes|Battle of the sexes]]. The whole point in this game is to find out who will yield, which means that it isn't known in advance. This means that the mixed strategy equilibrium is the more reasonable equilibrium.&lt;br /&gt;
&lt;br /&gt;
==Mixed strategy in Rock, paper, scissors==&lt;br /&gt;
&lt;br /&gt;
=== Definition ===&lt;br /&gt;
&lt;br /&gt;
“Rock, paper, scissors” is a child’s game in which two children use their hands to simultaneously choose paper, scissors, or rock. The nature of the payoffs is that paper beats rock, rock beats scissors, and scissors beats paper. This game has the structure that is illustrated below.&lt;br /&gt;
&lt;br /&gt;
[[File:Bart1.png|400px|center]]&lt;br /&gt;
&lt;br /&gt;
We can note that in the game between Bart and Lisa there is '''no pure Nash equilibrium''', because the gains are directly opposed. if Bart received a big utility, Lisa received a small one. If one player knows what will do his opponent, he will directly win. That is why the game has no Nash equilibrium in '''pure strategy'''.&lt;br /&gt;
&lt;br /&gt;
'''The mixed strategy in this game give you the opportunity to protect yourself against the other.'''&lt;br /&gt;
* If Bart choose always Rock, Lisa will always play Paper and Bart will have a utility of -1 with certainty.&lt;br /&gt;
* If Bart choose Rock or Paper with a probability of 0.5, Lisa who knows, will play Paper all the time and Bart will get an expected utility of: &amp;lt;math&amp;gt; 0.5 * 0 + 0.5 * (-1) = -0.5&amp;lt;/math&amp;gt;.&lt;br /&gt;
* The best strategy for Bart is to choose a probability &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; for which Lisa is '''indifferent''' between choosing Rock, Paper or Scissors. In this case Bart will play Rock, Paper and Scissor with a probability of 1/3 and then Lisa and Bart will both have a utility of&amp;lt;math&amp;gt;(1/3) * 1 + (1/3) * 0 + (1/3) * (-1) = 0&amp;lt;/math&amp;gt;. &lt;br /&gt;
By choosing a mixed strategy for which Lisa is '''indifferent''' between choosing Rock, Paper or Scissors, Bart can increase his utility.&lt;br /&gt;
&lt;br /&gt;
== References and Sources ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref name=&amp;quot;john&amp;quot; &amp;gt;John Von Neumann, Oskar Morgenstern. Theory of Games and Economic Behavior. 1944. Book review: https://www.ams.org/journals/bull/1945-51-07/S0002-9904-1945-08391-8/S0002-9904-1945-08391-8.pdf.&amp;lt;/ref&amp;gt;,&lt;br /&gt;
&amp;lt;ref name=&amp;quot;Nash&amp;quot;&amp;gt;John Forbes Nash Jr, Non-cooperative games. Article 1950. https://www.jstor.org/stable/1969529?seq=1&amp;lt;/ref&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
https://cs.stanford.edu/people/eroberts/courses/soco/projects/1998-99/game-theory/chicken.html&lt;br /&gt;
https://en.wikipedia.org/wiki/Strategy_(game_theory)&lt;br /&gt;
https://saylordotorg.github.io/text_introduction-to-economic-analysis/s17-03-mixed-strategies.html&lt;br /&gt;
https://en.wikipedia.org/wiki/Theory_of_Games_and_Economic_Behavior&lt;br /&gt;
https://www.jstor.org/stable/1969529?seq=1&lt;/div&gt;</summary>
		<author><name>Toscool</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20317</id>
		<title>Impact of late lockdown and hospital capacity on 19-COVID spread</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20317"/>
		<updated>2021-01-08T10:41:50Z</updated>

		<summary type="html">&lt;p&gt;Toscool: /* Conclusion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=Problem definition=&lt;br /&gt;
&lt;br /&gt;
The coronavirus pandemic is an ongoing pandemic, the first case confirmed in Switzerland  was on February 25th, 2020 and has known an exponential growth since. We know that the virus is spread from an infected person to a healthy one during close contact or via touching a contaminated surface. The aim of the simulation is to display the dynamics of the reaction time of the government to take measures and to see if the hospital capacity play a key role in the spread of the COVID-19&lt;br /&gt;
&lt;br /&gt;
=Method=&lt;br /&gt;
&lt;br /&gt;
Vensim modelling approach was selected due to dynamic behavior of the simulated system.&lt;br /&gt;
&lt;br /&gt;
the model shows the evolution of the number of people who got infected by the covid-19 virus in countries where the population have a high health care protection and where the government have decided to make a decision about the virus propagation. The model will explain how fast the virus spreads itself and how political decisions can change the number of infected people at a given point in time. The construction of the model is simple: at the beginning one person is infected and will, then, infect other people. When you are infected many possibilities are open:&lt;br /&gt;
* You can be a healthy virus carrier. In that case you will not know that you have the virus and after 19 days you will be recovered.&lt;br /&gt;
* After 5 days you get symptoms, but you do not have any important health problems, you will recover in the next 14 days.&lt;br /&gt;
* After 5 days, you get symptoms and you are very sick and have respiratory problems, after 3 more days, still feeling bad, you decide to go to the doctor to get a diagnosis. The doctor has than two options: to send you back home, where you will recover after 11 more days or hospitalized you the next day.&lt;br /&gt;
* The doctor had decided to hospitalize you, you then spend two weeks in intensive care, where you will need artificial ventilation and 24-hour nursing care. You can then recover or unfortunately die. &lt;br /&gt;
&lt;br /&gt;
The higher the hospital utilization, the greater the probability to die. Indeed, if hospitals get busier, the medical staff will be less available and health care quality might decrease. When the number of diagnosed and hospitalized people (which are the official number of cases) is greater than a certain percentage of the population, the government will take decisions to slow down the spread of the virus. This is to say that governments will take some measures, such as installing a forced lockdown of the population to decrease the number of contacts per habitant. Moreover, such a decision will have an impact on the population, which will be more aware of the situation and will be more careful to not spread or contract the virus. So, the contagion rate as the number of contacts per people will slow down. They will be less hospitalized people, that means less people in the hospital, meaning a better service and so less people who die.&lt;br /&gt;
&lt;br /&gt;
=Model=&lt;br /&gt;
&lt;br /&gt;
Following vensim model was developed based on the study.&lt;br /&gt;
&lt;br /&gt;
[[File:Model1.png|900px|thumb|center|COVID-19 pandemic in Switzerland Stock Flow Diagram]]&lt;br /&gt;
&lt;br /&gt;
== Variables ==&lt;br /&gt;
&lt;br /&gt;
===Initial population=== &lt;br /&gt;
''The Population of Switzerland can be found here: https://en.wikipedia.org/wiki/Demographics_of_Switzerland''&lt;br /&gt;
&lt;br /&gt;
=8 500 000&lt;br /&gt;
&lt;br /&gt;
===Ratio susceptible people=== &lt;br /&gt;
''Decrease the susceptible people by the number of deaths due to the COVID-19.''&lt;br /&gt;
&lt;br /&gt;
=Susceptible population / (Initial population-Dead)&lt;br /&gt;
&lt;br /&gt;
===Susceptible population=== &lt;br /&gt;
''Decrease the susceptible population by the number of new infections.''&lt;br /&gt;
&lt;br /&gt;
=-New infections&lt;br /&gt;
&lt;br /&gt;
===contact=== &lt;br /&gt;
'''Lockdown:''' ''Function IF THEN ELSE that bring the number of new people you meet (contact) from 5 to 0.05 if the ratio exceed 0.015%''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot;&amp;gt; 0.00015, 0.05 , 5 )&lt;br /&gt;
&lt;br /&gt;
===Contagion Rate=== &lt;br /&gt;
'''Lockdown:''' ''contagion rate: IF THEN ELSE that bring the contagion rate from 0.1 to 0.075 if the ratio exceed 0.015%. Function of the awareness in the population (washing more often their hands if lockdown)''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot; &amp;gt; 0.00015 , 0.075 , 0.1 )&lt;br /&gt;
&lt;br /&gt;
===New infections=== &lt;br /&gt;
''It represent the new number of people infected each day.''&lt;br /&gt;
&lt;br /&gt;
=contact*Infected*Ratio susceptible people*Contagion Rate&lt;br /&gt;
&lt;br /&gt;
===Infected=== &lt;br /&gt;
''It represent the stock of the new people infected. We start the model with 1 infected people.''&lt;br /&gt;
&lt;br /&gt;
=New infections-New recoveries from infected-New symptoms ///// Initial value: 1&lt;br /&gt;
&lt;br /&gt;
===New recoveries from infected===&lt;br /&gt;
''It represent the number of people without symptoms and they go in the recovered stock after 19 days.''&lt;br /&gt;
&lt;br /&gt;
=((1-Ratio Symptoms)*Infected)/TTA recoveries&lt;br /&gt;
&lt;br /&gt;
===New symptoms=== &lt;br /&gt;
''It represent the number of new people that develop symptoms during 5 days before going to the symptomatic stock.''&lt;br /&gt;
&lt;br /&gt;
=(Infected*Ratio Symptoms)/TTA Symptoms&lt;br /&gt;
&lt;br /&gt;
===Ratio Symptoms=== &lt;br /&gt;
''The ratio of people who develop some symptoms.''&lt;br /&gt;
&lt;br /&gt;
=0.2&lt;br /&gt;
&lt;br /&gt;
===Symptomatic=== &lt;br /&gt;
''The stock of people symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=New symptoms-New Diagnostic-New recoveries from symptoms&lt;br /&gt;
&lt;br /&gt;
===New recoveries from symptoms=== &lt;br /&gt;
''It represent the number of people that have symptoms but that were not to the doctor, after 14 they are in the recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Diagnost)*Symptomatic/TTA sympt&lt;br /&gt;
&lt;br /&gt;
===New Diagnostic=== &lt;br /&gt;
''It represent the number of new people that are diagnosed each day, they stay 3 days before having the diagnostic.''&lt;br /&gt;
&lt;br /&gt;
=Symptomatic*Ratio Diagnost/TTA Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Ratio Diagnost===&lt;br /&gt;
''the ratio of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=0.4&lt;br /&gt;
&lt;br /&gt;
===Diagnosed=== &lt;br /&gt;
''The stock of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic-New Hospitalization-New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===New Recovery from Diagnostic===&lt;br /&gt;
''It represent the number of people that are diagnosed and not sent to the hospital. they stay 11 days before going in the Recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Hospitalize)*Diagnosed/TTA diag&lt;br /&gt;
&lt;br /&gt;
===New Hospitalization=== &lt;br /&gt;
''It represent the number of people that are diagnosed and sent to the hospital. they stay 1 day before being sent.''&lt;br /&gt;
&lt;br /&gt;
=(Diagnosed*Ratio Hospitalize)/TTA Hospitalization Ratio Hospitalize&lt;br /&gt;
&lt;br /&gt;
===Ratio Hospitalize===&lt;br /&gt;
''The ratio of people that are Hospitalized.''&lt;br /&gt;
&lt;br /&gt;
=0.3&lt;br /&gt;
&lt;br /&gt;
===Hospitalized=== &lt;br /&gt;
''The stock of people that are hospitalized before being Recovered or Dead.''&lt;br /&gt;
&lt;br /&gt;
=New Hospitalization-New Death-New Recovery&lt;br /&gt;
&lt;br /&gt;
===New Recovery=== &lt;br /&gt;
''The number of people that recover each day from the hospitalization. It depends on the '''Taux Mortality''' which is depend from the '''hospital utilization''' (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=((1-Taux Mortality)*Hospitalized)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===New Death===&lt;br /&gt;
''The number of people that die each day from the hospitalization. It depends on the '''Taux Mortality''' which is depend from the '''hospital utilization''' (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized* Taux Mortality)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===hospital bed=== &lt;br /&gt;
''The number of bed in Switzerland is 356 beds for 100k people with 8.5M people it gives that number: https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704''&lt;br /&gt;
&lt;br /&gt;
=30260&lt;br /&gt;
&lt;br /&gt;
===hospital utilization=== &lt;br /&gt;
''For the utilization of the hospital I assumed that there is already 8260 beds used for regular patient (outside the covid pandemic). The more utilization we have, the greater the probability to die. Indeed, if hospitals get busier, the medical staff will be less available and health care quality might decrease.''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized/(hospital bed - 8260))&lt;br /&gt;
&lt;br /&gt;
===lookup mortality===&lt;br /&gt;
''The lookup function is used to described the taux mortality.''&lt;br /&gt;
&lt;br /&gt;
[(0,0)-(1000,0.3)],(0,0.065),(0.6,0.065),(0.8,0.12),(1,0.25),(1.2,0.3),(10,0.3),(1000,0.3)&lt;br /&gt;
&lt;br /&gt;
===Taux Mortality=== &lt;br /&gt;
''The mortality rate depends on the hospital utilization. For example based on the above function, if the capacity reach 100% the hospital is full and the chance to die is then 25%.''&lt;br /&gt;
&lt;br /&gt;
=lk mortality (hospital utilization)&lt;br /&gt;
&lt;br /&gt;
===Dead=== &lt;br /&gt;
''The stock of Dead people killed by the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New Death&lt;br /&gt;
&lt;br /&gt;
===Recovered=== &lt;br /&gt;
''The Total amount of people who recovered from the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New recoveries from infected+New recoveries from symptoms+New Recovery+New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===official active cases===&lt;br /&gt;
''It represent the number of people that were tested and it's this number that will be used by the government to follow the pandemic and take decision of lockdown.''&lt;br /&gt;
&lt;br /&gt;
=Diagnosed+Hosptitalized&lt;br /&gt;
&lt;br /&gt;
===Ratio official cases/pop=== &lt;br /&gt;
''The ratio that will be used for lockdown. ''&lt;br /&gt;
&lt;br /&gt;
=official active cases/ Initial population&lt;br /&gt;
&lt;br /&gt;
===New Diagnosed.1=== &lt;br /&gt;
''It's is just the same as New Diagnostic, it is used in the model to have the Total Diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Total Diagnosed=== &lt;br /&gt;
''Used in the model to have the official number of cases in the model.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnosed.1&lt;br /&gt;
&lt;br /&gt;
===TTA recoveries=== &lt;br /&gt;
''Time to recover after being infected and not having symptoms.''&lt;br /&gt;
&lt;br /&gt;
=19&lt;br /&gt;
&lt;br /&gt;
===TTA Symptoms=== &lt;br /&gt;
''The time you take to develop symptoms.''&lt;br /&gt;
&lt;br /&gt;
=5&lt;br /&gt;
&lt;br /&gt;
===TTA sympt===&lt;br /&gt;
''The time you take for recovering after being symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
===TTA Diagnostic=== &lt;br /&gt;
''Time to go to the doctor and have the result.''&lt;br /&gt;
&lt;br /&gt;
=3&lt;br /&gt;
&lt;br /&gt;
===TTA diag===&lt;br /&gt;
''The time you take for recovering after being diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=11&lt;br /&gt;
&lt;br /&gt;
===TTA Hospitalization=== &lt;br /&gt;
''Time to go to the Hospital.''&lt;br /&gt;
&lt;br /&gt;
=1&lt;br /&gt;
&lt;br /&gt;
===TTA Hospital===&lt;br /&gt;
''The time you stay at the hospital before recovering or dying.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
As explained in the problem definition we will focused our results on 3 cases. &lt;br /&gt;
* The first one is the normal scenario, with classic lockdown and regular numbers of beds for Switzerland&lt;br /&gt;
* The second is the same scenario as for the 1st one but the lockdown is delayed by 1 day,&lt;br /&gt;
* The third scenario is the normal scenario with a number of hospital beds reduce by 10 000 beds.&lt;br /&gt;
&lt;br /&gt;
==Normal Scenario==&lt;br /&gt;
&lt;br /&gt;
The first scenario take place in Switzerland with 8 500 000 peoples and a hospital capacity of 356 beds for 100k people. The first case was detected the 25 february 2019 and 20 days after the Government of Switzerland have decided to take some serious measures that is in our case represented by a lockdown. &lt;br /&gt;
&lt;br /&gt;
The following table show us the official number of new cases per day:&lt;br /&gt;
&lt;br /&gt;
[[File:Newcases.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
From the simulation we get:&lt;br /&gt;
&lt;br /&gt;
[[File:Yes.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
We can see that the model is reality closed to the reality with a pic of 1350 after 35 days. The simulation stopped after 100 days so we just focused on these first 100 days. The reality display a pic at 1243 days after 30 days.&lt;br /&gt;
&lt;br /&gt;
The true number of new death per day, and the number from the simulation is also display below:&lt;br /&gt;
&lt;br /&gt;
[[File: deat.png|500px|left]]        [[File:Deats.18.png|500px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We can see that the model is one more time really closed to the reality with a pic of 43 deaths after 50 days, while the reality display a pic at 44 days after 36 days.&lt;br /&gt;
&lt;br /&gt;
We have seen that the simulation is really closed from the data obtained for the Switzerland, but now lets go trough some special cases to see the impact of some decisions on the variables.&lt;br /&gt;
&lt;br /&gt;
==Scenario 1: Late lockdown==&lt;br /&gt;
&lt;br /&gt;
In this scenario we will see what could have happened if the government take 1 more day to react and to set up the lockdown. To simulate such a scenario I simply increased the number of &amp;quot;Ratio official cases/pop&amp;quot; in the function IF THEN ELSE in &amp;quot;contact&amp;quot; and &amp;quot;contagion rate&amp;quot; from 0.00015 to 0.00018 and it delay the reaction of the government by 1 day.&lt;br /&gt;
&lt;br /&gt;
[[File: Deathz1.png|450px|left]][[File: Deathz2.png|500px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graph, the total number of official cases (=total diagnosed) jump from 33 000 to 45 000 cases. An increase of 35% in the number of official cases by just delaying for 1 day the government decisions. It illustrates well the exponential effect on the model, indeed we don't have to forget that the delay is just one day but if it has been 4-5 days the number of cases would have been exponentially higher. The second graph shows the deaths jumping from 1600 to 2300, that is due to increasing number of cases and the hospital capacity reaching more than 60% utilization. Indeed due to the lookup function if the hospital capacity exceed 60% the mortality increase in the hospital. This is a very interesting scenarios that shows quite well the importance of the early lockdown and highlight the most important point in our model, '''the reaction time'''.&lt;br /&gt;
&lt;br /&gt;
==Scenario 2: Small Hospital capacity==&lt;br /&gt;
&lt;br /&gt;
In this scenario the number of hospital beds goes from 356/100k people to 238/100k people, a loss of -10 000 in variable ''hospital bed'' for Switzerland. This number of beds corresponds to the number of beds for a less developing country, such as Iceland (https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704). &lt;br /&gt;
&lt;br /&gt;
[[File: Utiliz.png|500px|left]][[File: Dead.png|480px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graphs, the hospital utilization reach almost 80%. Patients are not treated as well as they would if the utilization was lower, and it involves more deaths for these patients (right graph). We can see the importance of hospital capacity and for government to have a '''good amount of hospitals'''.&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
To conclude I would say that it has been quite difficult to deal with the real data because I had to find every number or to adjust some variables to fit with the reality. Another difficulty that I had to faced was all times and units to setup. &lt;br /&gt;
&lt;br /&gt;
The model display almost the same numbers as the ones communicated by the Swiss government, what could indicate that the model are not too far from what is happening in real-life. &lt;br /&gt;
&lt;br /&gt;
The most important variable in the simulation is the '''reaction time''' of the government in order to take some measures against the fast spread of the virus, such as bringing more awareness or imposing a lockdown.&lt;br /&gt;
&lt;br /&gt;
A further exogenous variable here is the number of hospital beds, which is a good proxy for modeling different countries. Having a smaller number of beds is a sign of vulnerability for the health care system and will impact mortality. A solution to this pandemic could therefore be to increase the number of beds in order to avoid exceeding capacity. &lt;br /&gt;
&lt;br /&gt;
A limit to this simulation would be that it is a real pandemic, for example I first tried to simulate the full pandemic with the second pic (higher) as you can see in the graph of Switzerland but I have to admit that sometimes the reality (or my Vensim skills) are to difficult to simulate that is why I choose to stop the simulation after 100 days.&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
[[File:Simulation Covid-19.mdl]]&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
#Federal Office of Public Health FOPH, https://www.bag.admin.ch/bag/en/home.html&lt;br /&gt;
#Fismann, D. (2009), “Modellig an Influenza Pandemic: A Guide for the Perplexed”, CMAJ,August.&lt;br /&gt;
#Madhav, N. (2017), “Pandemics: Risks, Impacts, and Mitigation”, November.&lt;br /&gt;
#Federal Office of Public Health FOPH, https://www.bag.admin.ch/bag/en/home.html&lt;br /&gt;
#https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704&lt;br /&gt;
#https://www.covid19.admin.ch/en/epidemiologic/case?detTime=total&amp;amp;detRel=abs&lt;br /&gt;
#https://www.covid19.admin.ch/en/epidemiologic/death?detTime=total&amp;amp;detRel=abs&lt;/div&gt;</summary>
		<author><name>Toscool</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20316</id>
		<title>Impact of late lockdown and hospital capacity on 19-COVID spread</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20316"/>
		<updated>2021-01-08T10:38:41Z</updated>

		<summary type="html">&lt;p&gt;Toscool: /* Scenario 1: Late lockdown */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=Problem definition=&lt;br /&gt;
&lt;br /&gt;
The coronavirus pandemic is an ongoing pandemic, the first case confirmed in Switzerland  was on February 25th, 2020 and has known an exponential growth since. We know that the virus is spread from an infected person to a healthy one during close contact or via touching a contaminated surface. The aim of the simulation is to display the dynamics of the reaction time of the government to take measures and to see if the hospital capacity play a key role in the spread of the COVID-19&lt;br /&gt;
&lt;br /&gt;
=Method=&lt;br /&gt;
&lt;br /&gt;
Vensim modelling approach was selected due to dynamic behavior of the simulated system.&lt;br /&gt;
&lt;br /&gt;
the model shows the evolution of the number of people who got infected by the covid-19 virus in countries where the population have a high health care protection and where the government have decided to make a decision about the virus propagation. The model will explain how fast the virus spreads itself and how political decisions can change the number of infected people at a given point in time. The construction of the model is simple: at the beginning one person is infected and will, then, infect other people. When you are infected many possibilities are open:&lt;br /&gt;
* You can be a healthy virus carrier. In that case you will not know that you have the virus and after 19 days you will be recovered.&lt;br /&gt;
* After 5 days you get symptoms, but you do not have any important health problems, you will recover in the next 14 days.&lt;br /&gt;
* After 5 days, you get symptoms and you are very sick and have respiratory problems, after 3 more days, still feeling bad, you decide to go to the doctor to get a diagnosis. The doctor has than two options: to send you back home, where you will recover after 11 more days or hospitalized you the next day.&lt;br /&gt;
* The doctor had decided to hospitalize you, you then spend two weeks in intensive care, where you will need artificial ventilation and 24-hour nursing care. You can then recover or unfortunately die. &lt;br /&gt;
&lt;br /&gt;
The higher the hospital utilization, the greater the probability to die. Indeed, if hospitals get busier, the medical staff will be less available and health care quality might decrease. When the number of diagnosed and hospitalized people (which are the official number of cases) is greater than a certain percentage of the population, the government will take decisions to slow down the spread of the virus. This is to say that governments will take some measures, such as installing a forced lockdown of the population to decrease the number of contacts per habitant. Moreover, such a decision will have an impact on the population, which will be more aware of the situation and will be more careful to not spread or contract the virus. So, the contagion rate as the number of contacts per people will slow down. They will be less hospitalized people, that means less people in the hospital, meaning a better service and so less people who die.&lt;br /&gt;
&lt;br /&gt;
=Model=&lt;br /&gt;
&lt;br /&gt;
Following vensim model was developed based on the study.&lt;br /&gt;
&lt;br /&gt;
[[File:Model1.png|900px|thumb|center|COVID-19 pandemic in Switzerland Stock Flow Diagram]]&lt;br /&gt;
&lt;br /&gt;
== Variables ==&lt;br /&gt;
&lt;br /&gt;
===Initial population=== &lt;br /&gt;
''The Population of Switzerland can be found here: https://en.wikipedia.org/wiki/Demographics_of_Switzerland''&lt;br /&gt;
&lt;br /&gt;
=8 500 000&lt;br /&gt;
&lt;br /&gt;
===Ratio susceptible people=== &lt;br /&gt;
''Decrease the susceptible people by the number of deaths due to the COVID-19.''&lt;br /&gt;
&lt;br /&gt;
=Susceptible population / (Initial population-Dead)&lt;br /&gt;
&lt;br /&gt;
===Susceptible population=== &lt;br /&gt;
''Decrease the susceptible population by the number of new infections.''&lt;br /&gt;
&lt;br /&gt;
=-New infections&lt;br /&gt;
&lt;br /&gt;
===contact=== &lt;br /&gt;
'''Lockdown:''' ''Function IF THEN ELSE that bring the number of new people you meet (contact) from 5 to 0.05 if the ratio exceed 0.015%''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot;&amp;gt; 0.00015, 0.05 , 5 )&lt;br /&gt;
&lt;br /&gt;
===Contagion Rate=== &lt;br /&gt;
'''Lockdown:''' ''contagion rate: IF THEN ELSE that bring the contagion rate from 0.1 to 0.075 if the ratio exceed 0.015%. Function of the awareness in the population (washing more often their hands if lockdown)''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot; &amp;gt; 0.00015 , 0.075 , 0.1 )&lt;br /&gt;
&lt;br /&gt;
===New infections=== &lt;br /&gt;
''It represent the new number of people infected each day.''&lt;br /&gt;
&lt;br /&gt;
=contact*Infected*Ratio susceptible people*Contagion Rate&lt;br /&gt;
&lt;br /&gt;
===Infected=== &lt;br /&gt;
''It represent the stock of the new people infected. We start the model with 1 infected people.''&lt;br /&gt;
&lt;br /&gt;
=New infections-New recoveries from infected-New symptoms ///// Initial value: 1&lt;br /&gt;
&lt;br /&gt;
===New recoveries from infected===&lt;br /&gt;
''It represent the number of people without symptoms and they go in the recovered stock after 19 days.''&lt;br /&gt;
&lt;br /&gt;
=((1-Ratio Symptoms)*Infected)/TTA recoveries&lt;br /&gt;
&lt;br /&gt;
===New symptoms=== &lt;br /&gt;
''It represent the number of new people that develop symptoms during 5 days before going to the symptomatic stock.''&lt;br /&gt;
&lt;br /&gt;
=(Infected*Ratio Symptoms)/TTA Symptoms&lt;br /&gt;
&lt;br /&gt;
===Ratio Symptoms=== &lt;br /&gt;
''The ratio of people who develop some symptoms.''&lt;br /&gt;
&lt;br /&gt;
=0.2&lt;br /&gt;
&lt;br /&gt;
===Symptomatic=== &lt;br /&gt;
''The stock of people symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=New symptoms-New Diagnostic-New recoveries from symptoms&lt;br /&gt;
&lt;br /&gt;
===New recoveries from symptoms=== &lt;br /&gt;
''It represent the number of people that have symptoms but that were not to the doctor, after 14 they are in the recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Diagnost)*Symptomatic/TTA sympt&lt;br /&gt;
&lt;br /&gt;
===New Diagnostic=== &lt;br /&gt;
''It represent the number of new people that are diagnosed each day, they stay 3 days before having the diagnostic.''&lt;br /&gt;
&lt;br /&gt;
=Symptomatic*Ratio Diagnost/TTA Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Ratio Diagnost===&lt;br /&gt;
''the ratio of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=0.4&lt;br /&gt;
&lt;br /&gt;
===Diagnosed=== &lt;br /&gt;
''The stock of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic-New Hospitalization-New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===New Recovery from Diagnostic===&lt;br /&gt;
''It represent the number of people that are diagnosed and not sent to the hospital. they stay 11 days before going in the Recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Hospitalize)*Diagnosed/TTA diag&lt;br /&gt;
&lt;br /&gt;
===New Hospitalization=== &lt;br /&gt;
''It represent the number of people that are diagnosed and sent to the hospital. they stay 1 day before being sent.''&lt;br /&gt;
&lt;br /&gt;
=(Diagnosed*Ratio Hospitalize)/TTA Hospitalization Ratio Hospitalize&lt;br /&gt;
&lt;br /&gt;
===Ratio Hospitalize===&lt;br /&gt;
''The ratio of people that are Hospitalized.''&lt;br /&gt;
&lt;br /&gt;
=0.3&lt;br /&gt;
&lt;br /&gt;
===Hospitalized=== &lt;br /&gt;
''The stock of people that are hospitalized before being Recovered or Dead.''&lt;br /&gt;
&lt;br /&gt;
=New Hospitalization-New Death-New Recovery&lt;br /&gt;
&lt;br /&gt;
===New Recovery=== &lt;br /&gt;
''The number of people that recover each day from the hospitalization. It depends on the '''Taux Mortality''' which is depend from the '''hospital utilization''' (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=((1-Taux Mortality)*Hospitalized)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===New Death===&lt;br /&gt;
''The number of people that die each day from the hospitalization. It depends on the '''Taux Mortality''' which is depend from the '''hospital utilization''' (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized* Taux Mortality)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===hospital bed=== &lt;br /&gt;
''The number of bed in Switzerland is 356 beds for 100k people with 8.5M people it gives that number: https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704''&lt;br /&gt;
&lt;br /&gt;
=30260&lt;br /&gt;
&lt;br /&gt;
===hospital utilization=== &lt;br /&gt;
''For the utilization of the hospital I assumed that there is already 8260 beds used for regular patient (outside the covid pandemic). The more utilization we have, the greater the probability to die. Indeed, if hospitals get busier, the medical staff will be less available and health care quality might decrease.''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized/(hospital bed - 8260))&lt;br /&gt;
&lt;br /&gt;
===lookup mortality===&lt;br /&gt;
''The lookup function is used to described the taux mortality.''&lt;br /&gt;
&lt;br /&gt;
[(0,0)-(1000,0.3)],(0,0.065),(0.6,0.065),(0.8,0.12),(1,0.25),(1.2,0.3),(10,0.3),(1000,0.3)&lt;br /&gt;
&lt;br /&gt;
===Taux Mortality=== &lt;br /&gt;
''The mortality rate depends on the hospital utilization. For example based on the above function, if the capacity reach 100% the hospital is full and the chance to die is then 25%.''&lt;br /&gt;
&lt;br /&gt;
=lk mortality (hospital utilization)&lt;br /&gt;
&lt;br /&gt;
===Dead=== &lt;br /&gt;
''The stock of Dead people killed by the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New Death&lt;br /&gt;
&lt;br /&gt;
===Recovered=== &lt;br /&gt;
''The Total amount of people who recovered from the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New recoveries from infected+New recoveries from symptoms+New Recovery+New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===official active cases===&lt;br /&gt;
''It represent the number of people that were tested and it's this number that will be used by the government to follow the pandemic and take decision of lockdown.''&lt;br /&gt;
&lt;br /&gt;
=Diagnosed+Hosptitalized&lt;br /&gt;
&lt;br /&gt;
===Ratio official cases/pop=== &lt;br /&gt;
''The ratio that will be used for lockdown. ''&lt;br /&gt;
&lt;br /&gt;
=official active cases/ Initial population&lt;br /&gt;
&lt;br /&gt;
===New Diagnosed.1=== &lt;br /&gt;
''It's is just the same as New Diagnostic, it is used in the model to have the Total Diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Total Diagnosed=== &lt;br /&gt;
''Used in the model to have the official number of cases in the model.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnosed.1&lt;br /&gt;
&lt;br /&gt;
===TTA recoveries=== &lt;br /&gt;
''Time to recover after being infected and not having symptoms.''&lt;br /&gt;
&lt;br /&gt;
=19&lt;br /&gt;
&lt;br /&gt;
===TTA Symptoms=== &lt;br /&gt;
''The time you take to develop symptoms.''&lt;br /&gt;
&lt;br /&gt;
=5&lt;br /&gt;
&lt;br /&gt;
===TTA sympt===&lt;br /&gt;
''The time you take for recovering after being symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
===TTA Diagnostic=== &lt;br /&gt;
''Time to go to the doctor and have the result.''&lt;br /&gt;
&lt;br /&gt;
=3&lt;br /&gt;
&lt;br /&gt;
===TTA diag===&lt;br /&gt;
''The time you take for recovering after being diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=11&lt;br /&gt;
&lt;br /&gt;
===TTA Hospitalization=== &lt;br /&gt;
''Time to go to the Hospital.''&lt;br /&gt;
&lt;br /&gt;
=1&lt;br /&gt;
&lt;br /&gt;
===TTA Hospital===&lt;br /&gt;
''The time you stay at the hospital before recovering or dying.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
As explained in the problem definition we will focused our results on 3 cases. &lt;br /&gt;
* The first one is the normal scenario, with classic lockdown and regular numbers of beds for Switzerland&lt;br /&gt;
* The second is the same scenario as for the 1st one but the lockdown is delayed by 1 day,&lt;br /&gt;
* The third scenario is the normal scenario with a number of hospital beds reduce by 10 000 beds.&lt;br /&gt;
&lt;br /&gt;
==Normal Scenario==&lt;br /&gt;
&lt;br /&gt;
The first scenario take place in Switzerland with 8 500 000 peoples and a hospital capacity of 356 beds for 100k people. The first case was detected the 25 february 2019 and 20 days after the Government of Switzerland have decided to take some serious measures that is in our case represented by a lockdown. &lt;br /&gt;
&lt;br /&gt;
The following table show us the official number of new cases per day:&lt;br /&gt;
&lt;br /&gt;
[[File:Newcases.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
From the simulation we get:&lt;br /&gt;
&lt;br /&gt;
[[File:Yes.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
We can see that the model is reality closed to the reality with a pic of 1350 after 35 days. The simulation stopped after 100 days so we just focused on these first 100 days. The reality display a pic at 1243 days after 30 days.&lt;br /&gt;
&lt;br /&gt;
The true number of new death per day, and the number from the simulation is also display below:&lt;br /&gt;
&lt;br /&gt;
[[File: deat.png|500px|left]]        [[File:Deats.18.png|500px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We can see that the model is one more time really closed to the reality with a pic of 43 deaths after 50 days, while the reality display a pic at 44 days after 36 days.&lt;br /&gt;
&lt;br /&gt;
We have seen that the simulation is really closed from the data obtained for the Switzerland, but now lets go trough some special cases to see the impact of some decisions on the variables.&lt;br /&gt;
&lt;br /&gt;
==Scenario 1: Late lockdown==&lt;br /&gt;
&lt;br /&gt;
In this scenario we will see what could have happened if the government take 1 more day to react and to set up the lockdown. To simulate such a scenario I simply increased the number of &amp;quot;Ratio official cases/pop&amp;quot; in the function IF THEN ELSE in &amp;quot;contact&amp;quot; and &amp;quot;contagion rate&amp;quot; from 0.00015 to 0.00018 and it delay the reaction of the government by 1 day.&lt;br /&gt;
&lt;br /&gt;
[[File: Deathz1.png|450px|left]][[File: Deathz2.png|500px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graph, the total number of official cases (=total diagnosed) jump from 33 000 to 45 000 cases. An increase of 35% in the number of official cases by just delaying for 1 day the government decisions. It illustrates well the exponential effect on the model, indeed we don't have to forget that the delay is just one day but if it has been 4-5 days the number of cases would have been exponentially higher. The second graph shows the deaths jumping from 1600 to 2300, that is due to increasing number of cases and the hospital capacity reaching more than 60% utilization. Indeed due to the lookup function if the hospital capacity exceed 60% the mortality increase in the hospital. This is a very interesting scenarios that shows quite well the importance of the early lockdown and highlight the most important point in our model, '''the reaction time'''.&lt;br /&gt;
&lt;br /&gt;
==Scenario 2: Small Hospital capacity==&lt;br /&gt;
&lt;br /&gt;
In this scenario the number of hospital beds goes from 356/100k people to 238/100k people, a loss of -10 000 in variable ''hospital bed'' for Switzerland. This number of beds corresponds to the number of beds for a less developing country, such as Iceland (https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704). &lt;br /&gt;
&lt;br /&gt;
[[File: Utiliz.png|500px|left]][[File: Dead.png|480px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graphs, the hospital utilization reach almost 80%. Patients are not treated as well as they would if the utilization was lower, and it involves more deaths for these patients (right graph). We can see the importance of hospital capacity and for government to have a '''good amount of hospitals'''.&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
To conclude I would say that it has been quite difficult to deal with the real data because I had to find every number or to adjust some variables to fit with the reality. Another difficulty that I had to faced was all times and units to setup. The model display almost the same numbers as the ones communicated by the Swiss government, what could indicate that the model are not too far from what is happening in real-life. &lt;br /&gt;
&lt;br /&gt;
The most important variable in the simulation is the '''reaction time''' of the government in order to take some measures against the fast spread of the virus, such as bringing more awareness or imposing a lockdown.&lt;br /&gt;
&lt;br /&gt;
A further exogenous variable here is the number of hospital beds, which is a good proxy for modeling different countries. Having a smaller number of beds is a sign of vulnerability for the health care system and will impact mortality. A solution to this pandemic could therefore be to increase the number of beds in order to avoid exceeding capacity. &lt;br /&gt;
&lt;br /&gt;
A limit to this simulation would be that it is a real pandemic, for example I first tried to simulate the full pandemic with the second pic (higher) as you can see in the graph of Switzerland but I have to admit that sometimes the reality (or my Vensim skills) are to difficult to simulate that is why I choose to stop the simulation after 100 days.&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
[[File:Simulation Covid-19.mdl]]&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
#Federal Office of Public Health FOPH, https://www.bag.admin.ch/bag/en/home.html&lt;br /&gt;
#Fismann, D. (2009), “Modellig an Influenza Pandemic: A Guide for the Perplexed”, CMAJ,August.&lt;br /&gt;
#Madhav, N. (2017), “Pandemics: Risks, Impacts, and Mitigation”, November.&lt;br /&gt;
#Federal Office of Public Health FOPH, https://www.bag.admin.ch/bag/en/home.html&lt;br /&gt;
#https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704&lt;br /&gt;
#https://www.covid19.admin.ch/en/epidemiologic/case?detTime=total&amp;amp;detRel=abs&lt;br /&gt;
#https://www.covid19.admin.ch/en/epidemiologic/death?detTime=total&amp;amp;detRel=abs&lt;/div&gt;</summary>
		<author><name>Toscool</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20315</id>
		<title>Impact of late lockdown and hospital capacity on 19-COVID spread</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20315"/>
		<updated>2021-01-08T10:37:16Z</updated>

		<summary type="html">&lt;p&gt;Toscool: /* Scenario 1: Late lockdown */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=Problem definition=&lt;br /&gt;
&lt;br /&gt;
The coronavirus pandemic is an ongoing pandemic, the first case confirmed in Switzerland  was on February 25th, 2020 and has known an exponential growth since. We know that the virus is spread from an infected person to a healthy one during close contact or via touching a contaminated surface. The aim of the simulation is to display the dynamics of the reaction time of the government to take measures and to see if the hospital capacity play a key role in the spread of the COVID-19&lt;br /&gt;
&lt;br /&gt;
=Method=&lt;br /&gt;
&lt;br /&gt;
Vensim modelling approach was selected due to dynamic behavior of the simulated system.&lt;br /&gt;
&lt;br /&gt;
the model shows the evolution of the number of people who got infected by the covid-19 virus in countries where the population have a high health care protection and where the government have decided to make a decision about the virus propagation. The model will explain how fast the virus spreads itself and how political decisions can change the number of infected people at a given point in time. The construction of the model is simple: at the beginning one person is infected and will, then, infect other people. When you are infected many possibilities are open:&lt;br /&gt;
* You can be a healthy virus carrier. In that case you will not know that you have the virus and after 19 days you will be recovered.&lt;br /&gt;
* After 5 days you get symptoms, but you do not have any important health problems, you will recover in the next 14 days.&lt;br /&gt;
* After 5 days, you get symptoms and you are very sick and have respiratory problems, after 3 more days, still feeling bad, you decide to go to the doctor to get a diagnosis. The doctor has than two options: to send you back home, where you will recover after 11 more days or hospitalized you the next day.&lt;br /&gt;
* The doctor had decided to hospitalize you, you then spend two weeks in intensive care, where you will need artificial ventilation and 24-hour nursing care. You can then recover or unfortunately die. &lt;br /&gt;
&lt;br /&gt;
The higher the hospital utilization, the greater the probability to die. Indeed, if hospitals get busier, the medical staff will be less available and health care quality might decrease. When the number of diagnosed and hospitalized people (which are the official number of cases) is greater than a certain percentage of the population, the government will take decisions to slow down the spread of the virus. This is to say that governments will take some measures, such as installing a forced lockdown of the population to decrease the number of contacts per habitant. Moreover, such a decision will have an impact on the population, which will be more aware of the situation and will be more careful to not spread or contract the virus. So, the contagion rate as the number of contacts per people will slow down. They will be less hospitalized people, that means less people in the hospital, meaning a better service and so less people who die.&lt;br /&gt;
&lt;br /&gt;
=Model=&lt;br /&gt;
&lt;br /&gt;
Following vensim model was developed based on the study.&lt;br /&gt;
&lt;br /&gt;
[[File:Model1.png|900px|thumb|center|COVID-19 pandemic in Switzerland Stock Flow Diagram]]&lt;br /&gt;
&lt;br /&gt;
== Variables ==&lt;br /&gt;
&lt;br /&gt;
===Initial population=== &lt;br /&gt;
''The Population of Switzerland can be found here: https://en.wikipedia.org/wiki/Demographics_of_Switzerland''&lt;br /&gt;
&lt;br /&gt;
=8 500 000&lt;br /&gt;
&lt;br /&gt;
===Ratio susceptible people=== &lt;br /&gt;
''Decrease the susceptible people by the number of deaths due to the COVID-19.''&lt;br /&gt;
&lt;br /&gt;
=Susceptible population / (Initial population-Dead)&lt;br /&gt;
&lt;br /&gt;
===Susceptible population=== &lt;br /&gt;
''Decrease the susceptible population by the number of new infections.''&lt;br /&gt;
&lt;br /&gt;
=-New infections&lt;br /&gt;
&lt;br /&gt;
===contact=== &lt;br /&gt;
'''Lockdown:''' ''Function IF THEN ELSE that bring the number of new people you meet (contact) from 5 to 0.05 if the ratio exceed 0.015%''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot;&amp;gt; 0.00015, 0.05 , 5 )&lt;br /&gt;
&lt;br /&gt;
===Contagion Rate=== &lt;br /&gt;
'''Lockdown:''' ''contagion rate: IF THEN ELSE that bring the contagion rate from 0.1 to 0.075 if the ratio exceed 0.015%. Function of the awareness in the population (washing more often their hands if lockdown)''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot; &amp;gt; 0.00015 , 0.075 , 0.1 )&lt;br /&gt;
&lt;br /&gt;
===New infections=== &lt;br /&gt;
''It represent the new number of people infected each day.''&lt;br /&gt;
&lt;br /&gt;
=contact*Infected*Ratio susceptible people*Contagion Rate&lt;br /&gt;
&lt;br /&gt;
===Infected=== &lt;br /&gt;
''It represent the stock of the new people infected. We start the model with 1 infected people.''&lt;br /&gt;
&lt;br /&gt;
=New infections-New recoveries from infected-New symptoms ///// Initial value: 1&lt;br /&gt;
&lt;br /&gt;
===New recoveries from infected===&lt;br /&gt;
''It represent the number of people without symptoms and they go in the recovered stock after 19 days.''&lt;br /&gt;
&lt;br /&gt;
=((1-Ratio Symptoms)*Infected)/TTA recoveries&lt;br /&gt;
&lt;br /&gt;
===New symptoms=== &lt;br /&gt;
''It represent the number of new people that develop symptoms during 5 days before going to the symptomatic stock.''&lt;br /&gt;
&lt;br /&gt;
=(Infected*Ratio Symptoms)/TTA Symptoms&lt;br /&gt;
&lt;br /&gt;
===Ratio Symptoms=== &lt;br /&gt;
''The ratio of people who develop some symptoms.''&lt;br /&gt;
&lt;br /&gt;
=0.2&lt;br /&gt;
&lt;br /&gt;
===Symptomatic=== &lt;br /&gt;
''The stock of people symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=New symptoms-New Diagnostic-New recoveries from symptoms&lt;br /&gt;
&lt;br /&gt;
===New recoveries from symptoms=== &lt;br /&gt;
''It represent the number of people that have symptoms but that were not to the doctor, after 14 they are in the recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Diagnost)*Symptomatic/TTA sympt&lt;br /&gt;
&lt;br /&gt;
===New Diagnostic=== &lt;br /&gt;
''It represent the number of new people that are diagnosed each day, they stay 3 days before having the diagnostic.''&lt;br /&gt;
&lt;br /&gt;
=Symptomatic*Ratio Diagnost/TTA Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Ratio Diagnost===&lt;br /&gt;
''the ratio of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=0.4&lt;br /&gt;
&lt;br /&gt;
===Diagnosed=== &lt;br /&gt;
''The stock of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic-New Hospitalization-New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===New Recovery from Diagnostic===&lt;br /&gt;
''It represent the number of people that are diagnosed and not sent to the hospital. they stay 11 days before going in the Recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Hospitalize)*Diagnosed/TTA diag&lt;br /&gt;
&lt;br /&gt;
===New Hospitalization=== &lt;br /&gt;
''It represent the number of people that are diagnosed and sent to the hospital. they stay 1 day before being sent.''&lt;br /&gt;
&lt;br /&gt;
=(Diagnosed*Ratio Hospitalize)/TTA Hospitalization Ratio Hospitalize&lt;br /&gt;
&lt;br /&gt;
===Ratio Hospitalize===&lt;br /&gt;
''The ratio of people that are Hospitalized.''&lt;br /&gt;
&lt;br /&gt;
=0.3&lt;br /&gt;
&lt;br /&gt;
===Hospitalized=== &lt;br /&gt;
''The stock of people that are hospitalized before being Recovered or Dead.''&lt;br /&gt;
&lt;br /&gt;
=New Hospitalization-New Death-New Recovery&lt;br /&gt;
&lt;br /&gt;
===New Recovery=== &lt;br /&gt;
''The number of people that recover each day from the hospitalization. It depends on the '''Taux Mortality''' which is depend from the '''hospital utilization''' (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=((1-Taux Mortality)*Hospitalized)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===New Death===&lt;br /&gt;
''The number of people that die each day from the hospitalization. It depends on the '''Taux Mortality''' which is depend from the '''hospital utilization''' (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized* Taux Mortality)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===hospital bed=== &lt;br /&gt;
''The number of bed in Switzerland is 356 beds for 100k people with 8.5M people it gives that number: https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704''&lt;br /&gt;
&lt;br /&gt;
=30260&lt;br /&gt;
&lt;br /&gt;
===hospital utilization=== &lt;br /&gt;
''For the utilization of the hospital I assumed that there is already 8260 beds used for regular patient (outside the covid pandemic). The more utilization we have, the greater the probability to die. Indeed, if hospitals get busier, the medical staff will be less available and health care quality might decrease.''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized/(hospital bed - 8260))&lt;br /&gt;
&lt;br /&gt;
===lookup mortality===&lt;br /&gt;
''The lookup function is used to described the taux mortality.''&lt;br /&gt;
&lt;br /&gt;
[(0,0)-(1000,0.3)],(0,0.065),(0.6,0.065),(0.8,0.12),(1,0.25),(1.2,0.3),(10,0.3),(1000,0.3)&lt;br /&gt;
&lt;br /&gt;
===Taux Mortality=== &lt;br /&gt;
''The mortality rate depends on the hospital utilization. For example based on the above function, if the capacity reach 100% the hospital is full and the chance to die is then 25%.''&lt;br /&gt;
&lt;br /&gt;
=lk mortality (hospital utilization)&lt;br /&gt;
&lt;br /&gt;
===Dead=== &lt;br /&gt;
''The stock of Dead people killed by the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New Death&lt;br /&gt;
&lt;br /&gt;
===Recovered=== &lt;br /&gt;
''The Total amount of people who recovered from the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New recoveries from infected+New recoveries from symptoms+New Recovery+New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===official active cases===&lt;br /&gt;
''It represent the number of people that were tested and it's this number that will be used by the government to follow the pandemic and take decision of lockdown.''&lt;br /&gt;
&lt;br /&gt;
=Diagnosed+Hosptitalized&lt;br /&gt;
&lt;br /&gt;
===Ratio official cases/pop=== &lt;br /&gt;
''The ratio that will be used for lockdown. ''&lt;br /&gt;
&lt;br /&gt;
=official active cases/ Initial population&lt;br /&gt;
&lt;br /&gt;
===New Diagnosed.1=== &lt;br /&gt;
''It's is just the same as New Diagnostic, it is used in the model to have the Total Diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Total Diagnosed=== &lt;br /&gt;
''Used in the model to have the official number of cases in the model.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnosed.1&lt;br /&gt;
&lt;br /&gt;
===TTA recoveries=== &lt;br /&gt;
''Time to recover after being infected and not having symptoms.''&lt;br /&gt;
&lt;br /&gt;
=19&lt;br /&gt;
&lt;br /&gt;
===TTA Symptoms=== &lt;br /&gt;
''The time you take to develop symptoms.''&lt;br /&gt;
&lt;br /&gt;
=5&lt;br /&gt;
&lt;br /&gt;
===TTA sympt===&lt;br /&gt;
''The time you take for recovering after being symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
===TTA Diagnostic=== &lt;br /&gt;
''Time to go to the doctor and have the result.''&lt;br /&gt;
&lt;br /&gt;
=3&lt;br /&gt;
&lt;br /&gt;
===TTA diag===&lt;br /&gt;
''The time you take for recovering after being diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=11&lt;br /&gt;
&lt;br /&gt;
===TTA Hospitalization=== &lt;br /&gt;
''Time to go to the Hospital.''&lt;br /&gt;
&lt;br /&gt;
=1&lt;br /&gt;
&lt;br /&gt;
===TTA Hospital===&lt;br /&gt;
''The time you stay at the hospital before recovering or dying.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
As explained in the problem definition we will focused our results on 3 cases. &lt;br /&gt;
* The first one is the normal scenario, with classic lockdown and regular numbers of beds for Switzerland&lt;br /&gt;
* The second is the same scenario as for the 1st one but the lockdown is delayed by 1 day,&lt;br /&gt;
* The third scenario is the normal scenario with a number of hospital beds reduce by 10 000 beds.&lt;br /&gt;
&lt;br /&gt;
==Normal Scenario==&lt;br /&gt;
&lt;br /&gt;
The first scenario take place in Switzerland with 8 500 000 peoples and a hospital capacity of 356 beds for 100k people. The first case was detected the 25 february 2019 and 20 days after the Government of Switzerland have decided to take some serious measures that is in our case represented by a lockdown. &lt;br /&gt;
&lt;br /&gt;
The following table show us the official number of new cases per day:&lt;br /&gt;
&lt;br /&gt;
[[File:Newcases.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
From the simulation we get:&lt;br /&gt;
&lt;br /&gt;
[[File:Yes.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
We can see that the model is reality closed to the reality with a pic of 1350 after 35 days. The simulation stopped after 100 days so we just focused on these first 100 days. The reality display a pic at 1243 days after 30 days.&lt;br /&gt;
&lt;br /&gt;
The true number of new death per day, and the number from the simulation is also display below:&lt;br /&gt;
&lt;br /&gt;
[[File: deat.png|500px|left]]        [[File:Deats.18.png|500px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We can see that the model is one more time really closed to the reality with a pic of 43 deaths after 50 days, while the reality display a pic at 44 days after 36 days.&lt;br /&gt;
&lt;br /&gt;
We have seen that the simulation is really closed from the data obtained for the Switzerland, but now lets go trough some special cases to see the impact of some decisions on the variables.&lt;br /&gt;
&lt;br /&gt;
==Scenario 1: Late lockdown==&lt;br /&gt;
&lt;br /&gt;
In this scenario we will see what could have happened if the government take 1 more day to react and to set up the lockdown. To simulate such a scenario I simply increased the number of &amp;quot;Ratio official cases/pop&amp;quot; in the function IF THEN ELSE in &amp;quot;contact&amp;quot; and &amp;quot;contagion rate&amp;quot; from 0.00015 to 0.00018 and it delay the reaction of the government by 1 day.&lt;br /&gt;
&lt;br /&gt;
[[File: Deathz1.png|450px|left]][[File: Deathz2.png|500px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graph, the total number of official cases (=total diagnosed) jump from 33 000 to 45 000 cases. An increase of 35% in the number of official cases by just delaying for 1 day the government decisions. It illustrates well the exponential effect on the model, indeed we don't have to forget that the delay is just one day but if it has been 4-5 days the number of cases would have been exponentially higher. The second graph shows the deaths jump from 1600 to 2300, that is due to increasing number of cases and the hospital capacity reaching more than 60% utilization. Indeed due to the lookup function if the hospital capacity exceed 60% the mortality increase in the hospital. This is a very interesting scenarios that shows quite well the importance of the early lockdown and highlight the most important point in our model, '''the reaction time'''.&lt;br /&gt;
&lt;br /&gt;
==Scenario 2: Small Hospital capacity==&lt;br /&gt;
&lt;br /&gt;
In this scenario the number of hospital beds goes from 356/100k people to 238/100k people, a loss of -10 000 in variable ''hospital bed'' for Switzerland. This number of beds corresponds to the number of beds for a less developing country, such as Iceland (https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704). &lt;br /&gt;
&lt;br /&gt;
[[File: Utiliz.png|500px|left]][[File: Dead.png|480px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graphs, the hospital utilization reach almost 80%. Patients are not treated as well as they would if the utilization was lower, and it involves more deaths for these patients (right graph). We can see the importance of hospital capacity and for government to have a '''good amount of hospitals'''.&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
To conclude I would say that it has been quite difficult to deal with the real data because I had to find every number or to adjust some variables to fit with the reality. Another difficulty that I had to faced was all times and units to setup. The model display almost the same numbers as the ones communicated by the Swiss government, what could indicate that the model are not too far from what is happening in real-life. &lt;br /&gt;
&lt;br /&gt;
The most important variable in the simulation is the '''reaction time''' of the government in order to take some measures against the fast spread of the virus, such as bringing more awareness or imposing a lockdown.&lt;br /&gt;
&lt;br /&gt;
A further exogenous variable here is the number of hospital beds, which is a good proxy for modeling different countries. Having a smaller number of beds is a sign of vulnerability for the health care system and will impact mortality. A solution to this pandemic could therefore be to increase the number of beds in order to avoid exceeding capacity. &lt;br /&gt;
&lt;br /&gt;
A limit to this simulation would be that it is a real pandemic, for example I first tried to simulate the full pandemic with the second pic (higher) as you can see in the graph of Switzerland but I have to admit that sometimes the reality (or my Vensim skills) are to difficult to simulate that is why I choose to stop the simulation after 100 days.&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
[[File:Simulation Covid-19.mdl]]&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
#Federal Office of Public Health FOPH, https://www.bag.admin.ch/bag/en/home.html&lt;br /&gt;
#Fismann, D. (2009), “Modellig an Influenza Pandemic: A Guide for the Perplexed”, CMAJ,August.&lt;br /&gt;
#Madhav, N. (2017), “Pandemics: Risks, Impacts, and Mitigation”, November.&lt;br /&gt;
#Federal Office of Public Health FOPH, https://www.bag.admin.ch/bag/en/home.html&lt;br /&gt;
#https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704&lt;br /&gt;
#https://www.covid19.admin.ch/en/epidemiologic/case?detTime=total&amp;amp;detRel=abs&lt;br /&gt;
#https://www.covid19.admin.ch/en/epidemiologic/death?detTime=total&amp;amp;detRel=abs&lt;/div&gt;</summary>
		<author><name>Toscool</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20314</id>
		<title>Impact of late lockdown and hospital capacity on 19-COVID spread</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20314"/>
		<updated>2021-01-08T10:36:28Z</updated>

		<summary type="html">&lt;p&gt;Toscool: /* Normal Scenario */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=Problem definition=&lt;br /&gt;
&lt;br /&gt;
The coronavirus pandemic is an ongoing pandemic, the first case confirmed in Switzerland  was on February 25th, 2020 and has known an exponential growth since. We know that the virus is spread from an infected person to a healthy one during close contact or via touching a contaminated surface. The aim of the simulation is to display the dynamics of the reaction time of the government to take measures and to see if the hospital capacity play a key role in the spread of the COVID-19&lt;br /&gt;
&lt;br /&gt;
=Method=&lt;br /&gt;
&lt;br /&gt;
Vensim modelling approach was selected due to dynamic behavior of the simulated system.&lt;br /&gt;
&lt;br /&gt;
the model shows the evolution of the number of people who got infected by the covid-19 virus in countries where the population have a high health care protection and where the government have decided to make a decision about the virus propagation. The model will explain how fast the virus spreads itself and how political decisions can change the number of infected people at a given point in time. The construction of the model is simple: at the beginning one person is infected and will, then, infect other people. When you are infected many possibilities are open:&lt;br /&gt;
* You can be a healthy virus carrier. In that case you will not know that you have the virus and after 19 days you will be recovered.&lt;br /&gt;
* After 5 days you get symptoms, but you do not have any important health problems, you will recover in the next 14 days.&lt;br /&gt;
* After 5 days, you get symptoms and you are very sick and have respiratory problems, after 3 more days, still feeling bad, you decide to go to the doctor to get a diagnosis. The doctor has than two options: to send you back home, where you will recover after 11 more days or hospitalized you the next day.&lt;br /&gt;
* The doctor had decided to hospitalize you, you then spend two weeks in intensive care, where you will need artificial ventilation and 24-hour nursing care. You can then recover or unfortunately die. &lt;br /&gt;
&lt;br /&gt;
The higher the hospital utilization, the greater the probability to die. Indeed, if hospitals get busier, the medical staff will be less available and health care quality might decrease. When the number of diagnosed and hospitalized people (which are the official number of cases) is greater than a certain percentage of the population, the government will take decisions to slow down the spread of the virus. This is to say that governments will take some measures, such as installing a forced lockdown of the population to decrease the number of contacts per habitant. Moreover, such a decision will have an impact on the population, which will be more aware of the situation and will be more careful to not spread or contract the virus. So, the contagion rate as the number of contacts per people will slow down. They will be less hospitalized people, that means less people in the hospital, meaning a better service and so less people who die.&lt;br /&gt;
&lt;br /&gt;
=Model=&lt;br /&gt;
&lt;br /&gt;
Following vensim model was developed based on the study.&lt;br /&gt;
&lt;br /&gt;
[[File:Model1.png|900px|thumb|center|COVID-19 pandemic in Switzerland Stock Flow Diagram]]&lt;br /&gt;
&lt;br /&gt;
== Variables ==&lt;br /&gt;
&lt;br /&gt;
===Initial population=== &lt;br /&gt;
''The Population of Switzerland can be found here: https://en.wikipedia.org/wiki/Demographics_of_Switzerland''&lt;br /&gt;
&lt;br /&gt;
=8 500 000&lt;br /&gt;
&lt;br /&gt;
===Ratio susceptible people=== &lt;br /&gt;
''Decrease the susceptible people by the number of deaths due to the COVID-19.''&lt;br /&gt;
&lt;br /&gt;
=Susceptible population / (Initial population-Dead)&lt;br /&gt;
&lt;br /&gt;
===Susceptible population=== &lt;br /&gt;
''Decrease the susceptible population by the number of new infections.''&lt;br /&gt;
&lt;br /&gt;
=-New infections&lt;br /&gt;
&lt;br /&gt;
===contact=== &lt;br /&gt;
'''Lockdown:''' ''Function IF THEN ELSE that bring the number of new people you meet (contact) from 5 to 0.05 if the ratio exceed 0.015%''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot;&amp;gt; 0.00015, 0.05 , 5 )&lt;br /&gt;
&lt;br /&gt;
===Contagion Rate=== &lt;br /&gt;
'''Lockdown:''' ''contagion rate: IF THEN ELSE that bring the contagion rate from 0.1 to 0.075 if the ratio exceed 0.015%. Function of the awareness in the population (washing more often their hands if lockdown)''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot; &amp;gt; 0.00015 , 0.075 , 0.1 )&lt;br /&gt;
&lt;br /&gt;
===New infections=== &lt;br /&gt;
''It represent the new number of people infected each day.''&lt;br /&gt;
&lt;br /&gt;
=contact*Infected*Ratio susceptible people*Contagion Rate&lt;br /&gt;
&lt;br /&gt;
===Infected=== &lt;br /&gt;
''It represent the stock of the new people infected. We start the model with 1 infected people.''&lt;br /&gt;
&lt;br /&gt;
=New infections-New recoveries from infected-New symptoms ///// Initial value: 1&lt;br /&gt;
&lt;br /&gt;
===New recoveries from infected===&lt;br /&gt;
''It represent the number of people without symptoms and they go in the recovered stock after 19 days.''&lt;br /&gt;
&lt;br /&gt;
=((1-Ratio Symptoms)*Infected)/TTA recoveries&lt;br /&gt;
&lt;br /&gt;
===New symptoms=== &lt;br /&gt;
''It represent the number of new people that develop symptoms during 5 days before going to the symptomatic stock.''&lt;br /&gt;
&lt;br /&gt;
=(Infected*Ratio Symptoms)/TTA Symptoms&lt;br /&gt;
&lt;br /&gt;
===Ratio Symptoms=== &lt;br /&gt;
''The ratio of people who develop some symptoms.''&lt;br /&gt;
&lt;br /&gt;
=0.2&lt;br /&gt;
&lt;br /&gt;
===Symptomatic=== &lt;br /&gt;
''The stock of people symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=New symptoms-New Diagnostic-New recoveries from symptoms&lt;br /&gt;
&lt;br /&gt;
===New recoveries from symptoms=== &lt;br /&gt;
''It represent the number of people that have symptoms but that were not to the doctor, after 14 they are in the recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Diagnost)*Symptomatic/TTA sympt&lt;br /&gt;
&lt;br /&gt;
===New Diagnostic=== &lt;br /&gt;
''It represent the number of new people that are diagnosed each day, they stay 3 days before having the diagnostic.''&lt;br /&gt;
&lt;br /&gt;
=Symptomatic*Ratio Diagnost/TTA Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Ratio Diagnost===&lt;br /&gt;
''the ratio of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=0.4&lt;br /&gt;
&lt;br /&gt;
===Diagnosed=== &lt;br /&gt;
''The stock of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic-New Hospitalization-New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===New Recovery from Diagnostic===&lt;br /&gt;
''It represent the number of people that are diagnosed and not sent to the hospital. they stay 11 days before going in the Recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Hospitalize)*Diagnosed/TTA diag&lt;br /&gt;
&lt;br /&gt;
===New Hospitalization=== &lt;br /&gt;
''It represent the number of people that are diagnosed and sent to the hospital. they stay 1 day before being sent.''&lt;br /&gt;
&lt;br /&gt;
=(Diagnosed*Ratio Hospitalize)/TTA Hospitalization Ratio Hospitalize&lt;br /&gt;
&lt;br /&gt;
===Ratio Hospitalize===&lt;br /&gt;
''The ratio of people that are Hospitalized.''&lt;br /&gt;
&lt;br /&gt;
=0.3&lt;br /&gt;
&lt;br /&gt;
===Hospitalized=== &lt;br /&gt;
''The stock of people that are hospitalized before being Recovered or Dead.''&lt;br /&gt;
&lt;br /&gt;
=New Hospitalization-New Death-New Recovery&lt;br /&gt;
&lt;br /&gt;
===New Recovery=== &lt;br /&gt;
''The number of people that recover each day from the hospitalization. It depends on the '''Taux Mortality''' which is depend from the '''hospital utilization''' (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=((1-Taux Mortality)*Hospitalized)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===New Death===&lt;br /&gt;
''The number of people that die each day from the hospitalization. It depends on the '''Taux Mortality''' which is depend from the '''hospital utilization''' (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized* Taux Mortality)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===hospital bed=== &lt;br /&gt;
''The number of bed in Switzerland is 356 beds for 100k people with 8.5M people it gives that number: https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704''&lt;br /&gt;
&lt;br /&gt;
=30260&lt;br /&gt;
&lt;br /&gt;
===hospital utilization=== &lt;br /&gt;
''For the utilization of the hospital I assumed that there is already 8260 beds used for regular patient (outside the covid pandemic). The more utilization we have, the greater the probability to die. Indeed, if hospitals get busier, the medical staff will be less available and health care quality might decrease.''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized/(hospital bed - 8260))&lt;br /&gt;
&lt;br /&gt;
===lookup mortality===&lt;br /&gt;
''The lookup function is used to described the taux mortality.''&lt;br /&gt;
&lt;br /&gt;
[(0,0)-(1000,0.3)],(0,0.065),(0.6,0.065),(0.8,0.12),(1,0.25),(1.2,0.3),(10,0.3),(1000,0.3)&lt;br /&gt;
&lt;br /&gt;
===Taux Mortality=== &lt;br /&gt;
''The mortality rate depends on the hospital utilization. For example based on the above function, if the capacity reach 100% the hospital is full and the chance to die is then 25%.''&lt;br /&gt;
&lt;br /&gt;
=lk mortality (hospital utilization)&lt;br /&gt;
&lt;br /&gt;
===Dead=== &lt;br /&gt;
''The stock of Dead people killed by the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New Death&lt;br /&gt;
&lt;br /&gt;
===Recovered=== &lt;br /&gt;
''The Total amount of people who recovered from the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New recoveries from infected+New recoveries from symptoms+New Recovery+New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===official active cases===&lt;br /&gt;
''It represent the number of people that were tested and it's this number that will be used by the government to follow the pandemic and take decision of lockdown.''&lt;br /&gt;
&lt;br /&gt;
=Diagnosed+Hosptitalized&lt;br /&gt;
&lt;br /&gt;
===Ratio official cases/pop=== &lt;br /&gt;
''The ratio that will be used for lockdown. ''&lt;br /&gt;
&lt;br /&gt;
=official active cases/ Initial population&lt;br /&gt;
&lt;br /&gt;
===New Diagnosed.1=== &lt;br /&gt;
''It's is just the same as New Diagnostic, it is used in the model to have the Total Diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Total Diagnosed=== &lt;br /&gt;
''Used in the model to have the official number of cases in the model.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnosed.1&lt;br /&gt;
&lt;br /&gt;
===TTA recoveries=== &lt;br /&gt;
''Time to recover after being infected and not having symptoms.''&lt;br /&gt;
&lt;br /&gt;
=19&lt;br /&gt;
&lt;br /&gt;
===TTA Symptoms=== &lt;br /&gt;
''The time you take to develop symptoms.''&lt;br /&gt;
&lt;br /&gt;
=5&lt;br /&gt;
&lt;br /&gt;
===TTA sympt===&lt;br /&gt;
''The time you take for recovering after being symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
===TTA Diagnostic=== &lt;br /&gt;
''Time to go to the doctor and have the result.''&lt;br /&gt;
&lt;br /&gt;
=3&lt;br /&gt;
&lt;br /&gt;
===TTA diag===&lt;br /&gt;
''The time you take for recovering after being diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=11&lt;br /&gt;
&lt;br /&gt;
===TTA Hospitalization=== &lt;br /&gt;
''Time to go to the Hospital.''&lt;br /&gt;
&lt;br /&gt;
=1&lt;br /&gt;
&lt;br /&gt;
===TTA Hospital===&lt;br /&gt;
''The time you stay at the hospital before recovering or dying.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
As explained in the problem definition we will focused our results on 3 cases. &lt;br /&gt;
* The first one is the normal scenario, with classic lockdown and regular numbers of beds for Switzerland&lt;br /&gt;
* The second is the same scenario as for the 1st one but the lockdown is delayed by 1 day,&lt;br /&gt;
* The third scenario is the normal scenario with a number of hospital beds reduce by 10 000 beds.&lt;br /&gt;
&lt;br /&gt;
==Normal Scenario==&lt;br /&gt;
&lt;br /&gt;
The first scenario take place in Switzerland with 8 500 000 peoples and a hospital capacity of 356 beds for 100k people. The first case was detected the 25 february 2019 and 20 days after the Government of Switzerland have decided to take some serious measures that is in our case represented by a lockdown. &lt;br /&gt;
&lt;br /&gt;
The following table show us the official number of new cases per day:&lt;br /&gt;
&lt;br /&gt;
[[File:Newcases.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
From the simulation we get:&lt;br /&gt;
&lt;br /&gt;
[[File:Yes.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
We can see that the model is reality closed to the reality with a pic of 1350 after 35 days. The simulation stopped after 100 days so we just focused on these first 100 days. The reality display a pic at 1243 days after 30 days.&lt;br /&gt;
&lt;br /&gt;
The true number of new death per day, and the number from the simulation is also display below:&lt;br /&gt;
&lt;br /&gt;
[[File: deat.png|500px|left]]        [[File:Deats.18.png|500px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We can see that the model is one more time really closed to the reality with a pic of 43 deaths after 50 days, while the reality display a pic at 44 days after 36 days.&lt;br /&gt;
&lt;br /&gt;
We have seen that the simulation is really closed from the data obtained for the Switzerland, but now lets go trough some special cases to see the impact of some decisions on the variables.&lt;br /&gt;
&lt;br /&gt;
==Scenario 1: Late lockdown==&lt;br /&gt;
&lt;br /&gt;
In this scenario we will see what could have happened if the government take 1 more day to react and to set up the lockdown. To simulate such a scenario I simply increase the number of &amp;quot;Ratio official cases/pop&amp;quot; in the function IF THEN ELSE in &amp;quot;contact&amp;quot; and &amp;quot;contagion rate&amp;quot; from 0.00015 to 0.00018 and it delay the reaction of the government for 1 day.&lt;br /&gt;
&lt;br /&gt;
[[File: Deathz1.png|450px|left]][[File: Deathz2.png|500px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graph, the total number of official cases (=total diagnosed) jump from 33 000 to 45 000 cases. An increase of 35% in the number of official cases by just delaying for 1 day the government decisions. It illustrates well the exponential effect on the model, indeed we don't have to forget that the delay is just one day but if it has been 4-5 days the number of cases would have been exponentially higher. The second graph shows the deaths jump from 1600 to 2300, that is due to increasing number of cases and the hospital capacity reaching more than 60% utilization. Indeed due to the lookup function if the hospital capacity exceed 60% the mortality increase in the hospital. This is a very interesting scenarios that shows quite well the importance of the early lockdown and highlight the most important point in our model, '''the reaction time'''.&lt;br /&gt;
&lt;br /&gt;
==Scenario 2: Small Hospital capacity==&lt;br /&gt;
&lt;br /&gt;
In this scenario the number of hospital beds goes from 356/100k people to 238/100k people, a loss of -10 000 in variable ''hospital bed'' for Switzerland. This number of beds corresponds to the number of beds for a less developing country, such as Iceland (https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704). &lt;br /&gt;
&lt;br /&gt;
[[File: Utiliz.png|500px|left]][[File: Dead.png|480px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graphs, the hospital utilization reach almost 80%. Patients are not treated as well as they would if the utilization was lower, and it involves more deaths for these patients (right graph). We can see the importance of hospital capacity and for government to have a '''good amount of hospitals'''.&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
To conclude I would say that it has been quite difficult to deal with the real data because I had to find every number or to adjust some variables to fit with the reality. Another difficulty that I had to faced was all times and units to setup. The model display almost the same numbers as the ones communicated by the Swiss government, what could indicate that the model are not too far from what is happening in real-life. &lt;br /&gt;
&lt;br /&gt;
The most important variable in the simulation is the '''reaction time''' of the government in order to take some measures against the fast spread of the virus, such as bringing more awareness or imposing a lockdown.&lt;br /&gt;
&lt;br /&gt;
A further exogenous variable here is the number of hospital beds, which is a good proxy for modeling different countries. Having a smaller number of beds is a sign of vulnerability for the health care system and will impact mortality. A solution to this pandemic could therefore be to increase the number of beds in order to avoid exceeding capacity. &lt;br /&gt;
&lt;br /&gt;
A limit to this simulation would be that it is a real pandemic, for example I first tried to simulate the full pandemic with the second pic (higher) as you can see in the graph of Switzerland but I have to admit that sometimes the reality (or my Vensim skills) are to difficult to simulate that is why I choose to stop the simulation after 100 days.&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
[[File:Simulation Covid-19.mdl]]&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
#Federal Office of Public Health FOPH, https://www.bag.admin.ch/bag/en/home.html&lt;br /&gt;
#Fismann, D. (2009), “Modellig an Influenza Pandemic: A Guide for the Perplexed”, CMAJ,August.&lt;br /&gt;
#Madhav, N. (2017), “Pandemics: Risks, Impacts, and Mitigation”, November.&lt;br /&gt;
#Federal Office of Public Health FOPH, https://www.bag.admin.ch/bag/en/home.html&lt;br /&gt;
#https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704&lt;br /&gt;
#https://www.covid19.admin.ch/en/epidemiologic/case?detTime=total&amp;amp;detRel=abs&lt;br /&gt;
#https://www.covid19.admin.ch/en/epidemiologic/death?detTime=total&amp;amp;detRel=abs&lt;/div&gt;</summary>
		<author><name>Toscool</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20313</id>
		<title>Impact of late lockdown and hospital capacity on 19-COVID spread</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20313"/>
		<updated>2021-01-08T10:35:38Z</updated>

		<summary type="html">&lt;p&gt;Toscool: /* Normal Scenario */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=Problem definition=&lt;br /&gt;
&lt;br /&gt;
The coronavirus pandemic is an ongoing pandemic, the first case confirmed in Switzerland  was on February 25th, 2020 and has known an exponential growth since. We know that the virus is spread from an infected person to a healthy one during close contact or via touching a contaminated surface. The aim of the simulation is to display the dynamics of the reaction time of the government to take measures and to see if the hospital capacity play a key role in the spread of the COVID-19&lt;br /&gt;
&lt;br /&gt;
=Method=&lt;br /&gt;
&lt;br /&gt;
Vensim modelling approach was selected due to dynamic behavior of the simulated system.&lt;br /&gt;
&lt;br /&gt;
the model shows the evolution of the number of people who got infected by the covid-19 virus in countries where the population have a high health care protection and where the government have decided to make a decision about the virus propagation. The model will explain how fast the virus spreads itself and how political decisions can change the number of infected people at a given point in time. The construction of the model is simple: at the beginning one person is infected and will, then, infect other people. When you are infected many possibilities are open:&lt;br /&gt;
* You can be a healthy virus carrier. In that case you will not know that you have the virus and after 19 days you will be recovered.&lt;br /&gt;
* After 5 days you get symptoms, but you do not have any important health problems, you will recover in the next 14 days.&lt;br /&gt;
* After 5 days, you get symptoms and you are very sick and have respiratory problems, after 3 more days, still feeling bad, you decide to go to the doctor to get a diagnosis. The doctor has than two options: to send you back home, where you will recover after 11 more days or hospitalized you the next day.&lt;br /&gt;
* The doctor had decided to hospitalize you, you then spend two weeks in intensive care, where you will need artificial ventilation and 24-hour nursing care. You can then recover or unfortunately die. &lt;br /&gt;
&lt;br /&gt;
The higher the hospital utilization, the greater the probability to die. Indeed, if hospitals get busier, the medical staff will be less available and health care quality might decrease. When the number of diagnosed and hospitalized people (which are the official number of cases) is greater than a certain percentage of the population, the government will take decisions to slow down the spread of the virus. This is to say that governments will take some measures, such as installing a forced lockdown of the population to decrease the number of contacts per habitant. Moreover, such a decision will have an impact on the population, which will be more aware of the situation and will be more careful to not spread or contract the virus. So, the contagion rate as the number of contacts per people will slow down. They will be less hospitalized people, that means less people in the hospital, meaning a better service and so less people who die.&lt;br /&gt;
&lt;br /&gt;
=Model=&lt;br /&gt;
&lt;br /&gt;
Following vensim model was developed based on the study.&lt;br /&gt;
&lt;br /&gt;
[[File:Model1.png|900px|thumb|center|COVID-19 pandemic in Switzerland Stock Flow Diagram]]&lt;br /&gt;
&lt;br /&gt;
== Variables ==&lt;br /&gt;
&lt;br /&gt;
===Initial population=== &lt;br /&gt;
''The Population of Switzerland can be found here: https://en.wikipedia.org/wiki/Demographics_of_Switzerland''&lt;br /&gt;
&lt;br /&gt;
=8 500 000&lt;br /&gt;
&lt;br /&gt;
===Ratio susceptible people=== &lt;br /&gt;
''Decrease the susceptible people by the number of deaths due to the COVID-19.''&lt;br /&gt;
&lt;br /&gt;
=Susceptible population / (Initial population-Dead)&lt;br /&gt;
&lt;br /&gt;
===Susceptible population=== &lt;br /&gt;
''Decrease the susceptible population by the number of new infections.''&lt;br /&gt;
&lt;br /&gt;
=-New infections&lt;br /&gt;
&lt;br /&gt;
===contact=== &lt;br /&gt;
'''Lockdown:''' ''Function IF THEN ELSE that bring the number of new people you meet (contact) from 5 to 0.05 if the ratio exceed 0.015%''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot;&amp;gt; 0.00015, 0.05 , 5 )&lt;br /&gt;
&lt;br /&gt;
===Contagion Rate=== &lt;br /&gt;
'''Lockdown:''' ''contagion rate: IF THEN ELSE that bring the contagion rate from 0.1 to 0.075 if the ratio exceed 0.015%. Function of the awareness in the population (washing more often their hands if lockdown)''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot; &amp;gt; 0.00015 , 0.075 , 0.1 )&lt;br /&gt;
&lt;br /&gt;
===New infections=== &lt;br /&gt;
''It represent the new number of people infected each day.''&lt;br /&gt;
&lt;br /&gt;
=contact*Infected*Ratio susceptible people*Contagion Rate&lt;br /&gt;
&lt;br /&gt;
===Infected=== &lt;br /&gt;
''It represent the stock of the new people infected. We start the model with 1 infected people.''&lt;br /&gt;
&lt;br /&gt;
=New infections-New recoveries from infected-New symptoms ///// Initial value: 1&lt;br /&gt;
&lt;br /&gt;
===New recoveries from infected===&lt;br /&gt;
''It represent the number of people without symptoms and they go in the recovered stock after 19 days.''&lt;br /&gt;
&lt;br /&gt;
=((1-Ratio Symptoms)*Infected)/TTA recoveries&lt;br /&gt;
&lt;br /&gt;
===New symptoms=== &lt;br /&gt;
''It represent the number of new people that develop symptoms during 5 days before going to the symptomatic stock.''&lt;br /&gt;
&lt;br /&gt;
=(Infected*Ratio Symptoms)/TTA Symptoms&lt;br /&gt;
&lt;br /&gt;
===Ratio Symptoms=== &lt;br /&gt;
''The ratio of people who develop some symptoms.''&lt;br /&gt;
&lt;br /&gt;
=0.2&lt;br /&gt;
&lt;br /&gt;
===Symptomatic=== &lt;br /&gt;
''The stock of people symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=New symptoms-New Diagnostic-New recoveries from symptoms&lt;br /&gt;
&lt;br /&gt;
===New recoveries from symptoms=== &lt;br /&gt;
''It represent the number of people that have symptoms but that were not to the doctor, after 14 they are in the recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Diagnost)*Symptomatic/TTA sympt&lt;br /&gt;
&lt;br /&gt;
===New Diagnostic=== &lt;br /&gt;
''It represent the number of new people that are diagnosed each day, they stay 3 days before having the diagnostic.''&lt;br /&gt;
&lt;br /&gt;
=Symptomatic*Ratio Diagnost/TTA Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Ratio Diagnost===&lt;br /&gt;
''the ratio of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=0.4&lt;br /&gt;
&lt;br /&gt;
===Diagnosed=== &lt;br /&gt;
''The stock of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic-New Hospitalization-New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===New Recovery from Diagnostic===&lt;br /&gt;
''It represent the number of people that are diagnosed and not sent to the hospital. they stay 11 days before going in the Recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Hospitalize)*Diagnosed/TTA diag&lt;br /&gt;
&lt;br /&gt;
===New Hospitalization=== &lt;br /&gt;
''It represent the number of people that are diagnosed and sent to the hospital. they stay 1 day before being sent.''&lt;br /&gt;
&lt;br /&gt;
=(Diagnosed*Ratio Hospitalize)/TTA Hospitalization Ratio Hospitalize&lt;br /&gt;
&lt;br /&gt;
===Ratio Hospitalize===&lt;br /&gt;
''The ratio of people that are Hospitalized.''&lt;br /&gt;
&lt;br /&gt;
=0.3&lt;br /&gt;
&lt;br /&gt;
===Hospitalized=== &lt;br /&gt;
''The stock of people that are hospitalized before being Recovered or Dead.''&lt;br /&gt;
&lt;br /&gt;
=New Hospitalization-New Death-New Recovery&lt;br /&gt;
&lt;br /&gt;
===New Recovery=== &lt;br /&gt;
''The number of people that recover each day from the hospitalization. It depends on the '''Taux Mortality''' which is depend from the '''hospital utilization''' (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=((1-Taux Mortality)*Hospitalized)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===New Death===&lt;br /&gt;
''The number of people that die each day from the hospitalization. It depends on the '''Taux Mortality''' which is depend from the '''hospital utilization''' (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized* Taux Mortality)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===hospital bed=== &lt;br /&gt;
''The number of bed in Switzerland is 356 beds for 100k people with 8.5M people it gives that number: https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704''&lt;br /&gt;
&lt;br /&gt;
=30260&lt;br /&gt;
&lt;br /&gt;
===hospital utilization=== &lt;br /&gt;
''For the utilization of the hospital I assumed that there is already 8260 beds used for regular patient (outside the covid pandemic). The more utilization we have, the greater the probability to die. Indeed, if hospitals get busier, the medical staff will be less available and health care quality might decrease.''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized/(hospital bed - 8260))&lt;br /&gt;
&lt;br /&gt;
===lookup mortality===&lt;br /&gt;
''The lookup function is used to described the taux mortality.''&lt;br /&gt;
&lt;br /&gt;
[(0,0)-(1000,0.3)],(0,0.065),(0.6,0.065),(0.8,0.12),(1,0.25),(1.2,0.3),(10,0.3),(1000,0.3)&lt;br /&gt;
&lt;br /&gt;
===Taux Mortality=== &lt;br /&gt;
''The mortality rate depends on the hospital utilization. For example based on the above function, if the capacity reach 100% the hospital is full and the chance to die is then 25%.''&lt;br /&gt;
&lt;br /&gt;
=lk mortality (hospital utilization)&lt;br /&gt;
&lt;br /&gt;
===Dead=== &lt;br /&gt;
''The stock of Dead people killed by the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New Death&lt;br /&gt;
&lt;br /&gt;
===Recovered=== &lt;br /&gt;
''The Total amount of people who recovered from the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New recoveries from infected+New recoveries from symptoms+New Recovery+New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===official active cases===&lt;br /&gt;
''It represent the number of people that were tested and it's this number that will be used by the government to follow the pandemic and take decision of lockdown.''&lt;br /&gt;
&lt;br /&gt;
=Diagnosed+Hosptitalized&lt;br /&gt;
&lt;br /&gt;
===Ratio official cases/pop=== &lt;br /&gt;
''The ratio that will be used for lockdown. ''&lt;br /&gt;
&lt;br /&gt;
=official active cases/ Initial population&lt;br /&gt;
&lt;br /&gt;
===New Diagnosed.1=== &lt;br /&gt;
''It's is just the same as New Diagnostic, it is used in the model to have the Total Diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Total Diagnosed=== &lt;br /&gt;
''Used in the model to have the official number of cases in the model.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnosed.1&lt;br /&gt;
&lt;br /&gt;
===TTA recoveries=== &lt;br /&gt;
''Time to recover after being infected and not having symptoms.''&lt;br /&gt;
&lt;br /&gt;
=19&lt;br /&gt;
&lt;br /&gt;
===TTA Symptoms=== &lt;br /&gt;
''The time you take to develop symptoms.''&lt;br /&gt;
&lt;br /&gt;
=5&lt;br /&gt;
&lt;br /&gt;
===TTA sympt===&lt;br /&gt;
''The time you take for recovering after being symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
===TTA Diagnostic=== &lt;br /&gt;
''Time to go to the doctor and have the result.''&lt;br /&gt;
&lt;br /&gt;
=3&lt;br /&gt;
&lt;br /&gt;
===TTA diag===&lt;br /&gt;
''The time you take for recovering after being diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=11&lt;br /&gt;
&lt;br /&gt;
===TTA Hospitalization=== &lt;br /&gt;
''Time to go to the Hospital.''&lt;br /&gt;
&lt;br /&gt;
=1&lt;br /&gt;
&lt;br /&gt;
===TTA Hospital===&lt;br /&gt;
''The time you stay at the hospital before recovering or dying.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
As explained in the problem definition we will focused our results on 3 cases. &lt;br /&gt;
* The first one is the normal scenario, with classic lockdown and regular numbers of beds for Switzerland&lt;br /&gt;
* The second is the same scenario as for the 1st one but the lockdown is delayed by 1 day,&lt;br /&gt;
* The third scenario is the normal scenario with a number of hospital beds reduce by 10 000 beds.&lt;br /&gt;
&lt;br /&gt;
==Normal Scenario==&lt;br /&gt;
&lt;br /&gt;
The first scenario take place in Switzerland with 8 500 000 peoples and a hospital capacity of 356 beds for 100k people. The first case was detected the 25 february 2019 and 20 days after the Government of Switzerland have decided to take some serious measures that is in our case represented by a lockdown. &lt;br /&gt;
&lt;br /&gt;
The following table show us the official number of new cases per day:&lt;br /&gt;
&lt;br /&gt;
[[File:Newcases.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
From the simulation we get:&lt;br /&gt;
&lt;br /&gt;
[[File:Yes.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
We can see that the model is reality closed to the reality with a pic of 1350 after 35 days. The simulation stopped after 100 days so we just focused on these first 100 days. The reality display a pic at 1243 days after 30 days.&lt;br /&gt;
&lt;br /&gt;
The true number of new death per day, and the number from the simulation is also display below:&lt;br /&gt;
&lt;br /&gt;
[[File: deat.png|500px|left]]        [[File:Deats.18.png|500px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We can see that the model is one more time really closed to the reality with a pic of 43 deaths after 50 days, while the reality display a pic at 44 days after 36 days.&lt;br /&gt;
&lt;br /&gt;
We have seen that the simulation is really closed from the data obtained for the Switzerland, but now lets go trough some special cases to see the impact of some decision on the variables.&lt;br /&gt;
&lt;br /&gt;
==Scenario 1: Late lockdown==&lt;br /&gt;
&lt;br /&gt;
In this scenario we will see what could have happened if the government take 1 more day to react and to set up the lockdown. To simulate such a scenario I simply increase the number of &amp;quot;Ratio official cases/pop&amp;quot; in the function IF THEN ELSE in &amp;quot;contact&amp;quot; and &amp;quot;contagion rate&amp;quot; from 0.00015 to 0.00018 and it delay the reaction of the government for 1 day.&lt;br /&gt;
&lt;br /&gt;
[[File: Deathz1.png|450px|left]][[File: Deathz2.png|500px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graph, the total number of official cases (=total diagnosed) jump from 33 000 to 45 000 cases. An increase of 35% in the number of official cases by just delaying for 1 day the government decisions. It illustrates well the exponential effect on the model, indeed we don't have to forget that the delay is just one day but if it has been 4-5 days the number of cases would have been exponentially higher. The second graph shows the deaths jump from 1600 to 2300, that is due to increasing number of cases and the hospital capacity reaching more than 60% utilization. Indeed due to the lookup function if the hospital capacity exceed 60% the mortality increase in the hospital. This is a very interesting scenarios that shows quite well the importance of the early lockdown and highlight the most important point in our model, '''the reaction time'''.&lt;br /&gt;
&lt;br /&gt;
==Scenario 2: Small Hospital capacity==&lt;br /&gt;
&lt;br /&gt;
In this scenario the number of hospital beds goes from 356/100k people to 238/100k people, a loss of -10 000 in variable ''hospital bed'' for Switzerland. This number of beds corresponds to the number of beds for a less developing country, such as Iceland (https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704). &lt;br /&gt;
&lt;br /&gt;
[[File: Utiliz.png|500px|left]][[File: Dead.png|480px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graphs, the hospital utilization reach almost 80%. Patients are not treated as well as they would if the utilization was lower, and it involves more deaths for these patients (right graph). We can see the importance of hospital capacity and for government to have a '''good amount of hospitals'''.&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
To conclude I would say that it has been quite difficult to deal with the real data because I had to find every number or to adjust some variables to fit with the reality. Another difficulty that I had to faced was all times and units to setup. The model display almost the same numbers as the ones communicated by the Swiss government, what could indicate that the model are not too far from what is happening in real-life. &lt;br /&gt;
&lt;br /&gt;
The most important variable in the simulation is the '''reaction time''' of the government in order to take some measures against the fast spread of the virus, such as bringing more awareness or imposing a lockdown.&lt;br /&gt;
&lt;br /&gt;
A further exogenous variable here is the number of hospital beds, which is a good proxy for modeling different countries. Having a smaller number of beds is a sign of vulnerability for the health care system and will impact mortality. A solution to this pandemic could therefore be to increase the number of beds in order to avoid exceeding capacity. &lt;br /&gt;
&lt;br /&gt;
A limit to this simulation would be that it is a real pandemic, for example I first tried to simulate the full pandemic with the second pic (higher) as you can see in the graph of Switzerland but I have to admit that sometimes the reality (or my Vensim skills) are to difficult to simulate that is why I choose to stop the simulation after 100 days.&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
[[File:Simulation Covid-19.mdl]]&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
#Federal Office of Public Health FOPH, https://www.bag.admin.ch/bag/en/home.html&lt;br /&gt;
#Fismann, D. (2009), “Modellig an Influenza Pandemic: A Guide for the Perplexed”, CMAJ,August.&lt;br /&gt;
#Madhav, N. (2017), “Pandemics: Risks, Impacts, and Mitigation”, November.&lt;br /&gt;
#Federal Office of Public Health FOPH, https://www.bag.admin.ch/bag/en/home.html&lt;br /&gt;
#https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704&lt;br /&gt;
#https://www.covid19.admin.ch/en/epidemiologic/case?detTime=total&amp;amp;detRel=abs&lt;br /&gt;
#https://www.covid19.admin.ch/en/epidemiologic/death?detTime=total&amp;amp;detRel=abs&lt;/div&gt;</summary>
		<author><name>Toscool</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20312</id>
		<title>Impact of late lockdown and hospital capacity on 19-COVID spread</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20312"/>
		<updated>2021-01-08T10:35:01Z</updated>

		<summary type="html">&lt;p&gt;Toscool: /* Normal Scenario */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=Problem definition=&lt;br /&gt;
&lt;br /&gt;
The coronavirus pandemic is an ongoing pandemic, the first case confirmed in Switzerland  was on February 25th, 2020 and has known an exponential growth since. We know that the virus is spread from an infected person to a healthy one during close contact or via touching a contaminated surface. The aim of the simulation is to display the dynamics of the reaction time of the government to take measures and to see if the hospital capacity play a key role in the spread of the COVID-19&lt;br /&gt;
&lt;br /&gt;
=Method=&lt;br /&gt;
&lt;br /&gt;
Vensim modelling approach was selected due to dynamic behavior of the simulated system.&lt;br /&gt;
&lt;br /&gt;
the model shows the evolution of the number of people who got infected by the covid-19 virus in countries where the population have a high health care protection and where the government have decided to make a decision about the virus propagation. The model will explain how fast the virus spreads itself and how political decisions can change the number of infected people at a given point in time. The construction of the model is simple: at the beginning one person is infected and will, then, infect other people. When you are infected many possibilities are open:&lt;br /&gt;
* You can be a healthy virus carrier. In that case you will not know that you have the virus and after 19 days you will be recovered.&lt;br /&gt;
* After 5 days you get symptoms, but you do not have any important health problems, you will recover in the next 14 days.&lt;br /&gt;
* After 5 days, you get symptoms and you are very sick and have respiratory problems, after 3 more days, still feeling bad, you decide to go to the doctor to get a diagnosis. The doctor has than two options: to send you back home, where you will recover after 11 more days or hospitalized you the next day.&lt;br /&gt;
* The doctor had decided to hospitalize you, you then spend two weeks in intensive care, where you will need artificial ventilation and 24-hour nursing care. You can then recover or unfortunately die. &lt;br /&gt;
&lt;br /&gt;
The higher the hospital utilization, the greater the probability to die. Indeed, if hospitals get busier, the medical staff will be less available and health care quality might decrease. When the number of diagnosed and hospitalized people (which are the official number of cases) is greater than a certain percentage of the population, the government will take decisions to slow down the spread of the virus. This is to say that governments will take some measures, such as installing a forced lockdown of the population to decrease the number of contacts per habitant. Moreover, such a decision will have an impact on the population, which will be more aware of the situation and will be more careful to not spread or contract the virus. So, the contagion rate as the number of contacts per people will slow down. They will be less hospitalized people, that means less people in the hospital, meaning a better service and so less people who die.&lt;br /&gt;
&lt;br /&gt;
=Model=&lt;br /&gt;
&lt;br /&gt;
Following vensim model was developed based on the study.&lt;br /&gt;
&lt;br /&gt;
[[File:Model1.png|900px|thumb|center|COVID-19 pandemic in Switzerland Stock Flow Diagram]]&lt;br /&gt;
&lt;br /&gt;
== Variables ==&lt;br /&gt;
&lt;br /&gt;
===Initial population=== &lt;br /&gt;
''The Population of Switzerland can be found here: https://en.wikipedia.org/wiki/Demographics_of_Switzerland''&lt;br /&gt;
&lt;br /&gt;
=8 500 000&lt;br /&gt;
&lt;br /&gt;
===Ratio susceptible people=== &lt;br /&gt;
''Decrease the susceptible people by the number of deaths due to the COVID-19.''&lt;br /&gt;
&lt;br /&gt;
=Susceptible population / (Initial population-Dead)&lt;br /&gt;
&lt;br /&gt;
===Susceptible population=== &lt;br /&gt;
''Decrease the susceptible population by the number of new infections.''&lt;br /&gt;
&lt;br /&gt;
=-New infections&lt;br /&gt;
&lt;br /&gt;
===contact=== &lt;br /&gt;
'''Lockdown:''' ''Function IF THEN ELSE that bring the number of new people you meet (contact) from 5 to 0.05 if the ratio exceed 0.015%''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot;&amp;gt; 0.00015, 0.05 , 5 )&lt;br /&gt;
&lt;br /&gt;
===Contagion Rate=== &lt;br /&gt;
'''Lockdown:''' ''contagion rate: IF THEN ELSE that bring the contagion rate from 0.1 to 0.075 if the ratio exceed 0.015%. Function of the awareness in the population (washing more often their hands if lockdown)''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot; &amp;gt; 0.00015 , 0.075 , 0.1 )&lt;br /&gt;
&lt;br /&gt;
===New infections=== &lt;br /&gt;
''It represent the new number of people infected each day.''&lt;br /&gt;
&lt;br /&gt;
=contact*Infected*Ratio susceptible people*Contagion Rate&lt;br /&gt;
&lt;br /&gt;
===Infected=== &lt;br /&gt;
''It represent the stock of the new people infected. We start the model with 1 infected people.''&lt;br /&gt;
&lt;br /&gt;
=New infections-New recoveries from infected-New symptoms ///// Initial value: 1&lt;br /&gt;
&lt;br /&gt;
===New recoveries from infected===&lt;br /&gt;
''It represent the number of people without symptoms and they go in the recovered stock after 19 days.''&lt;br /&gt;
&lt;br /&gt;
=((1-Ratio Symptoms)*Infected)/TTA recoveries&lt;br /&gt;
&lt;br /&gt;
===New symptoms=== &lt;br /&gt;
''It represent the number of new people that develop symptoms during 5 days before going to the symptomatic stock.''&lt;br /&gt;
&lt;br /&gt;
=(Infected*Ratio Symptoms)/TTA Symptoms&lt;br /&gt;
&lt;br /&gt;
===Ratio Symptoms=== &lt;br /&gt;
''The ratio of people who develop some symptoms.''&lt;br /&gt;
&lt;br /&gt;
=0.2&lt;br /&gt;
&lt;br /&gt;
===Symptomatic=== &lt;br /&gt;
''The stock of people symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=New symptoms-New Diagnostic-New recoveries from symptoms&lt;br /&gt;
&lt;br /&gt;
===New recoveries from symptoms=== &lt;br /&gt;
''It represent the number of people that have symptoms but that were not to the doctor, after 14 they are in the recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Diagnost)*Symptomatic/TTA sympt&lt;br /&gt;
&lt;br /&gt;
===New Diagnostic=== &lt;br /&gt;
''It represent the number of new people that are diagnosed each day, they stay 3 days before having the diagnostic.''&lt;br /&gt;
&lt;br /&gt;
=Symptomatic*Ratio Diagnost/TTA Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Ratio Diagnost===&lt;br /&gt;
''the ratio of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=0.4&lt;br /&gt;
&lt;br /&gt;
===Diagnosed=== &lt;br /&gt;
''The stock of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic-New Hospitalization-New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===New Recovery from Diagnostic===&lt;br /&gt;
''It represent the number of people that are diagnosed and not sent to the hospital. they stay 11 days before going in the Recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Hospitalize)*Diagnosed/TTA diag&lt;br /&gt;
&lt;br /&gt;
===New Hospitalization=== &lt;br /&gt;
''It represent the number of people that are diagnosed and sent to the hospital. they stay 1 day before being sent.''&lt;br /&gt;
&lt;br /&gt;
=(Diagnosed*Ratio Hospitalize)/TTA Hospitalization Ratio Hospitalize&lt;br /&gt;
&lt;br /&gt;
===Ratio Hospitalize===&lt;br /&gt;
''The ratio of people that are Hospitalized.''&lt;br /&gt;
&lt;br /&gt;
=0.3&lt;br /&gt;
&lt;br /&gt;
===Hospitalized=== &lt;br /&gt;
''The stock of people that are hospitalized before being Recovered or Dead.''&lt;br /&gt;
&lt;br /&gt;
=New Hospitalization-New Death-New Recovery&lt;br /&gt;
&lt;br /&gt;
===New Recovery=== &lt;br /&gt;
''The number of people that recover each day from the hospitalization. It depends on the '''Taux Mortality''' which is depend from the '''hospital utilization''' (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=((1-Taux Mortality)*Hospitalized)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===New Death===&lt;br /&gt;
''The number of people that die each day from the hospitalization. It depends on the '''Taux Mortality''' which is depend from the '''hospital utilization''' (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized* Taux Mortality)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===hospital bed=== &lt;br /&gt;
''The number of bed in Switzerland is 356 beds for 100k people with 8.5M people it gives that number: https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704''&lt;br /&gt;
&lt;br /&gt;
=30260&lt;br /&gt;
&lt;br /&gt;
===hospital utilization=== &lt;br /&gt;
''For the utilization of the hospital I assumed that there is already 8260 beds used for regular patient (outside the covid pandemic). The more utilization we have, the greater the probability to die. Indeed, if hospitals get busier, the medical staff will be less available and health care quality might decrease.''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized/(hospital bed - 8260))&lt;br /&gt;
&lt;br /&gt;
===lookup mortality===&lt;br /&gt;
''The lookup function is used to described the taux mortality.''&lt;br /&gt;
&lt;br /&gt;
[(0,0)-(1000,0.3)],(0,0.065),(0.6,0.065),(0.8,0.12),(1,0.25),(1.2,0.3),(10,0.3),(1000,0.3)&lt;br /&gt;
&lt;br /&gt;
===Taux Mortality=== &lt;br /&gt;
''The mortality rate depends on the hospital utilization. For example based on the above function, if the capacity reach 100% the hospital is full and the chance to die is then 25%.''&lt;br /&gt;
&lt;br /&gt;
=lk mortality (hospital utilization)&lt;br /&gt;
&lt;br /&gt;
===Dead=== &lt;br /&gt;
''The stock of Dead people killed by the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New Death&lt;br /&gt;
&lt;br /&gt;
===Recovered=== &lt;br /&gt;
''The Total amount of people who recovered from the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New recoveries from infected+New recoveries from symptoms+New Recovery+New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===official active cases===&lt;br /&gt;
''It represent the number of people that were tested and it's this number that will be used by the government to follow the pandemic and take decision of lockdown.''&lt;br /&gt;
&lt;br /&gt;
=Diagnosed+Hosptitalized&lt;br /&gt;
&lt;br /&gt;
===Ratio official cases/pop=== &lt;br /&gt;
''The ratio that will be used for lockdown. ''&lt;br /&gt;
&lt;br /&gt;
=official active cases/ Initial population&lt;br /&gt;
&lt;br /&gt;
===New Diagnosed.1=== &lt;br /&gt;
''It's is just the same as New Diagnostic, it is used in the model to have the Total Diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Total Diagnosed=== &lt;br /&gt;
''Used in the model to have the official number of cases in the model.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnosed.1&lt;br /&gt;
&lt;br /&gt;
===TTA recoveries=== &lt;br /&gt;
''Time to recover after being infected and not having symptoms.''&lt;br /&gt;
&lt;br /&gt;
=19&lt;br /&gt;
&lt;br /&gt;
===TTA Symptoms=== &lt;br /&gt;
''The time you take to develop symptoms.''&lt;br /&gt;
&lt;br /&gt;
=5&lt;br /&gt;
&lt;br /&gt;
===TTA sympt===&lt;br /&gt;
''The time you take for recovering after being symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
===TTA Diagnostic=== &lt;br /&gt;
''Time to go to the doctor and have the result.''&lt;br /&gt;
&lt;br /&gt;
=3&lt;br /&gt;
&lt;br /&gt;
===TTA diag===&lt;br /&gt;
''The time you take for recovering after being diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=11&lt;br /&gt;
&lt;br /&gt;
===TTA Hospitalization=== &lt;br /&gt;
''Time to go to the Hospital.''&lt;br /&gt;
&lt;br /&gt;
=1&lt;br /&gt;
&lt;br /&gt;
===TTA Hospital===&lt;br /&gt;
''The time you stay at the hospital before recovering or dying.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
As explained in the problem definition we will focused our results on 3 cases. &lt;br /&gt;
* The first one is the normal scenario, with classic lockdown and regular numbers of beds for Switzerland&lt;br /&gt;
* The second is the same scenario as for the 1st one but the lockdown is delayed by 1 day,&lt;br /&gt;
* The third scenario is the normal scenario with a number of hospital beds reduce by 10 000 beds.&lt;br /&gt;
&lt;br /&gt;
==Normal Scenario==&lt;br /&gt;
&lt;br /&gt;
The first scenario take place in Switzerland with 8 500 000 peoples and a hospital capacity of 356 beds for 100k people. The first case was detected the 25 february 2019 and 20 days after the Government of Switzerland have decided to take some serious measures that is in our case represented by a lockdown. &lt;br /&gt;
&lt;br /&gt;
The following table show us the official number of new cases per day:&lt;br /&gt;
&lt;br /&gt;
[[File:Newcases.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
From the simulation we get:&lt;br /&gt;
&lt;br /&gt;
[[File:Yes.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
We can see that the model is really closed to the reality with a pic of 1350 after 35 days. The simulation stopped after 100 days so we just focused on these first 100 days. The reality display a pic at 1243 days after 30 days.&lt;br /&gt;
&lt;br /&gt;
The true number of new death per day, and the number from the simulation is also display below:&lt;br /&gt;
&lt;br /&gt;
[[File: deat.png|500px|left]]        [[File:Deats.18.png|500px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We can see that the model is one more time really closed to the reality with a pic of 43 deaths after 50 days, while the reality display a pic at 44 days after 36 days.&lt;br /&gt;
&lt;br /&gt;
We have seen that the simulation is really closed from the data obtained for the Switzerland, but now lets go trough some special cases to see the impact of some decision on the variables.&lt;br /&gt;
&lt;br /&gt;
==Scenario 1: Late lockdown==&lt;br /&gt;
&lt;br /&gt;
In this scenario we will see what could have happened if the government take 1 more day to react and to set up the lockdown. To simulate such a scenario I simply increase the number of &amp;quot;Ratio official cases/pop&amp;quot; in the function IF THEN ELSE in &amp;quot;contact&amp;quot; and &amp;quot;contagion rate&amp;quot; from 0.00015 to 0.00018 and it delay the reaction of the government for 1 day.&lt;br /&gt;
&lt;br /&gt;
[[File: Deathz1.png|450px|left]][[File: Deathz2.png|500px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graph, the total number of official cases (=total diagnosed) jump from 33 000 to 45 000 cases. An increase of 35% in the number of official cases by just delaying for 1 day the government decisions. It illustrates well the exponential effect on the model, indeed we don't have to forget that the delay is just one day but if it has been 4-5 days the number of cases would have been exponentially higher. The second graph shows the deaths jump from 1600 to 2300, that is due to increasing number of cases and the hospital capacity reaching more than 60% utilization. Indeed due to the lookup function if the hospital capacity exceed 60% the mortality increase in the hospital. This is a very interesting scenarios that shows quite well the importance of the early lockdown and highlight the most important point in our model, '''the reaction time'''.&lt;br /&gt;
&lt;br /&gt;
==Scenario 2: Small Hospital capacity==&lt;br /&gt;
&lt;br /&gt;
In this scenario the number of hospital beds goes from 356/100k people to 238/100k people, a loss of -10 000 in variable ''hospital bed'' for Switzerland. This number of beds corresponds to the number of beds for a less developing country, such as Iceland (https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704). &lt;br /&gt;
&lt;br /&gt;
[[File: Utiliz.png|500px|left]][[File: Dead.png|480px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graphs, the hospital utilization reach almost 80%. Patients are not treated as well as they would if the utilization was lower, and it involves more deaths for these patients (right graph). We can see the importance of hospital capacity and for government to have a '''good amount of hospitals'''.&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
To conclude I would say that it has been quite difficult to deal with the real data because I had to find every number or to adjust some variables to fit with the reality. Another difficulty that I had to faced was all times and units to setup. The model display almost the same numbers as the ones communicated by the Swiss government, what could indicate that the model are not too far from what is happening in real-life. &lt;br /&gt;
&lt;br /&gt;
The most important variable in the simulation is the '''reaction time''' of the government in order to take some measures against the fast spread of the virus, such as bringing more awareness or imposing a lockdown.&lt;br /&gt;
&lt;br /&gt;
A further exogenous variable here is the number of hospital beds, which is a good proxy for modeling different countries. Having a smaller number of beds is a sign of vulnerability for the health care system and will impact mortality. A solution to this pandemic could therefore be to increase the number of beds in order to avoid exceeding capacity. &lt;br /&gt;
&lt;br /&gt;
A limit to this simulation would be that it is a real pandemic, for example I first tried to simulate the full pandemic with the second pic (higher) as you can see in the graph of Switzerland but I have to admit that sometimes the reality (or my Vensim skills) are to difficult to simulate that is why I choose to stop the simulation after 100 days.&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
[[File:Simulation Covid-19.mdl]]&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
#Federal Office of Public Health FOPH, https://www.bag.admin.ch/bag/en/home.html&lt;br /&gt;
#Fismann, D. (2009), “Modellig an Influenza Pandemic: A Guide for the Perplexed”, CMAJ,August.&lt;br /&gt;
#Madhav, N. (2017), “Pandemics: Risks, Impacts, and Mitigation”, November.&lt;br /&gt;
#Federal Office of Public Health FOPH, https://www.bag.admin.ch/bag/en/home.html&lt;br /&gt;
#https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704&lt;br /&gt;
#https://www.covid19.admin.ch/en/epidemiologic/case?detTime=total&amp;amp;detRel=abs&lt;br /&gt;
#https://www.covid19.admin.ch/en/epidemiologic/death?detTime=total&amp;amp;detRel=abs&lt;/div&gt;</summary>
		<author><name>Toscool</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20311</id>
		<title>Impact of late lockdown and hospital capacity on 19-COVID spread</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20311"/>
		<updated>2021-01-08T10:34:47Z</updated>

		<summary type="html">&lt;p&gt;Toscool: /* Normal Scenario */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=Problem definition=&lt;br /&gt;
&lt;br /&gt;
The coronavirus pandemic is an ongoing pandemic, the first case confirmed in Switzerland  was on February 25th, 2020 and has known an exponential growth since. We know that the virus is spread from an infected person to a healthy one during close contact or via touching a contaminated surface. The aim of the simulation is to display the dynamics of the reaction time of the government to take measures and to see if the hospital capacity play a key role in the spread of the COVID-19&lt;br /&gt;
&lt;br /&gt;
=Method=&lt;br /&gt;
&lt;br /&gt;
Vensim modelling approach was selected due to dynamic behavior of the simulated system.&lt;br /&gt;
&lt;br /&gt;
the model shows the evolution of the number of people who got infected by the covid-19 virus in countries where the population have a high health care protection and where the government have decided to make a decision about the virus propagation. The model will explain how fast the virus spreads itself and how political decisions can change the number of infected people at a given point in time. The construction of the model is simple: at the beginning one person is infected and will, then, infect other people. When you are infected many possibilities are open:&lt;br /&gt;
* You can be a healthy virus carrier. In that case you will not know that you have the virus and after 19 days you will be recovered.&lt;br /&gt;
* After 5 days you get symptoms, but you do not have any important health problems, you will recover in the next 14 days.&lt;br /&gt;
* After 5 days, you get symptoms and you are very sick and have respiratory problems, after 3 more days, still feeling bad, you decide to go to the doctor to get a diagnosis. The doctor has than two options: to send you back home, where you will recover after 11 more days or hospitalized you the next day.&lt;br /&gt;
* The doctor had decided to hospitalize you, you then spend two weeks in intensive care, where you will need artificial ventilation and 24-hour nursing care. You can then recover or unfortunately die. &lt;br /&gt;
&lt;br /&gt;
The higher the hospital utilization, the greater the probability to die. Indeed, if hospitals get busier, the medical staff will be less available and health care quality might decrease. When the number of diagnosed and hospitalized people (which are the official number of cases) is greater than a certain percentage of the population, the government will take decisions to slow down the spread of the virus. This is to say that governments will take some measures, such as installing a forced lockdown of the population to decrease the number of contacts per habitant. Moreover, such a decision will have an impact on the population, which will be more aware of the situation and will be more careful to not spread or contract the virus. So, the contagion rate as the number of contacts per people will slow down. They will be less hospitalized people, that means less people in the hospital, meaning a better service and so less people who die.&lt;br /&gt;
&lt;br /&gt;
=Model=&lt;br /&gt;
&lt;br /&gt;
Following vensim model was developed based on the study.&lt;br /&gt;
&lt;br /&gt;
[[File:Model1.png|900px|thumb|center|COVID-19 pandemic in Switzerland Stock Flow Diagram]]&lt;br /&gt;
&lt;br /&gt;
== Variables ==&lt;br /&gt;
&lt;br /&gt;
===Initial population=== &lt;br /&gt;
''The Population of Switzerland can be found here: https://en.wikipedia.org/wiki/Demographics_of_Switzerland''&lt;br /&gt;
&lt;br /&gt;
=8 500 000&lt;br /&gt;
&lt;br /&gt;
===Ratio susceptible people=== &lt;br /&gt;
''Decrease the susceptible people by the number of deaths due to the COVID-19.''&lt;br /&gt;
&lt;br /&gt;
=Susceptible population / (Initial population-Dead)&lt;br /&gt;
&lt;br /&gt;
===Susceptible population=== &lt;br /&gt;
''Decrease the susceptible population by the number of new infections.''&lt;br /&gt;
&lt;br /&gt;
=-New infections&lt;br /&gt;
&lt;br /&gt;
===contact=== &lt;br /&gt;
'''Lockdown:''' ''Function IF THEN ELSE that bring the number of new people you meet (contact) from 5 to 0.05 if the ratio exceed 0.015%''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot;&amp;gt; 0.00015, 0.05 , 5 )&lt;br /&gt;
&lt;br /&gt;
===Contagion Rate=== &lt;br /&gt;
'''Lockdown:''' ''contagion rate: IF THEN ELSE that bring the contagion rate from 0.1 to 0.075 if the ratio exceed 0.015%. Function of the awareness in the population (washing more often their hands if lockdown)''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot; &amp;gt; 0.00015 , 0.075 , 0.1 )&lt;br /&gt;
&lt;br /&gt;
===New infections=== &lt;br /&gt;
''It represent the new number of people infected each day.''&lt;br /&gt;
&lt;br /&gt;
=contact*Infected*Ratio susceptible people*Contagion Rate&lt;br /&gt;
&lt;br /&gt;
===Infected=== &lt;br /&gt;
''It represent the stock of the new people infected. We start the model with 1 infected people.''&lt;br /&gt;
&lt;br /&gt;
=New infections-New recoveries from infected-New symptoms ///// Initial value: 1&lt;br /&gt;
&lt;br /&gt;
===New recoveries from infected===&lt;br /&gt;
''It represent the number of people without symptoms and they go in the recovered stock after 19 days.''&lt;br /&gt;
&lt;br /&gt;
=((1-Ratio Symptoms)*Infected)/TTA recoveries&lt;br /&gt;
&lt;br /&gt;
===New symptoms=== &lt;br /&gt;
''It represent the number of new people that develop symptoms during 5 days before going to the symptomatic stock.''&lt;br /&gt;
&lt;br /&gt;
=(Infected*Ratio Symptoms)/TTA Symptoms&lt;br /&gt;
&lt;br /&gt;
===Ratio Symptoms=== &lt;br /&gt;
''The ratio of people who develop some symptoms.''&lt;br /&gt;
&lt;br /&gt;
=0.2&lt;br /&gt;
&lt;br /&gt;
===Symptomatic=== &lt;br /&gt;
''The stock of people symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=New symptoms-New Diagnostic-New recoveries from symptoms&lt;br /&gt;
&lt;br /&gt;
===New recoveries from symptoms=== &lt;br /&gt;
''It represent the number of people that have symptoms but that were not to the doctor, after 14 they are in the recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Diagnost)*Symptomatic/TTA sympt&lt;br /&gt;
&lt;br /&gt;
===New Diagnostic=== &lt;br /&gt;
''It represent the number of new people that are diagnosed each day, they stay 3 days before having the diagnostic.''&lt;br /&gt;
&lt;br /&gt;
=Symptomatic*Ratio Diagnost/TTA Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Ratio Diagnost===&lt;br /&gt;
''the ratio of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=0.4&lt;br /&gt;
&lt;br /&gt;
===Diagnosed=== &lt;br /&gt;
''The stock of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic-New Hospitalization-New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===New Recovery from Diagnostic===&lt;br /&gt;
''It represent the number of people that are diagnosed and not sent to the hospital. they stay 11 days before going in the Recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Hospitalize)*Diagnosed/TTA diag&lt;br /&gt;
&lt;br /&gt;
===New Hospitalization=== &lt;br /&gt;
''It represent the number of people that are diagnosed and sent to the hospital. they stay 1 day before being sent.''&lt;br /&gt;
&lt;br /&gt;
=(Diagnosed*Ratio Hospitalize)/TTA Hospitalization Ratio Hospitalize&lt;br /&gt;
&lt;br /&gt;
===Ratio Hospitalize===&lt;br /&gt;
''The ratio of people that are Hospitalized.''&lt;br /&gt;
&lt;br /&gt;
=0.3&lt;br /&gt;
&lt;br /&gt;
===Hospitalized=== &lt;br /&gt;
''The stock of people that are hospitalized before being Recovered or Dead.''&lt;br /&gt;
&lt;br /&gt;
=New Hospitalization-New Death-New Recovery&lt;br /&gt;
&lt;br /&gt;
===New Recovery=== &lt;br /&gt;
''The number of people that recover each day from the hospitalization. It depends on the '''Taux Mortality''' which is depend from the '''hospital utilization''' (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=((1-Taux Mortality)*Hospitalized)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===New Death===&lt;br /&gt;
''The number of people that die each day from the hospitalization. It depends on the '''Taux Mortality''' which is depend from the '''hospital utilization''' (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized* Taux Mortality)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===hospital bed=== &lt;br /&gt;
''The number of bed in Switzerland is 356 beds for 100k people with 8.5M people it gives that number: https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704''&lt;br /&gt;
&lt;br /&gt;
=30260&lt;br /&gt;
&lt;br /&gt;
===hospital utilization=== &lt;br /&gt;
''For the utilization of the hospital I assumed that there is already 8260 beds used for regular patient (outside the covid pandemic). The more utilization we have, the greater the probability to die. Indeed, if hospitals get busier, the medical staff will be less available and health care quality might decrease.''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized/(hospital bed - 8260))&lt;br /&gt;
&lt;br /&gt;
===lookup mortality===&lt;br /&gt;
''The lookup function is used to described the taux mortality.''&lt;br /&gt;
&lt;br /&gt;
[(0,0)-(1000,0.3)],(0,0.065),(0.6,0.065),(0.8,0.12),(1,0.25),(1.2,0.3),(10,0.3),(1000,0.3)&lt;br /&gt;
&lt;br /&gt;
===Taux Mortality=== &lt;br /&gt;
''The mortality rate depends on the hospital utilization. For example based on the above function, if the capacity reach 100% the hospital is full and the chance to die is then 25%.''&lt;br /&gt;
&lt;br /&gt;
=lk mortality (hospital utilization)&lt;br /&gt;
&lt;br /&gt;
===Dead=== &lt;br /&gt;
''The stock of Dead people killed by the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New Death&lt;br /&gt;
&lt;br /&gt;
===Recovered=== &lt;br /&gt;
''The Total amount of people who recovered from the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New recoveries from infected+New recoveries from symptoms+New Recovery+New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===official active cases===&lt;br /&gt;
''It represent the number of people that were tested and it's this number that will be used by the government to follow the pandemic and take decision of lockdown.''&lt;br /&gt;
&lt;br /&gt;
=Diagnosed+Hosptitalized&lt;br /&gt;
&lt;br /&gt;
===Ratio official cases/pop=== &lt;br /&gt;
''The ratio that will be used for lockdown. ''&lt;br /&gt;
&lt;br /&gt;
=official active cases/ Initial population&lt;br /&gt;
&lt;br /&gt;
===New Diagnosed.1=== &lt;br /&gt;
''It's is just the same as New Diagnostic, it is used in the model to have the Total Diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Total Diagnosed=== &lt;br /&gt;
''Used in the model to have the official number of cases in the model.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnosed.1&lt;br /&gt;
&lt;br /&gt;
===TTA recoveries=== &lt;br /&gt;
''Time to recover after being infected and not having symptoms.''&lt;br /&gt;
&lt;br /&gt;
=19&lt;br /&gt;
&lt;br /&gt;
===TTA Symptoms=== &lt;br /&gt;
''The time you take to develop symptoms.''&lt;br /&gt;
&lt;br /&gt;
=5&lt;br /&gt;
&lt;br /&gt;
===TTA sympt===&lt;br /&gt;
''The time you take for recovering after being symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
===TTA Diagnostic=== &lt;br /&gt;
''Time to go to the doctor and have the result.''&lt;br /&gt;
&lt;br /&gt;
=3&lt;br /&gt;
&lt;br /&gt;
===TTA diag===&lt;br /&gt;
''The time you take for recovering after being diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=11&lt;br /&gt;
&lt;br /&gt;
===TTA Hospitalization=== &lt;br /&gt;
''Time to go to the Hospital.''&lt;br /&gt;
&lt;br /&gt;
=1&lt;br /&gt;
&lt;br /&gt;
===TTA Hospital===&lt;br /&gt;
''The time you stay at the hospital before recovering or dying.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
As explained in the problem definition we will focused our results on 3 cases. &lt;br /&gt;
* The first one is the normal scenario, with classic lockdown and regular numbers of beds for Switzerland&lt;br /&gt;
* The second is the same scenario as for the 1st one but the lockdown is delayed by 1 day,&lt;br /&gt;
* The third scenario is the normal scenario with a number of hospital beds reduce by 10 000 beds.&lt;br /&gt;
&lt;br /&gt;
==Normal Scenario==&lt;br /&gt;
&lt;br /&gt;
The first scenario take place in Switzerland with 8 500 000 peoples and a hospital capacity of 356 beds for 100k people. The first case was detected the 25 february 2019 and 20 days after the Government of Switzerland have decided to take some serious measures that is in our case represented by a lockdown. &lt;br /&gt;
&lt;br /&gt;
The following table show us the official number of new cases per day:&lt;br /&gt;
&lt;br /&gt;
[[File:Newcases.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
From the simulation we get:&lt;br /&gt;
&lt;br /&gt;
[[File:Yes.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
We can see that the model is really closed to the reality with a pic of 1350 after 35 days. The simulation stopped after 100 days so we just focused on these first 100 days. The reality display a pic at 1243 days after 30 days.&lt;br /&gt;
&lt;br /&gt;
The true number of new death per day, and the number from the simulation is also display below:&lt;br /&gt;
&lt;br /&gt;
[[File: deat.png|500px|left]]        [[File:Deats.18.png|500px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We can see that the model is one more time really closed to the reality with a pic of 43 deaths after 50 days, while the reality display a pic at 44 days after 36 days.&lt;br /&gt;
&lt;br /&gt;
We have seen that the simulation is really closed from the data obtained for the Switzerland, but now lets go trough some special cases to see the impact of some decision on the variables.&lt;br /&gt;
&lt;br /&gt;
==Scenario 1: Late lockdown==&lt;br /&gt;
&lt;br /&gt;
In this scenario we will see what could have happened if the government take 1 more day to react and to set up the lockdown. To simulate such a scenario I simply increase the number of &amp;quot;Ratio official cases/pop&amp;quot; in the function IF THEN ELSE in &amp;quot;contact&amp;quot; and &amp;quot;contagion rate&amp;quot; from 0.00015 to 0.00018 and it delay the reaction of the government for 1 day.&lt;br /&gt;
&lt;br /&gt;
[[File: Deathz1.png|450px|left]][[File: Deathz2.png|500px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graph, the total number of official cases (=total diagnosed) jump from 33 000 to 45 000 cases. An increase of 35% in the number of official cases by just delaying for 1 day the government decisions. It illustrates well the exponential effect on the model, indeed we don't have to forget that the delay is just one day but if it has been 4-5 days the number of cases would have been exponentially higher. The second graph shows the deaths jump from 1600 to 2300, that is due to increasing number of cases and the hospital capacity reaching more than 60% utilization. Indeed due to the lookup function if the hospital capacity exceed 60% the mortality increase in the hospital. This is a very interesting scenarios that shows quite well the importance of the early lockdown and highlight the most important point in our model, '''the reaction time'''.&lt;br /&gt;
&lt;br /&gt;
==Scenario 2: Small Hospital capacity==&lt;br /&gt;
&lt;br /&gt;
In this scenario the number of hospital beds goes from 356/100k people to 238/100k people, a loss of -10 000 in variable ''hospital bed'' for Switzerland. This number of beds corresponds to the number of beds for a less developing country, such as Iceland (https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704). &lt;br /&gt;
&lt;br /&gt;
[[File: Utiliz.png|500px|left]][[File: Dead.png|480px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graphs, the hospital utilization reach almost 80%. Patients are not treated as well as they would if the utilization was lower, and it involves more deaths for these patients (right graph). We can see the importance of hospital capacity and for government to have a '''good amount of hospitals'''.&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
To conclude I would say that it has been quite difficult to deal with the real data because I had to find every number or to adjust some variables to fit with the reality. Another difficulty that I had to faced was all times and units to setup. The model display almost the same numbers as the ones communicated by the Swiss government, what could indicate that the model are not too far from what is happening in real-life. &lt;br /&gt;
&lt;br /&gt;
The most important variable in the simulation is the '''reaction time''' of the government in order to take some measures against the fast spread of the virus, such as bringing more awareness or imposing a lockdown.&lt;br /&gt;
&lt;br /&gt;
A further exogenous variable here is the number of hospital beds, which is a good proxy for modeling different countries. Having a smaller number of beds is a sign of vulnerability for the health care system and will impact mortality. A solution to this pandemic could therefore be to increase the number of beds in order to avoid exceeding capacity. &lt;br /&gt;
&lt;br /&gt;
A limit to this simulation would be that it is a real pandemic, for example I first tried to simulate the full pandemic with the second pic (higher) as you can see in the graph of Switzerland but I have to admit that sometimes the reality (or my Vensim skills) are to difficult to simulate that is why I choose to stop the simulation after 100 days.&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
[[File:Simulation Covid-19.mdl]]&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
#Federal Office of Public Health FOPH, https://www.bag.admin.ch/bag/en/home.html&lt;br /&gt;
#Fismann, D. (2009), “Modellig an Influenza Pandemic: A Guide for the Perplexed”, CMAJ,August.&lt;br /&gt;
#Madhav, N. (2017), “Pandemics: Risks, Impacts, and Mitigation”, November.&lt;br /&gt;
#Federal Office of Public Health FOPH, https://www.bag.admin.ch/bag/en/home.html&lt;br /&gt;
#https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704&lt;br /&gt;
#https://www.covid19.admin.ch/en/epidemiologic/case?detTime=total&amp;amp;detRel=abs&lt;br /&gt;
#https://www.covid19.admin.ch/en/epidemiologic/death?detTime=total&amp;amp;detRel=abs&lt;/div&gt;</summary>
		<author><name>Toscool</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20310</id>
		<title>Impact of late lockdown and hospital capacity on 19-COVID spread</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20310"/>
		<updated>2021-01-08T10:34:18Z</updated>

		<summary type="html">&lt;p&gt;Toscool: /* Normal Scenario */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=Problem definition=&lt;br /&gt;
&lt;br /&gt;
The coronavirus pandemic is an ongoing pandemic, the first case confirmed in Switzerland  was on February 25th, 2020 and has known an exponential growth since. We know that the virus is spread from an infected person to a healthy one during close contact or via touching a contaminated surface. The aim of the simulation is to display the dynamics of the reaction time of the government to take measures and to see if the hospital capacity play a key role in the spread of the COVID-19&lt;br /&gt;
&lt;br /&gt;
=Method=&lt;br /&gt;
&lt;br /&gt;
Vensim modelling approach was selected due to dynamic behavior of the simulated system.&lt;br /&gt;
&lt;br /&gt;
the model shows the evolution of the number of people who got infected by the covid-19 virus in countries where the population have a high health care protection and where the government have decided to make a decision about the virus propagation. The model will explain how fast the virus spreads itself and how political decisions can change the number of infected people at a given point in time. The construction of the model is simple: at the beginning one person is infected and will, then, infect other people. When you are infected many possibilities are open:&lt;br /&gt;
* You can be a healthy virus carrier. In that case you will not know that you have the virus and after 19 days you will be recovered.&lt;br /&gt;
* After 5 days you get symptoms, but you do not have any important health problems, you will recover in the next 14 days.&lt;br /&gt;
* After 5 days, you get symptoms and you are very sick and have respiratory problems, after 3 more days, still feeling bad, you decide to go to the doctor to get a diagnosis. The doctor has than two options: to send you back home, where you will recover after 11 more days or hospitalized you the next day.&lt;br /&gt;
* The doctor had decided to hospitalize you, you then spend two weeks in intensive care, where you will need artificial ventilation and 24-hour nursing care. You can then recover or unfortunately die. &lt;br /&gt;
&lt;br /&gt;
The higher the hospital utilization, the greater the probability to die. Indeed, if hospitals get busier, the medical staff will be less available and health care quality might decrease. When the number of diagnosed and hospitalized people (which are the official number of cases) is greater than a certain percentage of the population, the government will take decisions to slow down the spread of the virus. This is to say that governments will take some measures, such as installing a forced lockdown of the population to decrease the number of contacts per habitant. Moreover, such a decision will have an impact on the population, which will be more aware of the situation and will be more careful to not spread or contract the virus. So, the contagion rate as the number of contacts per people will slow down. They will be less hospitalized people, that means less people in the hospital, meaning a better service and so less people who die.&lt;br /&gt;
&lt;br /&gt;
=Model=&lt;br /&gt;
&lt;br /&gt;
Following vensim model was developed based on the study.&lt;br /&gt;
&lt;br /&gt;
[[File:Model1.png|900px|thumb|center|COVID-19 pandemic in Switzerland Stock Flow Diagram]]&lt;br /&gt;
&lt;br /&gt;
== Variables ==&lt;br /&gt;
&lt;br /&gt;
===Initial population=== &lt;br /&gt;
''The Population of Switzerland can be found here: https://en.wikipedia.org/wiki/Demographics_of_Switzerland''&lt;br /&gt;
&lt;br /&gt;
=8 500 000&lt;br /&gt;
&lt;br /&gt;
===Ratio susceptible people=== &lt;br /&gt;
''Decrease the susceptible people by the number of deaths due to the COVID-19.''&lt;br /&gt;
&lt;br /&gt;
=Susceptible population / (Initial population-Dead)&lt;br /&gt;
&lt;br /&gt;
===Susceptible population=== &lt;br /&gt;
''Decrease the susceptible population by the number of new infections.''&lt;br /&gt;
&lt;br /&gt;
=-New infections&lt;br /&gt;
&lt;br /&gt;
===contact=== &lt;br /&gt;
'''Lockdown:''' ''Function IF THEN ELSE that bring the number of new people you meet (contact) from 5 to 0.05 if the ratio exceed 0.015%''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot;&amp;gt; 0.00015, 0.05 , 5 )&lt;br /&gt;
&lt;br /&gt;
===Contagion Rate=== &lt;br /&gt;
'''Lockdown:''' ''contagion rate: IF THEN ELSE that bring the contagion rate from 0.1 to 0.075 if the ratio exceed 0.015%. Function of the awareness in the population (washing more often their hands if lockdown)''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot; &amp;gt; 0.00015 , 0.075 , 0.1 )&lt;br /&gt;
&lt;br /&gt;
===New infections=== &lt;br /&gt;
''It represent the new number of people infected each day.''&lt;br /&gt;
&lt;br /&gt;
=contact*Infected*Ratio susceptible people*Contagion Rate&lt;br /&gt;
&lt;br /&gt;
===Infected=== &lt;br /&gt;
''It represent the stock of the new people infected. We start the model with 1 infected people.''&lt;br /&gt;
&lt;br /&gt;
=New infections-New recoveries from infected-New symptoms ///// Initial value: 1&lt;br /&gt;
&lt;br /&gt;
===New recoveries from infected===&lt;br /&gt;
''It represent the number of people without symptoms and they go in the recovered stock after 19 days.''&lt;br /&gt;
&lt;br /&gt;
=((1-Ratio Symptoms)*Infected)/TTA recoveries&lt;br /&gt;
&lt;br /&gt;
===New symptoms=== &lt;br /&gt;
''It represent the number of new people that develop symptoms during 5 days before going to the symptomatic stock.''&lt;br /&gt;
&lt;br /&gt;
=(Infected*Ratio Symptoms)/TTA Symptoms&lt;br /&gt;
&lt;br /&gt;
===Ratio Symptoms=== &lt;br /&gt;
''The ratio of people who develop some symptoms.''&lt;br /&gt;
&lt;br /&gt;
=0.2&lt;br /&gt;
&lt;br /&gt;
===Symptomatic=== &lt;br /&gt;
''The stock of people symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=New symptoms-New Diagnostic-New recoveries from symptoms&lt;br /&gt;
&lt;br /&gt;
===New recoveries from symptoms=== &lt;br /&gt;
''It represent the number of people that have symptoms but that were not to the doctor, after 14 they are in the recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Diagnost)*Symptomatic/TTA sympt&lt;br /&gt;
&lt;br /&gt;
===New Diagnostic=== &lt;br /&gt;
''It represent the number of new people that are diagnosed each day, they stay 3 days before having the diagnostic.''&lt;br /&gt;
&lt;br /&gt;
=Symptomatic*Ratio Diagnost/TTA Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Ratio Diagnost===&lt;br /&gt;
''the ratio of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=0.4&lt;br /&gt;
&lt;br /&gt;
===Diagnosed=== &lt;br /&gt;
''The stock of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic-New Hospitalization-New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===New Recovery from Diagnostic===&lt;br /&gt;
''It represent the number of people that are diagnosed and not sent to the hospital. they stay 11 days before going in the Recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Hospitalize)*Diagnosed/TTA diag&lt;br /&gt;
&lt;br /&gt;
===New Hospitalization=== &lt;br /&gt;
''It represent the number of people that are diagnosed and sent to the hospital. they stay 1 day before being sent.''&lt;br /&gt;
&lt;br /&gt;
=(Diagnosed*Ratio Hospitalize)/TTA Hospitalization Ratio Hospitalize&lt;br /&gt;
&lt;br /&gt;
===Ratio Hospitalize===&lt;br /&gt;
''The ratio of people that are Hospitalized.''&lt;br /&gt;
&lt;br /&gt;
=0.3&lt;br /&gt;
&lt;br /&gt;
===Hospitalized=== &lt;br /&gt;
''The stock of people that are hospitalized before being Recovered or Dead.''&lt;br /&gt;
&lt;br /&gt;
=New Hospitalization-New Death-New Recovery&lt;br /&gt;
&lt;br /&gt;
===New Recovery=== &lt;br /&gt;
''The number of people that recover each day from the hospitalization. It depends on the '''Taux Mortality''' which is depend from the '''hospital utilization''' (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=((1-Taux Mortality)*Hospitalized)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===New Death===&lt;br /&gt;
''The number of people that die each day from the hospitalization. It depends on the '''Taux Mortality''' which is depend from the '''hospital utilization''' (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized* Taux Mortality)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===hospital bed=== &lt;br /&gt;
''The number of bed in Switzerland is 356 beds for 100k people with 8.5M people it gives that number: https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704''&lt;br /&gt;
&lt;br /&gt;
=30260&lt;br /&gt;
&lt;br /&gt;
===hospital utilization=== &lt;br /&gt;
''For the utilization of the hospital I assumed that there is already 8260 beds used for regular patient (outside the covid pandemic). The more utilization we have, the greater the probability to die. Indeed, if hospitals get busier, the medical staff will be less available and health care quality might decrease.''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized/(hospital bed - 8260))&lt;br /&gt;
&lt;br /&gt;
===lookup mortality===&lt;br /&gt;
''The lookup function is used to described the taux mortality.''&lt;br /&gt;
&lt;br /&gt;
[(0,0)-(1000,0.3)],(0,0.065),(0.6,0.065),(0.8,0.12),(1,0.25),(1.2,0.3),(10,0.3),(1000,0.3)&lt;br /&gt;
&lt;br /&gt;
===Taux Mortality=== &lt;br /&gt;
''The mortality rate depends on the hospital utilization. For example based on the above function, if the capacity reach 100% the hospital is full and the chance to die is then 25%.''&lt;br /&gt;
&lt;br /&gt;
=lk mortality (hospital utilization)&lt;br /&gt;
&lt;br /&gt;
===Dead=== &lt;br /&gt;
''The stock of Dead people killed by the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New Death&lt;br /&gt;
&lt;br /&gt;
===Recovered=== &lt;br /&gt;
''The Total amount of people who recovered from the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New recoveries from infected+New recoveries from symptoms+New Recovery+New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===official active cases===&lt;br /&gt;
''It represent the number of people that were tested and it's this number that will be used by the government to follow the pandemic and take decision of lockdown.''&lt;br /&gt;
&lt;br /&gt;
=Diagnosed+Hosptitalized&lt;br /&gt;
&lt;br /&gt;
===Ratio official cases/pop=== &lt;br /&gt;
''The ratio that will be used for lockdown. ''&lt;br /&gt;
&lt;br /&gt;
=official active cases/ Initial population&lt;br /&gt;
&lt;br /&gt;
===New Diagnosed.1=== &lt;br /&gt;
''It's is just the same as New Diagnostic, it is used in the model to have the Total Diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Total Diagnosed=== &lt;br /&gt;
''Used in the model to have the official number of cases in the model.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnosed.1&lt;br /&gt;
&lt;br /&gt;
===TTA recoveries=== &lt;br /&gt;
''Time to recover after being infected and not having symptoms.''&lt;br /&gt;
&lt;br /&gt;
=19&lt;br /&gt;
&lt;br /&gt;
===TTA Symptoms=== &lt;br /&gt;
''The time you take to develop symptoms.''&lt;br /&gt;
&lt;br /&gt;
=5&lt;br /&gt;
&lt;br /&gt;
===TTA sympt===&lt;br /&gt;
''The time you take for recovering after being symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
===TTA Diagnostic=== &lt;br /&gt;
''Time to go to the doctor and have the result.''&lt;br /&gt;
&lt;br /&gt;
=3&lt;br /&gt;
&lt;br /&gt;
===TTA diag===&lt;br /&gt;
''The time you take for recovering after being diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=11&lt;br /&gt;
&lt;br /&gt;
===TTA Hospitalization=== &lt;br /&gt;
''Time to go to the Hospital.''&lt;br /&gt;
&lt;br /&gt;
=1&lt;br /&gt;
&lt;br /&gt;
===TTA Hospital===&lt;br /&gt;
''The time you stay at the hospital before recovering or dying.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
As explained in the problem definition we will focused our results on 3 cases. &lt;br /&gt;
* The first one is the normal scenario, with classic lockdown and regular numbers of beds for Switzerland&lt;br /&gt;
* The second is the same scenario as for the 1st one but the lockdown is delayed by 1 day,&lt;br /&gt;
* The third scenario is the normal scenario with a number of hospital beds reduce by 10 000 beds.&lt;br /&gt;
&lt;br /&gt;
==Normal Scenario==&lt;br /&gt;
&lt;br /&gt;
The first scenario take place in Switzerland with 8 500 000 peoples and a hospital capacity of 356 beds for 100k people. The first case was detected the 25 february 2019 and 20 days after the Government of Switzerland have decided to take some serious measures that is in our case represented by a lockdown. &lt;br /&gt;
&lt;br /&gt;
The following table show us the official number of new cases per day:&lt;br /&gt;
&lt;br /&gt;
[[File:Newcases.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
From the simulation we get:&lt;br /&gt;
&lt;br /&gt;
[[File:Yes.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
We can see that the model is really closed to the reality with a pic of 1350 after 35 days. The simulation stopped after 100 days so we just focused on these first 100 days. The reality display a pic at 1243 days after 30 days.&lt;br /&gt;
&lt;br /&gt;
The true number of new death per day, and the number from the simulation is also display below:&lt;br /&gt;
&lt;br /&gt;
[[File: deat.png|500px|left]]        [[File:Deats.18.png|500px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We can see that the model is one more time really closed to the reality with a pic of 43 deaths after 50 days, while the reality display a pic at 44 days after 36 days.&lt;br /&gt;
&lt;br /&gt;
We have seen that the simulation is really closed from the data obtained for the Switzerland, but now lets go trough some special cases to see the impact of some decision on the variables.&lt;br /&gt;
&lt;br /&gt;
==Scenario 1: Late lockdown==&lt;br /&gt;
&lt;br /&gt;
In this scenario we will see what could have happened if the government take 1 more day to react and to set up the lockdown. To simulate such a scenario I simply increase the number of &amp;quot;Ratio official cases/pop&amp;quot; in the function IF THEN ELSE in &amp;quot;contact&amp;quot; and &amp;quot;contagion rate&amp;quot; from 0.00015 to 0.00018 and it delay the reaction of the government for 1 day.&lt;br /&gt;
&lt;br /&gt;
[[File: Deathz1.png|450px|left]][[File: Deathz2.png|500px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graph, the total number of official cases (=total diagnosed) jump from 33 000 to 45 000 cases. An increase of 35% in the number of official cases by just delaying for 1 day the government decisions. It illustrates well the exponential effect on the model, indeed we don't have to forget that the delay is just one day but if it has been 4-5 days the number of cases would have been exponentially higher. The second graph shows the deaths jump from 1600 to 2300, that is due to increasing number of cases and the hospital capacity reaching more than 60% utilization. Indeed due to the lookup function if the hospital capacity exceed 60% the mortality increase in the hospital. This is a very interesting scenarios that shows quite well the importance of the early lockdown and highlight the most important point in our model, '''the reaction time'''.&lt;br /&gt;
&lt;br /&gt;
==Scenario 2: Small Hospital capacity==&lt;br /&gt;
&lt;br /&gt;
In this scenario the number of hospital beds goes from 356/100k people to 238/100k people, a loss of -10 000 in variable ''hospital bed'' for Switzerland. This number of beds corresponds to the number of beds for a less developing country, such as Iceland (https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704). &lt;br /&gt;
&lt;br /&gt;
[[File: Utiliz.png|500px|left]][[File: Dead.png|480px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graphs, the hospital utilization reach almost 80%. Patients are not treated as well as they would if the utilization was lower, and it involves more deaths for these patients (right graph). We can see the importance of hospital capacity and for government to have a '''good amount of hospitals'''.&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
To conclude I would say that it has been quite difficult to deal with the real data because I had to find every number or to adjust some variables to fit with the reality. Another difficulty that I had to faced was all times and units to setup. The model display almost the same numbers as the ones communicated by the Swiss government, what could indicate that the model are not too far from what is happening in real-life. &lt;br /&gt;
&lt;br /&gt;
The most important variable in the simulation is the '''reaction time''' of the government in order to take some measures against the fast spread of the virus, such as bringing more awareness or imposing a lockdown.&lt;br /&gt;
&lt;br /&gt;
A further exogenous variable here is the number of hospital beds, which is a good proxy for modeling different countries. Having a smaller number of beds is a sign of vulnerability for the health care system and will impact mortality. A solution to this pandemic could therefore be to increase the number of beds in order to avoid exceeding capacity. &lt;br /&gt;
&lt;br /&gt;
A limit to this simulation would be that it is a real pandemic, for example I first tried to simulate the full pandemic with the second pic (higher) as you can see in the graph of Switzerland but I have to admit that sometimes the reality (or my Vensim skills) are to difficult to simulate that is why I choose to stop the simulation after 100 days.&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
[[File:Simulation Covid-19.mdl]]&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
#Federal Office of Public Health FOPH, https://www.bag.admin.ch/bag/en/home.html&lt;br /&gt;
#Fismann, D. (2009), “Modellig an Influenza Pandemic: A Guide for the Perplexed”, CMAJ,August.&lt;br /&gt;
#Madhav, N. (2017), “Pandemics: Risks, Impacts, and Mitigation”, November.&lt;br /&gt;
#Federal Office of Public Health FOPH, https://www.bag.admin.ch/bag/en/home.html&lt;br /&gt;
#https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704&lt;br /&gt;
#https://www.covid19.admin.ch/en/epidemiologic/case?detTime=total&amp;amp;detRel=abs&lt;br /&gt;
#https://www.covid19.admin.ch/en/epidemiologic/death?detTime=total&amp;amp;detRel=abs&lt;/div&gt;</summary>
		<author><name>Toscool</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20309</id>
		<title>Impact of late lockdown and hospital capacity on 19-COVID spread</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20309"/>
		<updated>2021-01-08T10:34:04Z</updated>

		<summary type="html">&lt;p&gt;Toscool: /* Normal Scenario */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=Problem definition=&lt;br /&gt;
&lt;br /&gt;
The coronavirus pandemic is an ongoing pandemic, the first case confirmed in Switzerland  was on February 25th, 2020 and has known an exponential growth since. We know that the virus is spread from an infected person to a healthy one during close contact or via touching a contaminated surface. The aim of the simulation is to display the dynamics of the reaction time of the government to take measures and to see if the hospital capacity play a key role in the spread of the COVID-19&lt;br /&gt;
&lt;br /&gt;
=Method=&lt;br /&gt;
&lt;br /&gt;
Vensim modelling approach was selected due to dynamic behavior of the simulated system.&lt;br /&gt;
&lt;br /&gt;
the model shows the evolution of the number of people who got infected by the covid-19 virus in countries where the population have a high health care protection and where the government have decided to make a decision about the virus propagation. The model will explain how fast the virus spreads itself and how political decisions can change the number of infected people at a given point in time. The construction of the model is simple: at the beginning one person is infected and will, then, infect other people. When you are infected many possibilities are open:&lt;br /&gt;
* You can be a healthy virus carrier. In that case you will not know that you have the virus and after 19 days you will be recovered.&lt;br /&gt;
* After 5 days you get symptoms, but you do not have any important health problems, you will recover in the next 14 days.&lt;br /&gt;
* After 5 days, you get symptoms and you are very sick and have respiratory problems, after 3 more days, still feeling bad, you decide to go to the doctor to get a diagnosis. The doctor has than two options: to send you back home, where you will recover after 11 more days or hospitalized you the next day.&lt;br /&gt;
* The doctor had decided to hospitalize you, you then spend two weeks in intensive care, where you will need artificial ventilation and 24-hour nursing care. You can then recover or unfortunately die. &lt;br /&gt;
&lt;br /&gt;
The higher the hospital utilization, the greater the probability to die. Indeed, if hospitals get busier, the medical staff will be less available and health care quality might decrease. When the number of diagnosed and hospitalized people (which are the official number of cases) is greater than a certain percentage of the population, the government will take decisions to slow down the spread of the virus. This is to say that governments will take some measures, such as installing a forced lockdown of the population to decrease the number of contacts per habitant. Moreover, such a decision will have an impact on the population, which will be more aware of the situation and will be more careful to not spread or contract the virus. So, the contagion rate as the number of contacts per people will slow down. They will be less hospitalized people, that means less people in the hospital, meaning a better service and so less people who die.&lt;br /&gt;
&lt;br /&gt;
=Model=&lt;br /&gt;
&lt;br /&gt;
Following vensim model was developed based on the study.&lt;br /&gt;
&lt;br /&gt;
[[File:Model1.png|900px|thumb|center|COVID-19 pandemic in Switzerland Stock Flow Diagram]]&lt;br /&gt;
&lt;br /&gt;
== Variables ==&lt;br /&gt;
&lt;br /&gt;
===Initial population=== &lt;br /&gt;
''The Population of Switzerland can be found here: https://en.wikipedia.org/wiki/Demographics_of_Switzerland''&lt;br /&gt;
&lt;br /&gt;
=8 500 000&lt;br /&gt;
&lt;br /&gt;
===Ratio susceptible people=== &lt;br /&gt;
''Decrease the susceptible people by the number of deaths due to the COVID-19.''&lt;br /&gt;
&lt;br /&gt;
=Susceptible population / (Initial population-Dead)&lt;br /&gt;
&lt;br /&gt;
===Susceptible population=== &lt;br /&gt;
''Decrease the susceptible population by the number of new infections.''&lt;br /&gt;
&lt;br /&gt;
=-New infections&lt;br /&gt;
&lt;br /&gt;
===contact=== &lt;br /&gt;
'''Lockdown:''' ''Function IF THEN ELSE that bring the number of new people you meet (contact) from 5 to 0.05 if the ratio exceed 0.015%''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot;&amp;gt; 0.00015, 0.05 , 5 )&lt;br /&gt;
&lt;br /&gt;
===Contagion Rate=== &lt;br /&gt;
'''Lockdown:''' ''contagion rate: IF THEN ELSE that bring the contagion rate from 0.1 to 0.075 if the ratio exceed 0.015%. Function of the awareness in the population (washing more often their hands if lockdown)''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot; &amp;gt; 0.00015 , 0.075 , 0.1 )&lt;br /&gt;
&lt;br /&gt;
===New infections=== &lt;br /&gt;
''It represent the new number of people infected each day.''&lt;br /&gt;
&lt;br /&gt;
=contact*Infected*Ratio susceptible people*Contagion Rate&lt;br /&gt;
&lt;br /&gt;
===Infected=== &lt;br /&gt;
''It represent the stock of the new people infected. We start the model with 1 infected people.''&lt;br /&gt;
&lt;br /&gt;
=New infections-New recoveries from infected-New symptoms ///// Initial value: 1&lt;br /&gt;
&lt;br /&gt;
===New recoveries from infected===&lt;br /&gt;
''It represent the number of people without symptoms and they go in the recovered stock after 19 days.''&lt;br /&gt;
&lt;br /&gt;
=((1-Ratio Symptoms)*Infected)/TTA recoveries&lt;br /&gt;
&lt;br /&gt;
===New symptoms=== &lt;br /&gt;
''It represent the number of new people that develop symptoms during 5 days before going to the symptomatic stock.''&lt;br /&gt;
&lt;br /&gt;
=(Infected*Ratio Symptoms)/TTA Symptoms&lt;br /&gt;
&lt;br /&gt;
===Ratio Symptoms=== &lt;br /&gt;
''The ratio of people who develop some symptoms.''&lt;br /&gt;
&lt;br /&gt;
=0.2&lt;br /&gt;
&lt;br /&gt;
===Symptomatic=== &lt;br /&gt;
''The stock of people symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=New symptoms-New Diagnostic-New recoveries from symptoms&lt;br /&gt;
&lt;br /&gt;
===New recoveries from symptoms=== &lt;br /&gt;
''It represent the number of people that have symptoms but that were not to the doctor, after 14 they are in the recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Diagnost)*Symptomatic/TTA sympt&lt;br /&gt;
&lt;br /&gt;
===New Diagnostic=== &lt;br /&gt;
''It represent the number of new people that are diagnosed each day, they stay 3 days before having the diagnostic.''&lt;br /&gt;
&lt;br /&gt;
=Symptomatic*Ratio Diagnost/TTA Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Ratio Diagnost===&lt;br /&gt;
''the ratio of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=0.4&lt;br /&gt;
&lt;br /&gt;
===Diagnosed=== &lt;br /&gt;
''The stock of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic-New Hospitalization-New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===New Recovery from Diagnostic===&lt;br /&gt;
''It represent the number of people that are diagnosed and not sent to the hospital. they stay 11 days before going in the Recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Hospitalize)*Diagnosed/TTA diag&lt;br /&gt;
&lt;br /&gt;
===New Hospitalization=== &lt;br /&gt;
''It represent the number of people that are diagnosed and sent to the hospital. they stay 1 day before being sent.''&lt;br /&gt;
&lt;br /&gt;
=(Diagnosed*Ratio Hospitalize)/TTA Hospitalization Ratio Hospitalize&lt;br /&gt;
&lt;br /&gt;
===Ratio Hospitalize===&lt;br /&gt;
''The ratio of people that are Hospitalized.''&lt;br /&gt;
&lt;br /&gt;
=0.3&lt;br /&gt;
&lt;br /&gt;
===Hospitalized=== &lt;br /&gt;
''The stock of people that are hospitalized before being Recovered or Dead.''&lt;br /&gt;
&lt;br /&gt;
=New Hospitalization-New Death-New Recovery&lt;br /&gt;
&lt;br /&gt;
===New Recovery=== &lt;br /&gt;
''The number of people that recover each day from the hospitalization. It depends on the '''Taux Mortality''' which is depend from the '''hospital utilization''' (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=((1-Taux Mortality)*Hospitalized)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===New Death===&lt;br /&gt;
''The number of people that die each day from the hospitalization. It depends on the '''Taux Mortality''' which is depend from the '''hospital utilization''' (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized* Taux Mortality)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===hospital bed=== &lt;br /&gt;
''The number of bed in Switzerland is 356 beds for 100k people with 8.5M people it gives that number: https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704''&lt;br /&gt;
&lt;br /&gt;
=30260&lt;br /&gt;
&lt;br /&gt;
===hospital utilization=== &lt;br /&gt;
''For the utilization of the hospital I assumed that there is already 8260 beds used for regular patient (outside the covid pandemic). The more utilization we have, the greater the probability to die. Indeed, if hospitals get busier, the medical staff will be less available and health care quality might decrease.''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized/(hospital bed - 8260))&lt;br /&gt;
&lt;br /&gt;
===lookup mortality===&lt;br /&gt;
''The lookup function is used to described the taux mortality.''&lt;br /&gt;
&lt;br /&gt;
[(0,0)-(1000,0.3)],(0,0.065),(0.6,0.065),(0.8,0.12),(1,0.25),(1.2,0.3),(10,0.3),(1000,0.3)&lt;br /&gt;
&lt;br /&gt;
===Taux Mortality=== &lt;br /&gt;
''The mortality rate depends on the hospital utilization. For example based on the above function, if the capacity reach 100% the hospital is full and the chance to die is then 25%.''&lt;br /&gt;
&lt;br /&gt;
=lk mortality (hospital utilization)&lt;br /&gt;
&lt;br /&gt;
===Dead=== &lt;br /&gt;
''The stock of Dead people killed by the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New Death&lt;br /&gt;
&lt;br /&gt;
===Recovered=== &lt;br /&gt;
''The Total amount of people who recovered from the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New recoveries from infected+New recoveries from symptoms+New Recovery+New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===official active cases===&lt;br /&gt;
''It represent the number of people that were tested and it's this number that will be used by the government to follow the pandemic and take decision of lockdown.''&lt;br /&gt;
&lt;br /&gt;
=Diagnosed+Hosptitalized&lt;br /&gt;
&lt;br /&gt;
===Ratio official cases/pop=== &lt;br /&gt;
''The ratio that will be used for lockdown. ''&lt;br /&gt;
&lt;br /&gt;
=official active cases/ Initial population&lt;br /&gt;
&lt;br /&gt;
===New Diagnosed.1=== &lt;br /&gt;
''It's is just the same as New Diagnostic, it is used in the model to have the Total Diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Total Diagnosed=== &lt;br /&gt;
''Used in the model to have the official number of cases in the model.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnosed.1&lt;br /&gt;
&lt;br /&gt;
===TTA recoveries=== &lt;br /&gt;
''Time to recover after being infected and not having symptoms.''&lt;br /&gt;
&lt;br /&gt;
=19&lt;br /&gt;
&lt;br /&gt;
===TTA Symptoms=== &lt;br /&gt;
''The time you take to develop symptoms.''&lt;br /&gt;
&lt;br /&gt;
=5&lt;br /&gt;
&lt;br /&gt;
===TTA sympt===&lt;br /&gt;
''The time you take for recovering after being symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
===TTA Diagnostic=== &lt;br /&gt;
''Time to go to the doctor and have the result.''&lt;br /&gt;
&lt;br /&gt;
=3&lt;br /&gt;
&lt;br /&gt;
===TTA diag===&lt;br /&gt;
''The time you take for recovering after being diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=11&lt;br /&gt;
&lt;br /&gt;
===TTA Hospitalization=== &lt;br /&gt;
''Time to go to the Hospital.''&lt;br /&gt;
&lt;br /&gt;
=1&lt;br /&gt;
&lt;br /&gt;
===TTA Hospital===&lt;br /&gt;
''The time you stay at the hospital before recovering or dying.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
As explained in the problem definition we will focused our results on 3 cases. &lt;br /&gt;
* The first one is the normal scenario, with classic lockdown and regular numbers of beds for Switzerland&lt;br /&gt;
* The second is the same scenario as for the 1st one but the lockdown is delayed by 1 day,&lt;br /&gt;
* The third scenario is the normal scenario with a number of hospital beds reduce by 10 000 beds.&lt;br /&gt;
&lt;br /&gt;
==Normal Scenario==&lt;br /&gt;
&lt;br /&gt;
The first scenario take place in Switzerland with 8 500 000 peoples and a hospital capacity of 356 beds for 100k people. The first case was detected the 25 february 2019 and 20 days after the Government of Switzerland have decided to take some serious measures that is in our case represented by a lockdown. &lt;br /&gt;
&lt;br /&gt;
The following table show us the official number of new cases per day:&lt;br /&gt;
&lt;br /&gt;
[[File:Newcases.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
From the simulation we get:&lt;br /&gt;
&lt;br /&gt;
[[File:Yes.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
We can see that the model is really closed to the reality with a pic of 1350 after 35 days. The simulation stopped after 100 days so we just focused on these first 100 days. The reality display a pic at 1243 days after 30 days.&lt;br /&gt;
&lt;br /&gt;
The true number of new death per day, and the number from the simulation is also display below:&lt;br /&gt;
&lt;br /&gt;
[[File: deat.png|500px|left]]        [[File:Deats.18.png|500px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We can see that the model is one more time really closed to the reality with a pic of 43 deaths after 50 days, while the reality display a pic at 44 days after 36 days.&lt;br /&gt;
&lt;br /&gt;
We have seen that the simulation is really closed from the data obtained for the Switzerland, but now lets go trough some special cases to see the impact of some decision on the variables.&lt;br /&gt;
&lt;br /&gt;
==Scenario 1: Late lockdown==&lt;br /&gt;
&lt;br /&gt;
In this scenario we will see what could have happened if the government take 1 more day to react and to set up the lockdown. To simulate such a scenario I simply increase the number of &amp;quot;Ratio official cases/pop&amp;quot; in the function IF THEN ELSE in &amp;quot;contact&amp;quot; and &amp;quot;contagion rate&amp;quot; from 0.00015 to 0.00018 and it delay the reaction of the government for 1 day.&lt;br /&gt;
&lt;br /&gt;
[[File: Deathz1.png|450px|left]][[File: Deathz2.png|500px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graph, the total number of official cases (=total diagnosed) jump from 33 000 to 45 000 cases. An increase of 35% in the number of official cases by just delaying for 1 day the government decisions. It illustrates well the exponential effect on the model, indeed we don't have to forget that the delay is just one day but if it has been 4-5 days the number of cases would have been exponentially higher. The second graph shows the deaths jump from 1600 to 2300, that is due to increasing number of cases and the hospital capacity reaching more than 60% utilization. Indeed due to the lookup function if the hospital capacity exceed 60% the mortality increase in the hospital. This is a very interesting scenarios that shows quite well the importance of the early lockdown and highlight the most important point in our model, '''the reaction time'''.&lt;br /&gt;
&lt;br /&gt;
==Scenario 2: Small Hospital capacity==&lt;br /&gt;
&lt;br /&gt;
In this scenario the number of hospital beds goes from 356/100k people to 238/100k people, a loss of -10 000 in variable ''hospital bed'' for Switzerland. This number of beds corresponds to the number of beds for a less developing country, such as Iceland (https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704). &lt;br /&gt;
&lt;br /&gt;
[[File: Utiliz.png|500px|left]][[File: Dead.png|480px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graphs, the hospital utilization reach almost 80%. Patients are not treated as well as they would if the utilization was lower, and it involves more deaths for these patients (right graph). We can see the importance of hospital capacity and for government to have a '''good amount of hospitals'''.&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
To conclude I would say that it has been quite difficult to deal with the real data because I had to find every number or to adjust some variables to fit with the reality. Another difficulty that I had to faced was all times and units to setup. The model display almost the same numbers as the ones communicated by the Swiss government, what could indicate that the model are not too far from what is happening in real-life. &lt;br /&gt;
&lt;br /&gt;
The most important variable in the simulation is the '''reaction time''' of the government in order to take some measures against the fast spread of the virus, such as bringing more awareness or imposing a lockdown.&lt;br /&gt;
&lt;br /&gt;
A further exogenous variable here is the number of hospital beds, which is a good proxy for modeling different countries. Having a smaller number of beds is a sign of vulnerability for the health care system and will impact mortality. A solution to this pandemic could therefore be to increase the number of beds in order to avoid exceeding capacity. &lt;br /&gt;
&lt;br /&gt;
A limit to this simulation would be that it is a real pandemic, for example I first tried to simulate the full pandemic with the second pic (higher) as you can see in the graph of Switzerland but I have to admit that sometimes the reality (or my Vensim skills) are to difficult to simulate that is why I choose to stop the simulation after 100 days.&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
[[File:Simulation Covid-19.mdl]]&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
#Federal Office of Public Health FOPH, https://www.bag.admin.ch/bag/en/home.html&lt;br /&gt;
#Fismann, D. (2009), “Modellig an Influenza Pandemic: A Guide for the Perplexed”, CMAJ,August.&lt;br /&gt;
#Madhav, N. (2017), “Pandemics: Risks, Impacts, and Mitigation”, November.&lt;br /&gt;
#Federal Office of Public Health FOPH, https://www.bag.admin.ch/bag/en/home.html&lt;br /&gt;
#https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704&lt;br /&gt;
#https://www.covid19.admin.ch/en/epidemiologic/case?detTime=total&amp;amp;detRel=abs&lt;br /&gt;
#https://www.covid19.admin.ch/en/epidemiologic/death?detTime=total&amp;amp;detRel=abs&lt;/div&gt;</summary>
		<author><name>Toscool</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20308</id>
		<title>Impact of late lockdown and hospital capacity on 19-COVID spread</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20308"/>
		<updated>2021-01-08T10:33:50Z</updated>

		<summary type="html">&lt;p&gt;Toscool: /* Normal Scenario */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=Problem definition=&lt;br /&gt;
&lt;br /&gt;
The coronavirus pandemic is an ongoing pandemic, the first case confirmed in Switzerland  was on February 25th, 2020 and has known an exponential growth since. We know that the virus is spread from an infected person to a healthy one during close contact or via touching a contaminated surface. The aim of the simulation is to display the dynamics of the reaction time of the government to take measures and to see if the hospital capacity play a key role in the spread of the COVID-19&lt;br /&gt;
&lt;br /&gt;
=Method=&lt;br /&gt;
&lt;br /&gt;
Vensim modelling approach was selected due to dynamic behavior of the simulated system.&lt;br /&gt;
&lt;br /&gt;
the model shows the evolution of the number of people who got infected by the covid-19 virus in countries where the population have a high health care protection and where the government have decided to make a decision about the virus propagation. The model will explain how fast the virus spreads itself and how political decisions can change the number of infected people at a given point in time. The construction of the model is simple: at the beginning one person is infected and will, then, infect other people. When you are infected many possibilities are open:&lt;br /&gt;
* You can be a healthy virus carrier. In that case you will not know that you have the virus and after 19 days you will be recovered.&lt;br /&gt;
* After 5 days you get symptoms, but you do not have any important health problems, you will recover in the next 14 days.&lt;br /&gt;
* After 5 days, you get symptoms and you are very sick and have respiratory problems, after 3 more days, still feeling bad, you decide to go to the doctor to get a diagnosis. The doctor has than two options: to send you back home, where you will recover after 11 more days or hospitalized you the next day.&lt;br /&gt;
* The doctor had decided to hospitalize you, you then spend two weeks in intensive care, where you will need artificial ventilation and 24-hour nursing care. You can then recover or unfortunately die. &lt;br /&gt;
&lt;br /&gt;
The higher the hospital utilization, the greater the probability to die. Indeed, if hospitals get busier, the medical staff will be less available and health care quality might decrease. When the number of diagnosed and hospitalized people (which are the official number of cases) is greater than a certain percentage of the population, the government will take decisions to slow down the spread of the virus. This is to say that governments will take some measures, such as installing a forced lockdown of the population to decrease the number of contacts per habitant. Moreover, such a decision will have an impact on the population, which will be more aware of the situation and will be more careful to not spread or contract the virus. So, the contagion rate as the number of contacts per people will slow down. They will be less hospitalized people, that means less people in the hospital, meaning a better service and so less people who die.&lt;br /&gt;
&lt;br /&gt;
=Model=&lt;br /&gt;
&lt;br /&gt;
Following vensim model was developed based on the study.&lt;br /&gt;
&lt;br /&gt;
[[File:Model1.png|900px|thumb|center|COVID-19 pandemic in Switzerland Stock Flow Diagram]]&lt;br /&gt;
&lt;br /&gt;
== Variables ==&lt;br /&gt;
&lt;br /&gt;
===Initial population=== &lt;br /&gt;
''The Population of Switzerland can be found here: https://en.wikipedia.org/wiki/Demographics_of_Switzerland''&lt;br /&gt;
&lt;br /&gt;
=8 500 000&lt;br /&gt;
&lt;br /&gt;
===Ratio susceptible people=== &lt;br /&gt;
''Decrease the susceptible people by the number of deaths due to the COVID-19.''&lt;br /&gt;
&lt;br /&gt;
=Susceptible population / (Initial population-Dead)&lt;br /&gt;
&lt;br /&gt;
===Susceptible population=== &lt;br /&gt;
''Decrease the susceptible population by the number of new infections.''&lt;br /&gt;
&lt;br /&gt;
=-New infections&lt;br /&gt;
&lt;br /&gt;
===contact=== &lt;br /&gt;
'''Lockdown:''' ''Function IF THEN ELSE that bring the number of new people you meet (contact) from 5 to 0.05 if the ratio exceed 0.015%''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot;&amp;gt; 0.00015, 0.05 , 5 )&lt;br /&gt;
&lt;br /&gt;
===Contagion Rate=== &lt;br /&gt;
'''Lockdown:''' ''contagion rate: IF THEN ELSE that bring the contagion rate from 0.1 to 0.075 if the ratio exceed 0.015%. Function of the awareness in the population (washing more often their hands if lockdown)''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot; &amp;gt; 0.00015 , 0.075 , 0.1 )&lt;br /&gt;
&lt;br /&gt;
===New infections=== &lt;br /&gt;
''It represent the new number of people infected each day.''&lt;br /&gt;
&lt;br /&gt;
=contact*Infected*Ratio susceptible people*Contagion Rate&lt;br /&gt;
&lt;br /&gt;
===Infected=== &lt;br /&gt;
''It represent the stock of the new people infected. We start the model with 1 infected people.''&lt;br /&gt;
&lt;br /&gt;
=New infections-New recoveries from infected-New symptoms ///// Initial value: 1&lt;br /&gt;
&lt;br /&gt;
===New recoveries from infected===&lt;br /&gt;
''It represent the number of people without symptoms and they go in the recovered stock after 19 days.''&lt;br /&gt;
&lt;br /&gt;
=((1-Ratio Symptoms)*Infected)/TTA recoveries&lt;br /&gt;
&lt;br /&gt;
===New symptoms=== &lt;br /&gt;
''It represent the number of new people that develop symptoms during 5 days before going to the symptomatic stock.''&lt;br /&gt;
&lt;br /&gt;
=(Infected*Ratio Symptoms)/TTA Symptoms&lt;br /&gt;
&lt;br /&gt;
===Ratio Symptoms=== &lt;br /&gt;
''The ratio of people who develop some symptoms.''&lt;br /&gt;
&lt;br /&gt;
=0.2&lt;br /&gt;
&lt;br /&gt;
===Symptomatic=== &lt;br /&gt;
''The stock of people symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=New symptoms-New Diagnostic-New recoveries from symptoms&lt;br /&gt;
&lt;br /&gt;
===New recoveries from symptoms=== &lt;br /&gt;
''It represent the number of people that have symptoms but that were not to the doctor, after 14 they are in the recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Diagnost)*Symptomatic/TTA sympt&lt;br /&gt;
&lt;br /&gt;
===New Diagnostic=== &lt;br /&gt;
''It represent the number of new people that are diagnosed each day, they stay 3 days before having the diagnostic.''&lt;br /&gt;
&lt;br /&gt;
=Symptomatic*Ratio Diagnost/TTA Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Ratio Diagnost===&lt;br /&gt;
''the ratio of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=0.4&lt;br /&gt;
&lt;br /&gt;
===Diagnosed=== &lt;br /&gt;
''The stock of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic-New Hospitalization-New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===New Recovery from Diagnostic===&lt;br /&gt;
''It represent the number of people that are diagnosed and not sent to the hospital. they stay 11 days before going in the Recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Hospitalize)*Diagnosed/TTA diag&lt;br /&gt;
&lt;br /&gt;
===New Hospitalization=== &lt;br /&gt;
''It represent the number of people that are diagnosed and sent to the hospital. they stay 1 day before being sent.''&lt;br /&gt;
&lt;br /&gt;
=(Diagnosed*Ratio Hospitalize)/TTA Hospitalization Ratio Hospitalize&lt;br /&gt;
&lt;br /&gt;
===Ratio Hospitalize===&lt;br /&gt;
''The ratio of people that are Hospitalized.''&lt;br /&gt;
&lt;br /&gt;
=0.3&lt;br /&gt;
&lt;br /&gt;
===Hospitalized=== &lt;br /&gt;
''The stock of people that are hospitalized before being Recovered or Dead.''&lt;br /&gt;
&lt;br /&gt;
=New Hospitalization-New Death-New Recovery&lt;br /&gt;
&lt;br /&gt;
===New Recovery=== &lt;br /&gt;
''The number of people that recover each day from the hospitalization. It depends on the '''Taux Mortality''' which is depend from the '''hospital utilization''' (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=((1-Taux Mortality)*Hospitalized)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===New Death===&lt;br /&gt;
''The number of people that die each day from the hospitalization. It depends on the '''Taux Mortality''' which is depend from the '''hospital utilization''' (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized* Taux Mortality)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===hospital bed=== &lt;br /&gt;
''The number of bed in Switzerland is 356 beds for 100k people with 8.5M people it gives that number: https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704''&lt;br /&gt;
&lt;br /&gt;
=30260&lt;br /&gt;
&lt;br /&gt;
===hospital utilization=== &lt;br /&gt;
''For the utilization of the hospital I assumed that there is already 8260 beds used for regular patient (outside the covid pandemic). The more utilization we have, the greater the probability to die. Indeed, if hospitals get busier, the medical staff will be less available and health care quality might decrease.''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized/(hospital bed - 8260))&lt;br /&gt;
&lt;br /&gt;
===lookup mortality===&lt;br /&gt;
''The lookup function is used to described the taux mortality.''&lt;br /&gt;
&lt;br /&gt;
[(0,0)-(1000,0.3)],(0,0.065),(0.6,0.065),(0.8,0.12),(1,0.25),(1.2,0.3),(10,0.3),(1000,0.3)&lt;br /&gt;
&lt;br /&gt;
===Taux Mortality=== &lt;br /&gt;
''The mortality rate depends on the hospital utilization. For example based on the above function, if the capacity reach 100% the hospital is full and the chance to die is then 25%.''&lt;br /&gt;
&lt;br /&gt;
=lk mortality (hospital utilization)&lt;br /&gt;
&lt;br /&gt;
===Dead=== &lt;br /&gt;
''The stock of Dead people killed by the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New Death&lt;br /&gt;
&lt;br /&gt;
===Recovered=== &lt;br /&gt;
''The Total amount of people who recovered from the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New recoveries from infected+New recoveries from symptoms+New Recovery+New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===official active cases===&lt;br /&gt;
''It represent the number of people that were tested and it's this number that will be used by the government to follow the pandemic and take decision of lockdown.''&lt;br /&gt;
&lt;br /&gt;
=Diagnosed+Hosptitalized&lt;br /&gt;
&lt;br /&gt;
===Ratio official cases/pop=== &lt;br /&gt;
''The ratio that will be used for lockdown. ''&lt;br /&gt;
&lt;br /&gt;
=official active cases/ Initial population&lt;br /&gt;
&lt;br /&gt;
===New Diagnosed.1=== &lt;br /&gt;
''It's is just the same as New Diagnostic, it is used in the model to have the Total Diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Total Diagnosed=== &lt;br /&gt;
''Used in the model to have the official number of cases in the model.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnosed.1&lt;br /&gt;
&lt;br /&gt;
===TTA recoveries=== &lt;br /&gt;
''Time to recover after being infected and not having symptoms.''&lt;br /&gt;
&lt;br /&gt;
=19&lt;br /&gt;
&lt;br /&gt;
===TTA Symptoms=== &lt;br /&gt;
''The time you take to develop symptoms.''&lt;br /&gt;
&lt;br /&gt;
=5&lt;br /&gt;
&lt;br /&gt;
===TTA sympt===&lt;br /&gt;
''The time you take for recovering after being symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
===TTA Diagnostic=== &lt;br /&gt;
''Time to go to the doctor and have the result.''&lt;br /&gt;
&lt;br /&gt;
=3&lt;br /&gt;
&lt;br /&gt;
===TTA diag===&lt;br /&gt;
''The time you take for recovering after being diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=11&lt;br /&gt;
&lt;br /&gt;
===TTA Hospitalization=== &lt;br /&gt;
''Time to go to the Hospital.''&lt;br /&gt;
&lt;br /&gt;
=1&lt;br /&gt;
&lt;br /&gt;
===TTA Hospital===&lt;br /&gt;
''The time you stay at the hospital before recovering or dying.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
As explained in the problem definition we will focused our results on 3 cases. &lt;br /&gt;
* The first one is the normal scenario, with classic lockdown and regular numbers of beds for Switzerland&lt;br /&gt;
* The second is the same scenario as for the 1st one but the lockdown is delayed by 1 day,&lt;br /&gt;
* The third scenario is the normal scenario with a number of hospital beds reduce by 10 000 beds.&lt;br /&gt;
&lt;br /&gt;
==Normal Scenario==&lt;br /&gt;
&lt;br /&gt;
The first scenario take place in Switzerland with 8 500 000 peoples and a hospital capacity of 356 beds for 100k people. The first case was detected the 25 february 2019 and 20 days after the Government of Switzerland have decided to take some serious measures that is in our case represented by a lockdown. &lt;br /&gt;
&lt;br /&gt;
The following table show us the official number of new cases per day:&lt;br /&gt;
&lt;br /&gt;
[[File:Newcases.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
From the simulation we get:&lt;br /&gt;
&lt;br /&gt;
[[File:Yes.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
We can see that the model is really closed to the reality with a pic of 1350 after 35 days. The simulation stopped after 100 days so we just focused on these first 100 days. The reality display a pic at 1243 days after 30 days.&lt;br /&gt;
&lt;br /&gt;
The true number of new death per day, and the number from the simulation is also display below:&lt;br /&gt;
&lt;br /&gt;
[[File: deat.png|500px|left]]        [[File:Deats.18.png|500px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We can see that the model is one more time really closed to the reality with a pic of 43 deaths after 50 days, while the reality display a pic at 44 days after 36 days.&lt;br /&gt;
&lt;br /&gt;
We have seen that the simulation is really closed from the data obtained for the Switzerland, but now lets go trough some special cases to see the impact of some decision on the variables.&lt;br /&gt;
&lt;br /&gt;
==Scenario 1: Late lockdown==&lt;br /&gt;
&lt;br /&gt;
In this scenario we will see what could have happened if the government take 1 more day to react and to set up the lockdown. To simulate such a scenario I simply increase the number of &amp;quot;Ratio official cases/pop&amp;quot; in the function IF THEN ELSE in &amp;quot;contact&amp;quot; and &amp;quot;contagion rate&amp;quot; from 0.00015 to 0.00018 and it delay the reaction of the government for 1 day.&lt;br /&gt;
&lt;br /&gt;
[[File: Deathz1.png|450px|left]][[File: Deathz2.png|500px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graph, the total number of official cases (=total diagnosed) jump from 33 000 to 45 000 cases. An increase of 35% in the number of official cases by just delaying for 1 day the government decisions. It illustrates well the exponential effect on the model, indeed we don't have to forget that the delay is just one day but if it has been 4-5 days the number of cases would have been exponentially higher. The second graph shows the deaths jump from 1600 to 2300, that is due to increasing number of cases and the hospital capacity reaching more than 60% utilization. Indeed due to the lookup function if the hospital capacity exceed 60% the mortality increase in the hospital. This is a very interesting scenarios that shows quite well the importance of the early lockdown and highlight the most important point in our model, '''the reaction time'''.&lt;br /&gt;
&lt;br /&gt;
==Scenario 2: Small Hospital capacity==&lt;br /&gt;
&lt;br /&gt;
In this scenario the number of hospital beds goes from 356/100k people to 238/100k people, a loss of -10 000 in variable ''hospital bed'' for Switzerland. This number of beds corresponds to the number of beds for a less developing country, such as Iceland (https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704). &lt;br /&gt;
&lt;br /&gt;
[[File: Utiliz.png|500px|left]][[File: Dead.png|480px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graphs, the hospital utilization reach almost 80%. Patients are not treated as well as they would if the utilization was lower, and it involves more deaths for these patients (right graph). We can see the importance of hospital capacity and for government to have a '''good amount of hospitals'''.&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
To conclude I would say that it has been quite difficult to deal with the real data because I had to find every number or to adjust some variables to fit with the reality. Another difficulty that I had to faced was all times and units to setup. The model display almost the same numbers as the ones communicated by the Swiss government, what could indicate that the model are not too far from what is happening in real-life. &lt;br /&gt;
&lt;br /&gt;
The most important variable in the simulation is the '''reaction time''' of the government in order to take some measures against the fast spread of the virus, such as bringing more awareness or imposing a lockdown.&lt;br /&gt;
&lt;br /&gt;
A further exogenous variable here is the number of hospital beds, which is a good proxy for modeling different countries. Having a smaller number of beds is a sign of vulnerability for the health care system and will impact mortality. A solution to this pandemic could therefore be to increase the number of beds in order to avoid exceeding capacity. &lt;br /&gt;
&lt;br /&gt;
A limit to this simulation would be that it is a real pandemic, for example I first tried to simulate the full pandemic with the second pic (higher) as you can see in the graph of Switzerland but I have to admit that sometimes the reality (or my Vensim skills) are to difficult to simulate that is why I choose to stop the simulation after 100 days.&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
[[File:Simulation Covid-19.mdl]]&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
#Federal Office of Public Health FOPH, https://www.bag.admin.ch/bag/en/home.html&lt;br /&gt;
#Fismann, D. (2009), “Modellig an Influenza Pandemic: A Guide for the Perplexed”, CMAJ,August.&lt;br /&gt;
#Madhav, N. (2017), “Pandemics: Risks, Impacts, and Mitigation”, November.&lt;br /&gt;
#Federal Office of Public Health FOPH, https://www.bag.admin.ch/bag/en/home.html&lt;br /&gt;
#https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704&lt;br /&gt;
#https://www.covid19.admin.ch/en/epidemiologic/case?detTime=total&amp;amp;detRel=abs&lt;br /&gt;
#https://www.covid19.admin.ch/en/epidemiologic/death?detTime=total&amp;amp;detRel=abs&lt;/div&gt;</summary>
		<author><name>Toscool</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20307</id>
		<title>Impact of late lockdown and hospital capacity on 19-COVID spread</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20307"/>
		<updated>2021-01-08T10:33:34Z</updated>

		<summary type="html">&lt;p&gt;Toscool: /* Results */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=Problem definition=&lt;br /&gt;
&lt;br /&gt;
The coronavirus pandemic is an ongoing pandemic, the first case confirmed in Switzerland  was on February 25th, 2020 and has known an exponential growth since. We know that the virus is spread from an infected person to a healthy one during close contact or via touching a contaminated surface. The aim of the simulation is to display the dynamics of the reaction time of the government to take measures and to see if the hospital capacity play a key role in the spread of the COVID-19&lt;br /&gt;
&lt;br /&gt;
=Method=&lt;br /&gt;
&lt;br /&gt;
Vensim modelling approach was selected due to dynamic behavior of the simulated system.&lt;br /&gt;
&lt;br /&gt;
the model shows the evolution of the number of people who got infected by the covid-19 virus in countries where the population have a high health care protection and where the government have decided to make a decision about the virus propagation. The model will explain how fast the virus spreads itself and how political decisions can change the number of infected people at a given point in time. The construction of the model is simple: at the beginning one person is infected and will, then, infect other people. When you are infected many possibilities are open:&lt;br /&gt;
* You can be a healthy virus carrier. In that case you will not know that you have the virus and after 19 days you will be recovered.&lt;br /&gt;
* After 5 days you get symptoms, but you do not have any important health problems, you will recover in the next 14 days.&lt;br /&gt;
* After 5 days, you get symptoms and you are very sick and have respiratory problems, after 3 more days, still feeling bad, you decide to go to the doctor to get a diagnosis. The doctor has than two options: to send you back home, where you will recover after 11 more days or hospitalized you the next day.&lt;br /&gt;
* The doctor had decided to hospitalize you, you then spend two weeks in intensive care, where you will need artificial ventilation and 24-hour nursing care. You can then recover or unfortunately die. &lt;br /&gt;
&lt;br /&gt;
The higher the hospital utilization, the greater the probability to die. Indeed, if hospitals get busier, the medical staff will be less available and health care quality might decrease. When the number of diagnosed and hospitalized people (which are the official number of cases) is greater than a certain percentage of the population, the government will take decisions to slow down the spread of the virus. This is to say that governments will take some measures, such as installing a forced lockdown of the population to decrease the number of contacts per habitant. Moreover, such a decision will have an impact on the population, which will be more aware of the situation and will be more careful to not spread or contract the virus. So, the contagion rate as the number of contacts per people will slow down. They will be less hospitalized people, that means less people in the hospital, meaning a better service and so less people who die.&lt;br /&gt;
&lt;br /&gt;
=Model=&lt;br /&gt;
&lt;br /&gt;
Following vensim model was developed based on the study.&lt;br /&gt;
&lt;br /&gt;
[[File:Model1.png|900px|thumb|center|COVID-19 pandemic in Switzerland Stock Flow Diagram]]&lt;br /&gt;
&lt;br /&gt;
== Variables ==&lt;br /&gt;
&lt;br /&gt;
===Initial population=== &lt;br /&gt;
''The Population of Switzerland can be found here: https://en.wikipedia.org/wiki/Demographics_of_Switzerland''&lt;br /&gt;
&lt;br /&gt;
=8 500 000&lt;br /&gt;
&lt;br /&gt;
===Ratio susceptible people=== &lt;br /&gt;
''Decrease the susceptible people by the number of deaths due to the COVID-19.''&lt;br /&gt;
&lt;br /&gt;
=Susceptible population / (Initial population-Dead)&lt;br /&gt;
&lt;br /&gt;
===Susceptible population=== &lt;br /&gt;
''Decrease the susceptible population by the number of new infections.''&lt;br /&gt;
&lt;br /&gt;
=-New infections&lt;br /&gt;
&lt;br /&gt;
===contact=== &lt;br /&gt;
'''Lockdown:''' ''Function IF THEN ELSE that bring the number of new people you meet (contact) from 5 to 0.05 if the ratio exceed 0.015%''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot;&amp;gt; 0.00015, 0.05 , 5 )&lt;br /&gt;
&lt;br /&gt;
===Contagion Rate=== &lt;br /&gt;
'''Lockdown:''' ''contagion rate: IF THEN ELSE that bring the contagion rate from 0.1 to 0.075 if the ratio exceed 0.015%. Function of the awareness in the population (washing more often their hands if lockdown)''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot; &amp;gt; 0.00015 , 0.075 , 0.1 )&lt;br /&gt;
&lt;br /&gt;
===New infections=== &lt;br /&gt;
''It represent the new number of people infected each day.''&lt;br /&gt;
&lt;br /&gt;
=contact*Infected*Ratio susceptible people*Contagion Rate&lt;br /&gt;
&lt;br /&gt;
===Infected=== &lt;br /&gt;
''It represent the stock of the new people infected. We start the model with 1 infected people.''&lt;br /&gt;
&lt;br /&gt;
=New infections-New recoveries from infected-New symptoms ///// Initial value: 1&lt;br /&gt;
&lt;br /&gt;
===New recoveries from infected===&lt;br /&gt;
''It represent the number of people without symptoms and they go in the recovered stock after 19 days.''&lt;br /&gt;
&lt;br /&gt;
=((1-Ratio Symptoms)*Infected)/TTA recoveries&lt;br /&gt;
&lt;br /&gt;
===New symptoms=== &lt;br /&gt;
''It represent the number of new people that develop symptoms during 5 days before going to the symptomatic stock.''&lt;br /&gt;
&lt;br /&gt;
=(Infected*Ratio Symptoms)/TTA Symptoms&lt;br /&gt;
&lt;br /&gt;
===Ratio Symptoms=== &lt;br /&gt;
''The ratio of people who develop some symptoms.''&lt;br /&gt;
&lt;br /&gt;
=0.2&lt;br /&gt;
&lt;br /&gt;
===Symptomatic=== &lt;br /&gt;
''The stock of people symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=New symptoms-New Diagnostic-New recoveries from symptoms&lt;br /&gt;
&lt;br /&gt;
===New recoveries from symptoms=== &lt;br /&gt;
''It represent the number of people that have symptoms but that were not to the doctor, after 14 they are in the recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Diagnost)*Symptomatic/TTA sympt&lt;br /&gt;
&lt;br /&gt;
===New Diagnostic=== &lt;br /&gt;
''It represent the number of new people that are diagnosed each day, they stay 3 days before having the diagnostic.''&lt;br /&gt;
&lt;br /&gt;
=Symptomatic*Ratio Diagnost/TTA Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Ratio Diagnost===&lt;br /&gt;
''the ratio of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=0.4&lt;br /&gt;
&lt;br /&gt;
===Diagnosed=== &lt;br /&gt;
''The stock of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic-New Hospitalization-New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===New Recovery from Diagnostic===&lt;br /&gt;
''It represent the number of people that are diagnosed and not sent to the hospital. they stay 11 days before going in the Recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Hospitalize)*Diagnosed/TTA diag&lt;br /&gt;
&lt;br /&gt;
===New Hospitalization=== &lt;br /&gt;
''It represent the number of people that are diagnosed and sent to the hospital. they stay 1 day before being sent.''&lt;br /&gt;
&lt;br /&gt;
=(Diagnosed*Ratio Hospitalize)/TTA Hospitalization Ratio Hospitalize&lt;br /&gt;
&lt;br /&gt;
===Ratio Hospitalize===&lt;br /&gt;
''The ratio of people that are Hospitalized.''&lt;br /&gt;
&lt;br /&gt;
=0.3&lt;br /&gt;
&lt;br /&gt;
===Hospitalized=== &lt;br /&gt;
''The stock of people that are hospitalized before being Recovered or Dead.''&lt;br /&gt;
&lt;br /&gt;
=New Hospitalization-New Death-New Recovery&lt;br /&gt;
&lt;br /&gt;
===New Recovery=== &lt;br /&gt;
''The number of people that recover each day from the hospitalization. It depends on the '''Taux Mortality''' which is depend from the '''hospital utilization''' (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=((1-Taux Mortality)*Hospitalized)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===New Death===&lt;br /&gt;
''The number of people that die each day from the hospitalization. It depends on the '''Taux Mortality''' which is depend from the '''hospital utilization''' (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized* Taux Mortality)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===hospital bed=== &lt;br /&gt;
''The number of bed in Switzerland is 356 beds for 100k people with 8.5M people it gives that number: https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704''&lt;br /&gt;
&lt;br /&gt;
=30260&lt;br /&gt;
&lt;br /&gt;
===hospital utilization=== &lt;br /&gt;
''For the utilization of the hospital I assumed that there is already 8260 beds used for regular patient (outside the covid pandemic). The more utilization we have, the greater the probability to die. Indeed, if hospitals get busier, the medical staff will be less available and health care quality might decrease.''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized/(hospital bed - 8260))&lt;br /&gt;
&lt;br /&gt;
===lookup mortality===&lt;br /&gt;
''The lookup function is used to described the taux mortality.''&lt;br /&gt;
&lt;br /&gt;
[(0,0)-(1000,0.3)],(0,0.065),(0.6,0.065),(0.8,0.12),(1,0.25),(1.2,0.3),(10,0.3),(1000,0.3)&lt;br /&gt;
&lt;br /&gt;
===Taux Mortality=== &lt;br /&gt;
''The mortality rate depends on the hospital utilization. For example based on the above function, if the capacity reach 100% the hospital is full and the chance to die is then 25%.''&lt;br /&gt;
&lt;br /&gt;
=lk mortality (hospital utilization)&lt;br /&gt;
&lt;br /&gt;
===Dead=== &lt;br /&gt;
''The stock of Dead people killed by the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New Death&lt;br /&gt;
&lt;br /&gt;
===Recovered=== &lt;br /&gt;
''The Total amount of people who recovered from the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New recoveries from infected+New recoveries from symptoms+New Recovery+New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===official active cases===&lt;br /&gt;
''It represent the number of people that were tested and it's this number that will be used by the government to follow the pandemic and take decision of lockdown.''&lt;br /&gt;
&lt;br /&gt;
=Diagnosed+Hosptitalized&lt;br /&gt;
&lt;br /&gt;
===Ratio official cases/pop=== &lt;br /&gt;
''The ratio that will be used for lockdown. ''&lt;br /&gt;
&lt;br /&gt;
=official active cases/ Initial population&lt;br /&gt;
&lt;br /&gt;
===New Diagnosed.1=== &lt;br /&gt;
''It's is just the same as New Diagnostic, it is used in the model to have the Total Diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Total Diagnosed=== &lt;br /&gt;
''Used in the model to have the official number of cases in the model.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnosed.1&lt;br /&gt;
&lt;br /&gt;
===TTA recoveries=== &lt;br /&gt;
''Time to recover after being infected and not having symptoms.''&lt;br /&gt;
&lt;br /&gt;
=19&lt;br /&gt;
&lt;br /&gt;
===TTA Symptoms=== &lt;br /&gt;
''The time you take to develop symptoms.''&lt;br /&gt;
&lt;br /&gt;
=5&lt;br /&gt;
&lt;br /&gt;
===TTA sympt===&lt;br /&gt;
''The time you take for recovering after being symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
===TTA Diagnostic=== &lt;br /&gt;
''Time to go to the doctor and have the result.''&lt;br /&gt;
&lt;br /&gt;
=3&lt;br /&gt;
&lt;br /&gt;
===TTA diag===&lt;br /&gt;
''The time you take for recovering after being diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=11&lt;br /&gt;
&lt;br /&gt;
===TTA Hospitalization=== &lt;br /&gt;
''Time to go to the Hospital.''&lt;br /&gt;
&lt;br /&gt;
=1&lt;br /&gt;
&lt;br /&gt;
===TTA Hospital===&lt;br /&gt;
''The time you stay at the hospital before recovering or dying.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
As explained in the problem definition we will focused our results on 3 cases. &lt;br /&gt;
* The first one is the normal scenario, with classic lockdown and regular numbers of beds for Switzerland&lt;br /&gt;
* The second is the same scenario as for the 1st one but the lockdown is delayed by 1 day,&lt;br /&gt;
* The third scenario is the normal scenario with a number of hospital beds reduce by 10 000 beds.&lt;br /&gt;
&lt;br /&gt;
==Normal Scenario==&lt;br /&gt;
&lt;br /&gt;
The first scenario take place in Switzerland with 8 500 000 peoples and a hospital capacity of 356 beds for 100k people. The first case was detected the 25 february 2019 and 20 days after the Government of Switzerland have decided to take some serious measures that is in our case represented by a lockdown. &lt;br /&gt;
&lt;br /&gt;
The following table show us the official number of new cases per day:&lt;br /&gt;
&lt;br /&gt;
[[File:Newcases.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
From the simulation we get:&lt;br /&gt;
&lt;br /&gt;
[[File:Yes.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
We can see that the model is really closed to the reality with a pic of 1350 after 35 days. The simulation stopped after 100 days so we just focused on these first 100 days. The reality display a pic at 1243 days after 30 days.&lt;br /&gt;
&lt;br /&gt;
The true number of new death per day, and the number from the simulation is also display below:&lt;br /&gt;
&lt;br /&gt;
[[File: deat.png|500px|left]]        [[File:Deats.18.png|500px|right]]&lt;br /&gt;
&lt;br /&gt;
We can see that the model is one more time really closed to the reality with a pic of 43 deaths after 50 days, while the reality display a pic at 44 days after 36 days.&lt;br /&gt;
&lt;br /&gt;
We have seen that the simulation is really closed from the data obtained for the Switzerland, but now lets go trough some special cases to see the impact of some decision on the variables.&lt;br /&gt;
&lt;br /&gt;
==Scenario 1: Late lockdown==&lt;br /&gt;
&lt;br /&gt;
In this scenario we will see what could have happened if the government take 1 more day to react and to set up the lockdown. To simulate such a scenario I simply increase the number of &amp;quot;Ratio official cases/pop&amp;quot; in the function IF THEN ELSE in &amp;quot;contact&amp;quot; and &amp;quot;contagion rate&amp;quot; from 0.00015 to 0.00018 and it delay the reaction of the government for 1 day.&lt;br /&gt;
&lt;br /&gt;
[[File: Deathz1.png|450px|left]][[File: Deathz2.png|500px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graph, the total number of official cases (=total diagnosed) jump from 33 000 to 45 000 cases. An increase of 35% in the number of official cases by just delaying for 1 day the government decisions. It illustrates well the exponential effect on the model, indeed we don't have to forget that the delay is just one day but if it has been 4-5 days the number of cases would have been exponentially higher. The second graph shows the deaths jump from 1600 to 2300, that is due to increasing number of cases and the hospital capacity reaching more than 60% utilization. Indeed due to the lookup function if the hospital capacity exceed 60% the mortality increase in the hospital. This is a very interesting scenarios that shows quite well the importance of the early lockdown and highlight the most important point in our model, '''the reaction time'''.&lt;br /&gt;
&lt;br /&gt;
==Scenario 2: Small Hospital capacity==&lt;br /&gt;
&lt;br /&gt;
In this scenario the number of hospital beds goes from 356/100k people to 238/100k people, a loss of -10 000 in variable ''hospital bed'' for Switzerland. This number of beds corresponds to the number of beds for a less developing country, such as Iceland (https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704). &lt;br /&gt;
&lt;br /&gt;
[[File: Utiliz.png|500px|left]][[File: Dead.png|480px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graphs, the hospital utilization reach almost 80%. Patients are not treated as well as they would if the utilization was lower, and it involves more deaths for these patients (right graph). We can see the importance of hospital capacity and for government to have a '''good amount of hospitals'''.&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
To conclude I would say that it has been quite difficult to deal with the real data because I had to find every number or to adjust some variables to fit with the reality. Another difficulty that I had to faced was all times and units to setup. The model display almost the same numbers as the ones communicated by the Swiss government, what could indicate that the model are not too far from what is happening in real-life. &lt;br /&gt;
&lt;br /&gt;
The most important variable in the simulation is the '''reaction time''' of the government in order to take some measures against the fast spread of the virus, such as bringing more awareness or imposing a lockdown.&lt;br /&gt;
&lt;br /&gt;
A further exogenous variable here is the number of hospital beds, which is a good proxy for modeling different countries. Having a smaller number of beds is a sign of vulnerability for the health care system and will impact mortality. A solution to this pandemic could therefore be to increase the number of beds in order to avoid exceeding capacity. &lt;br /&gt;
&lt;br /&gt;
A limit to this simulation would be that it is a real pandemic, for example I first tried to simulate the full pandemic with the second pic (higher) as you can see in the graph of Switzerland but I have to admit that sometimes the reality (or my Vensim skills) are to difficult to simulate that is why I choose to stop the simulation after 100 days.&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
[[File:Simulation Covid-19.mdl]]&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
#Federal Office of Public Health FOPH, https://www.bag.admin.ch/bag/en/home.html&lt;br /&gt;
#Fismann, D. (2009), “Modellig an Influenza Pandemic: A Guide for the Perplexed”, CMAJ,August.&lt;br /&gt;
#Madhav, N. (2017), “Pandemics: Risks, Impacts, and Mitigation”, November.&lt;br /&gt;
#Federal Office of Public Health FOPH, https://www.bag.admin.ch/bag/en/home.html&lt;br /&gt;
#https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704&lt;br /&gt;
#https://www.covid19.admin.ch/en/epidemiologic/case?detTime=total&amp;amp;detRel=abs&lt;br /&gt;
#https://www.covid19.admin.ch/en/epidemiologic/death?detTime=total&amp;amp;detRel=abs&lt;/div&gt;</summary>
		<author><name>Toscool</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20306</id>
		<title>Impact of late lockdown and hospital capacity on 19-COVID spread</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20306"/>
		<updated>2021-01-08T10:29:10Z</updated>

		<summary type="html">&lt;p&gt;Toscool: /* New Death */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=Problem definition=&lt;br /&gt;
&lt;br /&gt;
The coronavirus pandemic is an ongoing pandemic, the first case confirmed in Switzerland  was on February 25th, 2020 and has known an exponential growth since. We know that the virus is spread from an infected person to a healthy one during close contact or via touching a contaminated surface. The aim of the simulation is to display the dynamics of the reaction time of the government to take measures and to see if the hospital capacity play a key role in the spread of the COVID-19&lt;br /&gt;
&lt;br /&gt;
=Method=&lt;br /&gt;
&lt;br /&gt;
Vensim modelling approach was selected due to dynamic behavior of the simulated system.&lt;br /&gt;
&lt;br /&gt;
the model shows the evolution of the number of people who got infected by the covid-19 virus in countries where the population have a high health care protection and where the government have decided to make a decision about the virus propagation. The model will explain how fast the virus spreads itself and how political decisions can change the number of infected people at a given point in time. The construction of the model is simple: at the beginning one person is infected and will, then, infect other people. When you are infected many possibilities are open:&lt;br /&gt;
* You can be a healthy virus carrier. In that case you will not know that you have the virus and after 19 days you will be recovered.&lt;br /&gt;
* After 5 days you get symptoms, but you do not have any important health problems, you will recover in the next 14 days.&lt;br /&gt;
* After 5 days, you get symptoms and you are very sick and have respiratory problems, after 3 more days, still feeling bad, you decide to go to the doctor to get a diagnosis. The doctor has than two options: to send you back home, where you will recover after 11 more days or hospitalized you the next day.&lt;br /&gt;
* The doctor had decided to hospitalize you, you then spend two weeks in intensive care, where you will need artificial ventilation and 24-hour nursing care. You can then recover or unfortunately die. &lt;br /&gt;
&lt;br /&gt;
The higher the hospital utilization, the greater the probability to die. Indeed, if hospitals get busier, the medical staff will be less available and health care quality might decrease. When the number of diagnosed and hospitalized people (which are the official number of cases) is greater than a certain percentage of the population, the government will take decisions to slow down the spread of the virus. This is to say that governments will take some measures, such as installing a forced lockdown of the population to decrease the number of contacts per habitant. Moreover, such a decision will have an impact on the population, which will be more aware of the situation and will be more careful to not spread or contract the virus. So, the contagion rate as the number of contacts per people will slow down. They will be less hospitalized people, that means less people in the hospital, meaning a better service and so less people who die.&lt;br /&gt;
&lt;br /&gt;
=Model=&lt;br /&gt;
&lt;br /&gt;
Following vensim model was developed based on the study.&lt;br /&gt;
&lt;br /&gt;
[[File:Model1.png|900px|thumb|center|COVID-19 pandemic in Switzerland Stock Flow Diagram]]&lt;br /&gt;
&lt;br /&gt;
== Variables ==&lt;br /&gt;
&lt;br /&gt;
===Initial population=== &lt;br /&gt;
''The Population of Switzerland can be found here: https://en.wikipedia.org/wiki/Demographics_of_Switzerland''&lt;br /&gt;
&lt;br /&gt;
=8 500 000&lt;br /&gt;
&lt;br /&gt;
===Ratio susceptible people=== &lt;br /&gt;
''Decrease the susceptible people by the number of deaths due to the COVID-19.''&lt;br /&gt;
&lt;br /&gt;
=Susceptible population / (Initial population-Dead)&lt;br /&gt;
&lt;br /&gt;
===Susceptible population=== &lt;br /&gt;
''Decrease the susceptible population by the number of new infections.''&lt;br /&gt;
&lt;br /&gt;
=-New infections&lt;br /&gt;
&lt;br /&gt;
===contact=== &lt;br /&gt;
'''Lockdown:''' ''Function IF THEN ELSE that bring the number of new people you meet (contact) from 5 to 0.05 if the ratio exceed 0.015%''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot;&amp;gt; 0.00015, 0.05 , 5 )&lt;br /&gt;
&lt;br /&gt;
===Contagion Rate=== &lt;br /&gt;
'''Lockdown:''' ''contagion rate: IF THEN ELSE that bring the contagion rate from 0.1 to 0.075 if the ratio exceed 0.015%. Function of the awareness in the population (washing more often their hands if lockdown)''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot; &amp;gt; 0.00015 , 0.075 , 0.1 )&lt;br /&gt;
&lt;br /&gt;
===New infections=== &lt;br /&gt;
''It represent the new number of people infected each day.''&lt;br /&gt;
&lt;br /&gt;
=contact*Infected*Ratio susceptible people*Contagion Rate&lt;br /&gt;
&lt;br /&gt;
===Infected=== &lt;br /&gt;
''It represent the stock of the new people infected. We start the model with 1 infected people.''&lt;br /&gt;
&lt;br /&gt;
=New infections-New recoveries from infected-New symptoms ///// Initial value: 1&lt;br /&gt;
&lt;br /&gt;
===New recoveries from infected===&lt;br /&gt;
''It represent the number of people without symptoms and they go in the recovered stock after 19 days.''&lt;br /&gt;
&lt;br /&gt;
=((1-Ratio Symptoms)*Infected)/TTA recoveries&lt;br /&gt;
&lt;br /&gt;
===New symptoms=== &lt;br /&gt;
''It represent the number of new people that develop symptoms during 5 days before going to the symptomatic stock.''&lt;br /&gt;
&lt;br /&gt;
=(Infected*Ratio Symptoms)/TTA Symptoms&lt;br /&gt;
&lt;br /&gt;
===Ratio Symptoms=== &lt;br /&gt;
''The ratio of people who develop some symptoms.''&lt;br /&gt;
&lt;br /&gt;
=0.2&lt;br /&gt;
&lt;br /&gt;
===Symptomatic=== &lt;br /&gt;
''The stock of people symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=New symptoms-New Diagnostic-New recoveries from symptoms&lt;br /&gt;
&lt;br /&gt;
===New recoveries from symptoms=== &lt;br /&gt;
''It represent the number of people that have symptoms but that were not to the doctor, after 14 they are in the recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Diagnost)*Symptomatic/TTA sympt&lt;br /&gt;
&lt;br /&gt;
===New Diagnostic=== &lt;br /&gt;
''It represent the number of new people that are diagnosed each day, they stay 3 days before having the diagnostic.''&lt;br /&gt;
&lt;br /&gt;
=Symptomatic*Ratio Diagnost/TTA Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Ratio Diagnost===&lt;br /&gt;
''the ratio of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=0.4&lt;br /&gt;
&lt;br /&gt;
===Diagnosed=== &lt;br /&gt;
''The stock of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic-New Hospitalization-New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===New Recovery from Diagnostic===&lt;br /&gt;
''It represent the number of people that are diagnosed and not sent to the hospital. they stay 11 days before going in the Recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Hospitalize)*Diagnosed/TTA diag&lt;br /&gt;
&lt;br /&gt;
===New Hospitalization=== &lt;br /&gt;
''It represent the number of people that are diagnosed and sent to the hospital. they stay 1 day before being sent.''&lt;br /&gt;
&lt;br /&gt;
=(Diagnosed*Ratio Hospitalize)/TTA Hospitalization Ratio Hospitalize&lt;br /&gt;
&lt;br /&gt;
===Ratio Hospitalize===&lt;br /&gt;
''The ratio of people that are Hospitalized.''&lt;br /&gt;
&lt;br /&gt;
=0.3&lt;br /&gt;
&lt;br /&gt;
===Hospitalized=== &lt;br /&gt;
''The stock of people that are hospitalized before being Recovered or Dead.''&lt;br /&gt;
&lt;br /&gt;
=New Hospitalization-New Death-New Recovery&lt;br /&gt;
&lt;br /&gt;
===New Recovery=== &lt;br /&gt;
''The number of people that recover each day from the hospitalization. It depends on the '''Taux Mortality''' which is depend from the '''hospital utilization''' (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=((1-Taux Mortality)*Hospitalized)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===New Death===&lt;br /&gt;
''The number of people that die each day from the hospitalization. It depends on the '''Taux Mortality''' which is depend from the '''hospital utilization''' (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized* Taux Mortality)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===hospital bed=== &lt;br /&gt;
''The number of bed in Switzerland is 356 beds for 100k people with 8.5M people it gives that number: https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704''&lt;br /&gt;
&lt;br /&gt;
=30260&lt;br /&gt;
&lt;br /&gt;
===hospital utilization=== &lt;br /&gt;
''For the utilization of the hospital I assumed that there is already 8260 beds used for regular patient (outside the covid pandemic). The more utilization we have, the greater the probability to die. Indeed, if hospitals get busier, the medical staff will be less available and health care quality might decrease.''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized/(hospital bed - 8260))&lt;br /&gt;
&lt;br /&gt;
===lookup mortality===&lt;br /&gt;
''The lookup function is used to described the taux mortality.''&lt;br /&gt;
&lt;br /&gt;
[(0,0)-(1000,0.3)],(0,0.065),(0.6,0.065),(0.8,0.12),(1,0.25),(1.2,0.3),(10,0.3),(1000,0.3)&lt;br /&gt;
&lt;br /&gt;
===Taux Mortality=== &lt;br /&gt;
''The mortality rate depends on the hospital utilization. For example based on the above function, if the capacity reach 100% the hospital is full and the chance to die is then 25%.''&lt;br /&gt;
&lt;br /&gt;
=lk mortality (hospital utilization)&lt;br /&gt;
&lt;br /&gt;
===Dead=== &lt;br /&gt;
''The stock of Dead people killed by the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New Death&lt;br /&gt;
&lt;br /&gt;
===Recovered=== &lt;br /&gt;
''The Total amount of people who recovered from the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New recoveries from infected+New recoveries from symptoms+New Recovery+New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===official active cases===&lt;br /&gt;
''It represent the number of people that were tested and it's this number that will be used by the government to follow the pandemic and take decision of lockdown.''&lt;br /&gt;
&lt;br /&gt;
=Diagnosed+Hosptitalized&lt;br /&gt;
&lt;br /&gt;
===Ratio official cases/pop=== &lt;br /&gt;
''The ratio that will be used for lockdown. ''&lt;br /&gt;
&lt;br /&gt;
=official active cases/ Initial population&lt;br /&gt;
&lt;br /&gt;
===New Diagnosed.1=== &lt;br /&gt;
''It's is just the same as New Diagnostic, it is used in the model to have the Total Diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Total Diagnosed=== &lt;br /&gt;
''Used in the model to have the official number of cases in the model.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnosed.1&lt;br /&gt;
&lt;br /&gt;
===TTA recoveries=== &lt;br /&gt;
''Time to recover after being infected and not having symptoms.''&lt;br /&gt;
&lt;br /&gt;
=19&lt;br /&gt;
&lt;br /&gt;
===TTA Symptoms=== &lt;br /&gt;
''The time you take to develop symptoms.''&lt;br /&gt;
&lt;br /&gt;
=5&lt;br /&gt;
&lt;br /&gt;
===TTA sympt===&lt;br /&gt;
''The time you take for recovering after being symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
===TTA Diagnostic=== &lt;br /&gt;
''Time to go to the doctor and have the result.''&lt;br /&gt;
&lt;br /&gt;
=3&lt;br /&gt;
&lt;br /&gt;
===TTA diag===&lt;br /&gt;
''The time you take for recovering after being diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=11&lt;br /&gt;
&lt;br /&gt;
===TTA Hospitalization=== &lt;br /&gt;
''Time to go to the Hospital.''&lt;br /&gt;
&lt;br /&gt;
=1&lt;br /&gt;
&lt;br /&gt;
===TTA Hospital===&lt;br /&gt;
''The time you stay at the hospital before recovering or dying.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
As explained in the problem definition we will focused our results on 3 cases. The first one is the normal scenario, the second is the same scenario but the lockdown is delayed for 1 day, and the last scenario is the normal scenario with a number of hospital beds reduce by 10 000 beds.&lt;br /&gt;
&lt;br /&gt;
==Normal Scenario==&lt;br /&gt;
&lt;br /&gt;
The first scenario take place in Switzerland with 8 500 000 peoples and a hospital capacity of 356 beds for 100k people. The first case was detected the 25 february 2019 and 20 days after the Government of Switzerland have decided to take some serious measures that is in our case represented by a lockdown. &lt;br /&gt;
&lt;br /&gt;
The following table show us the official number of new cases per day:&lt;br /&gt;
&lt;br /&gt;
[[File:Newcases.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
From the simulation we get:&lt;br /&gt;
&lt;br /&gt;
[[File:Yes.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
We can see that the model is really closed to the reality with a pic of 1350 after 35 days. The simulation stopped after 100 days so we just want to focused on these first 100 days. The reality display a pic at 1243 days after 30 days.&lt;br /&gt;
&lt;br /&gt;
The true number of new death per day, and the number from the simulation is also display below:&lt;br /&gt;
&lt;br /&gt;
[[File: deat.png|500px|left]]        [[File:Deats.18.png|500px|rigth]]&lt;br /&gt;
&lt;br /&gt;
We can see that the model is one more time really closed to the reality with a pic of 43 deaths after 50 days, while the reality display a pic at 44 days after 36 days.&lt;br /&gt;
&lt;br /&gt;
We have seen that the simulation is really closed from the data obtained for the Switzerland, but now lets go trough some special cases to see the impact of some decision on the variables.&lt;br /&gt;
&lt;br /&gt;
==Scenario 1: Late lockdown==&lt;br /&gt;
&lt;br /&gt;
In this scenario we will see what could have happened if the government take 1 more day to react and to set up the lockdown. To simulate such a scenario I simply increase the number of &amp;quot;Ratio official cases/pop&amp;quot; in the function IF THEN ELSE in &amp;quot;contact&amp;quot; and &amp;quot;contagion rate&amp;quot; from 0.00015 to 0.00018 and it delay the reaction of the government for 1 day.&lt;br /&gt;
&lt;br /&gt;
[[File: Deathz1.png|450px|left]][[File: Deathz2.png|500px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graph, the total number of official cases (=total diagnosed) jump from 33 000 to 45 000 cases. An increase of 35% in the number of official cases by just delaying for 1 day the government decisions. It illustrates well the exponential effect on the model, indeed we don't have to forget that the delay is just one day but if it has been 4-5 days the number of cases would have been exponentially higher. The second graph shows the deaths jump from 1600 to 2300, that is due to increasing number of cases and the hospital capacity reaching more than 60% utilization. Indeed due to the lookup function if the hospital capacity exceed 60% the mortality increase in the hospital. This is a very interesting scenarios that shows quite well the importance of the early lockdown and highlight the most important point in our model, '''the reaction time'''.&lt;br /&gt;
&lt;br /&gt;
==Scenario 2: Small Hospital capacity==&lt;br /&gt;
&lt;br /&gt;
In this scenario the number of hospital beds goes from 356/100k people to 238/100k people, a loss of -10 000 in variable ''hospital bed'' for Switzerland. This number of beds corresponds to the number of beds for a less developing country, such as Iceland (https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704). &lt;br /&gt;
&lt;br /&gt;
[[File: Utiliz.png|500px|left]][[File: Dead.png|480px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graphs, the hospital utilization reach almost 80%. Patients are not treated as well as they would if the utilization was lower, and it involves more deaths for these patients (right graph). We can see the importance of hospital capacity and for government to have a '''good amount of hospitals'''.&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
To conclude I would say that it has been quite difficult to deal with the real data because I had to find every number or to adjust some variables to fit with the reality. Another difficulty that I had to faced was all times and units to setup. The model display almost the same numbers as the ones communicated by the Swiss government, what could indicate that the model are not too far from what is happening in real-life. &lt;br /&gt;
&lt;br /&gt;
The most important variable in the simulation is the '''reaction time''' of the government in order to take some measures against the fast spread of the virus, such as bringing more awareness or imposing a lockdown.&lt;br /&gt;
&lt;br /&gt;
A further exogenous variable here is the number of hospital beds, which is a good proxy for modeling different countries. Having a smaller number of beds is a sign of vulnerability for the health care system and will impact mortality. A solution to this pandemic could therefore be to increase the number of beds in order to avoid exceeding capacity. &lt;br /&gt;
&lt;br /&gt;
A limit to this simulation would be that it is a real pandemic, for example I first tried to simulate the full pandemic with the second pic (higher) as you can see in the graph of Switzerland but I have to admit that sometimes the reality (or my Vensim skills) are to difficult to simulate that is why I choose to stop the simulation after 100 days.&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
[[File:Simulation Covid-19.mdl]]&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
#Federal Office of Public Health FOPH, https://www.bag.admin.ch/bag/en/home.html&lt;br /&gt;
#Fismann, D. (2009), “Modellig an Influenza Pandemic: A Guide for the Perplexed”, CMAJ,August.&lt;br /&gt;
#Madhav, N. (2017), “Pandemics: Risks, Impacts, and Mitigation”, November.&lt;br /&gt;
#Federal Office of Public Health FOPH, https://www.bag.admin.ch/bag/en/home.html&lt;br /&gt;
#https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704&lt;br /&gt;
#https://www.covid19.admin.ch/en/epidemiologic/case?detTime=total&amp;amp;detRel=abs&lt;br /&gt;
#https://www.covid19.admin.ch/en/epidemiologic/death?detTime=total&amp;amp;detRel=abs&lt;/div&gt;</summary>
		<author><name>Toscool</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20305</id>
		<title>Impact of late lockdown and hospital capacity on 19-COVID spread</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20305"/>
		<updated>2021-01-08T10:28:52Z</updated>

		<summary type="html">&lt;p&gt;Toscool: /* New Recovery */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=Problem definition=&lt;br /&gt;
&lt;br /&gt;
The coronavirus pandemic is an ongoing pandemic, the first case confirmed in Switzerland  was on February 25th, 2020 and has known an exponential growth since. We know that the virus is spread from an infected person to a healthy one during close contact or via touching a contaminated surface. The aim of the simulation is to display the dynamics of the reaction time of the government to take measures and to see if the hospital capacity play a key role in the spread of the COVID-19&lt;br /&gt;
&lt;br /&gt;
=Method=&lt;br /&gt;
&lt;br /&gt;
Vensim modelling approach was selected due to dynamic behavior of the simulated system.&lt;br /&gt;
&lt;br /&gt;
the model shows the evolution of the number of people who got infected by the covid-19 virus in countries where the population have a high health care protection and where the government have decided to make a decision about the virus propagation. The model will explain how fast the virus spreads itself and how political decisions can change the number of infected people at a given point in time. The construction of the model is simple: at the beginning one person is infected and will, then, infect other people. When you are infected many possibilities are open:&lt;br /&gt;
* You can be a healthy virus carrier. In that case you will not know that you have the virus and after 19 days you will be recovered.&lt;br /&gt;
* After 5 days you get symptoms, but you do not have any important health problems, you will recover in the next 14 days.&lt;br /&gt;
* After 5 days, you get symptoms and you are very sick and have respiratory problems, after 3 more days, still feeling bad, you decide to go to the doctor to get a diagnosis. The doctor has than two options: to send you back home, where you will recover after 11 more days or hospitalized you the next day.&lt;br /&gt;
* The doctor had decided to hospitalize you, you then spend two weeks in intensive care, where you will need artificial ventilation and 24-hour nursing care. You can then recover or unfortunately die. &lt;br /&gt;
&lt;br /&gt;
The higher the hospital utilization, the greater the probability to die. Indeed, if hospitals get busier, the medical staff will be less available and health care quality might decrease. When the number of diagnosed and hospitalized people (which are the official number of cases) is greater than a certain percentage of the population, the government will take decisions to slow down the spread of the virus. This is to say that governments will take some measures, such as installing a forced lockdown of the population to decrease the number of contacts per habitant. Moreover, such a decision will have an impact on the population, which will be more aware of the situation and will be more careful to not spread or contract the virus. So, the contagion rate as the number of contacts per people will slow down. They will be less hospitalized people, that means less people in the hospital, meaning a better service and so less people who die.&lt;br /&gt;
&lt;br /&gt;
=Model=&lt;br /&gt;
&lt;br /&gt;
Following vensim model was developed based on the study.&lt;br /&gt;
&lt;br /&gt;
[[File:Model1.png|900px|thumb|center|COVID-19 pandemic in Switzerland Stock Flow Diagram]]&lt;br /&gt;
&lt;br /&gt;
== Variables ==&lt;br /&gt;
&lt;br /&gt;
===Initial population=== &lt;br /&gt;
''The Population of Switzerland can be found here: https://en.wikipedia.org/wiki/Demographics_of_Switzerland''&lt;br /&gt;
&lt;br /&gt;
=8 500 000&lt;br /&gt;
&lt;br /&gt;
===Ratio susceptible people=== &lt;br /&gt;
''Decrease the susceptible people by the number of deaths due to the COVID-19.''&lt;br /&gt;
&lt;br /&gt;
=Susceptible population / (Initial population-Dead)&lt;br /&gt;
&lt;br /&gt;
===Susceptible population=== &lt;br /&gt;
''Decrease the susceptible population by the number of new infections.''&lt;br /&gt;
&lt;br /&gt;
=-New infections&lt;br /&gt;
&lt;br /&gt;
===contact=== &lt;br /&gt;
'''Lockdown:''' ''Function IF THEN ELSE that bring the number of new people you meet (contact) from 5 to 0.05 if the ratio exceed 0.015%''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot;&amp;gt; 0.00015, 0.05 , 5 )&lt;br /&gt;
&lt;br /&gt;
===Contagion Rate=== &lt;br /&gt;
'''Lockdown:''' ''contagion rate: IF THEN ELSE that bring the contagion rate from 0.1 to 0.075 if the ratio exceed 0.015%. Function of the awareness in the population (washing more often their hands if lockdown)''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot; &amp;gt; 0.00015 , 0.075 , 0.1 )&lt;br /&gt;
&lt;br /&gt;
===New infections=== &lt;br /&gt;
''It represent the new number of people infected each day.''&lt;br /&gt;
&lt;br /&gt;
=contact*Infected*Ratio susceptible people*Contagion Rate&lt;br /&gt;
&lt;br /&gt;
===Infected=== &lt;br /&gt;
''It represent the stock of the new people infected. We start the model with 1 infected people.''&lt;br /&gt;
&lt;br /&gt;
=New infections-New recoveries from infected-New symptoms ///// Initial value: 1&lt;br /&gt;
&lt;br /&gt;
===New recoveries from infected===&lt;br /&gt;
''It represent the number of people without symptoms and they go in the recovered stock after 19 days.''&lt;br /&gt;
&lt;br /&gt;
=((1-Ratio Symptoms)*Infected)/TTA recoveries&lt;br /&gt;
&lt;br /&gt;
===New symptoms=== &lt;br /&gt;
''It represent the number of new people that develop symptoms during 5 days before going to the symptomatic stock.''&lt;br /&gt;
&lt;br /&gt;
=(Infected*Ratio Symptoms)/TTA Symptoms&lt;br /&gt;
&lt;br /&gt;
===Ratio Symptoms=== &lt;br /&gt;
''The ratio of people who develop some symptoms.''&lt;br /&gt;
&lt;br /&gt;
=0.2&lt;br /&gt;
&lt;br /&gt;
===Symptomatic=== &lt;br /&gt;
''The stock of people symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=New symptoms-New Diagnostic-New recoveries from symptoms&lt;br /&gt;
&lt;br /&gt;
===New recoveries from symptoms=== &lt;br /&gt;
''It represent the number of people that have symptoms but that were not to the doctor, after 14 they are in the recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Diagnost)*Symptomatic/TTA sympt&lt;br /&gt;
&lt;br /&gt;
===New Diagnostic=== &lt;br /&gt;
''It represent the number of new people that are diagnosed each day, they stay 3 days before having the diagnostic.''&lt;br /&gt;
&lt;br /&gt;
=Symptomatic*Ratio Diagnost/TTA Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Ratio Diagnost===&lt;br /&gt;
''the ratio of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=0.4&lt;br /&gt;
&lt;br /&gt;
===Diagnosed=== &lt;br /&gt;
''The stock of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic-New Hospitalization-New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===New Recovery from Diagnostic===&lt;br /&gt;
''It represent the number of people that are diagnosed and not sent to the hospital. they stay 11 days before going in the Recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Hospitalize)*Diagnosed/TTA diag&lt;br /&gt;
&lt;br /&gt;
===New Hospitalization=== &lt;br /&gt;
''It represent the number of people that are diagnosed and sent to the hospital. they stay 1 day before being sent.''&lt;br /&gt;
&lt;br /&gt;
=(Diagnosed*Ratio Hospitalize)/TTA Hospitalization Ratio Hospitalize&lt;br /&gt;
&lt;br /&gt;
===Ratio Hospitalize===&lt;br /&gt;
''The ratio of people that are Hospitalized.''&lt;br /&gt;
&lt;br /&gt;
=0.3&lt;br /&gt;
&lt;br /&gt;
===Hospitalized=== &lt;br /&gt;
''The stock of people that are hospitalized before being Recovered or Dead.''&lt;br /&gt;
&lt;br /&gt;
=New Hospitalization-New Death-New Recovery&lt;br /&gt;
&lt;br /&gt;
===New Recovery=== &lt;br /&gt;
''The number of people that recover each day from the hospitalization. It depends on the '''Taux Mortality''' which is depend from the '''hospital utilization''' (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=((1-Taux Mortality)*Hospitalized)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===New Death===&lt;br /&gt;
''The number of people that die each day from the hospitalization. It depends on the '''Taux Mortality''' which is depend from the '''hospital utilization''' (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized*Mortality Rate)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===hospital bed=== &lt;br /&gt;
''The number of bed in Switzerland is 356 beds for 100k people with 8.5M people it gives that number: https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704''&lt;br /&gt;
&lt;br /&gt;
=30260&lt;br /&gt;
&lt;br /&gt;
===hospital utilization=== &lt;br /&gt;
''For the utilization of the hospital I assumed that there is already 8260 beds used for regular patient (outside the covid pandemic). The more utilization we have, the greater the probability to die. Indeed, if hospitals get busier, the medical staff will be less available and health care quality might decrease.''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized/(hospital bed - 8260))&lt;br /&gt;
&lt;br /&gt;
===lookup mortality===&lt;br /&gt;
''The lookup function is used to described the taux mortality.''&lt;br /&gt;
&lt;br /&gt;
[(0,0)-(1000,0.3)],(0,0.065),(0.6,0.065),(0.8,0.12),(1,0.25),(1.2,0.3),(10,0.3),(1000,0.3)&lt;br /&gt;
&lt;br /&gt;
===Taux Mortality=== &lt;br /&gt;
''The mortality rate depends on the hospital utilization. For example based on the above function, if the capacity reach 100% the hospital is full and the chance to die is then 25%.''&lt;br /&gt;
&lt;br /&gt;
=lk mortality (hospital utilization)&lt;br /&gt;
&lt;br /&gt;
===Dead=== &lt;br /&gt;
''The stock of Dead people killed by the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New Death&lt;br /&gt;
&lt;br /&gt;
===Recovered=== &lt;br /&gt;
''The Total amount of people who recovered from the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New recoveries from infected+New recoveries from symptoms+New Recovery+New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===official active cases===&lt;br /&gt;
''It represent the number of people that were tested and it's this number that will be used by the government to follow the pandemic and take decision of lockdown.''&lt;br /&gt;
&lt;br /&gt;
=Diagnosed+Hosptitalized&lt;br /&gt;
&lt;br /&gt;
===Ratio official cases/pop=== &lt;br /&gt;
''The ratio that will be used for lockdown. ''&lt;br /&gt;
&lt;br /&gt;
=official active cases/ Initial population&lt;br /&gt;
&lt;br /&gt;
===New Diagnosed.1=== &lt;br /&gt;
''It's is just the same as New Diagnostic, it is used in the model to have the Total Diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Total Diagnosed=== &lt;br /&gt;
''Used in the model to have the official number of cases in the model.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnosed.1&lt;br /&gt;
&lt;br /&gt;
===TTA recoveries=== &lt;br /&gt;
''Time to recover after being infected and not having symptoms.''&lt;br /&gt;
&lt;br /&gt;
=19&lt;br /&gt;
&lt;br /&gt;
===TTA Symptoms=== &lt;br /&gt;
''The time you take to develop symptoms.''&lt;br /&gt;
&lt;br /&gt;
=5&lt;br /&gt;
&lt;br /&gt;
===TTA sympt===&lt;br /&gt;
''The time you take for recovering after being symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
===TTA Diagnostic=== &lt;br /&gt;
''Time to go to the doctor and have the result.''&lt;br /&gt;
&lt;br /&gt;
=3&lt;br /&gt;
&lt;br /&gt;
===TTA diag===&lt;br /&gt;
''The time you take for recovering after being diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=11&lt;br /&gt;
&lt;br /&gt;
===TTA Hospitalization=== &lt;br /&gt;
''Time to go to the Hospital.''&lt;br /&gt;
&lt;br /&gt;
=1&lt;br /&gt;
&lt;br /&gt;
===TTA Hospital===&lt;br /&gt;
''The time you stay at the hospital before recovering or dying.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
As explained in the problem definition we will focused our results on 3 cases. The first one is the normal scenario, the second is the same scenario but the lockdown is delayed for 1 day, and the last scenario is the normal scenario with a number of hospital beds reduce by 10 000 beds.&lt;br /&gt;
&lt;br /&gt;
==Normal Scenario==&lt;br /&gt;
&lt;br /&gt;
The first scenario take place in Switzerland with 8 500 000 peoples and a hospital capacity of 356 beds for 100k people. The first case was detected the 25 february 2019 and 20 days after the Government of Switzerland have decided to take some serious measures that is in our case represented by a lockdown. &lt;br /&gt;
&lt;br /&gt;
The following table show us the official number of new cases per day:&lt;br /&gt;
&lt;br /&gt;
[[File:Newcases.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
From the simulation we get:&lt;br /&gt;
&lt;br /&gt;
[[File:Yes.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
We can see that the model is really closed to the reality with a pic of 1350 after 35 days. The simulation stopped after 100 days so we just want to focused on these first 100 days. The reality display a pic at 1243 days after 30 days.&lt;br /&gt;
&lt;br /&gt;
The true number of new death per day, and the number from the simulation is also display below:&lt;br /&gt;
&lt;br /&gt;
[[File: deat.png|500px|left]]        [[File:Deats.18.png|500px|rigth]]&lt;br /&gt;
&lt;br /&gt;
We can see that the model is one more time really closed to the reality with a pic of 43 deaths after 50 days, while the reality display a pic at 44 days after 36 days.&lt;br /&gt;
&lt;br /&gt;
We have seen that the simulation is really closed from the data obtained for the Switzerland, but now lets go trough some special cases to see the impact of some decision on the variables.&lt;br /&gt;
&lt;br /&gt;
==Scenario 1: Late lockdown==&lt;br /&gt;
&lt;br /&gt;
In this scenario we will see what could have happened if the government take 1 more day to react and to set up the lockdown. To simulate such a scenario I simply increase the number of &amp;quot;Ratio official cases/pop&amp;quot; in the function IF THEN ELSE in &amp;quot;contact&amp;quot; and &amp;quot;contagion rate&amp;quot; from 0.00015 to 0.00018 and it delay the reaction of the government for 1 day.&lt;br /&gt;
&lt;br /&gt;
[[File: Deathz1.png|450px|left]][[File: Deathz2.png|500px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graph, the total number of official cases (=total diagnosed) jump from 33 000 to 45 000 cases. An increase of 35% in the number of official cases by just delaying for 1 day the government decisions. It illustrates well the exponential effect on the model, indeed we don't have to forget that the delay is just one day but if it has been 4-5 days the number of cases would have been exponentially higher. The second graph shows the deaths jump from 1600 to 2300, that is due to increasing number of cases and the hospital capacity reaching more than 60% utilization. Indeed due to the lookup function if the hospital capacity exceed 60% the mortality increase in the hospital. This is a very interesting scenarios that shows quite well the importance of the early lockdown and highlight the most important point in our model, '''the reaction time'''.&lt;br /&gt;
&lt;br /&gt;
==Scenario 2: Small Hospital capacity==&lt;br /&gt;
&lt;br /&gt;
In this scenario the number of hospital beds goes from 356/100k people to 238/100k people, a loss of -10 000 in variable ''hospital bed'' for Switzerland. This number of beds corresponds to the number of beds for a less developing country, such as Iceland (https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704). &lt;br /&gt;
&lt;br /&gt;
[[File: Utiliz.png|500px|left]][[File: Dead.png|480px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graphs, the hospital utilization reach almost 80%. Patients are not treated as well as they would if the utilization was lower, and it involves more deaths for these patients (right graph). We can see the importance of hospital capacity and for government to have a '''good amount of hospitals'''.&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
To conclude I would say that it has been quite difficult to deal with the real data because I had to find every number or to adjust some variables to fit with the reality. Another difficulty that I had to faced was all times and units to setup. The model display almost the same numbers as the ones communicated by the Swiss government, what could indicate that the model are not too far from what is happening in real-life. &lt;br /&gt;
&lt;br /&gt;
The most important variable in the simulation is the '''reaction time''' of the government in order to take some measures against the fast spread of the virus, such as bringing more awareness or imposing a lockdown.&lt;br /&gt;
&lt;br /&gt;
A further exogenous variable here is the number of hospital beds, which is a good proxy for modeling different countries. Having a smaller number of beds is a sign of vulnerability for the health care system and will impact mortality. A solution to this pandemic could therefore be to increase the number of beds in order to avoid exceeding capacity. &lt;br /&gt;
&lt;br /&gt;
A limit to this simulation would be that it is a real pandemic, for example I first tried to simulate the full pandemic with the second pic (higher) as you can see in the graph of Switzerland but I have to admit that sometimes the reality (or my Vensim skills) are to difficult to simulate that is why I choose to stop the simulation after 100 days.&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
[[File:Simulation Covid-19.mdl]]&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
#Federal Office of Public Health FOPH, https://www.bag.admin.ch/bag/en/home.html&lt;br /&gt;
#Fismann, D. (2009), “Modellig an Influenza Pandemic: A Guide for the Perplexed”, CMAJ,August.&lt;br /&gt;
#Madhav, N. (2017), “Pandemics: Risks, Impacts, and Mitigation”, November.&lt;br /&gt;
#Federal Office of Public Health FOPH, https://www.bag.admin.ch/bag/en/home.html&lt;br /&gt;
#https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704&lt;br /&gt;
#https://www.covid19.admin.ch/en/epidemiologic/case?detTime=total&amp;amp;detRel=abs&lt;br /&gt;
#https://www.covid19.admin.ch/en/epidemiologic/death?detTime=total&amp;amp;detRel=abs&lt;/div&gt;</summary>
		<author><name>Toscool</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20304</id>
		<title>Impact of late lockdown and hospital capacity on 19-COVID spread</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20304"/>
		<updated>2021-01-08T10:27:28Z</updated>

		<summary type="html">&lt;p&gt;Toscool: /* lookup mortality */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=Problem definition=&lt;br /&gt;
&lt;br /&gt;
The coronavirus pandemic is an ongoing pandemic, the first case confirmed in Switzerland  was on February 25th, 2020 and has known an exponential growth since. We know that the virus is spread from an infected person to a healthy one during close contact or via touching a contaminated surface. The aim of the simulation is to display the dynamics of the reaction time of the government to take measures and to see if the hospital capacity play a key role in the spread of the COVID-19&lt;br /&gt;
&lt;br /&gt;
=Method=&lt;br /&gt;
&lt;br /&gt;
Vensim modelling approach was selected due to dynamic behavior of the simulated system.&lt;br /&gt;
&lt;br /&gt;
the model shows the evolution of the number of people who got infected by the covid-19 virus in countries where the population have a high health care protection and where the government have decided to make a decision about the virus propagation. The model will explain how fast the virus spreads itself and how political decisions can change the number of infected people at a given point in time. The construction of the model is simple: at the beginning one person is infected and will, then, infect other people. When you are infected many possibilities are open:&lt;br /&gt;
* You can be a healthy virus carrier. In that case you will not know that you have the virus and after 19 days you will be recovered.&lt;br /&gt;
* After 5 days you get symptoms, but you do not have any important health problems, you will recover in the next 14 days.&lt;br /&gt;
* After 5 days, you get symptoms and you are very sick and have respiratory problems, after 3 more days, still feeling bad, you decide to go to the doctor to get a diagnosis. The doctor has than two options: to send you back home, where you will recover after 11 more days or hospitalized you the next day.&lt;br /&gt;
* The doctor had decided to hospitalize you, you then spend two weeks in intensive care, where you will need artificial ventilation and 24-hour nursing care. You can then recover or unfortunately die. &lt;br /&gt;
&lt;br /&gt;
The higher the hospital utilization, the greater the probability to die. Indeed, if hospitals get busier, the medical staff will be less available and health care quality might decrease. When the number of diagnosed and hospitalized people (which are the official number of cases) is greater than a certain percentage of the population, the government will take decisions to slow down the spread of the virus. This is to say that governments will take some measures, such as installing a forced lockdown of the population to decrease the number of contacts per habitant. Moreover, such a decision will have an impact on the population, which will be more aware of the situation and will be more careful to not spread or contract the virus. So, the contagion rate as the number of contacts per people will slow down. They will be less hospitalized people, that means less people in the hospital, meaning a better service and so less people who die.&lt;br /&gt;
&lt;br /&gt;
=Model=&lt;br /&gt;
&lt;br /&gt;
Following vensim model was developed based on the study.&lt;br /&gt;
&lt;br /&gt;
[[File:Model1.png|900px|thumb|center|COVID-19 pandemic in Switzerland Stock Flow Diagram]]&lt;br /&gt;
&lt;br /&gt;
== Variables ==&lt;br /&gt;
&lt;br /&gt;
===Initial population=== &lt;br /&gt;
''The Population of Switzerland can be found here: https://en.wikipedia.org/wiki/Demographics_of_Switzerland''&lt;br /&gt;
&lt;br /&gt;
=8 500 000&lt;br /&gt;
&lt;br /&gt;
===Ratio susceptible people=== &lt;br /&gt;
''Decrease the susceptible people by the number of deaths due to the COVID-19.''&lt;br /&gt;
&lt;br /&gt;
=Susceptible population / (Initial population-Dead)&lt;br /&gt;
&lt;br /&gt;
===Susceptible population=== &lt;br /&gt;
''Decrease the susceptible population by the number of new infections.''&lt;br /&gt;
&lt;br /&gt;
=-New infections&lt;br /&gt;
&lt;br /&gt;
===contact=== &lt;br /&gt;
'''Lockdown:''' ''Function IF THEN ELSE that bring the number of new people you meet (contact) from 5 to 0.05 if the ratio exceed 0.015%''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot;&amp;gt; 0.00015, 0.05 , 5 )&lt;br /&gt;
&lt;br /&gt;
===Contagion Rate=== &lt;br /&gt;
'''Lockdown:''' ''contagion rate: IF THEN ELSE that bring the contagion rate from 0.1 to 0.075 if the ratio exceed 0.015%. Function of the awareness in the population (washing more often their hands if lockdown)''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot; &amp;gt; 0.00015 , 0.075 , 0.1 )&lt;br /&gt;
&lt;br /&gt;
===New infections=== &lt;br /&gt;
''It represent the new number of people infected each day.''&lt;br /&gt;
&lt;br /&gt;
=contact*Infected*Ratio susceptible people*Contagion Rate&lt;br /&gt;
&lt;br /&gt;
===Infected=== &lt;br /&gt;
''It represent the stock of the new people infected. We start the model with 1 infected people.''&lt;br /&gt;
&lt;br /&gt;
=New infections-New recoveries from infected-New symptoms ///// Initial value: 1&lt;br /&gt;
&lt;br /&gt;
===New recoveries from infected===&lt;br /&gt;
''It represent the number of people without symptoms and they go in the recovered stock after 19 days.''&lt;br /&gt;
&lt;br /&gt;
=((1-Ratio Symptoms)*Infected)/TTA recoveries&lt;br /&gt;
&lt;br /&gt;
===New symptoms=== &lt;br /&gt;
''It represent the number of new people that develop symptoms during 5 days before going to the symptomatic stock.''&lt;br /&gt;
&lt;br /&gt;
=(Infected*Ratio Symptoms)/TTA Symptoms&lt;br /&gt;
&lt;br /&gt;
===Ratio Symptoms=== &lt;br /&gt;
''The ratio of people who develop some symptoms.''&lt;br /&gt;
&lt;br /&gt;
=0.2&lt;br /&gt;
&lt;br /&gt;
===Symptomatic=== &lt;br /&gt;
''The stock of people symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=New symptoms-New Diagnostic-New recoveries from symptoms&lt;br /&gt;
&lt;br /&gt;
===New recoveries from symptoms=== &lt;br /&gt;
''It represent the number of people that have symptoms but that were not to the doctor, after 14 they are in the recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Diagnost)*Symptomatic/TTA sympt&lt;br /&gt;
&lt;br /&gt;
===New Diagnostic=== &lt;br /&gt;
''It represent the number of new people that are diagnosed each day, they stay 3 days before having the diagnostic.''&lt;br /&gt;
&lt;br /&gt;
=Symptomatic*Ratio Diagnost/TTA Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Ratio Diagnost===&lt;br /&gt;
''the ratio of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=0.4&lt;br /&gt;
&lt;br /&gt;
===Diagnosed=== &lt;br /&gt;
''The stock of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic-New Hospitalization-New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===New Recovery from Diagnostic===&lt;br /&gt;
''It represent the number of people that are diagnosed and not sent to the hospital. they stay 11 days before going in the Recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Hospitalize)*Diagnosed/TTA diag&lt;br /&gt;
&lt;br /&gt;
===New Hospitalization=== &lt;br /&gt;
''It represent the number of people that are diagnosed and sent to the hospital. they stay 1 day before being sent.''&lt;br /&gt;
&lt;br /&gt;
=(Diagnosed*Ratio Hospitalize)/TTA Hospitalization Ratio Hospitalize&lt;br /&gt;
&lt;br /&gt;
===Ratio Hospitalize===&lt;br /&gt;
''The ratio of people that are Hospitalized.''&lt;br /&gt;
&lt;br /&gt;
=0.3&lt;br /&gt;
&lt;br /&gt;
===Hospitalized=== &lt;br /&gt;
''The stock of people that are hospitalized before being Recovered or Dead.''&lt;br /&gt;
&lt;br /&gt;
=New Hospitalization-New Death-New Recovery&lt;br /&gt;
&lt;br /&gt;
===New Recovery=== &lt;br /&gt;
''The number of people that recover each day from the hospitalization. It depends on the '''Taux Mortality''' which is depend from the '''hospital utilization''' (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=((1-Mortality Rate)*Hospitalized)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===New Death===&lt;br /&gt;
''The number of people that die each day from the hospitalization. It depends on the '''Taux Mortality''' which is depend from the '''hospital utilization''' (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized*Mortality Rate)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===hospital bed=== &lt;br /&gt;
''The number of bed in Switzerland is 356 beds for 100k people with 8.5M people it gives that number: https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704''&lt;br /&gt;
&lt;br /&gt;
=30260&lt;br /&gt;
&lt;br /&gt;
===hospital utilization=== &lt;br /&gt;
''For the utilization of the hospital I assumed that there is already 8260 beds used for regular patient (outside the covid pandemic). The more utilization we have, the greater the probability to die. Indeed, if hospitals get busier, the medical staff will be less available and health care quality might decrease.''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized/(hospital bed - 8260))&lt;br /&gt;
&lt;br /&gt;
===lookup mortality===&lt;br /&gt;
''The lookup function is used to described the taux mortality.''&lt;br /&gt;
&lt;br /&gt;
[(0,0)-(1000,0.3)],(0,0.065),(0.6,0.065),(0.8,0.12),(1,0.25),(1.2,0.3),(10,0.3),(1000,0.3)&lt;br /&gt;
&lt;br /&gt;
===Taux Mortality=== &lt;br /&gt;
''The mortality rate depends on the hospital utilization. For example based on the above function, if the capacity reach 100% the hospital is full and the chance to die is then 25%.''&lt;br /&gt;
&lt;br /&gt;
=lk mortality (hospital utilization)&lt;br /&gt;
&lt;br /&gt;
===Dead=== &lt;br /&gt;
''The stock of Dead people killed by the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New Death&lt;br /&gt;
&lt;br /&gt;
===Recovered=== &lt;br /&gt;
''The Total amount of people who recovered from the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New recoveries from infected+New recoveries from symptoms+New Recovery+New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===official active cases===&lt;br /&gt;
''It represent the number of people that were tested and it's this number that will be used by the government to follow the pandemic and take decision of lockdown.''&lt;br /&gt;
&lt;br /&gt;
=Diagnosed+Hosptitalized&lt;br /&gt;
&lt;br /&gt;
===Ratio official cases/pop=== &lt;br /&gt;
''The ratio that will be used for lockdown. ''&lt;br /&gt;
&lt;br /&gt;
=official active cases/ Initial population&lt;br /&gt;
&lt;br /&gt;
===New Diagnosed.1=== &lt;br /&gt;
''It's is just the same as New Diagnostic, it is used in the model to have the Total Diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Total Diagnosed=== &lt;br /&gt;
''Used in the model to have the official number of cases in the model.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnosed.1&lt;br /&gt;
&lt;br /&gt;
===TTA recoveries=== &lt;br /&gt;
''Time to recover after being infected and not having symptoms.''&lt;br /&gt;
&lt;br /&gt;
=19&lt;br /&gt;
&lt;br /&gt;
===TTA Symptoms=== &lt;br /&gt;
''The time you take to develop symptoms.''&lt;br /&gt;
&lt;br /&gt;
=5&lt;br /&gt;
&lt;br /&gt;
===TTA sympt===&lt;br /&gt;
''The time you take for recovering after being symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
===TTA Diagnostic=== &lt;br /&gt;
''Time to go to the doctor and have the result.''&lt;br /&gt;
&lt;br /&gt;
=3&lt;br /&gt;
&lt;br /&gt;
===TTA diag===&lt;br /&gt;
''The time you take for recovering after being diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=11&lt;br /&gt;
&lt;br /&gt;
===TTA Hospitalization=== &lt;br /&gt;
''Time to go to the Hospital.''&lt;br /&gt;
&lt;br /&gt;
=1&lt;br /&gt;
&lt;br /&gt;
===TTA Hospital===&lt;br /&gt;
''The time you stay at the hospital before recovering or dying.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
As explained in the problem definition we will focused our results on 3 cases. The first one is the normal scenario, the second is the same scenario but the lockdown is delayed for 1 day, and the last scenario is the normal scenario with a number of hospital beds reduce by 10 000 beds.&lt;br /&gt;
&lt;br /&gt;
==Normal Scenario==&lt;br /&gt;
&lt;br /&gt;
The first scenario take place in Switzerland with 8 500 000 peoples and a hospital capacity of 356 beds for 100k people. The first case was detected the 25 february 2019 and 20 days after the Government of Switzerland have decided to take some serious measures that is in our case represented by a lockdown. &lt;br /&gt;
&lt;br /&gt;
The following table show us the official number of new cases per day:&lt;br /&gt;
&lt;br /&gt;
[[File:Newcases.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
From the simulation we get:&lt;br /&gt;
&lt;br /&gt;
[[File:Yes.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
We can see that the model is really closed to the reality with a pic of 1350 after 35 days. The simulation stopped after 100 days so we just want to focused on these first 100 days. The reality display a pic at 1243 days after 30 days.&lt;br /&gt;
&lt;br /&gt;
The true number of new death per day, and the number from the simulation is also display below:&lt;br /&gt;
&lt;br /&gt;
[[File: deat.png|500px|left]]        [[File:Deats.18.png|500px|rigth]]&lt;br /&gt;
&lt;br /&gt;
We can see that the model is one more time really closed to the reality with a pic of 43 deaths after 50 days, while the reality display a pic at 44 days after 36 days.&lt;br /&gt;
&lt;br /&gt;
We have seen that the simulation is really closed from the data obtained for the Switzerland, but now lets go trough some special cases to see the impact of some decision on the variables.&lt;br /&gt;
&lt;br /&gt;
==Scenario 1: Late lockdown==&lt;br /&gt;
&lt;br /&gt;
In this scenario we will see what could have happened if the government take 1 more day to react and to set up the lockdown. To simulate such a scenario I simply increase the number of &amp;quot;Ratio official cases/pop&amp;quot; in the function IF THEN ELSE in &amp;quot;contact&amp;quot; and &amp;quot;contagion rate&amp;quot; from 0.00015 to 0.00018 and it delay the reaction of the government for 1 day.&lt;br /&gt;
&lt;br /&gt;
[[File: Deathz1.png|450px|left]][[File: Deathz2.png|500px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graph, the total number of official cases (=total diagnosed) jump from 33 000 to 45 000 cases. An increase of 35% in the number of official cases by just delaying for 1 day the government decisions. It illustrates well the exponential effect on the model, indeed we don't have to forget that the delay is just one day but if it has been 4-5 days the number of cases would have been exponentially higher. The second graph shows the deaths jump from 1600 to 2300, that is due to increasing number of cases and the hospital capacity reaching more than 60% utilization. Indeed due to the lookup function if the hospital capacity exceed 60% the mortality increase in the hospital. This is a very interesting scenarios that shows quite well the importance of the early lockdown and highlight the most important point in our model, '''the reaction time'''.&lt;br /&gt;
&lt;br /&gt;
==Scenario 2: Small Hospital capacity==&lt;br /&gt;
&lt;br /&gt;
In this scenario the number of hospital beds goes from 356/100k people to 238/100k people, a loss of -10 000 in variable ''hospital bed'' for Switzerland. This number of beds corresponds to the number of beds for a less developing country, such as Iceland (https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704). &lt;br /&gt;
&lt;br /&gt;
[[File: Utiliz.png|500px|left]][[File: Dead.png|480px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graphs, the hospital utilization reach almost 80%. Patients are not treated as well as they would if the utilization was lower, and it involves more deaths for these patients (right graph). We can see the importance of hospital capacity and for government to have a '''good amount of hospitals'''.&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
To conclude I would say that it has been quite difficult to deal with the real data because I had to find every number or to adjust some variables to fit with the reality. Another difficulty that I had to faced was all times and units to setup. The model display almost the same numbers as the ones communicated by the Swiss government, what could indicate that the model are not too far from what is happening in real-life. &lt;br /&gt;
&lt;br /&gt;
The most important variable in the simulation is the '''reaction time''' of the government in order to take some measures against the fast spread of the virus, such as bringing more awareness or imposing a lockdown.&lt;br /&gt;
&lt;br /&gt;
A further exogenous variable here is the number of hospital beds, which is a good proxy for modeling different countries. Having a smaller number of beds is a sign of vulnerability for the health care system and will impact mortality. A solution to this pandemic could therefore be to increase the number of beds in order to avoid exceeding capacity. &lt;br /&gt;
&lt;br /&gt;
A limit to this simulation would be that it is a real pandemic, for example I first tried to simulate the full pandemic with the second pic (higher) as you can see in the graph of Switzerland but I have to admit that sometimes the reality (or my Vensim skills) are to difficult to simulate that is why I choose to stop the simulation after 100 days.&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
[[File:Simulation Covid-19.mdl]]&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
#Federal Office of Public Health FOPH, https://www.bag.admin.ch/bag/en/home.html&lt;br /&gt;
#Fismann, D. (2009), “Modellig an Influenza Pandemic: A Guide for the Perplexed”, CMAJ,August.&lt;br /&gt;
#Madhav, N. (2017), “Pandemics: Risks, Impacts, and Mitigation”, November.&lt;br /&gt;
#Federal Office of Public Health FOPH, https://www.bag.admin.ch/bag/en/home.html&lt;br /&gt;
#https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704&lt;br /&gt;
#https://www.covid19.admin.ch/en/epidemiologic/case?detTime=total&amp;amp;detRel=abs&lt;br /&gt;
#https://www.covid19.admin.ch/en/epidemiologic/death?detTime=total&amp;amp;detRel=abs&lt;/div&gt;</summary>
		<author><name>Toscool</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20303</id>
		<title>Impact of late lockdown and hospital capacity on 19-COVID spread</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20303"/>
		<updated>2021-01-08T10:27:06Z</updated>

		<summary type="html">&lt;p&gt;Toscool: /* hospital utilization */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=Problem definition=&lt;br /&gt;
&lt;br /&gt;
The coronavirus pandemic is an ongoing pandemic, the first case confirmed in Switzerland  was on February 25th, 2020 and has known an exponential growth since. We know that the virus is spread from an infected person to a healthy one during close contact or via touching a contaminated surface. The aim of the simulation is to display the dynamics of the reaction time of the government to take measures and to see if the hospital capacity play a key role in the spread of the COVID-19&lt;br /&gt;
&lt;br /&gt;
=Method=&lt;br /&gt;
&lt;br /&gt;
Vensim modelling approach was selected due to dynamic behavior of the simulated system.&lt;br /&gt;
&lt;br /&gt;
the model shows the evolution of the number of people who got infected by the covid-19 virus in countries where the population have a high health care protection and where the government have decided to make a decision about the virus propagation. The model will explain how fast the virus spreads itself and how political decisions can change the number of infected people at a given point in time. The construction of the model is simple: at the beginning one person is infected and will, then, infect other people. When you are infected many possibilities are open:&lt;br /&gt;
* You can be a healthy virus carrier. In that case you will not know that you have the virus and after 19 days you will be recovered.&lt;br /&gt;
* After 5 days you get symptoms, but you do not have any important health problems, you will recover in the next 14 days.&lt;br /&gt;
* After 5 days, you get symptoms and you are very sick and have respiratory problems, after 3 more days, still feeling bad, you decide to go to the doctor to get a diagnosis. The doctor has than two options: to send you back home, where you will recover after 11 more days or hospitalized you the next day.&lt;br /&gt;
* The doctor had decided to hospitalize you, you then spend two weeks in intensive care, where you will need artificial ventilation and 24-hour nursing care. You can then recover or unfortunately die. &lt;br /&gt;
&lt;br /&gt;
The higher the hospital utilization, the greater the probability to die. Indeed, if hospitals get busier, the medical staff will be less available and health care quality might decrease. When the number of diagnosed and hospitalized people (which are the official number of cases) is greater than a certain percentage of the population, the government will take decisions to slow down the spread of the virus. This is to say that governments will take some measures, such as installing a forced lockdown of the population to decrease the number of contacts per habitant. Moreover, such a decision will have an impact on the population, which will be more aware of the situation and will be more careful to not spread or contract the virus. So, the contagion rate as the number of contacts per people will slow down. They will be less hospitalized people, that means less people in the hospital, meaning a better service and so less people who die.&lt;br /&gt;
&lt;br /&gt;
=Model=&lt;br /&gt;
&lt;br /&gt;
Following vensim model was developed based on the study.&lt;br /&gt;
&lt;br /&gt;
[[File:Model1.png|900px|thumb|center|COVID-19 pandemic in Switzerland Stock Flow Diagram]]&lt;br /&gt;
&lt;br /&gt;
== Variables ==&lt;br /&gt;
&lt;br /&gt;
===Initial population=== &lt;br /&gt;
''The Population of Switzerland can be found here: https://en.wikipedia.org/wiki/Demographics_of_Switzerland''&lt;br /&gt;
&lt;br /&gt;
=8 500 000&lt;br /&gt;
&lt;br /&gt;
===Ratio susceptible people=== &lt;br /&gt;
''Decrease the susceptible people by the number of deaths due to the COVID-19.''&lt;br /&gt;
&lt;br /&gt;
=Susceptible population / (Initial population-Dead)&lt;br /&gt;
&lt;br /&gt;
===Susceptible population=== &lt;br /&gt;
''Decrease the susceptible population by the number of new infections.''&lt;br /&gt;
&lt;br /&gt;
=-New infections&lt;br /&gt;
&lt;br /&gt;
===contact=== &lt;br /&gt;
'''Lockdown:''' ''Function IF THEN ELSE that bring the number of new people you meet (contact) from 5 to 0.05 if the ratio exceed 0.015%''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot;&amp;gt; 0.00015, 0.05 , 5 )&lt;br /&gt;
&lt;br /&gt;
===Contagion Rate=== &lt;br /&gt;
'''Lockdown:''' ''contagion rate: IF THEN ELSE that bring the contagion rate from 0.1 to 0.075 if the ratio exceed 0.015%. Function of the awareness in the population (washing more often their hands if lockdown)''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot; &amp;gt; 0.00015 , 0.075 , 0.1 )&lt;br /&gt;
&lt;br /&gt;
===New infections=== &lt;br /&gt;
''It represent the new number of people infected each day.''&lt;br /&gt;
&lt;br /&gt;
=contact*Infected*Ratio susceptible people*Contagion Rate&lt;br /&gt;
&lt;br /&gt;
===Infected=== &lt;br /&gt;
''It represent the stock of the new people infected. We start the model with 1 infected people.''&lt;br /&gt;
&lt;br /&gt;
=New infections-New recoveries from infected-New symptoms ///// Initial value: 1&lt;br /&gt;
&lt;br /&gt;
===New recoveries from infected===&lt;br /&gt;
''It represent the number of people without symptoms and they go in the recovered stock after 19 days.''&lt;br /&gt;
&lt;br /&gt;
=((1-Ratio Symptoms)*Infected)/TTA recoveries&lt;br /&gt;
&lt;br /&gt;
===New symptoms=== &lt;br /&gt;
''It represent the number of new people that develop symptoms during 5 days before going to the symptomatic stock.''&lt;br /&gt;
&lt;br /&gt;
=(Infected*Ratio Symptoms)/TTA Symptoms&lt;br /&gt;
&lt;br /&gt;
===Ratio Symptoms=== &lt;br /&gt;
''The ratio of people who develop some symptoms.''&lt;br /&gt;
&lt;br /&gt;
=0.2&lt;br /&gt;
&lt;br /&gt;
===Symptomatic=== &lt;br /&gt;
''The stock of people symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=New symptoms-New Diagnostic-New recoveries from symptoms&lt;br /&gt;
&lt;br /&gt;
===New recoveries from symptoms=== &lt;br /&gt;
''It represent the number of people that have symptoms but that were not to the doctor, after 14 they are in the recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Diagnost)*Symptomatic/TTA sympt&lt;br /&gt;
&lt;br /&gt;
===New Diagnostic=== &lt;br /&gt;
''It represent the number of new people that are diagnosed each day, they stay 3 days before having the diagnostic.''&lt;br /&gt;
&lt;br /&gt;
=Symptomatic*Ratio Diagnost/TTA Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Ratio Diagnost===&lt;br /&gt;
''the ratio of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=0.4&lt;br /&gt;
&lt;br /&gt;
===Diagnosed=== &lt;br /&gt;
''The stock of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic-New Hospitalization-New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===New Recovery from Diagnostic===&lt;br /&gt;
''It represent the number of people that are diagnosed and not sent to the hospital. they stay 11 days before going in the Recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Hospitalize)*Diagnosed/TTA diag&lt;br /&gt;
&lt;br /&gt;
===New Hospitalization=== &lt;br /&gt;
''It represent the number of people that are diagnosed and sent to the hospital. they stay 1 day before being sent.''&lt;br /&gt;
&lt;br /&gt;
=(Diagnosed*Ratio Hospitalize)/TTA Hospitalization Ratio Hospitalize&lt;br /&gt;
&lt;br /&gt;
===Ratio Hospitalize===&lt;br /&gt;
''The ratio of people that are Hospitalized.''&lt;br /&gt;
&lt;br /&gt;
=0.3&lt;br /&gt;
&lt;br /&gt;
===Hospitalized=== &lt;br /&gt;
''The stock of people that are hospitalized before being Recovered or Dead.''&lt;br /&gt;
&lt;br /&gt;
=New Hospitalization-New Death-New Recovery&lt;br /&gt;
&lt;br /&gt;
===New Recovery=== &lt;br /&gt;
''The number of people that recover each day from the hospitalization. It depends on the '''Taux Mortality''' which is depend from the '''hospital utilization''' (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=((1-Mortality Rate)*Hospitalized)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===New Death===&lt;br /&gt;
''The number of people that die each day from the hospitalization. It depends on the '''Taux Mortality''' which is depend from the '''hospital utilization''' (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized*Mortality Rate)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===hospital bed=== &lt;br /&gt;
''The number of bed in Switzerland is 356 beds for 100k people with 8.5M people it gives that number: https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704''&lt;br /&gt;
&lt;br /&gt;
=30260&lt;br /&gt;
&lt;br /&gt;
===hospital utilization=== &lt;br /&gt;
''For the utilization of the hospital I assumed that there is already 8260 beds used for regular patient (outside the covid pandemic). The more utilization we have, the greater the probability to die. Indeed, if hospitals get busier, the medical staff will be less available and health care quality might decrease.''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized/(hospital bed - 8260))&lt;br /&gt;
&lt;br /&gt;
===lookup mortality===&lt;br /&gt;
''The lookup function is used to described the mortality rate.''&lt;br /&gt;
&lt;br /&gt;
[(0,0)-(1000,0.3)],(0,0.065),(0.6,0.065),(0.8,0.12),(1,0.25),(1.2,0.3),(10,0.3),(1000,0.3)&lt;br /&gt;
&lt;br /&gt;
===Taux Mortality=== &lt;br /&gt;
''The mortality rate depends on the hospital utilization. For example based on the above function, if the capacity reach 100% the hospital is full and the chance to die is then 25%.''&lt;br /&gt;
&lt;br /&gt;
=lk mortality (hospital utilization)&lt;br /&gt;
&lt;br /&gt;
===Dead=== &lt;br /&gt;
''The stock of Dead people killed by the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New Death&lt;br /&gt;
&lt;br /&gt;
===Recovered=== &lt;br /&gt;
''The Total amount of people who recovered from the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New recoveries from infected+New recoveries from symptoms+New Recovery+New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===official active cases===&lt;br /&gt;
''It represent the number of people that were tested and it's this number that will be used by the government to follow the pandemic and take decision of lockdown.''&lt;br /&gt;
&lt;br /&gt;
=Diagnosed+Hosptitalized&lt;br /&gt;
&lt;br /&gt;
===Ratio official cases/pop=== &lt;br /&gt;
''The ratio that will be used for lockdown. ''&lt;br /&gt;
&lt;br /&gt;
=official active cases/ Initial population&lt;br /&gt;
&lt;br /&gt;
===New Diagnosed.1=== &lt;br /&gt;
''It's is just the same as New Diagnostic, it is used in the model to have the Total Diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Total Diagnosed=== &lt;br /&gt;
''Used in the model to have the official number of cases in the model.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnosed.1&lt;br /&gt;
&lt;br /&gt;
===TTA recoveries=== &lt;br /&gt;
''Time to recover after being infected and not having symptoms.''&lt;br /&gt;
&lt;br /&gt;
=19&lt;br /&gt;
&lt;br /&gt;
===TTA Symptoms=== &lt;br /&gt;
''The time you take to develop symptoms.''&lt;br /&gt;
&lt;br /&gt;
=5&lt;br /&gt;
&lt;br /&gt;
===TTA sympt===&lt;br /&gt;
''The time you take for recovering after being symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
===TTA Diagnostic=== &lt;br /&gt;
''Time to go to the doctor and have the result.''&lt;br /&gt;
&lt;br /&gt;
=3&lt;br /&gt;
&lt;br /&gt;
===TTA diag===&lt;br /&gt;
''The time you take for recovering after being diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=11&lt;br /&gt;
&lt;br /&gt;
===TTA Hospitalization=== &lt;br /&gt;
''Time to go to the Hospital.''&lt;br /&gt;
&lt;br /&gt;
=1&lt;br /&gt;
&lt;br /&gt;
===TTA Hospital===&lt;br /&gt;
''The time you stay at the hospital before recovering or dying.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
As explained in the problem definition we will focused our results on 3 cases. The first one is the normal scenario, the second is the same scenario but the lockdown is delayed for 1 day, and the last scenario is the normal scenario with a number of hospital beds reduce by 10 000 beds.&lt;br /&gt;
&lt;br /&gt;
==Normal Scenario==&lt;br /&gt;
&lt;br /&gt;
The first scenario take place in Switzerland with 8 500 000 peoples and a hospital capacity of 356 beds for 100k people. The first case was detected the 25 february 2019 and 20 days after the Government of Switzerland have decided to take some serious measures that is in our case represented by a lockdown. &lt;br /&gt;
&lt;br /&gt;
The following table show us the official number of new cases per day:&lt;br /&gt;
&lt;br /&gt;
[[File:Newcases.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
From the simulation we get:&lt;br /&gt;
&lt;br /&gt;
[[File:Yes.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
We can see that the model is really closed to the reality with a pic of 1350 after 35 days. The simulation stopped after 100 days so we just want to focused on these first 100 days. The reality display a pic at 1243 days after 30 days.&lt;br /&gt;
&lt;br /&gt;
The true number of new death per day, and the number from the simulation is also display below:&lt;br /&gt;
&lt;br /&gt;
[[File: deat.png|500px|left]]        [[File:Deats.18.png|500px|rigth]]&lt;br /&gt;
&lt;br /&gt;
We can see that the model is one more time really closed to the reality with a pic of 43 deaths after 50 days, while the reality display a pic at 44 days after 36 days.&lt;br /&gt;
&lt;br /&gt;
We have seen that the simulation is really closed from the data obtained for the Switzerland, but now lets go trough some special cases to see the impact of some decision on the variables.&lt;br /&gt;
&lt;br /&gt;
==Scenario 1: Late lockdown==&lt;br /&gt;
&lt;br /&gt;
In this scenario we will see what could have happened if the government take 1 more day to react and to set up the lockdown. To simulate such a scenario I simply increase the number of &amp;quot;Ratio official cases/pop&amp;quot; in the function IF THEN ELSE in &amp;quot;contact&amp;quot; and &amp;quot;contagion rate&amp;quot; from 0.00015 to 0.00018 and it delay the reaction of the government for 1 day.&lt;br /&gt;
&lt;br /&gt;
[[File: Deathz1.png|450px|left]][[File: Deathz2.png|500px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graph, the total number of official cases (=total diagnosed) jump from 33 000 to 45 000 cases. An increase of 35% in the number of official cases by just delaying for 1 day the government decisions. It illustrates well the exponential effect on the model, indeed we don't have to forget that the delay is just one day but if it has been 4-5 days the number of cases would have been exponentially higher. The second graph shows the deaths jump from 1600 to 2300, that is due to increasing number of cases and the hospital capacity reaching more than 60% utilization. Indeed due to the lookup function if the hospital capacity exceed 60% the mortality increase in the hospital. This is a very interesting scenarios that shows quite well the importance of the early lockdown and highlight the most important point in our model, '''the reaction time'''.&lt;br /&gt;
&lt;br /&gt;
==Scenario 2: Small Hospital capacity==&lt;br /&gt;
&lt;br /&gt;
In this scenario the number of hospital beds goes from 356/100k people to 238/100k people, a loss of -10 000 in variable ''hospital bed'' for Switzerland. This number of beds corresponds to the number of beds for a less developing country, such as Iceland (https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704). &lt;br /&gt;
&lt;br /&gt;
[[File: Utiliz.png|500px|left]][[File: Dead.png|480px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graphs, the hospital utilization reach almost 80%. Patients are not treated as well as they would if the utilization was lower, and it involves more deaths for these patients (right graph). We can see the importance of hospital capacity and for government to have a '''good amount of hospitals'''.&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
To conclude I would say that it has been quite difficult to deal with the real data because I had to find every number or to adjust some variables to fit with the reality. Another difficulty that I had to faced was all times and units to setup. The model display almost the same numbers as the ones communicated by the Swiss government, what could indicate that the model are not too far from what is happening in real-life. &lt;br /&gt;
&lt;br /&gt;
The most important variable in the simulation is the '''reaction time''' of the government in order to take some measures against the fast spread of the virus, such as bringing more awareness or imposing a lockdown.&lt;br /&gt;
&lt;br /&gt;
A further exogenous variable here is the number of hospital beds, which is a good proxy for modeling different countries. Having a smaller number of beds is a sign of vulnerability for the health care system and will impact mortality. A solution to this pandemic could therefore be to increase the number of beds in order to avoid exceeding capacity. &lt;br /&gt;
&lt;br /&gt;
A limit to this simulation would be that it is a real pandemic, for example I first tried to simulate the full pandemic with the second pic (higher) as you can see in the graph of Switzerland but I have to admit that sometimes the reality (or my Vensim skills) are to difficult to simulate that is why I choose to stop the simulation after 100 days.&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
[[File:Simulation Covid-19.mdl]]&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
#Federal Office of Public Health FOPH, https://www.bag.admin.ch/bag/en/home.html&lt;br /&gt;
#Fismann, D. (2009), “Modellig an Influenza Pandemic: A Guide for the Perplexed”, CMAJ,August.&lt;br /&gt;
#Madhav, N. (2017), “Pandemics: Risks, Impacts, and Mitigation”, November.&lt;br /&gt;
#Federal Office of Public Health FOPH, https://www.bag.admin.ch/bag/en/home.html&lt;br /&gt;
#https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704&lt;br /&gt;
#https://www.covid19.admin.ch/en/epidemiologic/case?detTime=total&amp;amp;detRel=abs&lt;br /&gt;
#https://www.covid19.admin.ch/en/epidemiologic/death?detTime=total&amp;amp;detRel=abs&lt;/div&gt;</summary>
		<author><name>Toscool</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20302</id>
		<title>Impact of late lockdown and hospital capacity on 19-COVID spread</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20302"/>
		<updated>2021-01-08T10:25:57Z</updated>

		<summary type="html">&lt;p&gt;Toscool: /* hospital bed */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=Problem definition=&lt;br /&gt;
&lt;br /&gt;
The coronavirus pandemic is an ongoing pandemic, the first case confirmed in Switzerland  was on February 25th, 2020 and has known an exponential growth since. We know that the virus is spread from an infected person to a healthy one during close contact or via touching a contaminated surface. The aim of the simulation is to display the dynamics of the reaction time of the government to take measures and to see if the hospital capacity play a key role in the spread of the COVID-19&lt;br /&gt;
&lt;br /&gt;
=Method=&lt;br /&gt;
&lt;br /&gt;
Vensim modelling approach was selected due to dynamic behavior of the simulated system.&lt;br /&gt;
&lt;br /&gt;
the model shows the evolution of the number of people who got infected by the covid-19 virus in countries where the population have a high health care protection and where the government have decided to make a decision about the virus propagation. The model will explain how fast the virus spreads itself and how political decisions can change the number of infected people at a given point in time. The construction of the model is simple: at the beginning one person is infected and will, then, infect other people. When you are infected many possibilities are open:&lt;br /&gt;
* You can be a healthy virus carrier. In that case you will not know that you have the virus and after 19 days you will be recovered.&lt;br /&gt;
* After 5 days you get symptoms, but you do not have any important health problems, you will recover in the next 14 days.&lt;br /&gt;
* After 5 days, you get symptoms and you are very sick and have respiratory problems, after 3 more days, still feeling bad, you decide to go to the doctor to get a diagnosis. The doctor has than two options: to send you back home, where you will recover after 11 more days or hospitalized you the next day.&lt;br /&gt;
* The doctor had decided to hospitalize you, you then spend two weeks in intensive care, where you will need artificial ventilation and 24-hour nursing care. You can then recover or unfortunately die. &lt;br /&gt;
&lt;br /&gt;
The higher the hospital utilization, the greater the probability to die. Indeed, if hospitals get busier, the medical staff will be less available and health care quality might decrease. When the number of diagnosed and hospitalized people (which are the official number of cases) is greater than a certain percentage of the population, the government will take decisions to slow down the spread of the virus. This is to say that governments will take some measures, such as installing a forced lockdown of the population to decrease the number of contacts per habitant. Moreover, such a decision will have an impact on the population, which will be more aware of the situation and will be more careful to not spread or contract the virus. So, the contagion rate as the number of contacts per people will slow down. They will be less hospitalized people, that means less people in the hospital, meaning a better service and so less people who die.&lt;br /&gt;
&lt;br /&gt;
=Model=&lt;br /&gt;
&lt;br /&gt;
Following vensim model was developed based on the study.&lt;br /&gt;
&lt;br /&gt;
[[File:Model1.png|900px|thumb|center|COVID-19 pandemic in Switzerland Stock Flow Diagram]]&lt;br /&gt;
&lt;br /&gt;
== Variables ==&lt;br /&gt;
&lt;br /&gt;
===Initial population=== &lt;br /&gt;
''The Population of Switzerland can be found here: https://en.wikipedia.org/wiki/Demographics_of_Switzerland''&lt;br /&gt;
&lt;br /&gt;
=8 500 000&lt;br /&gt;
&lt;br /&gt;
===Ratio susceptible people=== &lt;br /&gt;
''Decrease the susceptible people by the number of deaths due to the COVID-19.''&lt;br /&gt;
&lt;br /&gt;
=Susceptible population / (Initial population-Dead)&lt;br /&gt;
&lt;br /&gt;
===Susceptible population=== &lt;br /&gt;
''Decrease the susceptible population by the number of new infections.''&lt;br /&gt;
&lt;br /&gt;
=-New infections&lt;br /&gt;
&lt;br /&gt;
===contact=== &lt;br /&gt;
'''Lockdown:''' ''Function IF THEN ELSE that bring the number of new people you meet (contact) from 5 to 0.05 if the ratio exceed 0.015%''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot;&amp;gt; 0.00015, 0.05 , 5 )&lt;br /&gt;
&lt;br /&gt;
===Contagion Rate=== &lt;br /&gt;
'''Lockdown:''' ''contagion rate: IF THEN ELSE that bring the contagion rate from 0.1 to 0.075 if the ratio exceed 0.015%. Function of the awareness in the population (washing more often their hands if lockdown)''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot; &amp;gt; 0.00015 , 0.075 , 0.1 )&lt;br /&gt;
&lt;br /&gt;
===New infections=== &lt;br /&gt;
''It represent the new number of people infected each day.''&lt;br /&gt;
&lt;br /&gt;
=contact*Infected*Ratio susceptible people*Contagion Rate&lt;br /&gt;
&lt;br /&gt;
===Infected=== &lt;br /&gt;
''It represent the stock of the new people infected. We start the model with 1 infected people.''&lt;br /&gt;
&lt;br /&gt;
=New infections-New recoveries from infected-New symptoms ///// Initial value: 1&lt;br /&gt;
&lt;br /&gt;
===New recoveries from infected===&lt;br /&gt;
''It represent the number of people without symptoms and they go in the recovered stock after 19 days.''&lt;br /&gt;
&lt;br /&gt;
=((1-Ratio Symptoms)*Infected)/TTA recoveries&lt;br /&gt;
&lt;br /&gt;
===New symptoms=== &lt;br /&gt;
''It represent the number of new people that develop symptoms during 5 days before going to the symptomatic stock.''&lt;br /&gt;
&lt;br /&gt;
=(Infected*Ratio Symptoms)/TTA Symptoms&lt;br /&gt;
&lt;br /&gt;
===Ratio Symptoms=== &lt;br /&gt;
''The ratio of people who develop some symptoms.''&lt;br /&gt;
&lt;br /&gt;
=0.2&lt;br /&gt;
&lt;br /&gt;
===Symptomatic=== &lt;br /&gt;
''The stock of people symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=New symptoms-New Diagnostic-New recoveries from symptoms&lt;br /&gt;
&lt;br /&gt;
===New recoveries from symptoms=== &lt;br /&gt;
''It represent the number of people that have symptoms but that were not to the doctor, after 14 they are in the recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Diagnost)*Symptomatic/TTA sympt&lt;br /&gt;
&lt;br /&gt;
===New Diagnostic=== &lt;br /&gt;
''It represent the number of new people that are diagnosed each day, they stay 3 days before having the diagnostic.''&lt;br /&gt;
&lt;br /&gt;
=Symptomatic*Ratio Diagnost/TTA Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Ratio Diagnost===&lt;br /&gt;
''the ratio of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=0.4&lt;br /&gt;
&lt;br /&gt;
===Diagnosed=== &lt;br /&gt;
''The stock of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic-New Hospitalization-New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===New Recovery from Diagnostic===&lt;br /&gt;
''It represent the number of people that are diagnosed and not sent to the hospital. they stay 11 days before going in the Recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Hospitalize)*Diagnosed/TTA diag&lt;br /&gt;
&lt;br /&gt;
===New Hospitalization=== &lt;br /&gt;
''It represent the number of people that are diagnosed and sent to the hospital. they stay 1 day before being sent.''&lt;br /&gt;
&lt;br /&gt;
=(Diagnosed*Ratio Hospitalize)/TTA Hospitalization Ratio Hospitalize&lt;br /&gt;
&lt;br /&gt;
===Ratio Hospitalize===&lt;br /&gt;
''The ratio of people that are Hospitalized.''&lt;br /&gt;
&lt;br /&gt;
=0.3&lt;br /&gt;
&lt;br /&gt;
===Hospitalized=== &lt;br /&gt;
''The stock of people that are hospitalized before being Recovered or Dead.''&lt;br /&gt;
&lt;br /&gt;
=New Hospitalization-New Death-New Recovery&lt;br /&gt;
&lt;br /&gt;
===New Recovery=== &lt;br /&gt;
''The number of people that recover each day from the hospitalization. It depends on the '''Taux Mortality''' which is depend from the '''hospital utilization''' (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=((1-Mortality Rate)*Hospitalized)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===New Death===&lt;br /&gt;
''The number of people that die each day from the hospitalization. It depends on the '''Taux Mortality''' which is depend from the '''hospital utilization''' (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized*Mortality Rate)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===hospital bed=== &lt;br /&gt;
''The number of bed in Switzerland is 356 beds for 100k people with 8.5M people it gives that number: https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704''&lt;br /&gt;
&lt;br /&gt;
=30260&lt;br /&gt;
&lt;br /&gt;
===hospital utilization=== &lt;br /&gt;
''The utilization of the hospital we assume that there is already 8260 beds used for patient outside the covid pandemic. The more utilization we have, the greater the probability to die. Indeed, if hospitals get busier, the medical staff will be less available and health care quality might decrease.''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized/(hospital bed - 8260)) &lt;br /&gt;
&lt;br /&gt;
===lookup mortality===&lt;br /&gt;
''The lookup function is used to described the mortality rate.''&lt;br /&gt;
&lt;br /&gt;
[(0,0)-(1000,0.3)],(0,0.065),(0.6,0.065),(0.8,0.12),(1,0.25),(1.2,0.3),(10,0.3),(1000,0.3)&lt;br /&gt;
&lt;br /&gt;
===Taux Mortality=== &lt;br /&gt;
''The mortality rate depends on the hospital utilization. For example based on the above function, if the capacity reach 100% the hospital is full and the chance to die is then 25%.''&lt;br /&gt;
&lt;br /&gt;
=lk mortality (hospital utilization)&lt;br /&gt;
&lt;br /&gt;
===Dead=== &lt;br /&gt;
''The stock of Dead people killed by the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New Death&lt;br /&gt;
&lt;br /&gt;
===Recovered=== &lt;br /&gt;
''The Total amount of people who recovered from the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New recoveries from infected+New recoveries from symptoms+New Recovery+New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===official active cases===&lt;br /&gt;
''It represent the number of people that were tested and it's this number that will be used by the government to follow the pandemic and take decision of lockdown.''&lt;br /&gt;
&lt;br /&gt;
=Diagnosed+Hosptitalized&lt;br /&gt;
&lt;br /&gt;
===Ratio official cases/pop=== &lt;br /&gt;
''The ratio that will be used for lockdown. ''&lt;br /&gt;
&lt;br /&gt;
=official active cases/ Initial population&lt;br /&gt;
&lt;br /&gt;
===New Diagnosed.1=== &lt;br /&gt;
''It's is just the same as New Diagnostic, it is used in the model to have the Total Diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Total Diagnosed=== &lt;br /&gt;
''Used in the model to have the official number of cases in the model.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnosed.1&lt;br /&gt;
&lt;br /&gt;
===TTA recoveries=== &lt;br /&gt;
''Time to recover after being infected and not having symptoms.''&lt;br /&gt;
&lt;br /&gt;
=19&lt;br /&gt;
&lt;br /&gt;
===TTA Symptoms=== &lt;br /&gt;
''The time you take to develop symptoms.''&lt;br /&gt;
&lt;br /&gt;
=5&lt;br /&gt;
&lt;br /&gt;
===TTA sympt===&lt;br /&gt;
''The time you take for recovering after being symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
===TTA Diagnostic=== &lt;br /&gt;
''Time to go to the doctor and have the result.''&lt;br /&gt;
&lt;br /&gt;
=3&lt;br /&gt;
&lt;br /&gt;
===TTA diag===&lt;br /&gt;
''The time you take for recovering after being diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=11&lt;br /&gt;
&lt;br /&gt;
===TTA Hospitalization=== &lt;br /&gt;
''Time to go to the Hospital.''&lt;br /&gt;
&lt;br /&gt;
=1&lt;br /&gt;
&lt;br /&gt;
===TTA Hospital===&lt;br /&gt;
''The time you stay at the hospital before recovering or dying.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
As explained in the problem definition we will focused our results on 3 cases. The first one is the normal scenario, the second is the same scenario but the lockdown is delayed for 1 day, and the last scenario is the normal scenario with a number of hospital beds reduce by 10 000 beds.&lt;br /&gt;
&lt;br /&gt;
==Normal Scenario==&lt;br /&gt;
&lt;br /&gt;
The first scenario take place in Switzerland with 8 500 000 peoples and a hospital capacity of 356 beds for 100k people. The first case was detected the 25 february 2019 and 20 days after the Government of Switzerland have decided to take some serious measures that is in our case represented by a lockdown. &lt;br /&gt;
&lt;br /&gt;
The following table show us the official number of new cases per day:&lt;br /&gt;
&lt;br /&gt;
[[File:Newcases.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
From the simulation we get:&lt;br /&gt;
&lt;br /&gt;
[[File:Yes.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
We can see that the model is really closed to the reality with a pic of 1350 after 35 days. The simulation stopped after 100 days so we just want to focused on these first 100 days. The reality display a pic at 1243 days after 30 days.&lt;br /&gt;
&lt;br /&gt;
The true number of new death per day, and the number from the simulation is also display below:&lt;br /&gt;
&lt;br /&gt;
[[File: deat.png|500px|left]]        [[File:Deats.18.png|500px|rigth]]&lt;br /&gt;
&lt;br /&gt;
We can see that the model is one more time really closed to the reality with a pic of 43 deaths after 50 days, while the reality display a pic at 44 days after 36 days.&lt;br /&gt;
&lt;br /&gt;
We have seen that the simulation is really closed from the data obtained for the Switzerland, but now lets go trough some special cases to see the impact of some decision on the variables.&lt;br /&gt;
&lt;br /&gt;
==Scenario 1: Late lockdown==&lt;br /&gt;
&lt;br /&gt;
In this scenario we will see what could have happened if the government take 1 more day to react and to set up the lockdown. To simulate such a scenario I simply increase the number of &amp;quot;Ratio official cases/pop&amp;quot; in the function IF THEN ELSE in &amp;quot;contact&amp;quot; and &amp;quot;contagion rate&amp;quot; from 0.00015 to 0.00018 and it delay the reaction of the government for 1 day.&lt;br /&gt;
&lt;br /&gt;
[[File: Deathz1.png|450px|left]][[File: Deathz2.png|500px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graph, the total number of official cases (=total diagnosed) jump from 33 000 to 45 000 cases. An increase of 35% in the number of official cases by just delaying for 1 day the government decisions. It illustrates well the exponential effect on the model, indeed we don't have to forget that the delay is just one day but if it has been 4-5 days the number of cases would have been exponentially higher. The second graph shows the deaths jump from 1600 to 2300, that is due to increasing number of cases and the hospital capacity reaching more than 60% utilization. Indeed due to the lookup function if the hospital capacity exceed 60% the mortality increase in the hospital. This is a very interesting scenarios that shows quite well the importance of the early lockdown and highlight the most important point in our model, '''the reaction time'''.&lt;br /&gt;
&lt;br /&gt;
==Scenario 2: Small Hospital capacity==&lt;br /&gt;
&lt;br /&gt;
In this scenario the number of hospital beds goes from 356/100k people to 238/100k people, a loss of -10 000 in variable ''hospital bed'' for Switzerland. This number of beds corresponds to the number of beds for a less developing country, such as Iceland (https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704). &lt;br /&gt;
&lt;br /&gt;
[[File: Utiliz.png|500px|left]][[File: Dead.png|480px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graphs, the hospital utilization reach almost 80%. Patients are not treated as well as they would if the utilization was lower, and it involves more deaths for these patients (right graph). We can see the importance of hospital capacity and for government to have a '''good amount of hospitals'''.&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
To conclude I would say that it has been quite difficult to deal with the real data because I had to find every number or to adjust some variables to fit with the reality. Another difficulty that I had to faced was all times and units to setup. The model display almost the same numbers as the ones communicated by the Swiss government, what could indicate that the model are not too far from what is happening in real-life. &lt;br /&gt;
&lt;br /&gt;
The most important variable in the simulation is the '''reaction time''' of the government in order to take some measures against the fast spread of the virus, such as bringing more awareness or imposing a lockdown.&lt;br /&gt;
&lt;br /&gt;
A further exogenous variable here is the number of hospital beds, which is a good proxy for modeling different countries. Having a smaller number of beds is a sign of vulnerability for the health care system and will impact mortality. A solution to this pandemic could therefore be to increase the number of beds in order to avoid exceeding capacity. &lt;br /&gt;
&lt;br /&gt;
A limit to this simulation would be that it is a real pandemic, for example I first tried to simulate the full pandemic with the second pic (higher) as you can see in the graph of Switzerland but I have to admit that sometimes the reality (or my Vensim skills) are to difficult to simulate that is why I choose to stop the simulation after 100 days.&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
[[File:Simulation Covid-19.mdl]]&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
#Federal Office of Public Health FOPH, https://www.bag.admin.ch/bag/en/home.html&lt;br /&gt;
#Fismann, D. (2009), “Modellig an Influenza Pandemic: A Guide for the Perplexed”, CMAJ,August.&lt;br /&gt;
#Madhav, N. (2017), “Pandemics: Risks, Impacts, and Mitigation”, November.&lt;br /&gt;
#Federal Office of Public Health FOPH, https://www.bag.admin.ch/bag/en/home.html&lt;br /&gt;
#https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704&lt;br /&gt;
#https://www.covid19.admin.ch/en/epidemiologic/case?detTime=total&amp;amp;detRel=abs&lt;br /&gt;
#https://www.covid19.admin.ch/en/epidemiologic/death?detTime=total&amp;amp;detRel=abs&lt;/div&gt;</summary>
		<author><name>Toscool</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20301</id>
		<title>Impact of late lockdown and hospital capacity on 19-COVID spread</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20301"/>
		<updated>2021-01-08T10:25:27Z</updated>

		<summary type="html">&lt;p&gt;Toscool: /* New Death */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=Problem definition=&lt;br /&gt;
&lt;br /&gt;
The coronavirus pandemic is an ongoing pandemic, the first case confirmed in Switzerland  was on February 25th, 2020 and has known an exponential growth since. We know that the virus is spread from an infected person to a healthy one during close contact or via touching a contaminated surface. The aim of the simulation is to display the dynamics of the reaction time of the government to take measures and to see if the hospital capacity play a key role in the spread of the COVID-19&lt;br /&gt;
&lt;br /&gt;
=Method=&lt;br /&gt;
&lt;br /&gt;
Vensim modelling approach was selected due to dynamic behavior of the simulated system.&lt;br /&gt;
&lt;br /&gt;
the model shows the evolution of the number of people who got infected by the covid-19 virus in countries where the population have a high health care protection and where the government have decided to make a decision about the virus propagation. The model will explain how fast the virus spreads itself and how political decisions can change the number of infected people at a given point in time. The construction of the model is simple: at the beginning one person is infected and will, then, infect other people. When you are infected many possibilities are open:&lt;br /&gt;
* You can be a healthy virus carrier. In that case you will not know that you have the virus and after 19 days you will be recovered.&lt;br /&gt;
* After 5 days you get symptoms, but you do not have any important health problems, you will recover in the next 14 days.&lt;br /&gt;
* After 5 days, you get symptoms and you are very sick and have respiratory problems, after 3 more days, still feeling bad, you decide to go to the doctor to get a diagnosis. The doctor has than two options: to send you back home, where you will recover after 11 more days or hospitalized you the next day.&lt;br /&gt;
* The doctor had decided to hospitalize you, you then spend two weeks in intensive care, where you will need artificial ventilation and 24-hour nursing care. You can then recover or unfortunately die. &lt;br /&gt;
&lt;br /&gt;
The higher the hospital utilization, the greater the probability to die. Indeed, if hospitals get busier, the medical staff will be less available and health care quality might decrease. When the number of diagnosed and hospitalized people (which are the official number of cases) is greater than a certain percentage of the population, the government will take decisions to slow down the spread of the virus. This is to say that governments will take some measures, such as installing a forced lockdown of the population to decrease the number of contacts per habitant. Moreover, such a decision will have an impact on the population, which will be more aware of the situation and will be more careful to not spread or contract the virus. So, the contagion rate as the number of contacts per people will slow down. They will be less hospitalized people, that means less people in the hospital, meaning a better service and so less people who die.&lt;br /&gt;
&lt;br /&gt;
=Model=&lt;br /&gt;
&lt;br /&gt;
Following vensim model was developed based on the study.&lt;br /&gt;
&lt;br /&gt;
[[File:Model1.png|900px|thumb|center|COVID-19 pandemic in Switzerland Stock Flow Diagram]]&lt;br /&gt;
&lt;br /&gt;
== Variables ==&lt;br /&gt;
&lt;br /&gt;
===Initial population=== &lt;br /&gt;
''The Population of Switzerland can be found here: https://en.wikipedia.org/wiki/Demographics_of_Switzerland''&lt;br /&gt;
&lt;br /&gt;
=8 500 000&lt;br /&gt;
&lt;br /&gt;
===Ratio susceptible people=== &lt;br /&gt;
''Decrease the susceptible people by the number of deaths due to the COVID-19.''&lt;br /&gt;
&lt;br /&gt;
=Susceptible population / (Initial population-Dead)&lt;br /&gt;
&lt;br /&gt;
===Susceptible population=== &lt;br /&gt;
''Decrease the susceptible population by the number of new infections.''&lt;br /&gt;
&lt;br /&gt;
=-New infections&lt;br /&gt;
&lt;br /&gt;
===contact=== &lt;br /&gt;
'''Lockdown:''' ''Function IF THEN ELSE that bring the number of new people you meet (contact) from 5 to 0.05 if the ratio exceed 0.015%''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot;&amp;gt; 0.00015, 0.05 , 5 )&lt;br /&gt;
&lt;br /&gt;
===Contagion Rate=== &lt;br /&gt;
'''Lockdown:''' ''contagion rate: IF THEN ELSE that bring the contagion rate from 0.1 to 0.075 if the ratio exceed 0.015%. Function of the awareness in the population (washing more often their hands if lockdown)''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot; &amp;gt; 0.00015 , 0.075 , 0.1 )&lt;br /&gt;
&lt;br /&gt;
===New infections=== &lt;br /&gt;
''It represent the new number of people infected each day.''&lt;br /&gt;
&lt;br /&gt;
=contact*Infected*Ratio susceptible people*Contagion Rate&lt;br /&gt;
&lt;br /&gt;
===Infected=== &lt;br /&gt;
''It represent the stock of the new people infected. We start the model with 1 infected people.''&lt;br /&gt;
&lt;br /&gt;
=New infections-New recoveries from infected-New symptoms ///// Initial value: 1&lt;br /&gt;
&lt;br /&gt;
===New recoveries from infected===&lt;br /&gt;
''It represent the number of people without symptoms and they go in the recovered stock after 19 days.''&lt;br /&gt;
&lt;br /&gt;
=((1-Ratio Symptoms)*Infected)/TTA recoveries&lt;br /&gt;
&lt;br /&gt;
===New symptoms=== &lt;br /&gt;
''It represent the number of new people that develop symptoms during 5 days before going to the symptomatic stock.''&lt;br /&gt;
&lt;br /&gt;
=(Infected*Ratio Symptoms)/TTA Symptoms&lt;br /&gt;
&lt;br /&gt;
===Ratio Symptoms=== &lt;br /&gt;
''The ratio of people who develop some symptoms.''&lt;br /&gt;
&lt;br /&gt;
=0.2&lt;br /&gt;
&lt;br /&gt;
===Symptomatic=== &lt;br /&gt;
''The stock of people symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=New symptoms-New Diagnostic-New recoveries from symptoms&lt;br /&gt;
&lt;br /&gt;
===New recoveries from symptoms=== &lt;br /&gt;
''It represent the number of people that have symptoms but that were not to the doctor, after 14 they are in the recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Diagnost)*Symptomatic/TTA sympt&lt;br /&gt;
&lt;br /&gt;
===New Diagnostic=== &lt;br /&gt;
''It represent the number of new people that are diagnosed each day, they stay 3 days before having the diagnostic.''&lt;br /&gt;
&lt;br /&gt;
=Symptomatic*Ratio Diagnost/TTA Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Ratio Diagnost===&lt;br /&gt;
''the ratio of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=0.4&lt;br /&gt;
&lt;br /&gt;
===Diagnosed=== &lt;br /&gt;
''The stock of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic-New Hospitalization-New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===New Recovery from Diagnostic===&lt;br /&gt;
''It represent the number of people that are diagnosed and not sent to the hospital. they stay 11 days before going in the Recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Hospitalize)*Diagnosed/TTA diag&lt;br /&gt;
&lt;br /&gt;
===New Hospitalization=== &lt;br /&gt;
''It represent the number of people that are diagnosed and sent to the hospital. they stay 1 day before being sent.''&lt;br /&gt;
&lt;br /&gt;
=(Diagnosed*Ratio Hospitalize)/TTA Hospitalization Ratio Hospitalize&lt;br /&gt;
&lt;br /&gt;
===Ratio Hospitalize===&lt;br /&gt;
''The ratio of people that are Hospitalized.''&lt;br /&gt;
&lt;br /&gt;
=0.3&lt;br /&gt;
&lt;br /&gt;
===Hospitalized=== &lt;br /&gt;
''The stock of people that are hospitalized before being Recovered or Dead.''&lt;br /&gt;
&lt;br /&gt;
=New Hospitalization-New Death-New Recovery&lt;br /&gt;
&lt;br /&gt;
===New Recovery=== &lt;br /&gt;
''The number of people that recover each day from the hospitalization. It depends on the '''Taux Mortality''' which is depend from the '''hospital utilization''' (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=((1-Mortality Rate)*Hospitalized)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===New Death===&lt;br /&gt;
''The number of people that die each day from the hospitalization. It depends on the '''Taux Mortality''' which is depend from the '''hospital utilization''' (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized*Mortality Rate)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===hospital bed=== &lt;br /&gt;
''The number of bed in Switzerland 356 beds for 100k people with 8.5M people it gives that number: https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704''&lt;br /&gt;
&lt;br /&gt;
=30260&lt;br /&gt;
&lt;br /&gt;
===hospital utilization=== &lt;br /&gt;
''The utilization of the hospital we assume that there is already 8260 beds used for patient outside the covid pandemic. The more utilization we have, the greater the probability to die. Indeed, if hospitals get busier, the medical staff will be less available and health care quality might decrease.''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized/(hospital bed - 8260)) &lt;br /&gt;
&lt;br /&gt;
===lookup mortality===&lt;br /&gt;
''The lookup function is used to described the mortality rate.''&lt;br /&gt;
&lt;br /&gt;
[(0,0)-(1000,0.3)],(0,0.065),(0.6,0.065),(0.8,0.12),(1,0.25),(1.2,0.3),(10,0.3),(1000,0.3)&lt;br /&gt;
&lt;br /&gt;
===Taux Mortality=== &lt;br /&gt;
''The mortality rate depends on the hospital utilization. For example based on the above function, if the capacity reach 100% the hospital is full and the chance to die is then 25%.''&lt;br /&gt;
&lt;br /&gt;
=lk mortality (hospital utilization)&lt;br /&gt;
&lt;br /&gt;
===Dead=== &lt;br /&gt;
''The stock of Dead people killed by the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New Death&lt;br /&gt;
&lt;br /&gt;
===Recovered=== &lt;br /&gt;
''The Total amount of people who recovered from the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New recoveries from infected+New recoveries from symptoms+New Recovery+New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===official active cases===&lt;br /&gt;
''It represent the number of people that were tested and it's this number that will be used by the government to follow the pandemic and take decision of lockdown.''&lt;br /&gt;
&lt;br /&gt;
=Diagnosed+Hosptitalized&lt;br /&gt;
&lt;br /&gt;
===Ratio official cases/pop=== &lt;br /&gt;
''The ratio that will be used for lockdown. ''&lt;br /&gt;
&lt;br /&gt;
=official active cases/ Initial population&lt;br /&gt;
&lt;br /&gt;
===New Diagnosed.1=== &lt;br /&gt;
''It's is just the same as New Diagnostic, it is used in the model to have the Total Diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Total Diagnosed=== &lt;br /&gt;
''Used in the model to have the official number of cases in the model.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnosed.1&lt;br /&gt;
&lt;br /&gt;
===TTA recoveries=== &lt;br /&gt;
''Time to recover after being infected and not having symptoms.''&lt;br /&gt;
&lt;br /&gt;
=19&lt;br /&gt;
&lt;br /&gt;
===TTA Symptoms=== &lt;br /&gt;
''The time you take to develop symptoms.''&lt;br /&gt;
&lt;br /&gt;
=5&lt;br /&gt;
&lt;br /&gt;
===TTA sympt===&lt;br /&gt;
''The time you take for recovering after being symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
===TTA Diagnostic=== &lt;br /&gt;
''Time to go to the doctor and have the result.''&lt;br /&gt;
&lt;br /&gt;
=3&lt;br /&gt;
&lt;br /&gt;
===TTA diag===&lt;br /&gt;
''The time you take for recovering after being diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=11&lt;br /&gt;
&lt;br /&gt;
===TTA Hospitalization=== &lt;br /&gt;
''Time to go to the Hospital.''&lt;br /&gt;
&lt;br /&gt;
=1&lt;br /&gt;
&lt;br /&gt;
===TTA Hospital===&lt;br /&gt;
''The time you stay at the hospital before recovering or dying.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
As explained in the problem definition we will focused our results on 3 cases. The first one is the normal scenario, the second is the same scenario but the lockdown is delayed for 1 day, and the last scenario is the normal scenario with a number of hospital beds reduce by 10 000 beds.&lt;br /&gt;
&lt;br /&gt;
==Normal Scenario==&lt;br /&gt;
&lt;br /&gt;
The first scenario take place in Switzerland with 8 500 000 peoples and a hospital capacity of 356 beds for 100k people. The first case was detected the 25 february 2019 and 20 days after the Government of Switzerland have decided to take some serious measures that is in our case represented by a lockdown. &lt;br /&gt;
&lt;br /&gt;
The following table show us the official number of new cases per day:&lt;br /&gt;
&lt;br /&gt;
[[File:Newcases.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
From the simulation we get:&lt;br /&gt;
&lt;br /&gt;
[[File:Yes.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
We can see that the model is really closed to the reality with a pic of 1350 after 35 days. The simulation stopped after 100 days so we just want to focused on these first 100 days. The reality display a pic at 1243 days after 30 days.&lt;br /&gt;
&lt;br /&gt;
The true number of new death per day, and the number from the simulation is also display below:&lt;br /&gt;
&lt;br /&gt;
[[File: deat.png|500px|left]]        [[File:Deats.18.png|500px|rigth]]&lt;br /&gt;
&lt;br /&gt;
We can see that the model is one more time really closed to the reality with a pic of 43 deaths after 50 days, while the reality display a pic at 44 days after 36 days.&lt;br /&gt;
&lt;br /&gt;
We have seen that the simulation is really closed from the data obtained for the Switzerland, but now lets go trough some special cases to see the impact of some decision on the variables.&lt;br /&gt;
&lt;br /&gt;
==Scenario 1: Late lockdown==&lt;br /&gt;
&lt;br /&gt;
In this scenario we will see what could have happened if the government take 1 more day to react and to set up the lockdown. To simulate such a scenario I simply increase the number of &amp;quot;Ratio official cases/pop&amp;quot; in the function IF THEN ELSE in &amp;quot;contact&amp;quot; and &amp;quot;contagion rate&amp;quot; from 0.00015 to 0.00018 and it delay the reaction of the government for 1 day.&lt;br /&gt;
&lt;br /&gt;
[[File: Deathz1.png|450px|left]][[File: Deathz2.png|500px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graph, the total number of official cases (=total diagnosed) jump from 33 000 to 45 000 cases. An increase of 35% in the number of official cases by just delaying for 1 day the government decisions. It illustrates well the exponential effect on the model, indeed we don't have to forget that the delay is just one day but if it has been 4-5 days the number of cases would have been exponentially higher. The second graph shows the deaths jump from 1600 to 2300, that is due to increasing number of cases and the hospital capacity reaching more than 60% utilization. Indeed due to the lookup function if the hospital capacity exceed 60% the mortality increase in the hospital. This is a very interesting scenarios that shows quite well the importance of the early lockdown and highlight the most important point in our model, '''the reaction time'''.&lt;br /&gt;
&lt;br /&gt;
==Scenario 2: Small Hospital capacity==&lt;br /&gt;
&lt;br /&gt;
In this scenario the number of hospital beds goes from 356/100k people to 238/100k people, a loss of -10 000 in variable ''hospital bed'' for Switzerland. This number of beds corresponds to the number of beds for a less developing country, such as Iceland (https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704). &lt;br /&gt;
&lt;br /&gt;
[[File: Utiliz.png|500px|left]][[File: Dead.png|480px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graphs, the hospital utilization reach almost 80%. Patients are not treated as well as they would if the utilization was lower, and it involves more deaths for these patients (right graph). We can see the importance of hospital capacity and for government to have a '''good amount of hospitals'''.&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
To conclude I would say that it has been quite difficult to deal with the real data because I had to find every number or to adjust some variables to fit with the reality. Another difficulty that I had to faced was all times and units to setup. The model display almost the same numbers as the ones communicated by the Swiss government, what could indicate that the model are not too far from what is happening in real-life. &lt;br /&gt;
&lt;br /&gt;
The most important variable in the simulation is the '''reaction time''' of the government in order to take some measures against the fast spread of the virus, such as bringing more awareness or imposing a lockdown.&lt;br /&gt;
&lt;br /&gt;
A further exogenous variable here is the number of hospital beds, which is a good proxy for modeling different countries. Having a smaller number of beds is a sign of vulnerability for the health care system and will impact mortality. A solution to this pandemic could therefore be to increase the number of beds in order to avoid exceeding capacity. &lt;br /&gt;
&lt;br /&gt;
A limit to this simulation would be that it is a real pandemic, for example I first tried to simulate the full pandemic with the second pic (higher) as you can see in the graph of Switzerland but I have to admit that sometimes the reality (or my Vensim skills) are to difficult to simulate that is why I choose to stop the simulation after 100 days.&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
[[File:Simulation Covid-19.mdl]]&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
#Federal Office of Public Health FOPH, https://www.bag.admin.ch/bag/en/home.html&lt;br /&gt;
#Fismann, D. (2009), “Modellig an Influenza Pandemic: A Guide for the Perplexed”, CMAJ,August.&lt;br /&gt;
#Madhav, N. (2017), “Pandemics: Risks, Impacts, and Mitigation”, November.&lt;br /&gt;
#Federal Office of Public Health FOPH, https://www.bag.admin.ch/bag/en/home.html&lt;br /&gt;
#https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704&lt;br /&gt;
#https://www.covid19.admin.ch/en/epidemiologic/case?detTime=total&amp;amp;detRel=abs&lt;br /&gt;
#https://www.covid19.admin.ch/en/epidemiologic/death?detTime=total&amp;amp;detRel=abs&lt;/div&gt;</summary>
		<author><name>Toscool</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20300</id>
		<title>Impact of late lockdown and hospital capacity on 19-COVID spread</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20300"/>
		<updated>2021-01-08T10:24:49Z</updated>

		<summary type="html">&lt;p&gt;Toscool: /* New Recovery */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=Problem definition=&lt;br /&gt;
&lt;br /&gt;
The coronavirus pandemic is an ongoing pandemic, the first case confirmed in Switzerland  was on February 25th, 2020 and has known an exponential growth since. We know that the virus is spread from an infected person to a healthy one during close contact or via touching a contaminated surface. The aim of the simulation is to display the dynamics of the reaction time of the government to take measures and to see if the hospital capacity play a key role in the spread of the COVID-19&lt;br /&gt;
&lt;br /&gt;
=Method=&lt;br /&gt;
&lt;br /&gt;
Vensim modelling approach was selected due to dynamic behavior of the simulated system.&lt;br /&gt;
&lt;br /&gt;
the model shows the evolution of the number of people who got infected by the covid-19 virus in countries where the population have a high health care protection and where the government have decided to make a decision about the virus propagation. The model will explain how fast the virus spreads itself and how political decisions can change the number of infected people at a given point in time. The construction of the model is simple: at the beginning one person is infected and will, then, infect other people. When you are infected many possibilities are open:&lt;br /&gt;
* You can be a healthy virus carrier. In that case you will not know that you have the virus and after 19 days you will be recovered.&lt;br /&gt;
* After 5 days you get symptoms, but you do not have any important health problems, you will recover in the next 14 days.&lt;br /&gt;
* After 5 days, you get symptoms and you are very sick and have respiratory problems, after 3 more days, still feeling bad, you decide to go to the doctor to get a diagnosis. The doctor has than two options: to send you back home, where you will recover after 11 more days or hospitalized you the next day.&lt;br /&gt;
* The doctor had decided to hospitalize you, you then spend two weeks in intensive care, where you will need artificial ventilation and 24-hour nursing care. You can then recover or unfortunately die. &lt;br /&gt;
&lt;br /&gt;
The higher the hospital utilization, the greater the probability to die. Indeed, if hospitals get busier, the medical staff will be less available and health care quality might decrease. When the number of diagnosed and hospitalized people (which are the official number of cases) is greater than a certain percentage of the population, the government will take decisions to slow down the spread of the virus. This is to say that governments will take some measures, such as installing a forced lockdown of the population to decrease the number of contacts per habitant. Moreover, such a decision will have an impact on the population, which will be more aware of the situation and will be more careful to not spread or contract the virus. So, the contagion rate as the number of contacts per people will slow down. They will be less hospitalized people, that means less people in the hospital, meaning a better service and so less people who die.&lt;br /&gt;
&lt;br /&gt;
=Model=&lt;br /&gt;
&lt;br /&gt;
Following vensim model was developed based on the study.&lt;br /&gt;
&lt;br /&gt;
[[File:Model1.png|900px|thumb|center|COVID-19 pandemic in Switzerland Stock Flow Diagram]]&lt;br /&gt;
&lt;br /&gt;
== Variables ==&lt;br /&gt;
&lt;br /&gt;
===Initial population=== &lt;br /&gt;
''The Population of Switzerland can be found here: https://en.wikipedia.org/wiki/Demographics_of_Switzerland''&lt;br /&gt;
&lt;br /&gt;
=8 500 000&lt;br /&gt;
&lt;br /&gt;
===Ratio susceptible people=== &lt;br /&gt;
''Decrease the susceptible people by the number of deaths due to the COVID-19.''&lt;br /&gt;
&lt;br /&gt;
=Susceptible population / (Initial population-Dead)&lt;br /&gt;
&lt;br /&gt;
===Susceptible population=== &lt;br /&gt;
''Decrease the susceptible population by the number of new infections.''&lt;br /&gt;
&lt;br /&gt;
=-New infections&lt;br /&gt;
&lt;br /&gt;
===contact=== &lt;br /&gt;
'''Lockdown:''' ''Function IF THEN ELSE that bring the number of new people you meet (contact) from 5 to 0.05 if the ratio exceed 0.015%''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot;&amp;gt; 0.00015, 0.05 , 5 )&lt;br /&gt;
&lt;br /&gt;
===Contagion Rate=== &lt;br /&gt;
'''Lockdown:''' ''contagion rate: IF THEN ELSE that bring the contagion rate from 0.1 to 0.075 if the ratio exceed 0.015%. Function of the awareness in the population (washing more often their hands if lockdown)''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot; &amp;gt; 0.00015 , 0.075 , 0.1 )&lt;br /&gt;
&lt;br /&gt;
===New infections=== &lt;br /&gt;
''It represent the new number of people infected each day.''&lt;br /&gt;
&lt;br /&gt;
=contact*Infected*Ratio susceptible people*Contagion Rate&lt;br /&gt;
&lt;br /&gt;
===Infected=== &lt;br /&gt;
''It represent the stock of the new people infected. We start the model with 1 infected people.''&lt;br /&gt;
&lt;br /&gt;
=New infections-New recoveries from infected-New symptoms ///// Initial value: 1&lt;br /&gt;
&lt;br /&gt;
===New recoveries from infected===&lt;br /&gt;
''It represent the number of people without symptoms and they go in the recovered stock after 19 days.''&lt;br /&gt;
&lt;br /&gt;
=((1-Ratio Symptoms)*Infected)/TTA recoveries&lt;br /&gt;
&lt;br /&gt;
===New symptoms=== &lt;br /&gt;
''It represent the number of new people that develop symptoms during 5 days before going to the symptomatic stock.''&lt;br /&gt;
&lt;br /&gt;
=(Infected*Ratio Symptoms)/TTA Symptoms&lt;br /&gt;
&lt;br /&gt;
===Ratio Symptoms=== &lt;br /&gt;
''The ratio of people who develop some symptoms.''&lt;br /&gt;
&lt;br /&gt;
=0.2&lt;br /&gt;
&lt;br /&gt;
===Symptomatic=== &lt;br /&gt;
''The stock of people symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=New symptoms-New Diagnostic-New recoveries from symptoms&lt;br /&gt;
&lt;br /&gt;
===New recoveries from symptoms=== &lt;br /&gt;
''It represent the number of people that have symptoms but that were not to the doctor, after 14 they are in the recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Diagnost)*Symptomatic/TTA sympt&lt;br /&gt;
&lt;br /&gt;
===New Diagnostic=== &lt;br /&gt;
''It represent the number of new people that are diagnosed each day, they stay 3 days before having the diagnostic.''&lt;br /&gt;
&lt;br /&gt;
=Symptomatic*Ratio Diagnost/TTA Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Ratio Diagnost===&lt;br /&gt;
''the ratio of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=0.4&lt;br /&gt;
&lt;br /&gt;
===Diagnosed=== &lt;br /&gt;
''The stock of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic-New Hospitalization-New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===New Recovery from Diagnostic===&lt;br /&gt;
''It represent the number of people that are diagnosed and not sent to the hospital. they stay 11 days before going in the Recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Hospitalize)*Diagnosed/TTA diag&lt;br /&gt;
&lt;br /&gt;
===New Hospitalization=== &lt;br /&gt;
''It represent the number of people that are diagnosed and sent to the hospital. they stay 1 day before being sent.''&lt;br /&gt;
&lt;br /&gt;
=(Diagnosed*Ratio Hospitalize)/TTA Hospitalization Ratio Hospitalize&lt;br /&gt;
&lt;br /&gt;
===Ratio Hospitalize===&lt;br /&gt;
''The ratio of people that are Hospitalized.''&lt;br /&gt;
&lt;br /&gt;
=0.3&lt;br /&gt;
&lt;br /&gt;
===Hospitalized=== &lt;br /&gt;
''The stock of people that are hospitalized before being Recovered or Dead.''&lt;br /&gt;
&lt;br /&gt;
=New Hospitalization-New Death-New Recovery&lt;br /&gt;
&lt;br /&gt;
===New Recovery=== &lt;br /&gt;
''The number of people that recover each day from the hospitalization. It depends on the '''Taux Mortality''' which is depend from the '''hospital utilization''' (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=((1-Mortality Rate)*Hospitalized)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===New Death===&lt;br /&gt;
''The number of people that die each day from the hospitalization. It depends from the Mortality Rate which is depend from the hospital utilization (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized*Mortality Rate)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===hospital bed=== &lt;br /&gt;
''The number of bed in Switzerland 356 beds for 100k people with 8.5M people it gives that number: https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704''&lt;br /&gt;
&lt;br /&gt;
=30260&lt;br /&gt;
&lt;br /&gt;
===hospital utilization=== &lt;br /&gt;
''The utilization of the hospital we assume that there is already 8260 beds used for patient outside the covid pandemic. The more utilization we have, the greater the probability to die. Indeed, if hospitals get busier, the medical staff will be less available and health care quality might decrease.''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized/(hospital bed - 8260)) &lt;br /&gt;
&lt;br /&gt;
===lookup mortality===&lt;br /&gt;
''The lookup function is used to described the mortality rate.''&lt;br /&gt;
&lt;br /&gt;
[(0,0)-(1000,0.3)],(0,0.065),(0.6,0.065),(0.8,0.12),(1,0.25),(1.2,0.3),(10,0.3),(1000,0.3)&lt;br /&gt;
&lt;br /&gt;
===Taux Mortality=== &lt;br /&gt;
''The mortality rate depends on the hospital utilization. For example based on the above function, if the capacity reach 100% the hospital is full and the chance to die is then 25%.''&lt;br /&gt;
&lt;br /&gt;
=lk mortality (hospital utilization)&lt;br /&gt;
&lt;br /&gt;
===Dead=== &lt;br /&gt;
''The stock of Dead people killed by the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New Death&lt;br /&gt;
&lt;br /&gt;
===Recovered=== &lt;br /&gt;
''The Total amount of people who recovered from the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New recoveries from infected+New recoveries from symptoms+New Recovery+New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===official active cases===&lt;br /&gt;
''It represent the number of people that were tested and it's this number that will be used by the government to follow the pandemic and take decision of lockdown.''&lt;br /&gt;
&lt;br /&gt;
=Diagnosed+Hosptitalized&lt;br /&gt;
&lt;br /&gt;
===Ratio official cases/pop=== &lt;br /&gt;
''The ratio that will be used for lockdown. ''&lt;br /&gt;
&lt;br /&gt;
=official active cases/ Initial population&lt;br /&gt;
&lt;br /&gt;
===New Diagnosed.1=== &lt;br /&gt;
''It's is just the same as New Diagnostic, it is used in the model to have the Total Diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Total Diagnosed=== &lt;br /&gt;
''Used in the model to have the official number of cases in the model.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnosed.1&lt;br /&gt;
&lt;br /&gt;
===TTA recoveries=== &lt;br /&gt;
''Time to recover after being infected and not having symptoms.''&lt;br /&gt;
&lt;br /&gt;
=19&lt;br /&gt;
&lt;br /&gt;
===TTA Symptoms=== &lt;br /&gt;
''The time you take to develop symptoms.''&lt;br /&gt;
&lt;br /&gt;
=5&lt;br /&gt;
&lt;br /&gt;
===TTA sympt===&lt;br /&gt;
''The time you take for recovering after being symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
===TTA Diagnostic=== &lt;br /&gt;
''Time to go to the doctor and have the result.''&lt;br /&gt;
&lt;br /&gt;
=3&lt;br /&gt;
&lt;br /&gt;
===TTA diag===&lt;br /&gt;
''The time you take for recovering after being diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=11&lt;br /&gt;
&lt;br /&gt;
===TTA Hospitalization=== &lt;br /&gt;
''Time to go to the Hospital.''&lt;br /&gt;
&lt;br /&gt;
=1&lt;br /&gt;
&lt;br /&gt;
===TTA Hospital===&lt;br /&gt;
''The time you stay at the hospital before recovering or dying.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
As explained in the problem definition we will focused our results on 3 cases. The first one is the normal scenario, the second is the same scenario but the lockdown is delayed for 1 day, and the last scenario is the normal scenario with a number of hospital beds reduce by 10 000 beds.&lt;br /&gt;
&lt;br /&gt;
==Normal Scenario==&lt;br /&gt;
&lt;br /&gt;
The first scenario take place in Switzerland with 8 500 000 peoples and a hospital capacity of 356 beds for 100k people. The first case was detected the 25 february 2019 and 20 days after the Government of Switzerland have decided to take some serious measures that is in our case represented by a lockdown. &lt;br /&gt;
&lt;br /&gt;
The following table show us the official number of new cases per day:&lt;br /&gt;
&lt;br /&gt;
[[File:Newcases.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
From the simulation we get:&lt;br /&gt;
&lt;br /&gt;
[[File:Yes.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
We can see that the model is really closed to the reality with a pic of 1350 after 35 days. The simulation stopped after 100 days so we just want to focused on these first 100 days. The reality display a pic at 1243 days after 30 days.&lt;br /&gt;
&lt;br /&gt;
The true number of new death per day, and the number from the simulation is also display below:&lt;br /&gt;
&lt;br /&gt;
[[File: deat.png|500px|left]]        [[File:Deats.18.png|500px|rigth]]&lt;br /&gt;
&lt;br /&gt;
We can see that the model is one more time really closed to the reality with a pic of 43 deaths after 50 days, while the reality display a pic at 44 days after 36 days.&lt;br /&gt;
&lt;br /&gt;
We have seen that the simulation is really closed from the data obtained for the Switzerland, but now lets go trough some special cases to see the impact of some decision on the variables.&lt;br /&gt;
&lt;br /&gt;
==Scenario 1: Late lockdown==&lt;br /&gt;
&lt;br /&gt;
In this scenario we will see what could have happened if the government take 1 more day to react and to set up the lockdown. To simulate such a scenario I simply increase the number of &amp;quot;Ratio official cases/pop&amp;quot; in the function IF THEN ELSE in &amp;quot;contact&amp;quot; and &amp;quot;contagion rate&amp;quot; from 0.00015 to 0.00018 and it delay the reaction of the government for 1 day.&lt;br /&gt;
&lt;br /&gt;
[[File: Deathz1.png|450px|left]][[File: Deathz2.png|500px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graph, the total number of official cases (=total diagnosed) jump from 33 000 to 45 000 cases. An increase of 35% in the number of official cases by just delaying for 1 day the government decisions. It illustrates well the exponential effect on the model, indeed we don't have to forget that the delay is just one day but if it has been 4-5 days the number of cases would have been exponentially higher. The second graph shows the deaths jump from 1600 to 2300, that is due to increasing number of cases and the hospital capacity reaching more than 60% utilization. Indeed due to the lookup function if the hospital capacity exceed 60% the mortality increase in the hospital. This is a very interesting scenarios that shows quite well the importance of the early lockdown and highlight the most important point in our model, '''the reaction time'''.&lt;br /&gt;
&lt;br /&gt;
==Scenario 2: Small Hospital capacity==&lt;br /&gt;
&lt;br /&gt;
In this scenario the number of hospital beds goes from 356/100k people to 238/100k people, a loss of -10 000 in variable ''hospital bed'' for Switzerland. This number of beds corresponds to the number of beds for a less developing country, such as Iceland (https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704). &lt;br /&gt;
&lt;br /&gt;
[[File: Utiliz.png|500px|left]][[File: Dead.png|480px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graphs, the hospital utilization reach almost 80%. Patients are not treated as well as they would if the utilization was lower, and it involves more deaths for these patients (right graph). We can see the importance of hospital capacity and for government to have a '''good amount of hospitals'''.&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
To conclude I would say that it has been quite difficult to deal with the real data because I had to find every number or to adjust some variables to fit with the reality. Another difficulty that I had to faced was all times and units to setup. The model display almost the same numbers as the ones communicated by the Swiss government, what could indicate that the model are not too far from what is happening in real-life. &lt;br /&gt;
&lt;br /&gt;
The most important variable in the simulation is the '''reaction time''' of the government in order to take some measures against the fast spread of the virus, such as bringing more awareness or imposing a lockdown.&lt;br /&gt;
&lt;br /&gt;
A further exogenous variable here is the number of hospital beds, which is a good proxy for modeling different countries. Having a smaller number of beds is a sign of vulnerability for the health care system and will impact mortality. A solution to this pandemic could therefore be to increase the number of beds in order to avoid exceeding capacity. &lt;br /&gt;
&lt;br /&gt;
A limit to this simulation would be that it is a real pandemic, for example I first tried to simulate the full pandemic with the second pic (higher) as you can see in the graph of Switzerland but I have to admit that sometimes the reality (or my Vensim skills) are to difficult to simulate that is why I choose to stop the simulation after 100 days.&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
[[File:Simulation Covid-19.mdl]]&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
#Federal Office of Public Health FOPH, https://www.bag.admin.ch/bag/en/home.html&lt;br /&gt;
#Fismann, D. (2009), “Modellig an Influenza Pandemic: A Guide for the Perplexed”, CMAJ,August.&lt;br /&gt;
#Madhav, N. (2017), “Pandemics: Risks, Impacts, and Mitigation”, November.&lt;br /&gt;
#Federal Office of Public Health FOPH, https://www.bag.admin.ch/bag/en/home.html&lt;br /&gt;
#https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704&lt;br /&gt;
#https://www.covid19.admin.ch/en/epidemiologic/case?detTime=total&amp;amp;detRel=abs&lt;br /&gt;
#https://www.covid19.admin.ch/en/epidemiologic/death?detTime=total&amp;amp;detRel=abs&lt;/div&gt;</summary>
		<author><name>Toscool</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20299</id>
		<title>Impact of late lockdown and hospital capacity on 19-COVID spread</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20299"/>
		<updated>2021-01-08T10:23:23Z</updated>

		<summary type="html">&lt;p&gt;Toscool: /* New Recovery from Diagnostic */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=Problem definition=&lt;br /&gt;
&lt;br /&gt;
The coronavirus pandemic is an ongoing pandemic, the first case confirmed in Switzerland  was on February 25th, 2020 and has known an exponential growth since. We know that the virus is spread from an infected person to a healthy one during close contact or via touching a contaminated surface. The aim of the simulation is to display the dynamics of the reaction time of the government to take measures and to see if the hospital capacity play a key role in the spread of the COVID-19&lt;br /&gt;
&lt;br /&gt;
=Method=&lt;br /&gt;
&lt;br /&gt;
Vensim modelling approach was selected due to dynamic behavior of the simulated system.&lt;br /&gt;
&lt;br /&gt;
the model shows the evolution of the number of people who got infected by the covid-19 virus in countries where the population have a high health care protection and where the government have decided to make a decision about the virus propagation. The model will explain how fast the virus spreads itself and how political decisions can change the number of infected people at a given point in time. The construction of the model is simple: at the beginning one person is infected and will, then, infect other people. When you are infected many possibilities are open:&lt;br /&gt;
* You can be a healthy virus carrier. In that case you will not know that you have the virus and after 19 days you will be recovered.&lt;br /&gt;
* After 5 days you get symptoms, but you do not have any important health problems, you will recover in the next 14 days.&lt;br /&gt;
* After 5 days, you get symptoms and you are very sick and have respiratory problems, after 3 more days, still feeling bad, you decide to go to the doctor to get a diagnosis. The doctor has than two options: to send you back home, where you will recover after 11 more days or hospitalized you the next day.&lt;br /&gt;
* The doctor had decided to hospitalize you, you then spend two weeks in intensive care, where you will need artificial ventilation and 24-hour nursing care. You can then recover or unfortunately die. &lt;br /&gt;
&lt;br /&gt;
The higher the hospital utilization, the greater the probability to die. Indeed, if hospitals get busier, the medical staff will be less available and health care quality might decrease. When the number of diagnosed and hospitalized people (which are the official number of cases) is greater than a certain percentage of the population, the government will take decisions to slow down the spread of the virus. This is to say that governments will take some measures, such as installing a forced lockdown of the population to decrease the number of contacts per habitant. Moreover, such a decision will have an impact on the population, which will be more aware of the situation and will be more careful to not spread or contract the virus. So, the contagion rate as the number of contacts per people will slow down. They will be less hospitalized people, that means less people in the hospital, meaning a better service and so less people who die.&lt;br /&gt;
&lt;br /&gt;
=Model=&lt;br /&gt;
&lt;br /&gt;
Following vensim model was developed based on the study.&lt;br /&gt;
&lt;br /&gt;
[[File:Model1.png|900px|thumb|center|COVID-19 pandemic in Switzerland Stock Flow Diagram]]&lt;br /&gt;
&lt;br /&gt;
== Variables ==&lt;br /&gt;
&lt;br /&gt;
===Initial population=== &lt;br /&gt;
''The Population of Switzerland can be found here: https://en.wikipedia.org/wiki/Demographics_of_Switzerland''&lt;br /&gt;
&lt;br /&gt;
=8 500 000&lt;br /&gt;
&lt;br /&gt;
===Ratio susceptible people=== &lt;br /&gt;
''Decrease the susceptible people by the number of deaths due to the COVID-19.''&lt;br /&gt;
&lt;br /&gt;
=Susceptible population / (Initial population-Dead)&lt;br /&gt;
&lt;br /&gt;
===Susceptible population=== &lt;br /&gt;
''Decrease the susceptible population by the number of new infections.''&lt;br /&gt;
&lt;br /&gt;
=-New infections&lt;br /&gt;
&lt;br /&gt;
===contact=== &lt;br /&gt;
'''Lockdown:''' ''Function IF THEN ELSE that bring the number of new people you meet (contact) from 5 to 0.05 if the ratio exceed 0.015%''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot;&amp;gt; 0.00015, 0.05 , 5 )&lt;br /&gt;
&lt;br /&gt;
===Contagion Rate=== &lt;br /&gt;
'''Lockdown:''' ''contagion rate: IF THEN ELSE that bring the contagion rate from 0.1 to 0.075 if the ratio exceed 0.015%. Function of the awareness in the population (washing more often their hands if lockdown)''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot; &amp;gt; 0.00015 , 0.075 , 0.1 )&lt;br /&gt;
&lt;br /&gt;
===New infections=== &lt;br /&gt;
''It represent the new number of people infected each day.''&lt;br /&gt;
&lt;br /&gt;
=contact*Infected*Ratio susceptible people*Contagion Rate&lt;br /&gt;
&lt;br /&gt;
===Infected=== &lt;br /&gt;
''It represent the stock of the new people infected. We start the model with 1 infected people.''&lt;br /&gt;
&lt;br /&gt;
=New infections-New recoveries from infected-New symptoms ///// Initial value: 1&lt;br /&gt;
&lt;br /&gt;
===New recoveries from infected===&lt;br /&gt;
''It represent the number of people without symptoms and they go in the recovered stock after 19 days.''&lt;br /&gt;
&lt;br /&gt;
=((1-Ratio Symptoms)*Infected)/TTA recoveries&lt;br /&gt;
&lt;br /&gt;
===New symptoms=== &lt;br /&gt;
''It represent the number of new people that develop symptoms during 5 days before going to the symptomatic stock.''&lt;br /&gt;
&lt;br /&gt;
=(Infected*Ratio Symptoms)/TTA Symptoms&lt;br /&gt;
&lt;br /&gt;
===Ratio Symptoms=== &lt;br /&gt;
''The ratio of people who develop some symptoms.''&lt;br /&gt;
&lt;br /&gt;
=0.2&lt;br /&gt;
&lt;br /&gt;
===Symptomatic=== &lt;br /&gt;
''The stock of people symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=New symptoms-New Diagnostic-New recoveries from symptoms&lt;br /&gt;
&lt;br /&gt;
===New recoveries from symptoms=== &lt;br /&gt;
''It represent the number of people that have symptoms but that were not to the doctor, after 14 they are in the recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Diagnost)*Symptomatic/TTA sympt&lt;br /&gt;
&lt;br /&gt;
===New Diagnostic=== &lt;br /&gt;
''It represent the number of new people that are diagnosed each day, they stay 3 days before having the diagnostic.''&lt;br /&gt;
&lt;br /&gt;
=Symptomatic*Ratio Diagnost/TTA Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Ratio Diagnost===&lt;br /&gt;
''the ratio of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=0.4&lt;br /&gt;
&lt;br /&gt;
===Diagnosed=== &lt;br /&gt;
''The stock of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic-New Hospitalization-New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===New Recovery from Diagnostic===&lt;br /&gt;
''It represent the number of people that are diagnosed and not sent to the hospital. they stay 11 days before going in the Recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Hospitalize)*Diagnosed/TTA diag&lt;br /&gt;
&lt;br /&gt;
===New Hospitalization=== &lt;br /&gt;
''It represent the number of people that are diagnosed and sent to the hospital. they stay 1 day before being sent.''&lt;br /&gt;
&lt;br /&gt;
=(Diagnosed*Ratio Hospitalize)/TTA Hospitalization Ratio Hospitalize&lt;br /&gt;
&lt;br /&gt;
===Ratio Hospitalize===&lt;br /&gt;
''The ratio of people that are Hospitalized.''&lt;br /&gt;
&lt;br /&gt;
=0.3&lt;br /&gt;
&lt;br /&gt;
===Hospitalized=== &lt;br /&gt;
''The stock of people that are hospitalized before being Recovered or Dead.''&lt;br /&gt;
&lt;br /&gt;
=New Hospitalization-New Death-New Recovery&lt;br /&gt;
&lt;br /&gt;
===New Recovery=== &lt;br /&gt;
''The number of people that recover each day from the hospitalization. It depends from the Mortality Rate which is depend from the hospital utilization (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=((1-Mortality Rate)*Hospitalized)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===New Death===&lt;br /&gt;
''The number of people that die each day from the hospitalization. It depends from the Mortality Rate which is depend from the hospital utilization (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized*Mortality Rate)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===hospital bed=== &lt;br /&gt;
''The number of bed in Switzerland 356 beds for 100k people with 8.5M people it gives that number: https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704''&lt;br /&gt;
&lt;br /&gt;
=30260&lt;br /&gt;
&lt;br /&gt;
===hospital utilization=== &lt;br /&gt;
''The utilization of the hospital we assume that there is already 8260 beds used for patient outside the covid pandemic. The more utilization we have, the greater the probability to die. Indeed, if hospitals get busier, the medical staff will be less available and health care quality might decrease.''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized/(hospital bed - 8260)) &lt;br /&gt;
&lt;br /&gt;
===lookup mortality===&lt;br /&gt;
''The lookup function is used to described the mortality rate.''&lt;br /&gt;
&lt;br /&gt;
[(0,0)-(1000,0.3)],(0,0.065),(0.6,0.065),(0.8,0.12),(1,0.25),(1.2,0.3),(10,0.3),(1000,0.3)&lt;br /&gt;
&lt;br /&gt;
===Taux Mortality=== &lt;br /&gt;
''The mortality rate depends on the hospital utilization. For example based on the above function, if the capacity reach 100% the hospital is full and the chance to die is then 25%.''&lt;br /&gt;
&lt;br /&gt;
=lk mortality (hospital utilization)&lt;br /&gt;
&lt;br /&gt;
===Dead=== &lt;br /&gt;
''The stock of Dead people killed by the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New Death&lt;br /&gt;
&lt;br /&gt;
===Recovered=== &lt;br /&gt;
''The Total amount of people who recovered from the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New recoveries from infected+New recoveries from symptoms+New Recovery+New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===official active cases===&lt;br /&gt;
''It represent the number of people that were tested and it's this number that will be used by the government to follow the pandemic and take decision of lockdown.''&lt;br /&gt;
&lt;br /&gt;
=Diagnosed+Hosptitalized&lt;br /&gt;
&lt;br /&gt;
===Ratio official cases/pop=== &lt;br /&gt;
''The ratio that will be used for lockdown. ''&lt;br /&gt;
&lt;br /&gt;
=official active cases/ Initial population&lt;br /&gt;
&lt;br /&gt;
===New Diagnosed.1=== &lt;br /&gt;
''It's is just the same as New Diagnostic, it is used in the model to have the Total Diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Total Diagnosed=== &lt;br /&gt;
''Used in the model to have the official number of cases in the model.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnosed.1&lt;br /&gt;
&lt;br /&gt;
===TTA recoveries=== &lt;br /&gt;
''Time to recover after being infected and not having symptoms.''&lt;br /&gt;
&lt;br /&gt;
=19&lt;br /&gt;
&lt;br /&gt;
===TTA Symptoms=== &lt;br /&gt;
''The time you take to develop symptoms.''&lt;br /&gt;
&lt;br /&gt;
=5&lt;br /&gt;
&lt;br /&gt;
===TTA sympt===&lt;br /&gt;
''The time you take for recovering after being symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
===TTA Diagnostic=== &lt;br /&gt;
''Time to go to the doctor and have the result.''&lt;br /&gt;
&lt;br /&gt;
=3&lt;br /&gt;
&lt;br /&gt;
===TTA diag===&lt;br /&gt;
''The time you take for recovering after being diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=11&lt;br /&gt;
&lt;br /&gt;
===TTA Hospitalization=== &lt;br /&gt;
''Time to go to the Hospital.''&lt;br /&gt;
&lt;br /&gt;
=1&lt;br /&gt;
&lt;br /&gt;
===TTA Hospital===&lt;br /&gt;
''The time you stay at the hospital before recovering or dying.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
As explained in the problem definition we will focused our results on 3 cases. The first one is the normal scenario, the second is the same scenario but the lockdown is delayed for 1 day, and the last scenario is the normal scenario with a number of hospital beds reduce by 10 000 beds.&lt;br /&gt;
&lt;br /&gt;
==Normal Scenario==&lt;br /&gt;
&lt;br /&gt;
The first scenario take place in Switzerland with 8 500 000 peoples and a hospital capacity of 356 beds for 100k people. The first case was detected the 25 february 2019 and 20 days after the Government of Switzerland have decided to take some serious measures that is in our case represented by a lockdown. &lt;br /&gt;
&lt;br /&gt;
The following table show us the official number of new cases per day:&lt;br /&gt;
&lt;br /&gt;
[[File:Newcases.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
From the simulation we get:&lt;br /&gt;
&lt;br /&gt;
[[File:Yes.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
We can see that the model is really closed to the reality with a pic of 1350 after 35 days. The simulation stopped after 100 days so we just want to focused on these first 100 days. The reality display a pic at 1243 days after 30 days.&lt;br /&gt;
&lt;br /&gt;
The true number of new death per day, and the number from the simulation is also display below:&lt;br /&gt;
&lt;br /&gt;
[[File: deat.png|500px|left]]        [[File:Deats.18.png|500px|rigth]]&lt;br /&gt;
&lt;br /&gt;
We can see that the model is one more time really closed to the reality with a pic of 43 deaths after 50 days, while the reality display a pic at 44 days after 36 days.&lt;br /&gt;
&lt;br /&gt;
We have seen that the simulation is really closed from the data obtained for the Switzerland, but now lets go trough some special cases to see the impact of some decision on the variables.&lt;br /&gt;
&lt;br /&gt;
==Scenario 1: Late lockdown==&lt;br /&gt;
&lt;br /&gt;
In this scenario we will see what could have happened if the government take 1 more day to react and to set up the lockdown. To simulate such a scenario I simply increase the number of &amp;quot;Ratio official cases/pop&amp;quot; in the function IF THEN ELSE in &amp;quot;contact&amp;quot; and &amp;quot;contagion rate&amp;quot; from 0.00015 to 0.00018 and it delay the reaction of the government for 1 day.&lt;br /&gt;
&lt;br /&gt;
[[File: Deathz1.png|450px|left]][[File: Deathz2.png|500px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graph, the total number of official cases (=total diagnosed) jump from 33 000 to 45 000 cases. An increase of 35% in the number of official cases by just delaying for 1 day the government decisions. It illustrates well the exponential effect on the model, indeed we don't have to forget that the delay is just one day but if it has been 4-5 days the number of cases would have been exponentially higher. The second graph shows the deaths jump from 1600 to 2300, that is due to increasing number of cases and the hospital capacity reaching more than 60% utilization. Indeed due to the lookup function if the hospital capacity exceed 60% the mortality increase in the hospital. This is a very interesting scenarios that shows quite well the importance of the early lockdown and highlight the most important point in our model, '''the reaction time'''.&lt;br /&gt;
&lt;br /&gt;
==Scenario 2: Small Hospital capacity==&lt;br /&gt;
&lt;br /&gt;
In this scenario the number of hospital beds goes from 356/100k people to 238/100k people, a loss of -10 000 in variable ''hospital bed'' for Switzerland. This number of beds corresponds to the number of beds for a less developing country, such as Iceland (https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704). &lt;br /&gt;
&lt;br /&gt;
[[File: Utiliz.png|500px|left]][[File: Dead.png|480px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graphs, the hospital utilization reach almost 80%. Patients are not treated as well as they would if the utilization was lower, and it involves more deaths for these patients (right graph). We can see the importance of hospital capacity and for government to have a '''good amount of hospitals'''.&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
To conclude I would say that it has been quite difficult to deal with the real data because I had to find every number or to adjust some variables to fit with the reality. Another difficulty that I had to faced was all times and units to setup. The model display almost the same numbers as the ones communicated by the Swiss government, what could indicate that the model are not too far from what is happening in real-life. &lt;br /&gt;
&lt;br /&gt;
The most important variable in the simulation is the '''reaction time''' of the government in order to take some measures against the fast spread of the virus, such as bringing more awareness or imposing a lockdown.&lt;br /&gt;
&lt;br /&gt;
A further exogenous variable here is the number of hospital beds, which is a good proxy for modeling different countries. Having a smaller number of beds is a sign of vulnerability for the health care system and will impact mortality. A solution to this pandemic could therefore be to increase the number of beds in order to avoid exceeding capacity. &lt;br /&gt;
&lt;br /&gt;
A limit to this simulation would be that it is a real pandemic, for example I first tried to simulate the full pandemic with the second pic (higher) as you can see in the graph of Switzerland but I have to admit that sometimes the reality (or my Vensim skills) are to difficult to simulate that is why I choose to stop the simulation after 100 days.&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
[[File:Simulation Covid-19.mdl]]&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
#Federal Office of Public Health FOPH, https://www.bag.admin.ch/bag/en/home.html&lt;br /&gt;
#Fismann, D. (2009), “Modellig an Influenza Pandemic: A Guide for the Perplexed”, CMAJ,August.&lt;br /&gt;
#Madhav, N. (2017), “Pandemics: Risks, Impacts, and Mitigation”, November.&lt;br /&gt;
#Federal Office of Public Health FOPH, https://www.bag.admin.ch/bag/en/home.html&lt;br /&gt;
#https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704&lt;br /&gt;
#https://www.covid19.admin.ch/en/epidemiologic/case?detTime=total&amp;amp;detRel=abs&lt;br /&gt;
#https://www.covid19.admin.ch/en/epidemiologic/death?detTime=total&amp;amp;detRel=abs&lt;/div&gt;</summary>
		<author><name>Toscool</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20298</id>
		<title>Impact of late lockdown and hospital capacity on 19-COVID spread</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20298"/>
		<updated>2021-01-08T10:19:20Z</updated>

		<summary type="html">&lt;p&gt;Toscool: /* Mortality Rate */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=Problem definition=&lt;br /&gt;
&lt;br /&gt;
The coronavirus pandemic is an ongoing pandemic, the first case confirmed in Switzerland  was on February 25th, 2020 and has known an exponential growth since. We know that the virus is spread from an infected person to a healthy one during close contact or via touching a contaminated surface. The aim of the simulation is to display the dynamics of the reaction time of the government to take measures and to see if the hospital capacity play a key role in the spread of the COVID-19&lt;br /&gt;
&lt;br /&gt;
=Method=&lt;br /&gt;
&lt;br /&gt;
Vensim modelling approach was selected due to dynamic behavior of the simulated system.&lt;br /&gt;
&lt;br /&gt;
the model shows the evolution of the number of people who got infected by the covid-19 virus in countries where the population have a high health care protection and where the government have decided to make a decision about the virus propagation. The model will explain how fast the virus spreads itself and how political decisions can change the number of infected people at a given point in time. The construction of the model is simple: at the beginning one person is infected and will, then, infect other people. When you are infected many possibilities are open:&lt;br /&gt;
* You can be a healthy virus carrier. In that case you will not know that you have the virus and after 19 days you will be recovered.&lt;br /&gt;
* After 5 days you get symptoms, but you do not have any important health problems, you will recover in the next 14 days.&lt;br /&gt;
* After 5 days, you get symptoms and you are very sick and have respiratory problems, after 3 more days, still feeling bad, you decide to go to the doctor to get a diagnosis. The doctor has than two options: to send you back home, where you will recover after 11 more days or hospitalized you the next day.&lt;br /&gt;
* The doctor had decided to hospitalize you, you then spend two weeks in intensive care, where you will need artificial ventilation and 24-hour nursing care. You can then recover or unfortunately die. &lt;br /&gt;
&lt;br /&gt;
The higher the hospital utilization, the greater the probability to die. Indeed, if hospitals get busier, the medical staff will be less available and health care quality might decrease. When the number of diagnosed and hospitalized people (which are the official number of cases) is greater than a certain percentage of the population, the government will take decisions to slow down the spread of the virus. This is to say that governments will take some measures, such as installing a forced lockdown of the population to decrease the number of contacts per habitant. Moreover, such a decision will have an impact on the population, which will be more aware of the situation and will be more careful to not spread or contract the virus. So, the contagion rate as the number of contacts per people will slow down. They will be less hospitalized people, that means less people in the hospital, meaning a better service and so less people who die.&lt;br /&gt;
&lt;br /&gt;
=Model=&lt;br /&gt;
&lt;br /&gt;
Following vensim model was developed based on the study.&lt;br /&gt;
&lt;br /&gt;
[[File:Model1.png|900px|thumb|center|COVID-19 pandemic in Switzerland Stock Flow Diagram]]&lt;br /&gt;
&lt;br /&gt;
== Variables ==&lt;br /&gt;
&lt;br /&gt;
===Initial population=== &lt;br /&gt;
''The Population of Switzerland can be found here: https://en.wikipedia.org/wiki/Demographics_of_Switzerland''&lt;br /&gt;
&lt;br /&gt;
=8 500 000&lt;br /&gt;
&lt;br /&gt;
===Ratio susceptible people=== &lt;br /&gt;
''Decrease the susceptible people by the number of deaths due to the COVID-19.''&lt;br /&gt;
&lt;br /&gt;
=Susceptible population / (Initial population-Dead)&lt;br /&gt;
&lt;br /&gt;
===Susceptible population=== &lt;br /&gt;
''Decrease the susceptible population by the number of new infections.''&lt;br /&gt;
&lt;br /&gt;
=-New infections&lt;br /&gt;
&lt;br /&gt;
===contact=== &lt;br /&gt;
'''Lockdown:''' ''Function IF THEN ELSE that bring the number of new people you meet (contact) from 5 to 0.05 if the ratio exceed 0.015%''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot;&amp;gt; 0.00015, 0.05 , 5 )&lt;br /&gt;
&lt;br /&gt;
===Contagion Rate=== &lt;br /&gt;
'''Lockdown:''' ''contagion rate: IF THEN ELSE that bring the contagion rate from 0.1 to 0.075 if the ratio exceed 0.015%. Function of the awareness in the population (washing more often their hands if lockdown)''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot; &amp;gt; 0.00015 , 0.075 , 0.1 )&lt;br /&gt;
&lt;br /&gt;
===New infections=== &lt;br /&gt;
''It represent the new number of people infected each day.''&lt;br /&gt;
&lt;br /&gt;
=contact*Infected*Ratio susceptible people*Contagion Rate&lt;br /&gt;
&lt;br /&gt;
===Infected=== &lt;br /&gt;
''It represent the stock of the new people infected. We start the model with 1 infected people.''&lt;br /&gt;
&lt;br /&gt;
=New infections-New recoveries from infected-New symptoms ///// Initial value: 1&lt;br /&gt;
&lt;br /&gt;
===New recoveries from infected===&lt;br /&gt;
''It represent the number of people without symptoms and they go in the recovered stock after 19 days.''&lt;br /&gt;
&lt;br /&gt;
=((1-Ratio Symptoms)*Infected)/TTA recoveries&lt;br /&gt;
&lt;br /&gt;
===New symptoms=== &lt;br /&gt;
''It represent the number of new people that develop symptoms during 5 days before going to the symptomatic stock.''&lt;br /&gt;
&lt;br /&gt;
=(Infected*Ratio Symptoms)/TTA Symptoms&lt;br /&gt;
&lt;br /&gt;
===Ratio Symptoms=== &lt;br /&gt;
''The ratio of people who develop some symptoms.''&lt;br /&gt;
&lt;br /&gt;
=0.2&lt;br /&gt;
&lt;br /&gt;
===Symptomatic=== &lt;br /&gt;
''The stock of people symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=New symptoms-New Diagnostic-New recoveries from symptoms&lt;br /&gt;
&lt;br /&gt;
===New recoveries from symptoms=== &lt;br /&gt;
''It represent the number of people that have symptoms but that were not to the doctor, after 14 they are in the recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Diagnost)*Symptomatic/TTA sympt&lt;br /&gt;
&lt;br /&gt;
===New Diagnostic=== &lt;br /&gt;
''It represent the number of new people that are diagnosed each day, they stay 3 days before having the diagnostic.''&lt;br /&gt;
&lt;br /&gt;
=Symptomatic*Ratio Diagnost/TTA Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Ratio Diagnost===&lt;br /&gt;
''the ratio of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=0.4&lt;br /&gt;
&lt;br /&gt;
===Diagnosed=== &lt;br /&gt;
''The stock of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic-New Hospitalization-New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===New Recovery from Diagnostic===&lt;br /&gt;
''It represent the number of people that are diagnosed and not sent to the hospital. they stay 9 days before going in the Recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Hospitalize)*Diagnosed/TTA diag&lt;br /&gt;
&lt;br /&gt;
===New Hospitalization=== &lt;br /&gt;
''It represent the number of people that are diagnosed and sent to the hospital. they stay 1 day before being sent.''&lt;br /&gt;
&lt;br /&gt;
=(Diagnosed*Ratio Hospitalize)/TTA Hospitalization Ratio Hospitalize&lt;br /&gt;
&lt;br /&gt;
===Ratio Hospitalize===&lt;br /&gt;
''The ratio of people that are Hospitalized.''&lt;br /&gt;
&lt;br /&gt;
=0.3&lt;br /&gt;
&lt;br /&gt;
===Hospitalized=== &lt;br /&gt;
''The stock of people that are hospitalized before being Recovered or Dead.''&lt;br /&gt;
&lt;br /&gt;
=New Hospitalization-New Death-New Recovery&lt;br /&gt;
&lt;br /&gt;
===New Recovery=== &lt;br /&gt;
''The number of people that recover each day from the hospitalization. It depends from the Mortality Rate which is depend from the hospital utilization (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=((1-Mortality Rate)*Hospitalized)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===New Death===&lt;br /&gt;
''The number of people that die each day from the hospitalization. It depends from the Mortality Rate which is depend from the hospital utilization (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized*Mortality Rate)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===hospital bed=== &lt;br /&gt;
''The number of bed in Switzerland 356 beds for 100k people with 8.5M people it gives that number: https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704''&lt;br /&gt;
&lt;br /&gt;
=30260&lt;br /&gt;
&lt;br /&gt;
===hospital utilization=== &lt;br /&gt;
''The utilization of the hospital we assume that there is already 8260 beds used for patient outside the covid pandemic. The more utilization we have, the greater the probability to die. Indeed, if hospitals get busier, the medical staff will be less available and health care quality might decrease.''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized/(hospital bed - 8260)) &lt;br /&gt;
&lt;br /&gt;
===lookup mortality===&lt;br /&gt;
''The lookup function is used to described the mortality rate.''&lt;br /&gt;
&lt;br /&gt;
[(0,0)-(1000,0.3)],(0,0.065),(0.6,0.065),(0.8,0.12),(1,0.25),(1.2,0.3),(10,0.3),(1000,0.3)&lt;br /&gt;
&lt;br /&gt;
===Taux Mortality=== &lt;br /&gt;
''The mortality rate depends on the hospital utilization. For example based on the above function, if the capacity reach 100% the hospital is full and the chance to die is then 25%.''&lt;br /&gt;
&lt;br /&gt;
=lk mortality (hospital utilization)&lt;br /&gt;
&lt;br /&gt;
===Dead=== &lt;br /&gt;
''The stock of Dead people killed by the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New Death&lt;br /&gt;
&lt;br /&gt;
===Recovered=== &lt;br /&gt;
''The Total amount of people who recovered from the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New recoveries from infected+New recoveries from symptoms+New Recovery+New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===official active cases===&lt;br /&gt;
''It represent the number of people that were tested and it's this number that will be used by the government to follow the pandemic and take decision of lockdown.''&lt;br /&gt;
&lt;br /&gt;
=Diagnosed+Hosptitalized&lt;br /&gt;
&lt;br /&gt;
===Ratio official cases/pop=== &lt;br /&gt;
''The ratio that will be used for lockdown. ''&lt;br /&gt;
&lt;br /&gt;
=official active cases/ Initial population&lt;br /&gt;
&lt;br /&gt;
===New Diagnosed.1=== &lt;br /&gt;
''It's is just the same as New Diagnostic, it is used in the model to have the Total Diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Total Diagnosed=== &lt;br /&gt;
''Used in the model to have the official number of cases in the model.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnosed.1&lt;br /&gt;
&lt;br /&gt;
===TTA recoveries=== &lt;br /&gt;
''Time to recover after being infected and not having symptoms.''&lt;br /&gt;
&lt;br /&gt;
=19&lt;br /&gt;
&lt;br /&gt;
===TTA Symptoms=== &lt;br /&gt;
''The time you take to develop symptoms.''&lt;br /&gt;
&lt;br /&gt;
=5&lt;br /&gt;
&lt;br /&gt;
===TTA sympt===&lt;br /&gt;
''The time you take for recovering after being symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
===TTA Diagnostic=== &lt;br /&gt;
''Time to go to the doctor and have the result.''&lt;br /&gt;
&lt;br /&gt;
=3&lt;br /&gt;
&lt;br /&gt;
===TTA diag===&lt;br /&gt;
''The time you take for recovering after being diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=11&lt;br /&gt;
&lt;br /&gt;
===TTA Hospitalization=== &lt;br /&gt;
''Time to go to the Hospital.''&lt;br /&gt;
&lt;br /&gt;
=1&lt;br /&gt;
&lt;br /&gt;
===TTA Hospital===&lt;br /&gt;
''The time you stay at the hospital before recovering or dying.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
As explained in the problem definition we will focused our results on 3 cases. The first one is the normal scenario, the second is the same scenario but the lockdown is delayed for 1 day, and the last scenario is the normal scenario with a number of hospital beds reduce by 10 000 beds.&lt;br /&gt;
&lt;br /&gt;
==Normal Scenario==&lt;br /&gt;
&lt;br /&gt;
The first scenario take place in Switzerland with 8 500 000 peoples and a hospital capacity of 356 beds for 100k people. The first case was detected the 25 february 2019 and 20 days after the Government of Switzerland have decided to take some serious measures that is in our case represented by a lockdown. &lt;br /&gt;
&lt;br /&gt;
The following table show us the official number of new cases per day:&lt;br /&gt;
&lt;br /&gt;
[[File:Newcases.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
From the simulation we get:&lt;br /&gt;
&lt;br /&gt;
[[File:Yes.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
We can see that the model is really closed to the reality with a pic of 1350 after 35 days. The simulation stopped after 100 days so we just want to focused on these first 100 days. The reality display a pic at 1243 days after 30 days.&lt;br /&gt;
&lt;br /&gt;
The true number of new death per day, and the number from the simulation is also display below:&lt;br /&gt;
&lt;br /&gt;
[[File: deat.png|500px|left]]        [[File:Deats.18.png|500px|rigth]]&lt;br /&gt;
&lt;br /&gt;
We can see that the model is one more time really closed to the reality with a pic of 43 deaths after 50 days, while the reality display a pic at 44 days after 36 days.&lt;br /&gt;
&lt;br /&gt;
We have seen that the simulation is really closed from the data obtained for the Switzerland, but now lets go trough some special cases to see the impact of some decision on the variables.&lt;br /&gt;
&lt;br /&gt;
==Scenario 1: Late lockdown==&lt;br /&gt;
&lt;br /&gt;
In this scenario we will see what could have happened if the government take 1 more day to react and to set up the lockdown. To simulate such a scenario I simply increase the number of &amp;quot;Ratio official cases/pop&amp;quot; in the function IF THEN ELSE in &amp;quot;contact&amp;quot; and &amp;quot;contagion rate&amp;quot; from 0.00015 to 0.00018 and it delay the reaction of the government for 1 day.&lt;br /&gt;
&lt;br /&gt;
[[File: Deathz1.png|450px|left]][[File: Deathz2.png|500px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graph, the total number of official cases (=total diagnosed) jump from 33 000 to 45 000 cases. An increase of 35% in the number of official cases by just delaying for 1 day the government decisions. It illustrates well the exponential effect on the model, indeed we don't have to forget that the delay is just one day but if it has been 4-5 days the number of cases would have been exponentially higher. The second graph shows the deaths jump from 1600 to 2300, that is due to increasing number of cases and the hospital capacity reaching more than 60% utilization. Indeed due to the lookup function if the hospital capacity exceed 60% the mortality increase in the hospital. This is a very interesting scenarios that shows quite well the importance of the early lockdown and highlight the most important point in our model, '''the reaction time'''.&lt;br /&gt;
&lt;br /&gt;
==Scenario 2: Small Hospital capacity==&lt;br /&gt;
&lt;br /&gt;
In this scenario the number of hospital beds goes from 356/100k people to 238/100k people, a loss of -10 000 in variable ''hospital bed'' for Switzerland. This number of beds corresponds to the number of beds for a less developing country, such as Iceland (https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704). &lt;br /&gt;
&lt;br /&gt;
[[File: Utiliz.png|500px|left]][[File: Dead.png|480px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graphs, the hospital utilization reach almost 80%. Patients are not treated as well as they would if the utilization was lower, and it involves more deaths for these patients (right graph). We can see the importance of hospital capacity and for government to have a '''good amount of hospitals'''.&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
To conclude I would say that it has been quite difficult to deal with the real data because I had to find every number or to adjust some variables to fit with the reality. Another difficulty that I had to faced was all times and units to setup. The model display almost the same numbers as the ones communicated by the Swiss government, what could indicate that the model are not too far from what is happening in real-life. &lt;br /&gt;
&lt;br /&gt;
The most important variable in the simulation is the '''reaction time''' of the government in order to take some measures against the fast spread of the virus, such as bringing more awareness or imposing a lockdown.&lt;br /&gt;
&lt;br /&gt;
A further exogenous variable here is the number of hospital beds, which is a good proxy for modeling different countries. Having a smaller number of beds is a sign of vulnerability for the health care system and will impact mortality. A solution to this pandemic could therefore be to increase the number of beds in order to avoid exceeding capacity. &lt;br /&gt;
&lt;br /&gt;
A limit to this simulation would be that it is a real pandemic, for example I first tried to simulate the full pandemic with the second pic (higher) as you can see in the graph of Switzerland but I have to admit that sometimes the reality (or my Vensim skills) are to difficult to simulate that is why I choose to stop the simulation after 100 days.&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
[[File:Simulation Covid-19.mdl]]&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
#Federal Office of Public Health FOPH, https://www.bag.admin.ch/bag/en/home.html&lt;br /&gt;
#Fismann, D. (2009), “Modellig an Influenza Pandemic: A Guide for the Perplexed”, CMAJ,August.&lt;br /&gt;
#Madhav, N. (2017), “Pandemics: Risks, Impacts, and Mitigation”, November.&lt;br /&gt;
#Federal Office of Public Health FOPH, https://www.bag.admin.ch/bag/en/home.html&lt;br /&gt;
#https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704&lt;br /&gt;
#https://www.covid19.admin.ch/en/epidemiologic/case?detTime=total&amp;amp;detRel=abs&lt;br /&gt;
#https://www.covid19.admin.ch/en/epidemiologic/death?detTime=total&amp;amp;detRel=abs&lt;/div&gt;</summary>
		<author><name>Toscool</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20297</id>
		<title>Impact of late lockdown and hospital capacity on 19-COVID spread</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20297"/>
		<updated>2021-01-08T10:18:46Z</updated>

		<summary type="html">&lt;p&gt;Toscool: /* lk mortality */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=Problem definition=&lt;br /&gt;
&lt;br /&gt;
The coronavirus pandemic is an ongoing pandemic, the first case confirmed in Switzerland  was on February 25th, 2020 and has known an exponential growth since. We know that the virus is spread from an infected person to a healthy one during close contact or via touching a contaminated surface. The aim of the simulation is to display the dynamics of the reaction time of the government to take measures and to see if the hospital capacity play a key role in the spread of the COVID-19&lt;br /&gt;
&lt;br /&gt;
=Method=&lt;br /&gt;
&lt;br /&gt;
Vensim modelling approach was selected due to dynamic behavior of the simulated system.&lt;br /&gt;
&lt;br /&gt;
the model shows the evolution of the number of people who got infected by the covid-19 virus in countries where the population have a high health care protection and where the government have decided to make a decision about the virus propagation. The model will explain how fast the virus spreads itself and how political decisions can change the number of infected people at a given point in time. The construction of the model is simple: at the beginning one person is infected and will, then, infect other people. When you are infected many possibilities are open:&lt;br /&gt;
* You can be a healthy virus carrier. In that case you will not know that you have the virus and after 19 days you will be recovered.&lt;br /&gt;
* After 5 days you get symptoms, but you do not have any important health problems, you will recover in the next 14 days.&lt;br /&gt;
* After 5 days, you get symptoms and you are very sick and have respiratory problems, after 3 more days, still feeling bad, you decide to go to the doctor to get a diagnosis. The doctor has than two options: to send you back home, where you will recover after 11 more days or hospitalized you the next day.&lt;br /&gt;
* The doctor had decided to hospitalize you, you then spend two weeks in intensive care, where you will need artificial ventilation and 24-hour nursing care. You can then recover or unfortunately die. &lt;br /&gt;
&lt;br /&gt;
The higher the hospital utilization, the greater the probability to die. Indeed, if hospitals get busier, the medical staff will be less available and health care quality might decrease. When the number of diagnosed and hospitalized people (which are the official number of cases) is greater than a certain percentage of the population, the government will take decisions to slow down the spread of the virus. This is to say that governments will take some measures, such as installing a forced lockdown of the population to decrease the number of contacts per habitant. Moreover, such a decision will have an impact on the population, which will be more aware of the situation and will be more careful to not spread or contract the virus. So, the contagion rate as the number of contacts per people will slow down. They will be less hospitalized people, that means less people in the hospital, meaning a better service and so less people who die.&lt;br /&gt;
&lt;br /&gt;
=Model=&lt;br /&gt;
&lt;br /&gt;
Following vensim model was developed based on the study.&lt;br /&gt;
&lt;br /&gt;
[[File:Model1.png|900px|thumb|center|COVID-19 pandemic in Switzerland Stock Flow Diagram]]&lt;br /&gt;
&lt;br /&gt;
== Variables ==&lt;br /&gt;
&lt;br /&gt;
===Initial population=== &lt;br /&gt;
''The Population of Switzerland can be found here: https://en.wikipedia.org/wiki/Demographics_of_Switzerland''&lt;br /&gt;
&lt;br /&gt;
=8 500 000&lt;br /&gt;
&lt;br /&gt;
===Ratio susceptible people=== &lt;br /&gt;
''Decrease the susceptible people by the number of deaths due to the COVID-19.''&lt;br /&gt;
&lt;br /&gt;
=Susceptible population / (Initial population-Dead)&lt;br /&gt;
&lt;br /&gt;
===Susceptible population=== &lt;br /&gt;
''Decrease the susceptible population by the number of new infections.''&lt;br /&gt;
&lt;br /&gt;
=-New infections&lt;br /&gt;
&lt;br /&gt;
===contact=== &lt;br /&gt;
'''Lockdown:''' ''Function IF THEN ELSE that bring the number of new people you meet (contact) from 5 to 0.05 if the ratio exceed 0.015%''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot;&amp;gt; 0.00015, 0.05 , 5 )&lt;br /&gt;
&lt;br /&gt;
===Contagion Rate=== &lt;br /&gt;
'''Lockdown:''' ''contagion rate: IF THEN ELSE that bring the contagion rate from 0.1 to 0.075 if the ratio exceed 0.015%. Function of the awareness in the population (washing more often their hands if lockdown)''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot; &amp;gt; 0.00015 , 0.075 , 0.1 )&lt;br /&gt;
&lt;br /&gt;
===New infections=== &lt;br /&gt;
''It represent the new number of people infected each day.''&lt;br /&gt;
&lt;br /&gt;
=contact*Infected*Ratio susceptible people*Contagion Rate&lt;br /&gt;
&lt;br /&gt;
===Infected=== &lt;br /&gt;
''It represent the stock of the new people infected. We start the model with 1 infected people.''&lt;br /&gt;
&lt;br /&gt;
=New infections-New recoveries from infected-New symptoms ///// Initial value: 1&lt;br /&gt;
&lt;br /&gt;
===New recoveries from infected===&lt;br /&gt;
''It represent the number of people without symptoms and they go in the recovered stock after 19 days.''&lt;br /&gt;
&lt;br /&gt;
=((1-Ratio Symptoms)*Infected)/TTA recoveries&lt;br /&gt;
&lt;br /&gt;
===New symptoms=== &lt;br /&gt;
''It represent the number of new people that develop symptoms during 5 days before going to the symptomatic stock.''&lt;br /&gt;
&lt;br /&gt;
=(Infected*Ratio Symptoms)/TTA Symptoms&lt;br /&gt;
&lt;br /&gt;
===Ratio Symptoms=== &lt;br /&gt;
''The ratio of people who develop some symptoms.''&lt;br /&gt;
&lt;br /&gt;
=0.2&lt;br /&gt;
&lt;br /&gt;
===Symptomatic=== &lt;br /&gt;
''The stock of people symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=New symptoms-New Diagnostic-New recoveries from symptoms&lt;br /&gt;
&lt;br /&gt;
===New recoveries from symptoms=== &lt;br /&gt;
''It represent the number of people that have symptoms but that were not to the doctor, after 14 they are in the recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Diagnost)*Symptomatic/TTA sympt&lt;br /&gt;
&lt;br /&gt;
===New Diagnostic=== &lt;br /&gt;
''It represent the number of new people that are diagnosed each day, they stay 3 days before having the diagnostic.''&lt;br /&gt;
&lt;br /&gt;
=Symptomatic*Ratio Diagnost/TTA Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Ratio Diagnost===&lt;br /&gt;
''the ratio of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=0.4&lt;br /&gt;
&lt;br /&gt;
===Diagnosed=== &lt;br /&gt;
''The stock of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic-New Hospitalization-New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===New Recovery from Diagnostic===&lt;br /&gt;
''It represent the number of people that are diagnosed and not sent to the hospital. they stay 9 days before going in the Recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Hospitalize)*Diagnosed/TTA diag&lt;br /&gt;
&lt;br /&gt;
===New Hospitalization=== &lt;br /&gt;
''It represent the number of people that are diagnosed and sent to the hospital. they stay 1 day before being sent.''&lt;br /&gt;
&lt;br /&gt;
=(Diagnosed*Ratio Hospitalize)/TTA Hospitalization Ratio Hospitalize&lt;br /&gt;
&lt;br /&gt;
===Ratio Hospitalize===&lt;br /&gt;
''The ratio of people that are Hospitalized.''&lt;br /&gt;
&lt;br /&gt;
=0.3&lt;br /&gt;
&lt;br /&gt;
===Hospitalized=== &lt;br /&gt;
''The stock of people that are hospitalized before being Recovered or Dead.''&lt;br /&gt;
&lt;br /&gt;
=New Hospitalization-New Death-New Recovery&lt;br /&gt;
&lt;br /&gt;
===New Recovery=== &lt;br /&gt;
''The number of people that recover each day from the hospitalization. It depends from the Mortality Rate which is depend from the hospital utilization (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=((1-Mortality Rate)*Hospitalized)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===New Death===&lt;br /&gt;
''The number of people that die each day from the hospitalization. It depends from the Mortality Rate which is depend from the hospital utilization (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized*Mortality Rate)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===hospital bed=== &lt;br /&gt;
''The number of bed in Switzerland 356 beds for 100k people with 8.5M people it gives that number: https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704''&lt;br /&gt;
&lt;br /&gt;
=30260&lt;br /&gt;
&lt;br /&gt;
===hospital utilization=== &lt;br /&gt;
''The utilization of the hospital we assume that there is already 8260 beds used for patient outside the covid pandemic. The more utilization we have, the greater the probability to die. Indeed, if hospitals get busier, the medical staff will be less available and health care quality might decrease.''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized/(hospital bed - 8260)) &lt;br /&gt;
&lt;br /&gt;
===lookup mortality===&lt;br /&gt;
''The lookup function is used to described the mortality rate.''&lt;br /&gt;
&lt;br /&gt;
[(0,0)-(1000,0.3)],(0,0.065),(0.6,0.065),(0.8,0.12),(1,0.25),(1.2,0.3),(10,0.3),(1000,0.3)&lt;br /&gt;
&lt;br /&gt;
===Mortality Rate=== &lt;br /&gt;
''The mortality rate depends on the hospital utilization. For example based on the above function, if the capacity reach 100% the hospital is full and the chance to die is then 25%.''&lt;br /&gt;
&lt;br /&gt;
=lk mortality (hospital utilization)&lt;br /&gt;
&lt;br /&gt;
===Dead=== &lt;br /&gt;
''The stock of Dead people killed by the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New Death&lt;br /&gt;
&lt;br /&gt;
===Recovered=== &lt;br /&gt;
''The Total amount of people who recovered from the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New recoveries from infected+New recoveries from symptoms+New Recovery+New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===official active cases===&lt;br /&gt;
''It represent the number of people that were tested and it's this number that will be used by the government to follow the pandemic and take decision of lockdown.''&lt;br /&gt;
&lt;br /&gt;
=Diagnosed+Hosptitalized&lt;br /&gt;
&lt;br /&gt;
===Ratio official cases/pop=== &lt;br /&gt;
''The ratio that will be used for lockdown. ''&lt;br /&gt;
&lt;br /&gt;
=official active cases/ Initial population&lt;br /&gt;
&lt;br /&gt;
===New Diagnosed.1=== &lt;br /&gt;
''It's is just the same as New Diagnostic, it is used in the model to have the Total Diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Total Diagnosed=== &lt;br /&gt;
''Used in the model to have the official number of cases in the model.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnosed.1&lt;br /&gt;
&lt;br /&gt;
===TTA recoveries=== &lt;br /&gt;
''Time to recover after being infected and not having symptoms.''&lt;br /&gt;
&lt;br /&gt;
=19&lt;br /&gt;
&lt;br /&gt;
===TTA Symptoms=== &lt;br /&gt;
''The time you take to develop symptoms.''&lt;br /&gt;
&lt;br /&gt;
=5&lt;br /&gt;
&lt;br /&gt;
===TTA sympt===&lt;br /&gt;
''The time you take for recovering after being symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
===TTA Diagnostic=== &lt;br /&gt;
''Time to go to the doctor and have the result.''&lt;br /&gt;
&lt;br /&gt;
=3&lt;br /&gt;
&lt;br /&gt;
===TTA diag===&lt;br /&gt;
''The time you take for recovering after being diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=11&lt;br /&gt;
&lt;br /&gt;
===TTA Hospitalization=== &lt;br /&gt;
''Time to go to the Hospital.''&lt;br /&gt;
&lt;br /&gt;
=1&lt;br /&gt;
&lt;br /&gt;
===TTA Hospital===&lt;br /&gt;
''The time you stay at the hospital before recovering or dying.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
As explained in the problem definition we will focused our results on 3 cases. The first one is the normal scenario, the second is the same scenario but the lockdown is delayed for 1 day, and the last scenario is the normal scenario with a number of hospital beds reduce by 10 000 beds.&lt;br /&gt;
&lt;br /&gt;
==Normal Scenario==&lt;br /&gt;
&lt;br /&gt;
The first scenario take place in Switzerland with 8 500 000 peoples and a hospital capacity of 356 beds for 100k people. The first case was detected the 25 february 2019 and 20 days after the Government of Switzerland have decided to take some serious measures that is in our case represented by a lockdown. &lt;br /&gt;
&lt;br /&gt;
The following table show us the official number of new cases per day:&lt;br /&gt;
&lt;br /&gt;
[[File:Newcases.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
From the simulation we get:&lt;br /&gt;
&lt;br /&gt;
[[File:Yes.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
We can see that the model is really closed to the reality with a pic of 1350 after 35 days. The simulation stopped after 100 days so we just want to focused on these first 100 days. The reality display a pic at 1243 days after 30 days.&lt;br /&gt;
&lt;br /&gt;
The true number of new death per day, and the number from the simulation is also display below:&lt;br /&gt;
&lt;br /&gt;
[[File: deat.png|500px|left]]        [[File:Deats.18.png|500px|rigth]]&lt;br /&gt;
&lt;br /&gt;
We can see that the model is one more time really closed to the reality with a pic of 43 deaths after 50 days, while the reality display a pic at 44 days after 36 days.&lt;br /&gt;
&lt;br /&gt;
We have seen that the simulation is really closed from the data obtained for the Switzerland, but now lets go trough some special cases to see the impact of some decision on the variables.&lt;br /&gt;
&lt;br /&gt;
==Scenario 1: Late lockdown==&lt;br /&gt;
&lt;br /&gt;
In this scenario we will see what could have happened if the government take 1 more day to react and to set up the lockdown. To simulate such a scenario I simply increase the number of &amp;quot;Ratio official cases/pop&amp;quot; in the function IF THEN ELSE in &amp;quot;contact&amp;quot; and &amp;quot;contagion rate&amp;quot; from 0.00015 to 0.00018 and it delay the reaction of the government for 1 day.&lt;br /&gt;
&lt;br /&gt;
[[File: Deathz1.png|450px|left]][[File: Deathz2.png|500px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graph, the total number of official cases (=total diagnosed) jump from 33 000 to 45 000 cases. An increase of 35% in the number of official cases by just delaying for 1 day the government decisions. It illustrates well the exponential effect on the model, indeed we don't have to forget that the delay is just one day but if it has been 4-5 days the number of cases would have been exponentially higher. The second graph shows the deaths jump from 1600 to 2300, that is due to increasing number of cases and the hospital capacity reaching more than 60% utilization. Indeed due to the lookup function if the hospital capacity exceed 60% the mortality increase in the hospital. This is a very interesting scenarios that shows quite well the importance of the early lockdown and highlight the most important point in our model, '''the reaction time'''.&lt;br /&gt;
&lt;br /&gt;
==Scenario 2: Small Hospital capacity==&lt;br /&gt;
&lt;br /&gt;
In this scenario the number of hospital beds goes from 356/100k people to 238/100k people, a loss of -10 000 in variable ''hospital bed'' for Switzerland. This number of beds corresponds to the number of beds for a less developing country, such as Iceland (https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704). &lt;br /&gt;
&lt;br /&gt;
[[File: Utiliz.png|500px|left]][[File: Dead.png|480px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graphs, the hospital utilization reach almost 80%. Patients are not treated as well as they would if the utilization was lower, and it involves more deaths for these patients (right graph). We can see the importance of hospital capacity and for government to have a '''good amount of hospitals'''.&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
To conclude I would say that it has been quite difficult to deal with the real data because I had to find every number or to adjust some variables to fit with the reality. Another difficulty that I had to faced was all times and units to setup. The model display almost the same numbers as the ones communicated by the Swiss government, what could indicate that the model are not too far from what is happening in real-life. &lt;br /&gt;
&lt;br /&gt;
The most important variable in the simulation is the '''reaction time''' of the government in order to take some measures against the fast spread of the virus, such as bringing more awareness or imposing a lockdown.&lt;br /&gt;
&lt;br /&gt;
A further exogenous variable here is the number of hospital beds, which is a good proxy for modeling different countries. Having a smaller number of beds is a sign of vulnerability for the health care system and will impact mortality. A solution to this pandemic could therefore be to increase the number of beds in order to avoid exceeding capacity. &lt;br /&gt;
&lt;br /&gt;
A limit to this simulation would be that it is a real pandemic, for example I first tried to simulate the full pandemic with the second pic (higher) as you can see in the graph of Switzerland but I have to admit that sometimes the reality (or my Vensim skills) are to difficult to simulate that is why I choose to stop the simulation after 100 days.&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
[[File:Simulation Covid-19.mdl]]&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
#Federal Office of Public Health FOPH, https://www.bag.admin.ch/bag/en/home.html&lt;br /&gt;
#Fismann, D. (2009), “Modellig an Influenza Pandemic: A Guide for the Perplexed”, CMAJ,August.&lt;br /&gt;
#Madhav, N. (2017), “Pandemics: Risks, Impacts, and Mitigation”, November.&lt;br /&gt;
#Federal Office of Public Health FOPH, https://www.bag.admin.ch/bag/en/home.html&lt;br /&gt;
#https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704&lt;br /&gt;
#https://www.covid19.admin.ch/en/epidemiologic/case?detTime=total&amp;amp;detRel=abs&lt;br /&gt;
#https://www.covid19.admin.ch/en/epidemiologic/death?detTime=total&amp;amp;detRel=abs&lt;/div&gt;</summary>
		<author><name>Toscool</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20296</id>
		<title>Impact of late lockdown and hospital capacity on 19-COVID spread</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20296"/>
		<updated>2021-01-08T10:16:34Z</updated>

		<summary type="html">&lt;p&gt;Toscool: /* INTRODUCTION */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=Problem definition=&lt;br /&gt;
&lt;br /&gt;
The coronavirus pandemic is an ongoing pandemic, the first case confirmed in Switzerland  was on February 25th, 2020 and has known an exponential growth since. We know that the virus is spread from an infected person to a healthy one during close contact or via touching a contaminated surface. The aim of the simulation is to display the dynamics of the reaction time of the government to take measures and to see if the hospital capacity play a key role in the spread of the COVID-19&lt;br /&gt;
&lt;br /&gt;
=Method=&lt;br /&gt;
&lt;br /&gt;
Vensim modelling approach was selected due to dynamic behavior of the simulated system.&lt;br /&gt;
&lt;br /&gt;
the model shows the evolution of the number of people who got infected by the covid-19 virus in countries where the population have a high health care protection and where the government have decided to make a decision about the virus propagation. The model will explain how fast the virus spreads itself and how political decisions can change the number of infected people at a given point in time. The construction of the model is simple: at the beginning one person is infected and will, then, infect other people. When you are infected many possibilities are open:&lt;br /&gt;
* You can be a healthy virus carrier. In that case you will not know that you have the virus and after 19 days you will be recovered.&lt;br /&gt;
* After 5 days you get symptoms, but you do not have any important health problems, you will recover in the next 14 days.&lt;br /&gt;
* After 5 days, you get symptoms and you are very sick and have respiratory problems, after 3 more days, still feeling bad, you decide to go to the doctor to get a diagnosis. The doctor has than two options: to send you back home, where you will recover after 11 more days or hospitalized you the next day.&lt;br /&gt;
* The doctor had decided to hospitalize you, you then spend two weeks in intensive care, where you will need artificial ventilation and 24-hour nursing care. You can then recover or unfortunately die. &lt;br /&gt;
&lt;br /&gt;
The higher the hospital utilization, the greater the probability to die. Indeed, if hospitals get busier, the medical staff will be less available and health care quality might decrease. When the number of diagnosed and hospitalized people (which are the official number of cases) is greater than a certain percentage of the population, the government will take decisions to slow down the spread of the virus. This is to say that governments will take some measures, such as installing a forced lockdown of the population to decrease the number of contacts per habitant. Moreover, such a decision will have an impact on the population, which will be more aware of the situation and will be more careful to not spread or contract the virus. So, the contagion rate as the number of contacts per people will slow down. They will be less hospitalized people, that means less people in the hospital, meaning a better service and so less people who die.&lt;br /&gt;
&lt;br /&gt;
=Model=&lt;br /&gt;
&lt;br /&gt;
Following vensim model was developed based on the study.&lt;br /&gt;
&lt;br /&gt;
[[File:Model1.png|900px|thumb|center|COVID-19 pandemic in Switzerland Stock Flow Diagram]]&lt;br /&gt;
&lt;br /&gt;
== Variables ==&lt;br /&gt;
&lt;br /&gt;
===Initial population=== &lt;br /&gt;
''The Population of Switzerland can be found here: https://en.wikipedia.org/wiki/Demographics_of_Switzerland''&lt;br /&gt;
&lt;br /&gt;
=8 500 000&lt;br /&gt;
&lt;br /&gt;
===Ratio susceptible people=== &lt;br /&gt;
''Decrease the susceptible people by the number of deaths due to the COVID-19.''&lt;br /&gt;
&lt;br /&gt;
=Susceptible population / (Initial population-Dead)&lt;br /&gt;
&lt;br /&gt;
===Susceptible population=== &lt;br /&gt;
''Decrease the susceptible population by the number of new infections.''&lt;br /&gt;
&lt;br /&gt;
=-New infections&lt;br /&gt;
&lt;br /&gt;
===contact=== &lt;br /&gt;
'''Lockdown:''' ''Function IF THEN ELSE that bring the number of new people you meet (contact) from 5 to 0.05 if the ratio exceed 0.015%''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot;&amp;gt; 0.00015, 0.05 , 5 )&lt;br /&gt;
&lt;br /&gt;
===Contagion Rate=== &lt;br /&gt;
'''Lockdown:''' ''contagion rate: IF THEN ELSE that bring the contagion rate from 0.1 to 0.075 if the ratio exceed 0.015%. Function of the awareness in the population (washing more often their hands if lockdown)''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot; &amp;gt; 0.00015 , 0.075 , 0.1 )&lt;br /&gt;
&lt;br /&gt;
===New infections=== &lt;br /&gt;
''It represent the new number of people infected each day.''&lt;br /&gt;
&lt;br /&gt;
=contact*Infected*Ratio susceptible people*Contagion Rate&lt;br /&gt;
&lt;br /&gt;
===Infected=== &lt;br /&gt;
''It represent the stock of the new people infected. We start the model with 1 infected people.''&lt;br /&gt;
&lt;br /&gt;
=New infections-New recoveries from infected-New symptoms ///// Initial value: 1&lt;br /&gt;
&lt;br /&gt;
===New recoveries from infected===&lt;br /&gt;
''It represent the number of people without symptoms and they go in the recovered stock after 19 days.''&lt;br /&gt;
&lt;br /&gt;
=((1-Ratio Symptoms)*Infected)/TTA recoveries&lt;br /&gt;
&lt;br /&gt;
===New symptoms=== &lt;br /&gt;
''It represent the number of new people that develop symptoms during 5 days before going to the symptomatic stock.''&lt;br /&gt;
&lt;br /&gt;
=(Infected*Ratio Symptoms)/TTA Symptoms&lt;br /&gt;
&lt;br /&gt;
===Ratio Symptoms=== &lt;br /&gt;
''The ratio of people who develop some symptoms.''&lt;br /&gt;
&lt;br /&gt;
=0.2&lt;br /&gt;
&lt;br /&gt;
===Symptomatic=== &lt;br /&gt;
''The stock of people symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=New symptoms-New Diagnostic-New recoveries from symptoms&lt;br /&gt;
&lt;br /&gt;
===New recoveries from symptoms=== &lt;br /&gt;
''It represent the number of people that have symptoms but that were not to the doctor, after 14 they are in the recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Diagnost)*Symptomatic/TTA sympt&lt;br /&gt;
&lt;br /&gt;
===New Diagnostic=== &lt;br /&gt;
''It represent the number of new people that are diagnosed each day, they stay 3 days before having the diagnostic.''&lt;br /&gt;
&lt;br /&gt;
=Symptomatic*Ratio Diagnost/TTA Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Ratio Diagnost===&lt;br /&gt;
''the ratio of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=0.4&lt;br /&gt;
&lt;br /&gt;
===Diagnosed=== &lt;br /&gt;
''The stock of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic-New Hospitalization-New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===New Recovery from Diagnostic===&lt;br /&gt;
''It represent the number of people that are diagnosed and not sent to the hospital. they stay 9 days before going in the Recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Hospitalize)*Diagnosed/TTA diag&lt;br /&gt;
&lt;br /&gt;
===New Hospitalization=== &lt;br /&gt;
''It represent the number of people that are diagnosed and sent to the hospital. they stay 1 day before being sent.''&lt;br /&gt;
&lt;br /&gt;
=(Diagnosed*Ratio Hospitalize)/TTA Hospitalization Ratio Hospitalize&lt;br /&gt;
&lt;br /&gt;
===Ratio Hospitalize===&lt;br /&gt;
''The ratio of people that are Hospitalized.''&lt;br /&gt;
&lt;br /&gt;
=0.3&lt;br /&gt;
&lt;br /&gt;
===Hospitalized=== &lt;br /&gt;
''The stock of people that are hospitalized before being Recovered or Dead.''&lt;br /&gt;
&lt;br /&gt;
=New Hospitalization-New Death-New Recovery&lt;br /&gt;
&lt;br /&gt;
===New Recovery=== &lt;br /&gt;
''The number of people that recover each day from the hospitalization. It depends from the Mortality Rate which is depend from the hospital utilization (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=((1-Mortality Rate)*Hospitalized)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===New Death===&lt;br /&gt;
''The number of people that die each day from the hospitalization. It depends from the Mortality Rate which is depend from the hospital utilization (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized*Mortality Rate)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===hospital bed=== &lt;br /&gt;
''The number of bed in Switzerland 356 beds for 100k people with 8.5M people it gives that number: https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704''&lt;br /&gt;
&lt;br /&gt;
=30260&lt;br /&gt;
&lt;br /&gt;
===hospital utilization=== &lt;br /&gt;
''The utilization of the hospital we assume that there is already 8260 beds used for patient outside the covid pandemic. The more utilization we have, the greater the probability to die. Indeed, if hospitals get busier, the medical staff will be less available and health care quality might decrease.''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized/(hospital bed - 8260)) &lt;br /&gt;
&lt;br /&gt;
===lk mortality===&lt;br /&gt;
''The lookup function is used to described the mortality rate.''&lt;br /&gt;
&lt;br /&gt;
[(0,0)-(1000,0.3)],(0,0.065),(0.6,0.065),(0.8,0.12),(1,0.25),(1.2,0.3),(10,0.3),(1000,0.3)&lt;br /&gt;
&lt;br /&gt;
===Mortality Rate=== &lt;br /&gt;
''The mortality rate depends on the hospital utilization. For example based on the above function, if the capacity reach 100% the hospital is full and the chance to die is then 25%.''&lt;br /&gt;
&lt;br /&gt;
=lk mortality (hospital utilization)&lt;br /&gt;
&lt;br /&gt;
===Dead=== &lt;br /&gt;
''The stock of Dead people killed by the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New Death&lt;br /&gt;
&lt;br /&gt;
===Recovered=== &lt;br /&gt;
''The Total amount of people who recovered from the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New recoveries from infected+New recoveries from symptoms+New Recovery+New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===official active cases===&lt;br /&gt;
''It represent the number of people that were tested and it's this number that will be used by the government to follow the pandemic and take decision of lockdown.''&lt;br /&gt;
&lt;br /&gt;
=Diagnosed+Hosptitalized&lt;br /&gt;
&lt;br /&gt;
===Ratio official cases/pop=== &lt;br /&gt;
''The ratio that will be used for lockdown. ''&lt;br /&gt;
&lt;br /&gt;
=official active cases/ Initial population&lt;br /&gt;
&lt;br /&gt;
===New Diagnosed.1=== &lt;br /&gt;
''It's is just the same as New Diagnostic, it is used in the model to have the Total Diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Total Diagnosed=== &lt;br /&gt;
''Used in the model to have the official number of cases in the model.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnosed.1&lt;br /&gt;
&lt;br /&gt;
===TTA recoveries=== &lt;br /&gt;
''Time to recover after being infected and not having symptoms.''&lt;br /&gt;
&lt;br /&gt;
=19&lt;br /&gt;
&lt;br /&gt;
===TTA Symptoms=== &lt;br /&gt;
''The time you take to develop symptoms.''&lt;br /&gt;
&lt;br /&gt;
=5&lt;br /&gt;
&lt;br /&gt;
===TTA sympt===&lt;br /&gt;
''The time you take for recovering after being symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
===TTA Diagnostic=== &lt;br /&gt;
''Time to go to the doctor and have the result.''&lt;br /&gt;
&lt;br /&gt;
=3&lt;br /&gt;
&lt;br /&gt;
===TTA diag===&lt;br /&gt;
''The time you take for recovering after being diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=11&lt;br /&gt;
&lt;br /&gt;
===TTA Hospitalization=== &lt;br /&gt;
''Time to go to the Hospital.''&lt;br /&gt;
&lt;br /&gt;
=1&lt;br /&gt;
&lt;br /&gt;
===TTA Hospital===&lt;br /&gt;
''The time you stay at the hospital before recovering or dying.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
As explained in the problem definition we will focused our results on 3 cases. The first one is the normal scenario, the second is the same scenario but the lockdown is delayed for 1 day, and the last scenario is the normal scenario with a number of hospital beds reduce by 10 000 beds.&lt;br /&gt;
&lt;br /&gt;
==Normal Scenario==&lt;br /&gt;
&lt;br /&gt;
The first scenario take place in Switzerland with 8 500 000 peoples and a hospital capacity of 356 beds for 100k people. The first case was detected the 25 february 2019 and 20 days after the Government of Switzerland have decided to take some serious measures that is in our case represented by a lockdown. &lt;br /&gt;
&lt;br /&gt;
The following table show us the official number of new cases per day:&lt;br /&gt;
&lt;br /&gt;
[[File:Newcases.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
From the simulation we get:&lt;br /&gt;
&lt;br /&gt;
[[File:Yes.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
We can see that the model is really closed to the reality with a pic of 1350 after 35 days. The simulation stopped after 100 days so we just want to focused on these first 100 days. The reality display a pic at 1243 days after 30 days.&lt;br /&gt;
&lt;br /&gt;
The true number of new death per day, and the number from the simulation is also display below:&lt;br /&gt;
&lt;br /&gt;
[[File: deat.png|500px|left]]        [[File:Deats.18.png|500px|rigth]]&lt;br /&gt;
&lt;br /&gt;
We can see that the model is one more time really closed to the reality with a pic of 43 deaths after 50 days, while the reality display a pic at 44 days after 36 days.&lt;br /&gt;
&lt;br /&gt;
We have seen that the simulation is really closed from the data obtained for the Switzerland, but now lets go trough some special cases to see the impact of some decision on the variables.&lt;br /&gt;
&lt;br /&gt;
==Scenario 1: Late lockdown==&lt;br /&gt;
&lt;br /&gt;
In this scenario we will see what could have happened if the government take 1 more day to react and to set up the lockdown. To simulate such a scenario I simply increase the number of &amp;quot;Ratio official cases/pop&amp;quot; in the function IF THEN ELSE in &amp;quot;contact&amp;quot; and &amp;quot;contagion rate&amp;quot; from 0.00015 to 0.00018 and it delay the reaction of the government for 1 day.&lt;br /&gt;
&lt;br /&gt;
[[File: Deathz1.png|450px|left]][[File: Deathz2.png|500px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graph, the total number of official cases (=total diagnosed) jump from 33 000 to 45 000 cases. An increase of 35% in the number of official cases by just delaying for 1 day the government decisions. It illustrates well the exponential effect on the model, indeed we don't have to forget that the delay is just one day but if it has been 4-5 days the number of cases would have been exponentially higher. The second graph shows the deaths jump from 1600 to 2300, that is due to increasing number of cases and the hospital capacity reaching more than 60% utilization. Indeed due to the lookup function if the hospital capacity exceed 60% the mortality increase in the hospital. This is a very interesting scenarios that shows quite well the importance of the early lockdown and highlight the most important point in our model, '''the reaction time'''.&lt;br /&gt;
&lt;br /&gt;
==Scenario 2: Small Hospital capacity==&lt;br /&gt;
&lt;br /&gt;
In this scenario the number of hospital beds goes from 356/100k people to 238/100k people, a loss of -10 000 in variable ''hospital bed'' for Switzerland. This number of beds corresponds to the number of beds for a less developing country, such as Iceland (https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704). &lt;br /&gt;
&lt;br /&gt;
[[File: Utiliz.png|500px|left]][[File: Dead.png|480px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graphs, the hospital utilization reach almost 80%. Patients are not treated as well as they would if the utilization was lower, and it involves more deaths for these patients (right graph). We can see the importance of hospital capacity and for government to have a '''good amount of hospitals'''.&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
To conclude I would say that it has been quite difficult to deal with the real data because I had to find every number or to adjust some variables to fit with the reality. Another difficulty that I had to faced was all times and units to setup. The model display almost the same numbers as the ones communicated by the Swiss government, what could indicate that the model are not too far from what is happening in real-life. &lt;br /&gt;
&lt;br /&gt;
The most important variable in the simulation is the '''reaction time''' of the government in order to take some measures against the fast spread of the virus, such as bringing more awareness or imposing a lockdown.&lt;br /&gt;
&lt;br /&gt;
A further exogenous variable here is the number of hospital beds, which is a good proxy for modeling different countries. Having a smaller number of beds is a sign of vulnerability for the health care system and will impact mortality. A solution to this pandemic could therefore be to increase the number of beds in order to avoid exceeding capacity. &lt;br /&gt;
&lt;br /&gt;
A limit to this simulation would be that it is a real pandemic, for example I first tried to simulate the full pandemic with the second pic (higher) as you can see in the graph of Switzerland but I have to admit that sometimes the reality (or my Vensim skills) are to difficult to simulate that is why I choose to stop the simulation after 100 days.&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
[[File:Simulation Covid-19.mdl]]&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
#Federal Office of Public Health FOPH, https://www.bag.admin.ch/bag/en/home.html&lt;br /&gt;
#Fismann, D. (2009), “Modellig an Influenza Pandemic: A Guide for the Perplexed”, CMAJ,August.&lt;br /&gt;
#Madhav, N. (2017), “Pandemics: Risks, Impacts, and Mitigation”, November.&lt;br /&gt;
#Federal Office of Public Health FOPH, https://www.bag.admin.ch/bag/en/home.html&lt;br /&gt;
#https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704&lt;br /&gt;
#https://www.covid19.admin.ch/en/epidemiologic/case?detTime=total&amp;amp;detRel=abs&lt;br /&gt;
#https://www.covid19.admin.ch/en/epidemiologic/death?detTime=total&amp;amp;detRel=abs&lt;/div&gt;</summary>
		<author><name>Toscool</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20295</id>
		<title>Impact of late lockdown and hospital capacity on 19-COVID spread</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20295"/>
		<updated>2021-01-08T10:15:57Z</updated>

		<summary type="html">&lt;p&gt;Toscool: /* Method */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=INTRODUCTION=&lt;br /&gt;
&lt;br /&gt;
blablabla&lt;br /&gt;
&lt;br /&gt;
=Problem definition=&lt;br /&gt;
&lt;br /&gt;
The coronavirus pandemic is an ongoing pandemic, the first case confirmed in Switzerland  was on February 25th, 2020 and has known an exponential growth since. We know that the virus is spread from an infected person to a healthy one during close contact or via touching a contaminated surface. The aim of the simulation is to display the dynamics of the reaction time of the government to take measures and to see if the hospital capacity play a key role in the spread of the COVID-19&lt;br /&gt;
&lt;br /&gt;
=Method=&lt;br /&gt;
&lt;br /&gt;
Vensim modelling approach was selected due to dynamic behavior of the simulated system.&lt;br /&gt;
&lt;br /&gt;
the model shows the evolution of the number of people who got infected by the covid-19 virus in countries where the population have a high health care protection and where the government have decided to make a decision about the virus propagation. The model will explain how fast the virus spreads itself and how political decisions can change the number of infected people at a given point in time. The construction of the model is simple: at the beginning one person is infected and will, then, infect other people. When you are infected many possibilities are open:&lt;br /&gt;
* You can be a healthy virus carrier. In that case you will not know that you have the virus and after 19 days you will be recovered.&lt;br /&gt;
* After 5 days you get symptoms, but you do not have any important health problems, you will recover in the next 14 days.&lt;br /&gt;
* After 5 days, you get symptoms and you are very sick and have respiratory problems, after 3 more days, still feeling bad, you decide to go to the doctor to get a diagnosis. The doctor has than two options: to send you back home, where you will recover after 11 more days or hospitalized you the next day.&lt;br /&gt;
* The doctor had decided to hospitalize you, you then spend two weeks in intensive care, where you will need artificial ventilation and 24-hour nursing care. You can then recover or unfortunately die. &lt;br /&gt;
&lt;br /&gt;
The higher the hospital utilization, the greater the probability to die. Indeed, if hospitals get busier, the medical staff will be less available and health care quality might decrease. When the number of diagnosed and hospitalized people (which are the official number of cases) is greater than a certain percentage of the population, the government will take decisions to slow down the spread of the virus. This is to say that governments will take some measures, such as installing a forced lockdown of the population to decrease the number of contacts per habitant. Moreover, such a decision will have an impact on the population, which will be more aware of the situation and will be more careful to not spread or contract the virus. So, the contagion rate as the number of contacts per people will slow down. They will be less hospitalized people, that means less people in the hospital, meaning a better service and so less people who die.&lt;br /&gt;
&lt;br /&gt;
=Model=&lt;br /&gt;
&lt;br /&gt;
Following vensim model was developed based on the study.&lt;br /&gt;
&lt;br /&gt;
[[File:Model1.png|900px|thumb|center|COVID-19 pandemic in Switzerland Stock Flow Diagram]]&lt;br /&gt;
&lt;br /&gt;
== Variables ==&lt;br /&gt;
&lt;br /&gt;
===Initial population=== &lt;br /&gt;
''The Population of Switzerland can be found here: https://en.wikipedia.org/wiki/Demographics_of_Switzerland''&lt;br /&gt;
&lt;br /&gt;
=8 500 000&lt;br /&gt;
&lt;br /&gt;
===Ratio susceptible people=== &lt;br /&gt;
''Decrease the susceptible people by the number of deaths due to the COVID-19.''&lt;br /&gt;
&lt;br /&gt;
=Susceptible population / (Initial population-Dead)&lt;br /&gt;
&lt;br /&gt;
===Susceptible population=== &lt;br /&gt;
''Decrease the susceptible population by the number of new infections.''&lt;br /&gt;
&lt;br /&gt;
=-New infections&lt;br /&gt;
&lt;br /&gt;
===contact=== &lt;br /&gt;
'''Lockdown:''' ''Function IF THEN ELSE that bring the number of new people you meet (contact) from 5 to 0.05 if the ratio exceed 0.015%''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot;&amp;gt; 0.00015, 0.05 , 5 )&lt;br /&gt;
&lt;br /&gt;
===Contagion Rate=== &lt;br /&gt;
'''Lockdown:''' ''contagion rate: IF THEN ELSE that bring the contagion rate from 0.1 to 0.075 if the ratio exceed 0.015%. Function of the awareness in the population (washing more often their hands if lockdown)''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot; &amp;gt; 0.00015 , 0.075 , 0.1 )&lt;br /&gt;
&lt;br /&gt;
===New infections=== &lt;br /&gt;
''It represent the new number of people infected each day.''&lt;br /&gt;
&lt;br /&gt;
=contact*Infected*Ratio susceptible people*Contagion Rate&lt;br /&gt;
&lt;br /&gt;
===Infected=== &lt;br /&gt;
''It represent the stock of the new people infected. We start the model with 1 infected people.''&lt;br /&gt;
&lt;br /&gt;
=New infections-New recoveries from infected-New symptoms ///// Initial value: 1&lt;br /&gt;
&lt;br /&gt;
===New recoveries from infected===&lt;br /&gt;
''It represent the number of people without symptoms and they go in the recovered stock after 19 days.''&lt;br /&gt;
&lt;br /&gt;
=((1-Ratio Symptoms)*Infected)/TTA recoveries&lt;br /&gt;
&lt;br /&gt;
===New symptoms=== &lt;br /&gt;
''It represent the number of new people that develop symptoms during 5 days before going to the symptomatic stock.''&lt;br /&gt;
&lt;br /&gt;
=(Infected*Ratio Symptoms)/TTA Symptoms&lt;br /&gt;
&lt;br /&gt;
===Ratio Symptoms=== &lt;br /&gt;
''The ratio of people who develop some symptoms.''&lt;br /&gt;
&lt;br /&gt;
=0.2&lt;br /&gt;
&lt;br /&gt;
===Symptomatic=== &lt;br /&gt;
''The stock of people symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=New symptoms-New Diagnostic-New recoveries from symptoms&lt;br /&gt;
&lt;br /&gt;
===New recoveries from symptoms=== &lt;br /&gt;
''It represent the number of people that have symptoms but that were not to the doctor, after 14 they are in the recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Diagnost)*Symptomatic/TTA sympt&lt;br /&gt;
&lt;br /&gt;
===New Diagnostic=== &lt;br /&gt;
''It represent the number of new people that are diagnosed each day, they stay 3 days before having the diagnostic.''&lt;br /&gt;
&lt;br /&gt;
=Symptomatic*Ratio Diagnost/TTA Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Ratio Diagnost===&lt;br /&gt;
''the ratio of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=0.4&lt;br /&gt;
&lt;br /&gt;
===Diagnosed=== &lt;br /&gt;
''The stock of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic-New Hospitalization-New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===New Recovery from Diagnostic===&lt;br /&gt;
''It represent the number of people that are diagnosed and not sent to the hospital. they stay 9 days before going in the Recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Hospitalize)*Diagnosed/TTA diag&lt;br /&gt;
&lt;br /&gt;
===New Hospitalization=== &lt;br /&gt;
''It represent the number of people that are diagnosed and sent to the hospital. they stay 1 day before being sent.''&lt;br /&gt;
&lt;br /&gt;
=(Diagnosed*Ratio Hospitalize)/TTA Hospitalization Ratio Hospitalize&lt;br /&gt;
&lt;br /&gt;
===Ratio Hospitalize===&lt;br /&gt;
''The ratio of people that are Hospitalized.''&lt;br /&gt;
&lt;br /&gt;
=0.3&lt;br /&gt;
&lt;br /&gt;
===Hospitalized=== &lt;br /&gt;
''The stock of people that are hospitalized before being Recovered or Dead.''&lt;br /&gt;
&lt;br /&gt;
=New Hospitalization-New Death-New Recovery&lt;br /&gt;
&lt;br /&gt;
===New Recovery=== &lt;br /&gt;
''The number of people that recover each day from the hospitalization. It depends from the Mortality Rate which is depend from the hospital utilization (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=((1-Mortality Rate)*Hospitalized)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===New Death===&lt;br /&gt;
''The number of people that die each day from the hospitalization. It depends from the Mortality Rate which is depend from the hospital utilization (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized*Mortality Rate)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===hospital bed=== &lt;br /&gt;
''The number of bed in Switzerland 356 beds for 100k people with 8.5M people it gives that number: https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704''&lt;br /&gt;
&lt;br /&gt;
=30260&lt;br /&gt;
&lt;br /&gt;
===hospital utilization=== &lt;br /&gt;
''The utilization of the hospital we assume that there is already 8260 beds used for patient outside the covid pandemic. The more utilization we have, the greater the probability to die. Indeed, if hospitals get busier, the medical staff will be less available and health care quality might decrease.''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized/(hospital bed - 8260)) &lt;br /&gt;
&lt;br /&gt;
===lk mortality===&lt;br /&gt;
''The lookup function is used to described the mortality rate.''&lt;br /&gt;
&lt;br /&gt;
[(0,0)-(1000,0.3)],(0,0.065),(0.6,0.065),(0.8,0.12),(1,0.25),(1.2,0.3),(10,0.3),(1000,0.3)&lt;br /&gt;
&lt;br /&gt;
===Mortality Rate=== &lt;br /&gt;
''The mortality rate depends on the hospital utilization. For example based on the above function, if the capacity reach 100% the hospital is full and the chance to die is then 25%.''&lt;br /&gt;
&lt;br /&gt;
=lk mortality (hospital utilization)&lt;br /&gt;
&lt;br /&gt;
===Dead=== &lt;br /&gt;
''The stock of Dead people killed by the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New Death&lt;br /&gt;
&lt;br /&gt;
===Recovered=== &lt;br /&gt;
''The Total amount of people who recovered from the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New recoveries from infected+New recoveries from symptoms+New Recovery+New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===official active cases===&lt;br /&gt;
''It represent the number of people that were tested and it's this number that will be used by the government to follow the pandemic and take decision of lockdown.''&lt;br /&gt;
&lt;br /&gt;
=Diagnosed+Hosptitalized&lt;br /&gt;
&lt;br /&gt;
===Ratio official cases/pop=== &lt;br /&gt;
''The ratio that will be used for lockdown. ''&lt;br /&gt;
&lt;br /&gt;
=official active cases/ Initial population&lt;br /&gt;
&lt;br /&gt;
===New Diagnosed.1=== &lt;br /&gt;
''It's is just the same as New Diagnostic, it is used in the model to have the Total Diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Total Diagnosed=== &lt;br /&gt;
''Used in the model to have the official number of cases in the model.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnosed.1&lt;br /&gt;
&lt;br /&gt;
===TTA recoveries=== &lt;br /&gt;
''Time to recover after being infected and not having symptoms.''&lt;br /&gt;
&lt;br /&gt;
=19&lt;br /&gt;
&lt;br /&gt;
===TTA Symptoms=== &lt;br /&gt;
''The time you take to develop symptoms.''&lt;br /&gt;
&lt;br /&gt;
=5&lt;br /&gt;
&lt;br /&gt;
===TTA sympt===&lt;br /&gt;
''The time you take for recovering after being symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
===TTA Diagnostic=== &lt;br /&gt;
''Time to go to the doctor and have the result.''&lt;br /&gt;
&lt;br /&gt;
=3&lt;br /&gt;
&lt;br /&gt;
===TTA diag===&lt;br /&gt;
''The time you take for recovering after being diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=11&lt;br /&gt;
&lt;br /&gt;
===TTA Hospitalization=== &lt;br /&gt;
''Time to go to the Hospital.''&lt;br /&gt;
&lt;br /&gt;
=1&lt;br /&gt;
&lt;br /&gt;
===TTA Hospital===&lt;br /&gt;
''The time you stay at the hospital before recovering or dying.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
As explained in the problem definition we will focused our results on 3 cases. The first one is the normal scenario, the second is the same scenario but the lockdown is delayed for 1 day, and the last scenario is the normal scenario with a number of hospital beds reduce by 10 000 beds.&lt;br /&gt;
&lt;br /&gt;
==Normal Scenario==&lt;br /&gt;
&lt;br /&gt;
The first scenario take place in Switzerland with 8 500 000 peoples and a hospital capacity of 356 beds for 100k people. The first case was detected the 25 february 2019 and 20 days after the Government of Switzerland have decided to take some serious measures that is in our case represented by a lockdown. &lt;br /&gt;
&lt;br /&gt;
The following table show us the official number of new cases per day:&lt;br /&gt;
&lt;br /&gt;
[[File:Newcases.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
From the simulation we get:&lt;br /&gt;
&lt;br /&gt;
[[File:Yes.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
We can see that the model is really closed to the reality with a pic of 1350 after 35 days. The simulation stopped after 100 days so we just want to focused on these first 100 days. The reality display a pic at 1243 days after 30 days.&lt;br /&gt;
&lt;br /&gt;
The true number of new death per day, and the number from the simulation is also display below:&lt;br /&gt;
&lt;br /&gt;
[[File: deat.png|500px|left]]        [[File:Deats.18.png|500px|rigth]]&lt;br /&gt;
&lt;br /&gt;
We can see that the model is one more time really closed to the reality with a pic of 43 deaths after 50 days, while the reality display a pic at 44 days after 36 days.&lt;br /&gt;
&lt;br /&gt;
We have seen that the simulation is really closed from the data obtained for the Switzerland, but now lets go trough some special cases to see the impact of some decision on the variables.&lt;br /&gt;
&lt;br /&gt;
==Scenario 1: Late lockdown==&lt;br /&gt;
&lt;br /&gt;
In this scenario we will see what could have happened if the government take 1 more day to react and to set up the lockdown. To simulate such a scenario I simply increase the number of &amp;quot;Ratio official cases/pop&amp;quot; in the function IF THEN ELSE in &amp;quot;contact&amp;quot; and &amp;quot;contagion rate&amp;quot; from 0.00015 to 0.00018 and it delay the reaction of the government for 1 day.&lt;br /&gt;
&lt;br /&gt;
[[File: Deathz1.png|450px|left]][[File: Deathz2.png|500px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graph, the total number of official cases (=total diagnosed) jump from 33 000 to 45 000 cases. An increase of 35% in the number of official cases by just delaying for 1 day the government decisions. It illustrates well the exponential effect on the model, indeed we don't have to forget that the delay is just one day but if it has been 4-5 days the number of cases would have been exponentially higher. The second graph shows the deaths jump from 1600 to 2300, that is due to increasing number of cases and the hospital capacity reaching more than 60% utilization. Indeed due to the lookup function if the hospital capacity exceed 60% the mortality increase in the hospital. This is a very interesting scenarios that shows quite well the importance of the early lockdown and highlight the most important point in our model, '''the reaction time'''.&lt;br /&gt;
&lt;br /&gt;
==Scenario 2: Small Hospital capacity==&lt;br /&gt;
&lt;br /&gt;
In this scenario the number of hospital beds goes from 356/100k people to 238/100k people, a loss of -10 000 in variable ''hospital bed'' for Switzerland. This number of beds corresponds to the number of beds for a less developing country, such as Iceland (https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704). &lt;br /&gt;
&lt;br /&gt;
[[File: Utiliz.png|500px|left]][[File: Dead.png|480px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graphs, the hospital utilization reach almost 80%. Patients are not treated as well as they would if the utilization was lower, and it involves more deaths for these patients (right graph). We can see the importance of hospital capacity and for government to have a '''good amount of hospitals'''.&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
To conclude I would say that it has been quite difficult to deal with the real data because I had to find every number or to adjust some variables to fit with the reality. Another difficulty that I had to faced was all times and units to setup. The model display almost the same numbers as the ones communicated by the Swiss government, what could indicate that the model are not too far from what is happening in real-life. &lt;br /&gt;
&lt;br /&gt;
The most important variable in the simulation is the '''reaction time''' of the government in order to take some measures against the fast spread of the virus, such as bringing more awareness or imposing a lockdown.&lt;br /&gt;
&lt;br /&gt;
A further exogenous variable here is the number of hospital beds, which is a good proxy for modeling different countries. Having a smaller number of beds is a sign of vulnerability for the health care system and will impact mortality. A solution to this pandemic could therefore be to increase the number of beds in order to avoid exceeding capacity. &lt;br /&gt;
&lt;br /&gt;
A limit to this simulation would be that it is a real pandemic, for example I first tried to simulate the full pandemic with the second pic (higher) as you can see in the graph of Switzerland but I have to admit that sometimes the reality (or my Vensim skills) are to difficult to simulate that is why I choose to stop the simulation after 100 days.&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
[[File:Simulation Covid-19.mdl]]&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
#Federal Office of Public Health FOPH, https://www.bag.admin.ch/bag/en/home.html&lt;br /&gt;
#Fismann, D. (2009), “Modellig an Influenza Pandemic: A Guide for the Perplexed”, CMAJ,August.&lt;br /&gt;
#Madhav, N. (2017), “Pandemics: Risks, Impacts, and Mitigation”, November.&lt;br /&gt;
#Federal Office of Public Health FOPH, https://www.bag.admin.ch/bag/en/home.html&lt;br /&gt;
#https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704&lt;br /&gt;
#https://www.covid19.admin.ch/en/epidemiologic/case?detTime=total&amp;amp;detRel=abs&lt;br /&gt;
#https://www.covid19.admin.ch/en/epidemiologic/death?detTime=total&amp;amp;detRel=abs&lt;/div&gt;</summary>
		<author><name>Toscool</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20294</id>
		<title>Impact of late lockdown and hospital capacity on 19-COVID spread</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20294"/>
		<updated>2021-01-07T17:04:35Z</updated>

		<summary type="html">&lt;p&gt;Toscool: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=INTRODUCTION=&lt;br /&gt;
&lt;br /&gt;
blablabla&lt;br /&gt;
&lt;br /&gt;
=Problem definition=&lt;br /&gt;
&lt;br /&gt;
The coronavirus pandemic is an ongoing pandemic, the first case confirmed in Switzerland  was on February 25th, 2020 and has known an exponential growth since. We know that the virus is spread from an infected person to a healthy one during close contact or via touching a contaminated surface. The aim of the simulation is to display the dynamics of the reaction time of the government to take measures and to see if the hospital capacity play a key role in the spread of the COVID-19&lt;br /&gt;
&lt;br /&gt;
=Method=&lt;br /&gt;
&lt;br /&gt;
Vensim modelling approach was selected due to dynamic behavior of the simulated system.&lt;br /&gt;
&lt;br /&gt;
the model shows the evolution of the number of people who got infected by the covid-19 virus in countries where the population have a high health care protection and where the government has decided to make a decision about the virus propagation. The model will explain how fast the virus spreads itself and how political decisions can change the number of infected people at a given point in time. The construction of the model is simple: at the beginning one person is infected and will, then, infect other people. When you are infected many possibilities are open:&lt;br /&gt;
- You can be a healthy virus carrier. In that case you will not know that you have the virus and after 19 days you will be recovered.&lt;br /&gt;
- After 5 days you get symptoms, but you do not have any important health problems, you will recover in the next 14 days.&lt;br /&gt;
- After 5 days, you get symptoms and you are very sick and have respiratory problems, after 3 more days, still feeling bad, you decide to go to the doctor to get a diagnosis. The doctor has than two options: to send you back home, where you will recover after 11 more days or hospitalized you the next day.&lt;br /&gt;
- The doctor had decided to hospitalize you, you then spend two weeks in intensive care, where you will need artificial ventilation and 24-hour nursing care. &lt;br /&gt;
You can then recover or unfortunately die. The higher the hospital utilisation, the greater the probability to die. Indeed, if hospitals get busier, the medical staff will be less available and health care quality might decrease. When the number of diagnosed and hospitalised people (which are the official number of cases) is greater than certain percentage of the population, the government will take decisions to slow down the spread of the virus. This is to say that governments will take some measures, such as installing a forced lockdown of the population to decrease the number of contacts per habitant. Moreover, such a decision will have an impact of the population, which will be more aware of the situation and will be more careful to not spread or contract the virus. So, the contagion rate as the number of contacts per people will slow down. They will be less hospitalised people, that means less people in the hospital, meaning a better service and so less people who die.&lt;br /&gt;
&lt;br /&gt;
=Model=&lt;br /&gt;
&lt;br /&gt;
Following vensim model was developed based on the study.&lt;br /&gt;
&lt;br /&gt;
[[File:Model1.png|900px|thumb|center|COVID-19 pandemic in Switzerland Stock Flow Diagram]]&lt;br /&gt;
&lt;br /&gt;
== Variables ==&lt;br /&gt;
&lt;br /&gt;
===Initial population=== &lt;br /&gt;
''The Population of Switzerland can be found here: https://en.wikipedia.org/wiki/Demographics_of_Switzerland''&lt;br /&gt;
&lt;br /&gt;
=8 500 000&lt;br /&gt;
&lt;br /&gt;
===Ratio susceptible people=== &lt;br /&gt;
''Decrease the susceptible people by the number of deaths due to the COVID-19.''&lt;br /&gt;
&lt;br /&gt;
=Susceptible population / (Initial population-Dead)&lt;br /&gt;
&lt;br /&gt;
===Susceptible population=== &lt;br /&gt;
''Decrease the susceptible population by the number of new infections.''&lt;br /&gt;
&lt;br /&gt;
=-New infections&lt;br /&gt;
&lt;br /&gt;
===contact=== &lt;br /&gt;
'''Lockdown:''' ''Function IF THEN ELSE that bring the number of new people you meet (contact) from 5 to 0.05 if the ratio exceed 0.015%''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot;&amp;gt; 0.00015, 0.05 , 5 )&lt;br /&gt;
&lt;br /&gt;
===Contagion Rate=== &lt;br /&gt;
'''Lockdown:''' ''contagion rate: IF THEN ELSE that bring the contagion rate from 0.1 to 0.075 if the ratio exceed 0.015%. Function of the awareness in the population (washing more often their hands if lockdown)''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot; &amp;gt; 0.00015 , 0.075 , 0.1 )&lt;br /&gt;
&lt;br /&gt;
===New infections=== &lt;br /&gt;
''It represent the new number of people infected each day.''&lt;br /&gt;
&lt;br /&gt;
=contact*Infected*Ratio susceptible people*Contagion Rate&lt;br /&gt;
&lt;br /&gt;
===Infected=== &lt;br /&gt;
''It represent the stock of the new people infected. We start the model with 1 infected people.''&lt;br /&gt;
&lt;br /&gt;
=New infections-New recoveries from infected-New symptoms ///// Initial value: 1&lt;br /&gt;
&lt;br /&gt;
===New recoveries from infected===&lt;br /&gt;
''It represent the number of people without symptoms and they go in the recovered stock after 19 days.''&lt;br /&gt;
&lt;br /&gt;
=((1-Ratio Symptoms)*Infected)/TTA recoveries&lt;br /&gt;
&lt;br /&gt;
===New symptoms=== &lt;br /&gt;
''It represent the number of new people that develop symptoms during 5 days before going to the symptomatic stock.''&lt;br /&gt;
&lt;br /&gt;
=(Infected*Ratio Symptoms)/TTA Symptoms&lt;br /&gt;
&lt;br /&gt;
===Ratio Symptoms=== &lt;br /&gt;
''The ratio of people who develop some symptoms.''&lt;br /&gt;
&lt;br /&gt;
=0.2&lt;br /&gt;
&lt;br /&gt;
===Symptomatic=== &lt;br /&gt;
''The stock of people symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=New symptoms-New Diagnostic-New recoveries from symptoms&lt;br /&gt;
&lt;br /&gt;
===New recoveries from symptoms=== &lt;br /&gt;
''It represent the number of people that have symptoms but that were not to the doctor, after 14 they are in the recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Diagnost)*Symptomatic/TTA sympt&lt;br /&gt;
&lt;br /&gt;
===New Diagnostic=== &lt;br /&gt;
''It represent the number of new people that are diagnosed each day, they stay 3 days before having the diagnostic.''&lt;br /&gt;
&lt;br /&gt;
=Symptomatic*Ratio Diagnost/TTA Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Ratio Diagnost===&lt;br /&gt;
''the ratio of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=0.4&lt;br /&gt;
&lt;br /&gt;
===Diagnosed=== &lt;br /&gt;
''The stock of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic-New Hospitalization-New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===New Recovery from Diagnostic===&lt;br /&gt;
''It represent the number of people that are diagnosed and not sent to the hospital. they stay 9 days before going in the Recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Hospitalize)*Diagnosed/TTA diag&lt;br /&gt;
&lt;br /&gt;
===New Hospitalization=== &lt;br /&gt;
''It represent the number of people that are diagnosed and sent to the hospital. they stay 1 day before being sent.''&lt;br /&gt;
&lt;br /&gt;
=(Diagnosed*Ratio Hospitalize)/TTA Hospitalization Ratio Hospitalize&lt;br /&gt;
&lt;br /&gt;
===Ratio Hospitalize===&lt;br /&gt;
''The ratio of people that are Hospitalized.''&lt;br /&gt;
&lt;br /&gt;
=0.3&lt;br /&gt;
&lt;br /&gt;
===Hospitalized=== &lt;br /&gt;
''The stock of people that are hospitalized before being Recovered or Dead.''&lt;br /&gt;
&lt;br /&gt;
=New Hospitalization-New Death-New Recovery&lt;br /&gt;
&lt;br /&gt;
===New Recovery=== &lt;br /&gt;
''The number of people that recover each day from the hospitalization. It depends from the Mortality Rate which is depend from the hospital utilization (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=((1-Mortality Rate)*Hospitalized)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===New Death===&lt;br /&gt;
''The number of people that die each day from the hospitalization. It depends from the Mortality Rate which is depend from the hospital utilization (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized*Mortality Rate)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===hospital bed=== &lt;br /&gt;
''The number of bed in Switzerland 356 beds for 100k people with 8.5M people it gives that number: https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704''&lt;br /&gt;
&lt;br /&gt;
=30260&lt;br /&gt;
&lt;br /&gt;
===hospital utilization=== &lt;br /&gt;
''The utilization of the hospital we assume that there is already 8260 beds used for patient outside the covid pandemic. The more utilization we have, the greater the probability to die. Indeed, if hospitals get busier, the medical staff will be less available and health care quality might decrease.''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized/(hospital bed - 8260)) &lt;br /&gt;
&lt;br /&gt;
===lk mortality===&lt;br /&gt;
''The lookup function is used to described the mortality rate.''&lt;br /&gt;
&lt;br /&gt;
[(0,0)-(1000,0.3)],(0,0.065),(0.6,0.065),(0.8,0.12),(1,0.25),(1.2,0.3),(10,0.3),(1000,0.3)&lt;br /&gt;
&lt;br /&gt;
===Mortality Rate=== &lt;br /&gt;
''The mortality rate depends on the hospital utilization. For example based on the above function, if the capacity reach 100% the hospital is full and the chance to die is then 25%.''&lt;br /&gt;
&lt;br /&gt;
=lk mortality (hospital utilization)&lt;br /&gt;
&lt;br /&gt;
===Dead=== &lt;br /&gt;
''The stock of Dead people killed by the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New Death&lt;br /&gt;
&lt;br /&gt;
===Recovered=== &lt;br /&gt;
''The Total amount of people who recovered from the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New recoveries from infected+New recoveries from symptoms+New Recovery+New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===official active cases===&lt;br /&gt;
''It represent the number of people that were tested and it's this number that will be used by the government to follow the pandemic and take decision of lockdown.''&lt;br /&gt;
&lt;br /&gt;
=Diagnosed+Hosptitalized&lt;br /&gt;
&lt;br /&gt;
===Ratio official cases/pop=== &lt;br /&gt;
''The ratio that will be used for lockdown. ''&lt;br /&gt;
&lt;br /&gt;
=official active cases/ Initial population&lt;br /&gt;
&lt;br /&gt;
===New Diagnosed.1=== &lt;br /&gt;
''It's is just the same as New Diagnostic, it is used in the model to have the Total Diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Total Diagnosed=== &lt;br /&gt;
''Used in the model to have the official number of cases in the model.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnosed.1&lt;br /&gt;
&lt;br /&gt;
===TTA recoveries=== &lt;br /&gt;
''Time to recover after being infected and not having symptoms.''&lt;br /&gt;
&lt;br /&gt;
=19&lt;br /&gt;
&lt;br /&gt;
===TTA Symptoms=== &lt;br /&gt;
''The time you take to develop symptoms.''&lt;br /&gt;
&lt;br /&gt;
=5&lt;br /&gt;
&lt;br /&gt;
===TTA sympt===&lt;br /&gt;
''The time you take for recovering after being symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
===TTA Diagnostic=== &lt;br /&gt;
''Time to go to the doctor and have the result.''&lt;br /&gt;
&lt;br /&gt;
=3&lt;br /&gt;
&lt;br /&gt;
===TTA diag===&lt;br /&gt;
''The time you take for recovering after being diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=11&lt;br /&gt;
&lt;br /&gt;
===TTA Hospitalization=== &lt;br /&gt;
''Time to go to the Hospital.''&lt;br /&gt;
&lt;br /&gt;
=1&lt;br /&gt;
&lt;br /&gt;
===TTA Hospital===&lt;br /&gt;
''The time you stay at the hospital before recovering or dying.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
As explained in the problem definition we will focused our results on 3 cases. The first one is the normal scenario, the second is the same scenario but the lockdown is delayed for 1 day, and the last scenario is the normal scenario with a number of hospital beds reduce by 10 000 beds.&lt;br /&gt;
&lt;br /&gt;
==Normal Scenario==&lt;br /&gt;
&lt;br /&gt;
The first scenario take place in Switzerland with 8 500 000 peoples and a hospital capacity of 356 beds for 100k people. The first case was detected the 25 february 2019 and 20 days after the Government of Switzerland have decided to take some serious measures that is in our case represented by a lockdown. &lt;br /&gt;
&lt;br /&gt;
The following table show us the official number of new cases per day:&lt;br /&gt;
&lt;br /&gt;
[[File:Newcases.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
From the simulation we get:&lt;br /&gt;
&lt;br /&gt;
[[File:Yes.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
We can see that the model is really closed to the reality with a pic of 1350 after 35 days. The simulation stopped after 100 days so we just want to focused on these first 100 days. The reality display a pic at 1243 days after 30 days.&lt;br /&gt;
&lt;br /&gt;
The true number of new death per day, and the number from the simulation is also display below:&lt;br /&gt;
&lt;br /&gt;
[[File: deat.png|500px|left]]        [[File:Deats.18.png|500px|rigth]]&lt;br /&gt;
&lt;br /&gt;
We can see that the model is one more time really closed to the reality with a pic of 43 deaths after 50 days, while the reality display a pic at 44 days after 36 days.&lt;br /&gt;
&lt;br /&gt;
We have seen that the simulation is really closed from the data obtained for the Switzerland, but now lets go trough some special cases to see the impact of some decision on the variables.&lt;br /&gt;
&lt;br /&gt;
==Scenario 1: Late lockdown==&lt;br /&gt;
&lt;br /&gt;
In this scenario we will see what could have happened if the government take 1 more day to react and to set up the lockdown. To simulate such a scenario I simply increase the number of &amp;quot;Ratio official cases/pop&amp;quot; in the function IF THEN ELSE in &amp;quot;contact&amp;quot; and &amp;quot;contagion rate&amp;quot; from 0.00015 to 0.00018 and it delay the reaction of the government for 1 day.&lt;br /&gt;
&lt;br /&gt;
[[File: Deathz1.png|450px|left]][[File: Deathz2.png|500px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graph, the total number of official cases (=total diagnosed) jump from 33 000 to 45 000 cases. An increase of 35% in the number of official cases by just delaying for 1 day the government decisions. It illustrates well the exponential effect on the model, indeed we don't have to forget that the delay is just one day but if it has been 4-5 days the number of cases would have been exponentially higher. The second graph shows the deaths jump from 1600 to 2300, that is due to increasing number of cases and the hospital capacity reaching more than 60% utilization. Indeed due to the lookup function if the hospital capacity exceed 60% the mortality increase in the hospital. This is a very interesting scenarios that shows quite well the importance of the early lockdown and highlight the most important point in our model, '''the reaction time'''.&lt;br /&gt;
&lt;br /&gt;
==Scenario 2: Small Hospital capacity==&lt;br /&gt;
&lt;br /&gt;
In this scenario the number of hospital beds goes from 356/100k people to 238/100k people, a loss of -10 000 in variable ''hospital bed'' for Switzerland. This number of beds corresponds to the number of beds for a less developing country, such as Iceland (https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704). &lt;br /&gt;
&lt;br /&gt;
[[File: Utiliz.png|500px|left]][[File: Dead.png|480px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graphs, the hospital utilization reach almost 80%. Patients are not treated as well as they would if the utilization was lower, and it involves more deaths for these patients (right graph). We can see the importance of hospital capacity and for government to have a '''good amount of hospitals'''.&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
To conclude I would say that it has been quite difficult to deal with the real data because I had to find every number or to adjust some variables to fit with the reality. Another difficulty that I had to faced was all times and units to setup. The model display almost the same numbers as the ones communicated by the Swiss government, what could indicate that the model are not too far from what is happening in real-life. &lt;br /&gt;
&lt;br /&gt;
The most important variable in the simulation is the '''reaction time''' of the government in order to take some measures against the fast spread of the virus, such as bringing more awareness or imposing a lockdown.&lt;br /&gt;
&lt;br /&gt;
A further exogenous variable here is the number of hospital beds, which is a good proxy for modeling different countries. Having a smaller number of beds is a sign of vulnerability for the health care system and will impact mortality. A solution to this pandemic could therefore be to increase the number of beds in order to avoid exceeding capacity. &lt;br /&gt;
&lt;br /&gt;
A limit to this simulation would be that it is a real pandemic, for example I first tried to simulate the full pandemic with the second pic (higher) as you can see in the graph of Switzerland but I have to admit that sometimes the reality (or my Vensim skills) are to difficult to simulate that is why I choose to stop the simulation after 100 days.&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
[[File:Simulation Covid-19.mdl]]&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
#Federal Office of Public Health FOPH, https://www.bag.admin.ch/bag/en/home.html&lt;br /&gt;
#Fismann, D. (2009), “Modellig an Influenza Pandemic: A Guide for the Perplexed”, CMAJ,August.&lt;br /&gt;
#Madhav, N. (2017), “Pandemics: Risks, Impacts, and Mitigation”, November.&lt;br /&gt;
#Federal Office of Public Health FOPH, https://www.bag.admin.ch/bag/en/home.html&lt;br /&gt;
#https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704&lt;br /&gt;
#https://www.covid19.admin.ch/en/epidemiologic/case?detTime=total&amp;amp;detRel=abs&lt;br /&gt;
#https://www.covid19.admin.ch/en/epidemiologic/death?detTime=total&amp;amp;detRel=abs&lt;/div&gt;</summary>
		<author><name>Toscool</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=WS_2020/2021&amp;diff=20293</id>
		<title>WS 2020/2021</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=WS_2020/2021&amp;diff=20293"/>
		<updated>2021-01-07T16:50:13Z</updated>

		<summary type="html">&lt;p&gt;Toscool: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Semestral papers from winter term 2020/2021. Please, put here links to the pages with your paper. First you need to have your [[Assignments WS 2020/2021|assignment approved]]&lt;br /&gt;
&lt;br /&gt;
WIP [http://www.simulace.info/index.php/Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread Impact of late lockdown and hospital capacity on 19-COVID spread] , Thomas BAEUMLIN [[User:Toscool|Toscool]] ([[User talk:Toscool|talk]]) 16:15, 7 January 2020 (CET)&lt;/div&gt;</summary>
		<author><name>Toscool</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=WS_2020/2021&amp;diff=20292</id>
		<title>WS 2020/2021</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=WS_2020/2021&amp;diff=20292"/>
		<updated>2021-01-07T16:49:52Z</updated>

		<summary type="html">&lt;p&gt;Toscool: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Semestral papers from winter term 2020/2021. Please, put here links to the pages with your paper. First you need to have your [[Assignments WS 2020/2021|assignment approved]]&lt;br /&gt;
&lt;br /&gt;
[http://www.simulace.info/index.php/Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread Impact of late lockdown and hospital capacity on 19-COVID spread] , Thomas BAEUMLIN [[User:Toscool|Toscool]] ([[User talk:Toscool|talk]]) 16:15, 7 January 2020 (CET)&lt;/div&gt;</summary>
		<author><name>Toscool</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=WS_2020/2021&amp;diff=20291</id>
		<title>WS 2020/2021</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=WS_2020/2021&amp;diff=20291"/>
		<updated>2021-01-07T16:49:16Z</updated>

		<summary type="html">&lt;p&gt;Toscool: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Semestral papers from winter term 2020/2021. Please, put here links to the pages with your paper. First you need to have your [[Assignments WS 2020/2021|assignment approved]]&lt;br /&gt;
&lt;br /&gt;
[http://www.simulace.info/index.php/Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spreaImpact of late lockdown and hospital capacity on 19-COVID spread] , [[User:Toscool|Toscool]] ([[User talk:Toscool|talk]]) 16:15, 7 January 2020 (CET)&lt;/div&gt;</summary>
		<author><name>Toscool</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=WS_2020/2021&amp;diff=20290</id>
		<title>WS 2020/2021</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=WS_2020/2021&amp;diff=20290"/>
		<updated>2021-01-07T16:47:30Z</updated>

		<summary type="html">&lt;p&gt;Toscool: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Semestral papers from winter term 2020/2021. Please, put here links to the pages with your paper. First you need to have your [[Assignments WS 2020/2021|assignment approved]]&lt;br /&gt;
&lt;br /&gt;
[http://www.simulace.info/index.php/Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread]&lt;/div&gt;</summary>
		<author><name>Toscool</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=WS_2020/2021&amp;diff=20289</id>
		<title>WS 2020/2021</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=WS_2020/2021&amp;diff=20289"/>
		<updated>2021-01-07T16:46:06Z</updated>

		<summary type="html">&lt;p&gt;Toscool: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Semestral papers from winter term 2020/2021. Please, put here links to the pages with your paper. First you need to have your [[Assignments WS 2020/2021|assignment approved]]&lt;br /&gt;
&lt;br /&gt;
[[http://www.simulace.info/index.php/Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread|Impact of late lockdown and hospital capacity on COVID-19 spread]]&lt;/div&gt;</summary>
		<author><name>Toscool</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20288</id>
		<title>Impact of late lockdown and hospital capacity on 19-COVID spread</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20288"/>
		<updated>2021-01-07T16:40:10Z</updated>

		<summary type="html">&lt;p&gt;Toscool: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=INTRODUCTION=&lt;br /&gt;
&lt;br /&gt;
=Problem definition=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Method=&lt;br /&gt;
&lt;br /&gt;
Vensim modelling approach was selected due to dynamic behavior of the simulated system.&lt;br /&gt;
&lt;br /&gt;
Our model shows the evolution of the number of people who got infected by the covid-19 virus in countries where the population have a high health care protection and where the government has decided to make a decision about the virus propagation. The model will explain us how fast the virus spreads itself and how political decisions can change the number of infected people at a given point in time. The construction of our model is simple: at the beginning one person is infected and will, then, infect other people. When you are infected many possibilities are open:&lt;br /&gt;
- You can be a healthy virus carrier. In that case you will not know that you have the virus and after 19 days you will be recovered.&lt;br /&gt;
- After 5 days you get symptoms, but you do not have any important health problems, you will recover in the next 14 days.&lt;br /&gt;
- After 5 days, you get symptoms and you are very sick and have respiratory problems, after 5 more days, still feeling bad, you decide to go to the doctor to get a diagnosis. The doctor has than two options: to send you back home, where you will recover after 9 more days or hospitalized you the next day.&lt;br /&gt;
- The doctor had decided to hospitalize you, you then spend two weeks in intensive care, where you will need artificial ventilation and 24-hour nursing care. &lt;br /&gt;
You can then recover or unfortunately die. The higher the hospital utilisation, the greater the probability to die. Indeed, if hospitals get busier, the medical staff will be less available and health care quality might decrease. When the number of diagnosed and hospitalised people (which are the official number of cases) is greater than 3% of the population, the government will take decisions to slow down the spread of the virus. This is to say that governments will take some measures, such as installing a forced lockdown of the population to decrease the number of contacts per habitant. Moreover, such a decision will have an impact of the population, which will be more aware of the situation and will be more careful to not spread or contract the virus. So, the contagion rate as the number of contacts per people will slow down. They will be less hospitalised people, that means less people in the hospital, meaning a better service and so less people who die.&lt;br /&gt;
&lt;br /&gt;
=Model=&lt;br /&gt;
&lt;br /&gt;
Following vensim model was developed based on the study.&lt;br /&gt;
&lt;br /&gt;
[[File:Model1.png|900px|thumb|center|COVID-19 pandemic in Switzerland Stock Flow Diagram]]&lt;br /&gt;
&lt;br /&gt;
== Variables ==&lt;br /&gt;
&lt;br /&gt;
===Initial population=== &lt;br /&gt;
''The Population of Switzerland can be found here: https://en.wikipedia.org/wiki/Demographics_of_Switzerland''&lt;br /&gt;
&lt;br /&gt;
=8 500 000&lt;br /&gt;
&lt;br /&gt;
===Ratio susceptible people=== &lt;br /&gt;
''Decrease the susceptible people by the number of deaths due to the COVID-19.''&lt;br /&gt;
&lt;br /&gt;
=Susceptible population / (Initial population-Dead)&lt;br /&gt;
&lt;br /&gt;
===Susceptible population=== &lt;br /&gt;
''Decrease the susceptible population by the number of new infections.''&lt;br /&gt;
&lt;br /&gt;
=-New infections&lt;br /&gt;
&lt;br /&gt;
===contact=== &lt;br /&gt;
'''Lockdown:''' ''Function IF THEN ELSE that bring the number of new people you meet (contact) from 5 to 0.05 if the ratio exceed 0.015%''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot;&amp;gt; 0.00015, 0.05 , 5 )&lt;br /&gt;
&lt;br /&gt;
===Contagion Rate=== &lt;br /&gt;
'''Lockdown:''' ''contagion rate: IF THEN ELSE that bring the contagion rate from 0.1 to 0.075 if the ratio exceed 0.015%. Function of the awareness in the population (washing more often their hands if lockdown)''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot; &amp;gt; 0.00015 , 0.075 , 0.1 )&lt;br /&gt;
&lt;br /&gt;
===New infections=== &lt;br /&gt;
''It represent the new number of people infected each day.''&lt;br /&gt;
&lt;br /&gt;
=contact*Infected*Ratio susceptible people*Contagion Rate&lt;br /&gt;
&lt;br /&gt;
===Infected=== &lt;br /&gt;
''It represent the stock of the new people infected. We start the model with 1 infected people.''&lt;br /&gt;
&lt;br /&gt;
=New infections-New recoveries from infected-New symptoms ///// Initial value: 1&lt;br /&gt;
&lt;br /&gt;
===New recoveries from infected===&lt;br /&gt;
''It represent the number of people without symptoms and they go in the recovered stock after 19 days.''&lt;br /&gt;
&lt;br /&gt;
=((1-Ratio Symptoms)*Infected)/TTA recoveries&lt;br /&gt;
&lt;br /&gt;
===New symptoms=== &lt;br /&gt;
''It represent the number of new people that develop symptoms during 5 days before going to the symptomatic stock.''&lt;br /&gt;
&lt;br /&gt;
=(Infected*Ratio Symptoms)/TTA Symptoms&lt;br /&gt;
&lt;br /&gt;
===Ratio Symptoms=== &lt;br /&gt;
''The ratio of people who develop some symptoms.''&lt;br /&gt;
&lt;br /&gt;
=0.2&lt;br /&gt;
&lt;br /&gt;
===Symptomatic=== &lt;br /&gt;
''The stock of people symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=New symptoms-New Diagnostic-New recoveries from symptoms&lt;br /&gt;
&lt;br /&gt;
===New recoveries from symptoms=== &lt;br /&gt;
''It represent the number of people that have symptoms but that were not to the doctor, after 14 they are in the recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Diagnost)*Symptomatic/TTA sympt&lt;br /&gt;
&lt;br /&gt;
===New Diagnostic=== &lt;br /&gt;
''It represent the number of new people that are diagnosed each day, they stay 3 days before having the diagnostic.''&lt;br /&gt;
&lt;br /&gt;
=Symptomatic*Ratio Diagnost/TTA Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Ratio Diagnost===&lt;br /&gt;
''the ratio of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=0.4&lt;br /&gt;
&lt;br /&gt;
===Diagnosed=== &lt;br /&gt;
''The stock of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic-New Hospitalization-New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===New Recovery from Diagnostic===&lt;br /&gt;
''It represent the number of people that are diagnosed and not sent to the hospital. they stay 9 days before going in the Recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Hospitalize)*Diagnosed/TTA diag&lt;br /&gt;
&lt;br /&gt;
===New Hospitalization=== &lt;br /&gt;
''It represent the number of people that are diagnosed and sent to the hospital. they stay 1 day before being sent.''&lt;br /&gt;
&lt;br /&gt;
=(Diagnosed*Ratio Hospitalize)/TTA Hospitalization Ratio Hospitalize&lt;br /&gt;
&lt;br /&gt;
===Ratio Hospitalize===&lt;br /&gt;
''The ratio of people that are Hospitalized.''&lt;br /&gt;
&lt;br /&gt;
=0.3&lt;br /&gt;
&lt;br /&gt;
===Hospitalized=== &lt;br /&gt;
''The stock of people that are hospitalized before being Recovered or Dead.''&lt;br /&gt;
&lt;br /&gt;
=New Hospitalization-New Death-New Recovery&lt;br /&gt;
&lt;br /&gt;
===New Recovery=== &lt;br /&gt;
''The number of people that recover each day from the hospitalization. It depends from the Mortality Rate which is depend from the hospital utilization (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=((1-Mortality Rate)*Hospitalized)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===New Death===&lt;br /&gt;
''The number of people that die each day from the hospitalization. It depends from the Mortality Rate which is depend from the hospital utilization (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized*Mortality Rate)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===hospital bed=== &lt;br /&gt;
''The number of bed in Switzerland 356 beds for 100k people with 8.5M people it gives that number: https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704''&lt;br /&gt;
&lt;br /&gt;
=30260&lt;br /&gt;
&lt;br /&gt;
===hospital utilization=== &lt;br /&gt;
''The utilization of the hospital we assume that there is already 8260 beds used for patient outside the covid pandemic. The more utilization we have, the greater the probability to die. Indeed, if hospitals get busier, the medical staff will be less available and health care quality might decrease.''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized/(hospital bed - 8260)) &lt;br /&gt;
&lt;br /&gt;
===lk mortality===&lt;br /&gt;
''The lookup function is used to described the mortality rate.''&lt;br /&gt;
&lt;br /&gt;
[(0,0)-(1000,0.3)],(0,0.065),(0.6,0.065),(0.8,0.12),(1,0.25),(1.2,0.3),(10,0.3),(1000,0.3)&lt;br /&gt;
&lt;br /&gt;
===Mortality Rate=== &lt;br /&gt;
''The mortality rate depends on the hospital utilization. For example based on the above function, if the capacity reach 100% the hospital is full and the chance to die is then 25%.''&lt;br /&gt;
&lt;br /&gt;
=lk mortality (hospital utilization)&lt;br /&gt;
&lt;br /&gt;
===Dead=== &lt;br /&gt;
''The stock of Dead people killed by the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New Death&lt;br /&gt;
&lt;br /&gt;
===Recovered=== &lt;br /&gt;
''The Total amount of people who recovered from the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New recoveries from infected+New recoveries from symptoms+New Recovery+New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===official active cases===&lt;br /&gt;
''It represent the number of people that were tested and it's this number that will be used by the government to follow the pandemic and take decision of lockdown.''&lt;br /&gt;
&lt;br /&gt;
=Diagnosed+Hosptitalized&lt;br /&gt;
&lt;br /&gt;
===Ratio official cases/pop=== &lt;br /&gt;
''The ratio that will be used for lockdown. ''&lt;br /&gt;
&lt;br /&gt;
=official active cases/ Initial population&lt;br /&gt;
&lt;br /&gt;
===New Diagnosed.1=== &lt;br /&gt;
''It's is just the same as New Diagnostic, it is used in the model to have the Total Diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Total Diagnosed=== &lt;br /&gt;
''Used in the model to have the official number of cases in the model.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnosed.1&lt;br /&gt;
&lt;br /&gt;
===TTA recoveries=== &lt;br /&gt;
''Time to recover after being infected and not having symptoms.''&lt;br /&gt;
&lt;br /&gt;
=19&lt;br /&gt;
&lt;br /&gt;
===TTA Symptoms=== &lt;br /&gt;
''The time you take to develop symptoms.''&lt;br /&gt;
&lt;br /&gt;
=5&lt;br /&gt;
&lt;br /&gt;
===TTA sympt===&lt;br /&gt;
''The time you take for recovering after being symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
===TTA Diagnostic=== &lt;br /&gt;
''Time to go to the doctor and have the result.''&lt;br /&gt;
&lt;br /&gt;
=3&lt;br /&gt;
&lt;br /&gt;
===TTA diag===&lt;br /&gt;
''The time you take for recovering after being diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=11&lt;br /&gt;
&lt;br /&gt;
===TTA Hospitalization=== &lt;br /&gt;
''Time to go to the Hospital.''&lt;br /&gt;
&lt;br /&gt;
=1&lt;br /&gt;
&lt;br /&gt;
===TTA Hospital===&lt;br /&gt;
''The time you stay at the hospital before recovering or dying.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
As explained in the problem definition we will focused our results on 3 cases. The first one is the normal scenario, the second is the same scenario but the lockdown is delayed for 1 day, and the last scenario is the normal scenario with a number of hospital beds reduce by 10 000 beds.&lt;br /&gt;
&lt;br /&gt;
==Normal Scenario==&lt;br /&gt;
&lt;br /&gt;
The first scenario take place in Switzerland with 8 500 000 peoples and a hospital capacity of 356 beds for 100k people. The first case was detected the 25 february 2019 and 20 days after the Government of Switzerland have decided to take some serious measures that is in our case represented by a lockdown. &lt;br /&gt;
&lt;br /&gt;
The following table show us the official number of new cases per day:&lt;br /&gt;
&lt;br /&gt;
[[File:Newcases.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
From the simulation we get:&lt;br /&gt;
&lt;br /&gt;
[[File:Yes.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
We can see that the model is really closed to the reality with a pic of 1350 after 35 days. The simulation stopped after 100 days so we just want to focused on these first 100 days. The reality display a pic at 1243 days after 30 days.&lt;br /&gt;
&lt;br /&gt;
The true number of new death per day, and the number from the simulation is also display below:&lt;br /&gt;
&lt;br /&gt;
[[File: deat.png|500px|left]]        [[File:Deats.18.png|500px|rigth]]&lt;br /&gt;
&lt;br /&gt;
We can see that the model is one more time really closed to the reality with a pic of 43 deaths after 50 days, while the reality display a pic at 44 days after 36 days.&lt;br /&gt;
&lt;br /&gt;
We have seen that the simulation is really closed from the data obtained for the Switzerland, but now lets go trough some special cases to see the impact of some decision on the variables.&lt;br /&gt;
&lt;br /&gt;
==Scenario 1: Late lockdown==&lt;br /&gt;
&lt;br /&gt;
In this scenario we will see what could have happened if the government take 1 more day to react and to set up the lockdown. To simulate such a scenario I simply increase the number of &amp;quot;Ratio official cases/pop&amp;quot; in the function IF THEN ELSE in &amp;quot;contact&amp;quot; and &amp;quot;contagion rate&amp;quot; from 0.00015 to 0.00018 and it delay the reaction of the government for 1 day.&lt;br /&gt;
&lt;br /&gt;
[[File: Deathz1.png|450px|left]][[File: Deathz2.png|500px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graph, the total number of official cases (=total diagnosed) jump from 33 000 to 45 000 cases. An increase of 35% in the number of official cases by just delaying for 1 day the government decisions. It illustrates well the exponential effect on the model, indeed we don't have to forget that the delay is just one day but if it has been 4-5 days the number of cases would have been exponentially higher. The second graph shows the deaths jump from 1600 to 2300, that is due to increasing number of cases and the hospital capacity reaching more than 60% utilization. Indeed due to the lookup function if the hospital capacity exceed 60% the mortality increase in the hospital. This is a very interesting scenarios that shows quite well the importance of the early lockdown and highlight the most important point in our model, '''the reaction time'''.&lt;br /&gt;
&lt;br /&gt;
==Scenario 2: Small Hospital capacity==&lt;br /&gt;
&lt;br /&gt;
In this scenario the number of hospital beds goes from 356/100k people to 238/100k people, a loss of -10 000 in variable ''hospital bed'' for Switzerland. This number of beds corresponds to the number of beds for a less developing country, such as Iceland (https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704). &lt;br /&gt;
&lt;br /&gt;
[[File: Utiliz.png|500px|left]][[File: Dead.png|480px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graphs, the hospital utilization reach almost 80%. Patients are not treated as well as they would if the utilization was lower, and it involves more deaths for these patients (right graph). We can see the importance of hospital capacity and for government to have a '''good amount of hospitals'''.&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
To conclude I would say that it has been quite difficult to deal with the real data because I had to find every number or to adjust some variables to fit with the reality. Another difficulty that I had to faced was all times and units to setup. The model display almost the same numbers as the ones communicated by the Swiss government, what could indicate that the model are not too far from what is happening in real-life. &lt;br /&gt;
&lt;br /&gt;
The most important variable in the simulation is the '''reaction time''' of the government in order to take some measures against the fast spread of the virus, such as bringing more awareness or imposing a lockdown.&lt;br /&gt;
&lt;br /&gt;
A further exogenous variable here is the number of hospital beds, which is a good proxy for modeling different countries. Having a smaller number of beds is a sign of vulnerability for the health care system and will impact mortality. A solution to this pandemic could therefore be to increase the number of beds in order to avoid exceeding capacity. &lt;br /&gt;
&lt;br /&gt;
A limit to this simulation would be that it is a real pandemic, for example I first tried to simulate the full pandemic with the second pic (higher) as you can see in the graph of Switzerland but I have to admit that sometimes the reality (or my Vensim skills) are to difficult to simulate that is why I choose to stop the simulation after 100 days.&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
[[File:Simulation Covid-19.mdl]]&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
#Federal Office of Public Health FOPH, https://www.bag.admin.ch/bag/en/home.html&lt;br /&gt;
#Fismann, D. (2009), “Modellig an Influenza Pandemic: A Guide for the Perplexed”, CMAJ,August.&lt;br /&gt;
#Madhav, N. (2017), “Pandemics: Risks, Impacts, and Mitigation”, November.&lt;br /&gt;
#Federal Office of Public Health FOPH, https://www.bag.admin.ch/bag/en/home.html&lt;br /&gt;
#https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704&lt;br /&gt;
#https://www.covid19.admin.ch/en/epidemiologic/case?detTime=total&amp;amp;detRel=abs&lt;br /&gt;
#https://www.covid19.admin.ch/en/epidemiologic/death?detTime=total&amp;amp;detRel=abs&lt;/div&gt;</summary>
		<author><name>Toscool</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20287</id>
		<title>Impact of late lockdown and hospital capacity on 19-COVID spread</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20287"/>
		<updated>2021-01-07T16:34:49Z</updated>

		<summary type="html">&lt;p&gt;Toscool: /* Conclusion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Introduction&lt;br /&gt;
&lt;br /&gt;
=Problem definition=&lt;br /&gt;
&lt;br /&gt;
=Method=&lt;br /&gt;
&lt;br /&gt;
=Model=&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
&lt;br /&gt;
=Problem definition=&lt;br /&gt;
Crop rotation is based on growing a series of different types of crops in the same area in sequential seasons. The planned rotation may vary from a growing season to a few years or even longer periods. It is one of the most effective agricultural control strategies that is used in preventing the loss of soil fertility. It also helps in reducing soil erosion and increases crop yield. Planning an effective crop rotation requires weighing fixed and fluctuating production circumstances: market, farm size, labor supply, climate, soil type, growing practices, etc.&lt;br /&gt;
&lt;br /&gt;
In this simulation I will try to find parameters which have impact on the whole process of crop rotation with goal to find model providing desired outputs (these were slightly changed from concept) - crop yields, greenhouse gas emissions (N2O, CO2, NH4), soil fertility (nitrogen levels).&lt;br /&gt;
&lt;br /&gt;
I will focus on four crop rotation strategies with three different crops - corn, soybean, wheat:&lt;br /&gt;
&lt;br /&gt;
'''CCC''' (continuous corn) - only corn will be farmed for the whole observed time period (40 years)&lt;br /&gt;
&lt;br /&gt;
'''CS''' (corn-soybean) - rotation of corn and soybean will be used in year cycles for the whole observed time period (40 years), first year corn, second year soybean, repeat..&lt;br /&gt;
&lt;br /&gt;
'''SSS''' (continuous soybean) - only soybean will be farmed for the whole observed time period (40 years) &lt;br /&gt;
&lt;br /&gt;
'''CSW''' (corn-soybean-wheat) - rotation of corn, soybean and wheat will be used in year cycles for the whole observed time period (40 years), first year corn, second year soybean, third year wheat, repeat..&lt;br /&gt;
&lt;br /&gt;
Goal of this simulation is to observe dynamic changes with yields, greenhouse gas emissions, tillage strategy and soil nitrogen levels, while changing different crop rotation strategies.&lt;br /&gt;
&lt;br /&gt;
=Method=&lt;br /&gt;
&lt;br /&gt;
Vensim modelling approach was selected due to dynamic behavior of the simulated system.&lt;br /&gt;
&lt;br /&gt;
Our model shows the evolution of the number of people who got infected by the covid-19 virus in&lt;br /&gt;
countries where the population have a high health care protection and where the government has&lt;br /&gt;
decided to make a decision about the virus propagation. The model will explain us how fast the&lt;br /&gt;
virus spreads itself and how political decisions can change the number of infected people at a&lt;br /&gt;
given point in time. The construction of our model is simple: at the beginning one person is&lt;br /&gt;
infected and will, then, infect other people. When you are infected many possibilities are open:&lt;br /&gt;
- You can be a healthy virus carrier. In that case you will not know that you have the virus and&lt;br /&gt;
after 19 days you will be recovered.&lt;br /&gt;
- After 5 days you get symptoms, but you do not have any important health problems, you will&lt;br /&gt;
recover in the next 14 days.&lt;br /&gt;
- After 5 days, you get symptoms and you are very sick and have respiratory problems, after 5&lt;br /&gt;
more days, still feeling bad, you decide to go to the doctor to get a diagnosis. The doctor has than&lt;br /&gt;
two options: to send you back home, where you will recover after 9 more days or hospitalized you&lt;br /&gt;
the next day.&lt;br /&gt;
- The doctor had decided to hospitalize you, you then spend two weeks in intensive care, where&lt;br /&gt;
you will need artificial ventilation and 24-hour nursing care. You can then recover or unfortunately&lt;br /&gt;
die. The higher the hospital utilisation, the greater the probability to die. Indeed, if hospitals get&lt;br /&gt;
busier, the medical staff will be less available and health care quality might decrease.&lt;br /&gt;
When the number of diagnosed and hospitalised people (which are the official number of cases)&lt;br /&gt;
is greater than 3% of the population, the government will take decisions to slow down the spread&lt;br /&gt;
of the virus. This is to say that governments will take some measures, such as installing a forced&lt;br /&gt;
lockdown of the population to decrease the number of contacts per habitant. Moreover, such a&lt;br /&gt;
decision will have an impact of the population, which will be more aware of the situation and will&lt;br /&gt;
be more careful to not spread or contract the virus. So, the contagion rate as the number of contacts&lt;br /&gt;
per people will slow down. They will be less hospitalised people, that means less people in the&lt;br /&gt;
hospital, meaning a better service and so less people who die.&lt;br /&gt;
&lt;br /&gt;
=Model=&lt;br /&gt;
&lt;br /&gt;
Following vensim model was developed based on the study.&lt;br /&gt;
&lt;br /&gt;
[[File:Model1.png|900px|thumb|center|COVID-19 pandemic in Switzerland Stock Flow Diagram]]&lt;br /&gt;
&lt;br /&gt;
== Variables ==&lt;br /&gt;
&lt;br /&gt;
===Initial population=== &lt;br /&gt;
''The Population of Switzerland can be found here: https://en.wikipedia.org/wiki/Demographics_of_Switzerland''&lt;br /&gt;
&lt;br /&gt;
=8 500 000&lt;br /&gt;
&lt;br /&gt;
===Ratio susceptible people=== &lt;br /&gt;
''Decrease the susceptible people by the number of deaths due to the COVID-19.''&lt;br /&gt;
&lt;br /&gt;
=Susceptible population / (Initial population-Dead)&lt;br /&gt;
&lt;br /&gt;
===Susceptible population=== &lt;br /&gt;
''Decrease the susceptible population by the number of new infections.''&lt;br /&gt;
&lt;br /&gt;
=-New infections&lt;br /&gt;
&lt;br /&gt;
===contact=== &lt;br /&gt;
'''Lockdown:''' ''Function IF THEN ELSE that bring the number of new people you meet (contact) from 5 to 0.05 if the ratio exceed 0.015%''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot;&amp;gt; 0.00015, 0.05 , 5 )&lt;br /&gt;
&lt;br /&gt;
===Contagion Rate=== &lt;br /&gt;
'''Lockdown:''' ''contagion rate: IF THEN ELSE that bring the contagion rate from 0.1 to 0.075 if the ratio exceed 0.015%. Function of the awareness in the population (washing more often their hands if lockdown)''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot; &amp;gt; 0.00015 , 0.075 , 0.1 )&lt;br /&gt;
&lt;br /&gt;
===New infections=== &lt;br /&gt;
''It represent the new number of people infected each day.''&lt;br /&gt;
&lt;br /&gt;
=contact*Infected*Ratio susceptible people*Contagion Rate&lt;br /&gt;
&lt;br /&gt;
===Infected=== &lt;br /&gt;
''It represent the stock of the new people infected. We start the model with 1 infected people.''&lt;br /&gt;
&lt;br /&gt;
=New infections-New recoveries from infected-New symptoms ///// Initial value: 1&lt;br /&gt;
&lt;br /&gt;
===New recoveries from infected===&lt;br /&gt;
''It represent the number of people without symptoms and they go in the recovered stock after 19 days.''&lt;br /&gt;
&lt;br /&gt;
=((1-Ratio Symptoms)*Infected)/TTA recoveries&lt;br /&gt;
&lt;br /&gt;
===New symptoms=== &lt;br /&gt;
''It represent the number of new people that develop symptoms during 5 days before going to the symptomatic stock.''&lt;br /&gt;
&lt;br /&gt;
=(Infected*Ratio Symptoms)/TTA Symptoms&lt;br /&gt;
&lt;br /&gt;
===Ratio Symptoms=== &lt;br /&gt;
''The ratio of people who develop some symptoms.''&lt;br /&gt;
&lt;br /&gt;
=0.2&lt;br /&gt;
&lt;br /&gt;
===Symptomatic=== &lt;br /&gt;
''The stock of people symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=New symptoms-New Diagnostic-New recoveries from symptoms&lt;br /&gt;
&lt;br /&gt;
===New recoveries from symptoms=== &lt;br /&gt;
''It represent the number of people that have symptoms but that were not to the doctor, after 14 they are in the recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Diagnost)*Symptomatic/TTA sympt&lt;br /&gt;
&lt;br /&gt;
===New Diagnostic=== &lt;br /&gt;
''It represent the number of new people that are diagnosed each day, they stay 3 days before having the diagnostic.''&lt;br /&gt;
&lt;br /&gt;
=Symptomatic*Ratio Diagnost/TTA Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Ratio Diagnost===&lt;br /&gt;
''the ratio of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=0.4&lt;br /&gt;
&lt;br /&gt;
===Diagnosed=== &lt;br /&gt;
''The stock of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic-New Hospitalization-New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===New Recovery from Diagnostic===&lt;br /&gt;
''It represent the number of people that are diagnosed and not sent to the hospital. they stay 9 days before going in the Recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Hospitalize)*Diagnosed/TTA diag&lt;br /&gt;
&lt;br /&gt;
===New Hospitalization=== &lt;br /&gt;
''It represent the number of people that are diagnosed and sent to the hospital. they stay 1 day before being sent.''&lt;br /&gt;
&lt;br /&gt;
=(Diagnosed*Ratio Hospitalize)/TTA Hospitalization Ratio Hospitalize&lt;br /&gt;
&lt;br /&gt;
===Ratio Hospitalize===&lt;br /&gt;
''The ratio of people that are Hospitalized.''&lt;br /&gt;
&lt;br /&gt;
=0.3&lt;br /&gt;
&lt;br /&gt;
===Hospitalized=== &lt;br /&gt;
''The stock of people that are hospitalized before being Recovered or Dead.''&lt;br /&gt;
&lt;br /&gt;
=New Hospitalization-New Death-New Recovery&lt;br /&gt;
&lt;br /&gt;
===New Recovery=== &lt;br /&gt;
''The number of people that recover each day from the hospitalization. It depends from the Mortality Rate which is depend from the hospital utilization (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=((1-Mortality Rate)*Hospitalized)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===New Death===&lt;br /&gt;
''The number of people that die each day from the hospitalization. It depends from the Mortality Rate which is depend from the hospital utilization (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized*Mortality Rate)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===hospital bed=== &lt;br /&gt;
''The number of bed in Switzerland 356 beds for 100k people with 8.5M people it gives that number: https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704''&lt;br /&gt;
&lt;br /&gt;
=30260&lt;br /&gt;
&lt;br /&gt;
===hospital utilization=== &lt;br /&gt;
''The utilization of the hospital we assume that there is already 8260 beds used for patient outside the covid pandemic. The more utilization we have, the greater the probability to die. Indeed, if hospitals get busier, the medical staff will be less available and health care quality might decrease.''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized/(hospital bed - 8260)) &lt;br /&gt;
&lt;br /&gt;
===lk mortality===&lt;br /&gt;
''The lookup function is used to described the mortality rate.''&lt;br /&gt;
&lt;br /&gt;
[(0,0)-(1000,0.3)],(0,0.065),(0.6,0.065),(0.8,0.12),(1,0.25),(1.2,0.3),(10,0.3),(1000,0.3)&lt;br /&gt;
&lt;br /&gt;
===Mortality Rate=== &lt;br /&gt;
''The mortality rate depends on the hospital utilization. For example based on the above function, if the capacity reach 100% the hospital is full and the chance to die is then 25%.''&lt;br /&gt;
&lt;br /&gt;
=lk mortality (hospital utilization)&lt;br /&gt;
&lt;br /&gt;
===Dead=== &lt;br /&gt;
''The stock of Dead people killed by the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New Death&lt;br /&gt;
&lt;br /&gt;
===Recovered=== &lt;br /&gt;
''The Total amount of people who recovered from the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New recoveries from infected+New recoveries from symptoms+New Recovery+New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===official active cases===&lt;br /&gt;
''It represent the number of people that were tested and it's this number that will be used by the government to follow the pandemic and take decision of lockdown.''&lt;br /&gt;
&lt;br /&gt;
=Diagnosed+Hosptitalized&lt;br /&gt;
&lt;br /&gt;
===Ratio official cases/pop=== &lt;br /&gt;
''The ratio that will be used for lockdown. ''&lt;br /&gt;
&lt;br /&gt;
=official active cases/ Initial population&lt;br /&gt;
&lt;br /&gt;
===New Diagnosed.1=== &lt;br /&gt;
''It's is just the same as New Diagnostic, it is used in the model to have the Total Diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Total Diagnosed=== &lt;br /&gt;
''Used in the model to have the official number of cases in the model.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnosed.1&lt;br /&gt;
&lt;br /&gt;
===TTA recoveries=== &lt;br /&gt;
''Time to recover after being infected and not having symptoms.''&lt;br /&gt;
&lt;br /&gt;
=19&lt;br /&gt;
&lt;br /&gt;
===TTA Symptoms=== &lt;br /&gt;
''The time you take to develop symptoms.''&lt;br /&gt;
&lt;br /&gt;
=5&lt;br /&gt;
&lt;br /&gt;
===TTA sympt===&lt;br /&gt;
''The time you take for recovering after being symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
===TTA Diagnostic=== &lt;br /&gt;
''Time to go to the doctor and have the result.''&lt;br /&gt;
&lt;br /&gt;
=3&lt;br /&gt;
&lt;br /&gt;
===TTA diag===&lt;br /&gt;
''The time you take for recovering after being diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=11&lt;br /&gt;
&lt;br /&gt;
===TTA Hospitalization=== &lt;br /&gt;
''Time to go to the Hospital.''&lt;br /&gt;
&lt;br /&gt;
=1&lt;br /&gt;
&lt;br /&gt;
===TTA Hospital===&lt;br /&gt;
''The time you stay at the hospital before recovering or dying.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
As explained in the problem definition we will focused our results on 3 cases. The first one is the normal scenario, the second is the same scenario but the lockdown is delayed for 1 day, and the last scenario is the normal scenario with a number of hospital beds reduce by 10 000 beds.&lt;br /&gt;
&lt;br /&gt;
==Normal Scenario==&lt;br /&gt;
&lt;br /&gt;
The first scenario take place in Switzerland with 8 500 000 peoples and a hospital capacity of 356 beds for 100k people. The first case was detected the 25 february 2019 and 20 days after the Government of Switzerland have decided to take some serious measures that is in our case represented by a lockdown. &lt;br /&gt;
&lt;br /&gt;
The following table show us the official number of new cases per day:&lt;br /&gt;
&lt;br /&gt;
[[File:Newcases.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
From the simulation we get:&lt;br /&gt;
&lt;br /&gt;
[[File:Yes.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
We can see that the model is really closed to the reality with a pic of 1350 after 35 days. The simulation stopped after 100 days so we just want to focused on these first 100 days. The reality display a pic at 1243 days after 30 days.&lt;br /&gt;
&lt;br /&gt;
The true number of new death per day, and the number from the simulation is also display below:&lt;br /&gt;
&lt;br /&gt;
[[File: deat.png|500px|left]]        [[File:Deats.18.png|500px|rigth]]&lt;br /&gt;
&lt;br /&gt;
We can see that the model is one more time really closed to the reality with a pic of 43 deaths after 50 days, while the reality display a pic at 44 days after 36 days.&lt;br /&gt;
&lt;br /&gt;
We have seen that the simulation is really closed from the data obtained for the Switzerland, but now lets go trough some special cases to see the impact of some decision on the variables.&lt;br /&gt;
&lt;br /&gt;
==Scenario 1: Late lockdown==&lt;br /&gt;
&lt;br /&gt;
In this scenario we will see what could have happened if the government take 1 more day to react and to set up the lockdown. To simulate such a scenario I simply increase the number of &amp;quot;Ratio official cases/pop&amp;quot; in the function IF THEN ELSE in &amp;quot;contact&amp;quot; and &amp;quot;contagion rate&amp;quot; from 0.00015 to 0.00018 and it delay the reaction of the government for 1 day.&lt;br /&gt;
&lt;br /&gt;
[[File: Deathz1.png|450px|left]][[File: Deathz2.png|500px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graph, the total number of official cases (=total diagnosed) jump from 33 000 to 45 000 cases. An increase of 35% in the number of official cases by just delaying for 1 day the government decisions. It illustrates well the exponential effect on the model, indeed we don't have to forget that the delay is just one day but if it has been 4-5 days the number of cases would have been exponentially higher. The second graph shows the deaths jump from 1600 to 2300, that is due to increasing number of cases and the hospital capacity reaching more than 60% utilization. Indeed due to the lookup function if the hospital capacity exceed 60% the mortality increase in the hospital. This is a very interesting scenarios that shows quite well the importance of the early lockdown and highlight the most important point in our model, '''the reaction time'''.&lt;br /&gt;
&lt;br /&gt;
==Scenario 2: Small Hospital capacity==&lt;br /&gt;
&lt;br /&gt;
In this scenario the number of hospital beds goes from 356/100k people to 238/100k people, a loss of -10 000 in variable ''hospital bed'' for Switzerland. This number of beds corresponds to the number of beds for a less developing country, such as Iceland (https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704). &lt;br /&gt;
&lt;br /&gt;
[[File: Utiliz.png|500px|left]][[File: Dead.png|480px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graphs, the hospital utilization reach almost 80%. Patients are not treated as well as they would if the utilization was lower, and it involves more deaths for these patients (right graph). We can see the importance of hospital capacity and for government to have a '''good amount of hospitals'''.&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
To conclude I would say that it has been quite difficult to deal with the real data because I had to find every number or to adjust some variables to fit with the reality. Another difficulty that I had to faced was all times and units to setup. The model display almost the same numbers as the ones communicated by the Swiss government, what could indicate that the model are not too far from what is happening in real-life. &lt;br /&gt;
&lt;br /&gt;
The most important variable in the simulation is the '''reaction time''' of the government in order to take some measures against the fast spread of the virus, such as bringing more awareness or imposing a lockdown.&lt;br /&gt;
&lt;br /&gt;
A further exogenous variable here is the number of hospital beds, which is a good proxy for modeling different countries. Having a smaller number of beds is a sign of vulnerability for the health care system and will impact mortality. A solution to this pandemic could therefore be to increase the number of beds in order to avoid exceeding capacity. &lt;br /&gt;
&lt;br /&gt;
A limit to this simulation would be that it is a real pandemic, for example I first tried to simulate the full pandemic with the second pic (higher) as you can see in the graph of Switzerland but I have to admit that sometimes the reality (or my Vensim skills) are to difficult to simulate that is why I choose to stop the simulation after 100 days.&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
[[File:Simulation Covid-19.mdl]]&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
#BEHNKE, Gevan D., Stacy M. ZUBER, Cameron M. PITTELKOW, Emerson D. NAFZIGER a María B. VILLAMIL. Long-term crop rotation and tillage effects on soil greenhouse gas emissions and crop production in Illinois, USA. Agriculture, Ecosystems &amp;amp; Environment [online]. 2018, 261, 62-70 [cit. 2020-01-26]. DOI: 10.1016/j.agee.2018.03.007. ISSN 01678809. Availiable: https://linkinghub.elsevier.com/retrieve/pii/S0167880918301221&lt;br /&gt;
#KOLLAS, Chris, Kurt Christian KERSEBAUM, Claas NENDEL, et al. Crop rotation modelling—A European model intercomparison. European Journal of Agronomy [online]. 2015, 70, 98-111 [cit. 2020-01-26]. DOI: 10.1016/j.eja.2015.06.007. ISSN 11610301. Availiable: https://linkinghub.elsevier.com/retrieve/pii/S1161030115300010&lt;br /&gt;
#BRANKATSCHK, Gerhard a Matthias FINKBEINER. Modeling crop rotation in agricultural LCAs — Challenges and potential solutions. Agricultural Systems [online]. 2015, 138, 66-76 [cit. 2020-01-26]. DOI: 10.1016/j.agsy.2015.05.008. ISSN 0308521X. Availiable: https://linkinghub.elsevier.com/retrieve/pii/S0308521X1500075X&lt;/div&gt;</summary>
		<author><name>Toscool</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20286</id>
		<title>Impact of late lockdown and hospital capacity on 19-COVID spread</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20286"/>
		<updated>2021-01-07T16:33:44Z</updated>

		<summary type="html">&lt;p&gt;Toscool: /* Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Introduction&lt;br /&gt;
&lt;br /&gt;
=Problem definition=&lt;br /&gt;
&lt;br /&gt;
=Method=&lt;br /&gt;
&lt;br /&gt;
=Model=&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
&lt;br /&gt;
=Problem definition=&lt;br /&gt;
Crop rotation is based on growing a series of different types of crops in the same area in sequential seasons. The planned rotation may vary from a growing season to a few years or even longer periods. It is one of the most effective agricultural control strategies that is used in preventing the loss of soil fertility. It also helps in reducing soil erosion and increases crop yield. Planning an effective crop rotation requires weighing fixed and fluctuating production circumstances: market, farm size, labor supply, climate, soil type, growing practices, etc.&lt;br /&gt;
&lt;br /&gt;
In this simulation I will try to find parameters which have impact on the whole process of crop rotation with goal to find model providing desired outputs (these were slightly changed from concept) - crop yields, greenhouse gas emissions (N2O, CO2, NH4), soil fertility (nitrogen levels).&lt;br /&gt;
&lt;br /&gt;
I will focus on four crop rotation strategies with three different crops - corn, soybean, wheat:&lt;br /&gt;
&lt;br /&gt;
'''CCC''' (continuous corn) - only corn will be farmed for the whole observed time period (40 years)&lt;br /&gt;
&lt;br /&gt;
'''CS''' (corn-soybean) - rotation of corn and soybean will be used in year cycles for the whole observed time period (40 years), first year corn, second year soybean, repeat..&lt;br /&gt;
&lt;br /&gt;
'''SSS''' (continuous soybean) - only soybean will be farmed for the whole observed time period (40 years) &lt;br /&gt;
&lt;br /&gt;
'''CSW''' (corn-soybean-wheat) - rotation of corn, soybean and wheat will be used in year cycles for the whole observed time period (40 years), first year corn, second year soybean, third year wheat, repeat..&lt;br /&gt;
&lt;br /&gt;
Goal of this simulation is to observe dynamic changes with yields, greenhouse gas emissions, tillage strategy and soil nitrogen levels, while changing different crop rotation strategies.&lt;br /&gt;
&lt;br /&gt;
=Method=&lt;br /&gt;
&lt;br /&gt;
Vensim modelling approach was selected due to dynamic behavior of the simulated system.&lt;br /&gt;
&lt;br /&gt;
Our model shows the evolution of the number of people who got infected by the covid-19 virus in&lt;br /&gt;
countries where the population have a high health care protection and where the government has&lt;br /&gt;
decided to make a decision about the virus propagation. The model will explain us how fast the&lt;br /&gt;
virus spreads itself and how political decisions can change the number of infected people at a&lt;br /&gt;
given point in time. The construction of our model is simple: at the beginning one person is&lt;br /&gt;
infected and will, then, infect other people. When you are infected many possibilities are open:&lt;br /&gt;
- You can be a healthy virus carrier. In that case you will not know that you have the virus and&lt;br /&gt;
after 19 days you will be recovered.&lt;br /&gt;
- After 5 days you get symptoms, but you do not have any important health problems, you will&lt;br /&gt;
recover in the next 14 days.&lt;br /&gt;
- After 5 days, you get symptoms and you are very sick and have respiratory problems, after 5&lt;br /&gt;
more days, still feeling bad, you decide to go to the doctor to get a diagnosis. The doctor has than&lt;br /&gt;
two options: to send you back home, where you will recover after 9 more days or hospitalized you&lt;br /&gt;
the next day.&lt;br /&gt;
- The doctor had decided to hospitalize you, you then spend two weeks in intensive care, where&lt;br /&gt;
you will need artificial ventilation and 24-hour nursing care. You can then recover or unfortunately&lt;br /&gt;
die. The higher the hospital utilisation, the greater the probability to die. Indeed, if hospitals get&lt;br /&gt;
busier, the medical staff will be less available and health care quality might decrease.&lt;br /&gt;
When the number of diagnosed and hospitalised people (which are the official number of cases)&lt;br /&gt;
is greater than 3% of the population, the government will take decisions to slow down the spread&lt;br /&gt;
of the virus. This is to say that governments will take some measures, such as installing a forced&lt;br /&gt;
lockdown of the population to decrease the number of contacts per habitant. Moreover, such a&lt;br /&gt;
decision will have an impact of the population, which will be more aware of the situation and will&lt;br /&gt;
be more careful to not spread or contract the virus. So, the contagion rate as the number of contacts&lt;br /&gt;
per people will slow down. They will be less hospitalised people, that means less people in the&lt;br /&gt;
hospital, meaning a better service and so less people who die.&lt;br /&gt;
&lt;br /&gt;
=Model=&lt;br /&gt;
&lt;br /&gt;
Following vensim model was developed based on the study.&lt;br /&gt;
&lt;br /&gt;
[[File:Model1.png|900px|thumb|center|COVID-19 pandemic in Switzerland Stock Flow Diagram]]&lt;br /&gt;
&lt;br /&gt;
== Variables ==&lt;br /&gt;
&lt;br /&gt;
===Initial population=== &lt;br /&gt;
''The Population of Switzerland can be found here: https://en.wikipedia.org/wiki/Demographics_of_Switzerland''&lt;br /&gt;
&lt;br /&gt;
=8 500 000&lt;br /&gt;
&lt;br /&gt;
===Ratio susceptible people=== &lt;br /&gt;
''Decrease the susceptible people by the number of deaths due to the COVID-19.''&lt;br /&gt;
&lt;br /&gt;
=Susceptible population / (Initial population-Dead)&lt;br /&gt;
&lt;br /&gt;
===Susceptible population=== &lt;br /&gt;
''Decrease the susceptible population by the number of new infections.''&lt;br /&gt;
&lt;br /&gt;
=-New infections&lt;br /&gt;
&lt;br /&gt;
===contact=== &lt;br /&gt;
'''Lockdown:''' ''Function IF THEN ELSE that bring the number of new people you meet (contact) from 5 to 0.05 if the ratio exceed 0.015%''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot;&amp;gt; 0.00015, 0.05 , 5 )&lt;br /&gt;
&lt;br /&gt;
===Contagion Rate=== &lt;br /&gt;
'''Lockdown:''' ''contagion rate: IF THEN ELSE that bring the contagion rate from 0.1 to 0.075 if the ratio exceed 0.015%. Function of the awareness in the population (washing more often their hands if lockdown)''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot; &amp;gt; 0.00015 , 0.075 , 0.1 )&lt;br /&gt;
&lt;br /&gt;
===New infections=== &lt;br /&gt;
''It represent the new number of people infected each day.''&lt;br /&gt;
&lt;br /&gt;
=contact*Infected*Ratio susceptible people*Contagion Rate&lt;br /&gt;
&lt;br /&gt;
===Infected=== &lt;br /&gt;
''It represent the stock of the new people infected. We start the model with 1 infected people.''&lt;br /&gt;
&lt;br /&gt;
=New infections-New recoveries from infected-New symptoms ///// Initial value: 1&lt;br /&gt;
&lt;br /&gt;
===New recoveries from infected===&lt;br /&gt;
''It represent the number of people without symptoms and they go in the recovered stock after 19 days.''&lt;br /&gt;
&lt;br /&gt;
=((1-Ratio Symptoms)*Infected)/TTA recoveries&lt;br /&gt;
&lt;br /&gt;
===New symptoms=== &lt;br /&gt;
''It represent the number of new people that develop symptoms during 5 days before going to the symptomatic stock.''&lt;br /&gt;
&lt;br /&gt;
=(Infected*Ratio Symptoms)/TTA Symptoms&lt;br /&gt;
&lt;br /&gt;
===Ratio Symptoms=== &lt;br /&gt;
''The ratio of people who develop some symptoms.''&lt;br /&gt;
&lt;br /&gt;
=0.2&lt;br /&gt;
&lt;br /&gt;
===Symptomatic=== &lt;br /&gt;
''The stock of people symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=New symptoms-New Diagnostic-New recoveries from symptoms&lt;br /&gt;
&lt;br /&gt;
===New recoveries from symptoms=== &lt;br /&gt;
''It represent the number of people that have symptoms but that were not to the doctor, after 14 they are in the recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Diagnost)*Symptomatic/TTA sympt&lt;br /&gt;
&lt;br /&gt;
===New Diagnostic=== &lt;br /&gt;
''It represent the number of new people that are diagnosed each day, they stay 3 days before having the diagnostic.''&lt;br /&gt;
&lt;br /&gt;
=Symptomatic*Ratio Diagnost/TTA Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Ratio Diagnost===&lt;br /&gt;
''the ratio of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=0.4&lt;br /&gt;
&lt;br /&gt;
===Diagnosed=== &lt;br /&gt;
''The stock of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic-New Hospitalization-New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===New Recovery from Diagnostic===&lt;br /&gt;
''It represent the number of people that are diagnosed and not sent to the hospital. they stay 9 days before going in the Recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Hospitalize)*Diagnosed/TTA diag&lt;br /&gt;
&lt;br /&gt;
===New Hospitalization=== &lt;br /&gt;
''It represent the number of people that are diagnosed and sent to the hospital. they stay 1 day before being sent.''&lt;br /&gt;
&lt;br /&gt;
=(Diagnosed*Ratio Hospitalize)/TTA Hospitalization Ratio Hospitalize&lt;br /&gt;
&lt;br /&gt;
===Ratio Hospitalize===&lt;br /&gt;
''The ratio of people that are Hospitalized.''&lt;br /&gt;
&lt;br /&gt;
=0.3&lt;br /&gt;
&lt;br /&gt;
===Hospitalized=== &lt;br /&gt;
''The stock of people that are hospitalized before being Recovered or Dead.''&lt;br /&gt;
&lt;br /&gt;
=New Hospitalization-New Death-New Recovery&lt;br /&gt;
&lt;br /&gt;
===New Recovery=== &lt;br /&gt;
''The number of people that recover each day from the hospitalization. It depends from the Mortality Rate which is depend from the hospital utilization (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=((1-Mortality Rate)*Hospitalized)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===New Death===&lt;br /&gt;
''The number of people that die each day from the hospitalization. It depends from the Mortality Rate which is depend from the hospital utilization (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized*Mortality Rate)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===hospital bed=== &lt;br /&gt;
''The number of bed in Switzerland 356 beds for 100k people with 8.5M people it gives that number: https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704''&lt;br /&gt;
&lt;br /&gt;
=30260&lt;br /&gt;
&lt;br /&gt;
===hospital utilization=== &lt;br /&gt;
''The utilization of the hospital we assume that there is already 8260 beds used for patient outside the covid pandemic. The more utilization we have, the greater the probability to die. Indeed, if hospitals get busier, the medical staff will be less available and health care quality might decrease.''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized/(hospital bed - 8260)) &lt;br /&gt;
&lt;br /&gt;
===lk mortality===&lt;br /&gt;
''The lookup function is used to described the mortality rate.''&lt;br /&gt;
&lt;br /&gt;
[(0,0)-(1000,0.3)],(0,0.065),(0.6,0.065),(0.8,0.12),(1,0.25),(1.2,0.3),(10,0.3),(1000,0.3)&lt;br /&gt;
&lt;br /&gt;
===Mortality Rate=== &lt;br /&gt;
''The mortality rate depends on the hospital utilization. For example based on the above function, if the capacity reach 100% the hospital is full and the chance to die is then 25%.''&lt;br /&gt;
&lt;br /&gt;
=lk mortality (hospital utilization)&lt;br /&gt;
&lt;br /&gt;
===Dead=== &lt;br /&gt;
''The stock of Dead people killed by the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New Death&lt;br /&gt;
&lt;br /&gt;
===Recovered=== &lt;br /&gt;
''The Total amount of people who recovered from the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New recoveries from infected+New recoveries from symptoms+New Recovery+New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===official active cases===&lt;br /&gt;
''It represent the number of people that were tested and it's this number that will be used by the government to follow the pandemic and take decision of lockdown.''&lt;br /&gt;
&lt;br /&gt;
=Diagnosed+Hosptitalized&lt;br /&gt;
&lt;br /&gt;
===Ratio official cases/pop=== &lt;br /&gt;
''The ratio that will be used for lockdown. ''&lt;br /&gt;
&lt;br /&gt;
=official active cases/ Initial population&lt;br /&gt;
&lt;br /&gt;
===New Diagnosed.1=== &lt;br /&gt;
''It's is just the same as New Diagnostic, it is used in the model to have the Total Diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Total Diagnosed=== &lt;br /&gt;
''Used in the model to have the official number of cases in the model.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnosed.1&lt;br /&gt;
&lt;br /&gt;
===TTA recoveries=== &lt;br /&gt;
''Time to recover after being infected and not having symptoms.''&lt;br /&gt;
&lt;br /&gt;
=19&lt;br /&gt;
&lt;br /&gt;
===TTA Symptoms=== &lt;br /&gt;
''The time you take to develop symptoms.''&lt;br /&gt;
&lt;br /&gt;
=5&lt;br /&gt;
&lt;br /&gt;
===TTA sympt===&lt;br /&gt;
''The time you take for recovering after being symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
===TTA Diagnostic=== &lt;br /&gt;
''Time to go to the doctor and have the result.''&lt;br /&gt;
&lt;br /&gt;
=3&lt;br /&gt;
&lt;br /&gt;
===TTA diag===&lt;br /&gt;
''The time you take for recovering after being diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=11&lt;br /&gt;
&lt;br /&gt;
===TTA Hospitalization=== &lt;br /&gt;
''Time to go to the Hospital.''&lt;br /&gt;
&lt;br /&gt;
=1&lt;br /&gt;
&lt;br /&gt;
===TTA Hospital===&lt;br /&gt;
''The time you stay at the hospital before recovering or dying.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
As explained in the problem definition we will focused our results on 3 cases. The first one is the normal scenario, the second is the same scenario but the lockdown is delayed for 1 day, and the last scenario is the normal scenario with a number of hospital beds reduce by 10 000 beds.&lt;br /&gt;
&lt;br /&gt;
==Normal Scenario==&lt;br /&gt;
&lt;br /&gt;
The first scenario take place in Switzerland with 8 500 000 peoples and a hospital capacity of 356 beds for 100k people. The first case was detected the 25 february 2019 and 20 days after the Government of Switzerland have decided to take some serious measures that is in our case represented by a lockdown. &lt;br /&gt;
&lt;br /&gt;
The following table show us the official number of new cases per day:&lt;br /&gt;
&lt;br /&gt;
[[File:Newcases.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
From the simulation we get:&lt;br /&gt;
&lt;br /&gt;
[[File:Yes.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
We can see that the model is really closed to the reality with a pic of 1350 after 35 days. The simulation stopped after 100 days so we just want to focused on these first 100 days. The reality display a pic at 1243 days after 30 days.&lt;br /&gt;
&lt;br /&gt;
The true number of new death per day, and the number from the simulation is also display below:&lt;br /&gt;
&lt;br /&gt;
[[File: deat.png|500px|left]]        [[File:Deats.18.png|500px|rigth]]&lt;br /&gt;
&lt;br /&gt;
We can see that the model is one more time really closed to the reality with a pic of 43 deaths after 50 days, while the reality display a pic at 44 days after 36 days.&lt;br /&gt;
&lt;br /&gt;
We have seen that the simulation is really closed from the data obtained for the Switzerland, but now lets go trough some special cases to see the impact of some decision on the variables.&lt;br /&gt;
&lt;br /&gt;
==Scenario 1: Late lockdown==&lt;br /&gt;
&lt;br /&gt;
In this scenario we will see what could have happened if the government take 1 more day to react and to set up the lockdown. To simulate such a scenario I simply increase the number of &amp;quot;Ratio official cases/pop&amp;quot; in the function IF THEN ELSE in &amp;quot;contact&amp;quot; and &amp;quot;contagion rate&amp;quot; from 0.00015 to 0.00018 and it delay the reaction of the government for 1 day.&lt;br /&gt;
&lt;br /&gt;
[[File: Deathz1.png|450px|left]][[File: Deathz2.png|500px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graph, the total number of official cases (=total diagnosed) jump from 33 000 to 45 000 cases. An increase of 35% in the number of official cases by just delaying for 1 day the government decisions. It illustrates well the exponential effect on the model, indeed we don't have to forget that the delay is just one day but if it has been 4-5 days the number of cases would have been exponentially higher. The second graph shows the deaths jump from 1600 to 2300, that is due to increasing number of cases and the hospital capacity reaching more than 60% utilization. Indeed due to the lookup function if the hospital capacity exceed 60% the mortality increase in the hospital. This is a very interesting scenarios that shows quite well the importance of the early lockdown and highlight the most important point in our model, '''the reaction time'''.&lt;br /&gt;
&lt;br /&gt;
==Scenario 2: Small Hospital capacity==&lt;br /&gt;
&lt;br /&gt;
In this scenario the number of hospital beds goes from 356/100k people to 238/100k people, a loss of -10 000 in variable ''hospital bed'' for Switzerland. This number of beds corresponds to the number of beds for a less developing country, such as Iceland (https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704). &lt;br /&gt;
&lt;br /&gt;
[[File: Utiliz.png|500px|left]][[File: Dead.png|480px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graphs, the hospital utilization reach almost 80%. Patients are not treated as well as they would if the utilization was lower, and it involves more deaths for these patients (right graph). We can see the importance of hospital capacity and for government to have a '''good amount of hospitals'''.&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
To conclude I would say that it has been quite difficult to deal with the real data because I had to find every number or to adjust some variables to fit with the reality. The model display almost the same numbers as the ones communicated by the swiss government, what could indicate that the model are not too far from what is happening in real-life. &lt;br /&gt;
The most important variable in the simulation is the '''reaction time''' of the government in order to take some measures against the fast spread of the virus, such as bringing more awareness or imposing a lockdown.&lt;br /&gt;
A further exogenous variable here is the number of hospital beds, which is a good proxy for modeling different countries. Having a smaller number of beds is a sign of vulnerability for the health care system and will impact mortality. A solution to this pandemic could therefore be to increase the number of beds in order to avoid exceeding capacity. &lt;br /&gt;
A limit to this simulation would be that it is a real pandemic, for example I first tried to simulate the full pandemic with the second pic (higher) as you can see in the graph of Switzerland but I have to admit that sometimes the reality (or my Vensim skills) are to difficult to simulate that is why I choose to stop the simulation after 100 days.&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
[[File:Simulation Covid-19.mdl]]&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
#BEHNKE, Gevan D., Stacy M. ZUBER, Cameron M. PITTELKOW, Emerson D. NAFZIGER a María B. VILLAMIL. Long-term crop rotation and tillage effects on soil greenhouse gas emissions and crop production in Illinois, USA. Agriculture, Ecosystems &amp;amp; Environment [online]. 2018, 261, 62-70 [cit. 2020-01-26]. DOI: 10.1016/j.agee.2018.03.007. ISSN 01678809. Availiable: https://linkinghub.elsevier.com/retrieve/pii/S0167880918301221&lt;br /&gt;
#KOLLAS, Chris, Kurt Christian KERSEBAUM, Claas NENDEL, et al. Crop rotation modelling—A European model intercomparison. European Journal of Agronomy [online]. 2015, 70, 98-111 [cit. 2020-01-26]. DOI: 10.1016/j.eja.2015.06.007. ISSN 11610301. Availiable: https://linkinghub.elsevier.com/retrieve/pii/S1161030115300010&lt;br /&gt;
#BRANKATSCHK, Gerhard a Matthias FINKBEINER. Modeling crop rotation in agricultural LCAs — Challenges and potential solutions. Agricultural Systems [online]. 2015, 138, 66-76 [cit. 2020-01-26]. DOI: 10.1016/j.agsy.2015.05.008. ISSN 0308521X. Availiable: https://linkinghub.elsevier.com/retrieve/pii/S0308521X1500075X&lt;/div&gt;</summary>
		<author><name>Toscool</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=File:Simulation_Covid-19.mdl&amp;diff=20285</id>
		<title>File:Simulation Covid-19.mdl</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=File:Simulation_Covid-19.mdl&amp;diff=20285"/>
		<updated>2021-01-07T16:32:58Z</updated>

		<summary type="html">&lt;p&gt;Toscool: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Toscool</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20284</id>
		<title>Impact of late lockdown and hospital capacity on 19-COVID spread</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20284"/>
		<updated>2021-01-07T16:31:23Z</updated>

		<summary type="html">&lt;p&gt;Toscool: /* Conclusion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Introduction&lt;br /&gt;
&lt;br /&gt;
=Problem definition=&lt;br /&gt;
&lt;br /&gt;
=Method=&lt;br /&gt;
&lt;br /&gt;
=Model=&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
&lt;br /&gt;
=Problem definition=&lt;br /&gt;
Crop rotation is based on growing a series of different types of crops in the same area in sequential seasons. The planned rotation may vary from a growing season to a few years or even longer periods. It is one of the most effective agricultural control strategies that is used in preventing the loss of soil fertility. It also helps in reducing soil erosion and increases crop yield. Planning an effective crop rotation requires weighing fixed and fluctuating production circumstances: market, farm size, labor supply, climate, soil type, growing practices, etc.&lt;br /&gt;
&lt;br /&gt;
In this simulation I will try to find parameters which have impact on the whole process of crop rotation with goal to find model providing desired outputs (these were slightly changed from concept) - crop yields, greenhouse gas emissions (N2O, CO2, NH4), soil fertility (nitrogen levels).&lt;br /&gt;
&lt;br /&gt;
I will focus on four crop rotation strategies with three different crops - corn, soybean, wheat:&lt;br /&gt;
&lt;br /&gt;
'''CCC''' (continuous corn) - only corn will be farmed for the whole observed time period (40 years)&lt;br /&gt;
&lt;br /&gt;
'''CS''' (corn-soybean) - rotation of corn and soybean will be used in year cycles for the whole observed time period (40 years), first year corn, second year soybean, repeat..&lt;br /&gt;
&lt;br /&gt;
'''SSS''' (continuous soybean) - only soybean will be farmed for the whole observed time period (40 years) &lt;br /&gt;
&lt;br /&gt;
'''CSW''' (corn-soybean-wheat) - rotation of corn, soybean and wheat will be used in year cycles for the whole observed time period (40 years), first year corn, second year soybean, third year wheat, repeat..&lt;br /&gt;
&lt;br /&gt;
Goal of this simulation is to observe dynamic changes with yields, greenhouse gas emissions, tillage strategy and soil nitrogen levels, while changing different crop rotation strategies.&lt;br /&gt;
&lt;br /&gt;
=Method=&lt;br /&gt;
&lt;br /&gt;
Vensim modelling approach was selected due to dynamic behavior of the simulated system.&lt;br /&gt;
&lt;br /&gt;
Our model shows the evolution of the number of people who got infected by the covid-19 virus in&lt;br /&gt;
countries where the population have a high health care protection and where the government has&lt;br /&gt;
decided to make a decision about the virus propagation. The model will explain us how fast the&lt;br /&gt;
virus spreads itself and how political decisions can change the number of infected people at a&lt;br /&gt;
given point in time. The construction of our model is simple: at the beginning one person is&lt;br /&gt;
infected and will, then, infect other people. When you are infected many possibilities are open:&lt;br /&gt;
- You can be a healthy virus carrier. In that case you will not know that you have the virus and&lt;br /&gt;
after 19 days you will be recovered.&lt;br /&gt;
- After 5 days you get symptoms, but you do not have any important health problems, you will&lt;br /&gt;
recover in the next 14 days.&lt;br /&gt;
- After 5 days, you get symptoms and you are very sick and have respiratory problems, after 5&lt;br /&gt;
more days, still feeling bad, you decide to go to the doctor to get a diagnosis. The doctor has than&lt;br /&gt;
two options: to send you back home, where you will recover after 9 more days or hospitalized you&lt;br /&gt;
the next day.&lt;br /&gt;
- The doctor had decided to hospitalize you, you then spend two weeks in intensive care, where&lt;br /&gt;
you will need artificial ventilation and 24-hour nursing care. You can then recover or unfortunately&lt;br /&gt;
die. The higher the hospital utilisation, the greater the probability to die. Indeed, if hospitals get&lt;br /&gt;
busier, the medical staff will be less available and health care quality might decrease.&lt;br /&gt;
When the number of diagnosed and hospitalised people (which are the official number of cases)&lt;br /&gt;
is greater than 3% of the population, the government will take decisions to slow down the spread&lt;br /&gt;
of the virus. This is to say that governments will take some measures, such as installing a forced&lt;br /&gt;
lockdown of the population to decrease the number of contacts per habitant. Moreover, such a&lt;br /&gt;
decision will have an impact of the population, which will be more aware of the situation and will&lt;br /&gt;
be more careful to not spread or contract the virus. So, the contagion rate as the number of contacts&lt;br /&gt;
per people will slow down. They will be less hospitalised people, that means less people in the&lt;br /&gt;
hospital, meaning a better service and so less people who die.&lt;br /&gt;
&lt;br /&gt;
=Model=&lt;br /&gt;
&lt;br /&gt;
Following vensim model was developed based on the study.&lt;br /&gt;
&lt;br /&gt;
[[File:Model1.png|900px|thumb|center|COVID-19 pandemic in Switzerland Stock Flow Diagram]]&lt;br /&gt;
&lt;br /&gt;
== Variables ==&lt;br /&gt;
&lt;br /&gt;
===Initial population=== &lt;br /&gt;
''The Population of Switzerland can be found here: https://en.wikipedia.org/wiki/Demographics_of_Switzerland''&lt;br /&gt;
&lt;br /&gt;
=8 500 000&lt;br /&gt;
&lt;br /&gt;
===Ratio susceptible people=== &lt;br /&gt;
''Decrease the susceptible people by the number of deaths due to the COVID-19.''&lt;br /&gt;
&lt;br /&gt;
=Susceptible population / (Initial population-Dead)&lt;br /&gt;
&lt;br /&gt;
===Susceptible population=== &lt;br /&gt;
''Decrease the susceptible population by the number of new infections.''&lt;br /&gt;
&lt;br /&gt;
=-New infections&lt;br /&gt;
&lt;br /&gt;
===contact=== &lt;br /&gt;
'''Lockdown:''' ''Function IF THEN ELSE that bring the number of new people you meet (contact) from 5 to 0.05 if the ratio exceed 0.015%''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot;&amp;gt; 0.00015, 0.05 , 5 )&lt;br /&gt;
&lt;br /&gt;
===Contagion Rate=== &lt;br /&gt;
'''Lockdown:''' ''contagion rate: IF THEN ELSE that bring the contagion rate from 0.1 to 0.075 if the ratio exceed 0.015%. Function of the awareness in the population (washing more often their hands if lockdown)''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot; &amp;gt; 0.00015 , 0.075 , 0.1 )&lt;br /&gt;
&lt;br /&gt;
===New infections=== &lt;br /&gt;
''It represent the new number of people infected each day.''&lt;br /&gt;
&lt;br /&gt;
=contact*Infected*Ratio susceptible people*Contagion Rate&lt;br /&gt;
&lt;br /&gt;
===Infected=== &lt;br /&gt;
''It represent the stock of the new people infected. We start the model with 1 infected people.''&lt;br /&gt;
&lt;br /&gt;
=New infections-New recoveries from infected-New symptoms ///// Initial value: 1&lt;br /&gt;
&lt;br /&gt;
===New recoveries from infected===&lt;br /&gt;
''It represent the number of people without symptoms and they go in the recovered stock after 19 days.''&lt;br /&gt;
&lt;br /&gt;
=((1-Ratio Symptoms)*Infected)/TTA recoveries&lt;br /&gt;
&lt;br /&gt;
===New symptoms=== &lt;br /&gt;
''It represent the number of new people that develop symptoms during 5 days before going to the symptomatic stock.''&lt;br /&gt;
&lt;br /&gt;
=(Infected*Ratio Symptoms)/TTA Symptoms&lt;br /&gt;
&lt;br /&gt;
===Ratio Symptoms=== &lt;br /&gt;
''The ratio of people who develop some symptoms.''&lt;br /&gt;
&lt;br /&gt;
=0.2&lt;br /&gt;
&lt;br /&gt;
===Symptomatic=== &lt;br /&gt;
''The stock of people symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=New symptoms-New Diagnostic-New recoveries from symptoms&lt;br /&gt;
&lt;br /&gt;
===New recoveries from symptoms=== &lt;br /&gt;
''It represent the number of people that have symptoms but that were not to the doctor, after 14 they are in the recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Diagnost)*Symptomatic/TTA sympt&lt;br /&gt;
&lt;br /&gt;
===New Diagnostic=== &lt;br /&gt;
''It represent the number of new people that are diagnosed each day, they stay 3 days before having the diagnostic.''&lt;br /&gt;
&lt;br /&gt;
=Symptomatic*Ratio Diagnost/TTA Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Ratio Diagnost===&lt;br /&gt;
''the ratio of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=0.4&lt;br /&gt;
&lt;br /&gt;
===Diagnosed=== &lt;br /&gt;
''The stock of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic-New Hospitalization-New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===New Recovery from Diagnostic===&lt;br /&gt;
''It represent the number of people that are diagnosed and not sent to the hospital. they stay 9 days before going in the Recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Hospitalize)*Diagnosed/TTA diag&lt;br /&gt;
&lt;br /&gt;
===New Hospitalization=== &lt;br /&gt;
''It represent the number of people that are diagnosed and sent to the hospital. they stay 1 day before being sent.''&lt;br /&gt;
&lt;br /&gt;
=(Diagnosed*Ratio Hospitalize)/TTA Hospitalization Ratio Hospitalize&lt;br /&gt;
&lt;br /&gt;
===Ratio Hospitalize===&lt;br /&gt;
''The ratio of people that are Hospitalized.''&lt;br /&gt;
&lt;br /&gt;
=0.3&lt;br /&gt;
&lt;br /&gt;
===Hospitalized=== &lt;br /&gt;
''The stock of people that are hospitalized before being Recovered or Dead.''&lt;br /&gt;
&lt;br /&gt;
=New Hospitalization-New Death-New Recovery&lt;br /&gt;
&lt;br /&gt;
===New Recovery=== &lt;br /&gt;
''The number of people that recover each day from the hospitalization. It depends from the Mortality Rate which is depend from the hospital utilization (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=((1-Mortality Rate)*Hospitalized)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===New Death===&lt;br /&gt;
''The number of people that die each day from the hospitalization. It depends from the Mortality Rate which is depend from the hospital utilization (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized*Mortality Rate)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===hospital bed=== &lt;br /&gt;
''The number of bed in Switzerland 356 beds for 100k people with 8.5M people it gives that number: https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704''&lt;br /&gt;
&lt;br /&gt;
=30260&lt;br /&gt;
&lt;br /&gt;
===hospital utilization=== &lt;br /&gt;
''The utilization of the hospital we assume that there is already 8260 beds used for patient outside the covid pandemic. The more utilization we have, the greater the probability to die. Indeed, if hospitals get busier, the medical staff will be less available and health care quality might decrease.''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized/(hospital bed - 8260)) &lt;br /&gt;
&lt;br /&gt;
===lk mortality===&lt;br /&gt;
''The lookup function is used to described the mortality rate.''&lt;br /&gt;
&lt;br /&gt;
[(0,0)-(1000,0.3)],(0,0.065),(0.6,0.065),(0.8,0.12),(1,0.25),(1.2,0.3),(10,0.3),(1000,0.3)&lt;br /&gt;
&lt;br /&gt;
===Mortality Rate=== &lt;br /&gt;
''The mortality rate depends on the hospital utilization. For example based on the above function, if the capacity reach 100% the hospital is full and the chance to die is then 25%.''&lt;br /&gt;
&lt;br /&gt;
=lk mortality (hospital utilization)&lt;br /&gt;
&lt;br /&gt;
===Dead=== &lt;br /&gt;
''The stock of Dead people killed by the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New Death&lt;br /&gt;
&lt;br /&gt;
===Recovered=== &lt;br /&gt;
''The Total amount of people who recovered from the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New recoveries from infected+New recoveries from symptoms+New Recovery+New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===official active cases===&lt;br /&gt;
''It represent the number of people that were tested and it's this number that will be used by the government to follow the pandemic and take decision of lockdown.''&lt;br /&gt;
&lt;br /&gt;
=Diagnosed+Hosptitalized&lt;br /&gt;
&lt;br /&gt;
===Ratio official cases/pop=== &lt;br /&gt;
''The ratio that will be used for lockdown. ''&lt;br /&gt;
&lt;br /&gt;
=official active cases/ Initial population&lt;br /&gt;
&lt;br /&gt;
===New Diagnosed.1=== &lt;br /&gt;
''It's is just the same as New Diagnostic, it is used in the model to have the Total Diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Total Diagnosed=== &lt;br /&gt;
''Used in the model to have the official number of cases in the model.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnosed.1&lt;br /&gt;
&lt;br /&gt;
===TTA recoveries=== &lt;br /&gt;
''Time to recover after being infected and not having symptoms.''&lt;br /&gt;
&lt;br /&gt;
=19&lt;br /&gt;
&lt;br /&gt;
===TTA Symptoms=== &lt;br /&gt;
''The time you take to develop symptoms.''&lt;br /&gt;
&lt;br /&gt;
=5&lt;br /&gt;
&lt;br /&gt;
===TTA sympt===&lt;br /&gt;
''The time you take for recovering after being symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
===TTA Diagnostic=== &lt;br /&gt;
''Time to go to the doctor and have the result.''&lt;br /&gt;
&lt;br /&gt;
=3&lt;br /&gt;
&lt;br /&gt;
===TTA diag===&lt;br /&gt;
''The time you take for recovering after being diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=11&lt;br /&gt;
&lt;br /&gt;
===TTA Hospitalization=== &lt;br /&gt;
''Time to go to the Hospital.''&lt;br /&gt;
&lt;br /&gt;
=1&lt;br /&gt;
&lt;br /&gt;
===TTA Hospital===&lt;br /&gt;
''The time you stay at the hospital before recovering or dying.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
As explained in the problem definition we will focused our results on 3 cases. The first one is the normal scenario, the second is the same scenario but the lockdown is delayed for 1 day, and the last scenario is the normal scenario with a number of hospital beds reduce by 10 000 beds.&lt;br /&gt;
&lt;br /&gt;
==Normal Scenario==&lt;br /&gt;
&lt;br /&gt;
The first scenario take place in Switzerland with 8 500 000 peoples and a hospital capacity of 356 beds for 100k people. The first case was detected the 25 february 2019 and 20 days after the Government of Switzerland have decided to take some serious measures that is in our case represented by a lockdown. &lt;br /&gt;
&lt;br /&gt;
The following table show us the official number of new cases per day:&lt;br /&gt;
&lt;br /&gt;
[[File:Newcases.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
From the simulation we get:&lt;br /&gt;
&lt;br /&gt;
[[File:Yes.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
We can see that the model is really closed to the reality with a pic of 1350 after 35 days. The simulation stopped after 100 days so we just want to focused on these first 100 days. The reality display a pic at 1243 days after 30 days.&lt;br /&gt;
&lt;br /&gt;
The true number of new death per day, and the number from the simulation is also display below:&lt;br /&gt;
&lt;br /&gt;
[[File: deat.png|500px|left]]        [[File:Deats.18.png|500px|rigth]]&lt;br /&gt;
&lt;br /&gt;
We can see that the model is one more time really closed to the reality with a pic of 43 deaths after 50 days, while the reality display a pic at 44 days after 36 days.&lt;br /&gt;
&lt;br /&gt;
We have seen that the simulation is really closed from the data obtained for the Switzerland, but now lets go trough some special cases to see the impact of some decision on the variables.&lt;br /&gt;
&lt;br /&gt;
==Scenario 1: Late lockdown==&lt;br /&gt;
&lt;br /&gt;
In this scenario we will see what could have happened if the government take 1 more day to react and to set up the lockdown. To simulate such a scenario I simply increase the number of &amp;quot;Ratio official cases/pop&amp;quot; in the function IF THEN ELSE in &amp;quot;contact&amp;quot; and &amp;quot;contagion rate&amp;quot; from 0.00015 to 0.00018 and it delay the reaction of the government for 1 day.&lt;br /&gt;
&lt;br /&gt;
[[File: Deathz1.png|450px|left]][[File: Deathz2.png|500px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graph, the total number of official cases (=total diagnosed) jump from 33 000 to 45 000 cases. An increase of 35% in the number of official cases by just delaying for 1 day the government decisions. It illustrates well the exponential effect on the model, indeed we don't have to forget that the delay is just one day but if it has been 4-5 days the number of cases would have been exponentially higher. The second graph shows the deaths jump from 1600 to 2300, that is due to increasing number of cases and the hospital capacity reaching more than 60% utilization. Indeed due to the lookup function if the hospital capacity exceed 60% the mortality increase in the hospital. This is a very interesting scenarios that shows quite well the importance of the early lockdown and highlight the most important point in our model, '''the reaction time'''.&lt;br /&gt;
&lt;br /&gt;
==Scenario 2: Small Hospital capacity==&lt;br /&gt;
&lt;br /&gt;
In this scenario the number of hospital beds goes from 356/100k people to 238/100k people, a loss of -10 000 in variable ''hospital bed'' for Switzerland. This number of beds corresponds to the number of beds for a less developing country, such as Iceland (https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704). &lt;br /&gt;
&lt;br /&gt;
[[File: Utiliz.png|500px|left]][[File: Dead.png|480px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graphs, the hospital utilization reach almost 80%. Patients are not treated as well as they would if the utilization was lower, and it involves more deaths for these patients (right graph). We can see the importance of hospital capacity and for government to have a '''good amount of hospitals'''.&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
To conclude I would say that it has been quite difficult to deal with the real data because I had to find every number or to adjust some variables to fit with the reality. The model display almost the same numbers as the ones communicated by the swiss government, what could indicate that the model are not too far from what is happening in real-life. &lt;br /&gt;
The most important variable in the simulation is the '''reaction time''' of the government in order to take some measures against the fast spread of the virus, such as bringing more awareness or imposing a lockdown.&lt;br /&gt;
A further exogenous variable here is the number of hospital beds, which is a good proxy for modeling different countries. Having a smaller number of beds is a sign of vulnerability for the health care system and will impact mortality. A solution to this pandemic could therefore be to increase the number of beds in order to avoid exceeding capacity. &lt;br /&gt;
A limit to this simulation would be that it is a real pandemic, for example I first tried to simulate the full pandemic with the second pic (higher) as you can see in the graph of Switzerland but I have to admit that sometimes the reality (or my Vensim skills) are to difficult to simulate that is why I choose to stop the simulation after 100 days.&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
&lt;br /&gt;
[http://www.simulace.info/index.php/File:Crop_rotation_finished.mdl Crop rotation VENSIM model]&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
#BEHNKE, Gevan D., Stacy M. ZUBER, Cameron M. PITTELKOW, Emerson D. NAFZIGER a María B. VILLAMIL. Long-term crop rotation and tillage effects on soil greenhouse gas emissions and crop production in Illinois, USA. Agriculture, Ecosystems &amp;amp; Environment [online]. 2018, 261, 62-70 [cit. 2020-01-26]. DOI: 10.1016/j.agee.2018.03.007. ISSN 01678809. Availiable: https://linkinghub.elsevier.com/retrieve/pii/S0167880918301221&lt;br /&gt;
#KOLLAS, Chris, Kurt Christian KERSEBAUM, Claas NENDEL, et al. Crop rotation modelling—A European model intercomparison. European Journal of Agronomy [online]. 2015, 70, 98-111 [cit. 2020-01-26]. DOI: 10.1016/j.eja.2015.06.007. ISSN 11610301. Availiable: https://linkinghub.elsevier.com/retrieve/pii/S1161030115300010&lt;br /&gt;
#BRANKATSCHK, Gerhard a Matthias FINKBEINER. Modeling crop rotation in agricultural LCAs — Challenges and potential solutions. Agricultural Systems [online]. 2015, 138, 66-76 [cit. 2020-01-26]. DOI: 10.1016/j.agsy.2015.05.008. ISSN 0308521X. Availiable: https://linkinghub.elsevier.com/retrieve/pii/S0308521X1500075X&lt;/div&gt;</summary>
		<author><name>Toscool</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20283</id>
		<title>Impact of late lockdown and hospital capacity on 19-COVID spread</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20283"/>
		<updated>2021-01-07T16:17:26Z</updated>

		<summary type="html">&lt;p&gt;Toscool: /* Scenario 2: Small Hospital capacity */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Introduction&lt;br /&gt;
&lt;br /&gt;
=Problem definition=&lt;br /&gt;
&lt;br /&gt;
=Method=&lt;br /&gt;
&lt;br /&gt;
=Model=&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
&lt;br /&gt;
=Problem definition=&lt;br /&gt;
Crop rotation is based on growing a series of different types of crops in the same area in sequential seasons. The planned rotation may vary from a growing season to a few years or even longer periods. It is one of the most effective agricultural control strategies that is used in preventing the loss of soil fertility. It also helps in reducing soil erosion and increases crop yield. Planning an effective crop rotation requires weighing fixed and fluctuating production circumstances: market, farm size, labor supply, climate, soil type, growing practices, etc.&lt;br /&gt;
&lt;br /&gt;
In this simulation I will try to find parameters which have impact on the whole process of crop rotation with goal to find model providing desired outputs (these were slightly changed from concept) - crop yields, greenhouse gas emissions (N2O, CO2, NH4), soil fertility (nitrogen levels).&lt;br /&gt;
&lt;br /&gt;
I will focus on four crop rotation strategies with three different crops - corn, soybean, wheat:&lt;br /&gt;
&lt;br /&gt;
'''CCC''' (continuous corn) - only corn will be farmed for the whole observed time period (40 years)&lt;br /&gt;
&lt;br /&gt;
'''CS''' (corn-soybean) - rotation of corn and soybean will be used in year cycles for the whole observed time period (40 years), first year corn, second year soybean, repeat..&lt;br /&gt;
&lt;br /&gt;
'''SSS''' (continuous soybean) - only soybean will be farmed for the whole observed time period (40 years) &lt;br /&gt;
&lt;br /&gt;
'''CSW''' (corn-soybean-wheat) - rotation of corn, soybean and wheat will be used in year cycles for the whole observed time period (40 years), first year corn, second year soybean, third year wheat, repeat..&lt;br /&gt;
&lt;br /&gt;
Goal of this simulation is to observe dynamic changes with yields, greenhouse gas emissions, tillage strategy and soil nitrogen levels, while changing different crop rotation strategies.&lt;br /&gt;
&lt;br /&gt;
=Method=&lt;br /&gt;
&lt;br /&gt;
Vensim modelling approach was selected due to dynamic behavior of the simulated system.&lt;br /&gt;
&lt;br /&gt;
Our model shows the evolution of the number of people who got infected by the covid-19 virus in&lt;br /&gt;
countries where the population have a high health care protection and where the government has&lt;br /&gt;
decided to make a decision about the virus propagation. The model will explain us how fast the&lt;br /&gt;
virus spreads itself and how political decisions can change the number of infected people at a&lt;br /&gt;
given point in time. The construction of our model is simple: at the beginning one person is&lt;br /&gt;
infected and will, then, infect other people. When you are infected many possibilities are open:&lt;br /&gt;
- You can be a healthy virus carrier. In that case you will not know that you have the virus and&lt;br /&gt;
after 19 days you will be recovered.&lt;br /&gt;
- After 5 days you get symptoms, but you do not have any important health problems, you will&lt;br /&gt;
recover in the next 14 days.&lt;br /&gt;
- After 5 days, you get symptoms and you are very sick and have respiratory problems, after 5&lt;br /&gt;
more days, still feeling bad, you decide to go to the doctor to get a diagnosis. The doctor has than&lt;br /&gt;
two options: to send you back home, where you will recover after 9 more days or hospitalized you&lt;br /&gt;
the next day.&lt;br /&gt;
- The doctor had decided to hospitalize you, you then spend two weeks in intensive care, where&lt;br /&gt;
you will need artificial ventilation and 24-hour nursing care. You can then recover or unfortunately&lt;br /&gt;
die. The higher the hospital utilisation, the greater the probability to die. Indeed, if hospitals get&lt;br /&gt;
busier, the medical staff will be less available and health care quality might decrease.&lt;br /&gt;
When the number of diagnosed and hospitalised people (which are the official number of cases)&lt;br /&gt;
is greater than 3% of the population, the government will take decisions to slow down the spread&lt;br /&gt;
of the virus. This is to say that governments will take some measures, such as installing a forced&lt;br /&gt;
lockdown of the population to decrease the number of contacts per habitant. Moreover, such a&lt;br /&gt;
decision will have an impact of the population, which will be more aware of the situation and will&lt;br /&gt;
be more careful to not spread or contract the virus. So, the contagion rate as the number of contacts&lt;br /&gt;
per people will slow down. They will be less hospitalised people, that means less people in the&lt;br /&gt;
hospital, meaning a better service and so less people who die.&lt;br /&gt;
&lt;br /&gt;
=Model=&lt;br /&gt;
&lt;br /&gt;
Following vensim model was developed based on the study.&lt;br /&gt;
&lt;br /&gt;
[[File:Model1.png|900px|thumb|center|COVID-19 pandemic in Switzerland Stock Flow Diagram]]&lt;br /&gt;
&lt;br /&gt;
== Variables ==&lt;br /&gt;
&lt;br /&gt;
===Initial population=== &lt;br /&gt;
''The Population of Switzerland can be found here: https://en.wikipedia.org/wiki/Demographics_of_Switzerland''&lt;br /&gt;
&lt;br /&gt;
=8 500 000&lt;br /&gt;
&lt;br /&gt;
===Ratio susceptible people=== &lt;br /&gt;
''Decrease the susceptible people by the number of deaths due to the COVID-19.''&lt;br /&gt;
&lt;br /&gt;
=Susceptible population / (Initial population-Dead)&lt;br /&gt;
&lt;br /&gt;
===Susceptible population=== &lt;br /&gt;
''Decrease the susceptible population by the number of new infections.''&lt;br /&gt;
&lt;br /&gt;
=-New infections&lt;br /&gt;
&lt;br /&gt;
===contact=== &lt;br /&gt;
'''Lockdown:''' ''Function IF THEN ELSE that bring the number of new people you meet (contact) from 5 to 0.05 if the ratio exceed 0.015%''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot;&amp;gt; 0.00015, 0.05 , 5 )&lt;br /&gt;
&lt;br /&gt;
===Contagion Rate=== &lt;br /&gt;
'''Lockdown:''' ''contagion rate: IF THEN ELSE that bring the contagion rate from 0.1 to 0.075 if the ratio exceed 0.015%. Function of the awareness in the population (washing more often their hands if lockdown)''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot; &amp;gt; 0.00015 , 0.075 , 0.1 )&lt;br /&gt;
&lt;br /&gt;
===New infections=== &lt;br /&gt;
''It represent the new number of people infected each day.''&lt;br /&gt;
&lt;br /&gt;
=contact*Infected*Ratio susceptible people*Contagion Rate&lt;br /&gt;
&lt;br /&gt;
===Infected=== &lt;br /&gt;
''It represent the stock of the new people infected. We start the model with 1 infected people.''&lt;br /&gt;
&lt;br /&gt;
=New infections-New recoveries from infected-New symptoms ///// Initial value: 1&lt;br /&gt;
&lt;br /&gt;
===New recoveries from infected===&lt;br /&gt;
''It represent the number of people without symptoms and they go in the recovered stock after 19 days.''&lt;br /&gt;
&lt;br /&gt;
=((1-Ratio Symptoms)*Infected)/TTA recoveries&lt;br /&gt;
&lt;br /&gt;
===New symptoms=== &lt;br /&gt;
''It represent the number of new people that develop symptoms during 5 days before going to the symptomatic stock.''&lt;br /&gt;
&lt;br /&gt;
=(Infected*Ratio Symptoms)/TTA Symptoms&lt;br /&gt;
&lt;br /&gt;
===Ratio Symptoms=== &lt;br /&gt;
''The ratio of people who develop some symptoms.''&lt;br /&gt;
&lt;br /&gt;
=0.2&lt;br /&gt;
&lt;br /&gt;
===Symptomatic=== &lt;br /&gt;
''The stock of people symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=New symptoms-New Diagnostic-New recoveries from symptoms&lt;br /&gt;
&lt;br /&gt;
===New recoveries from symptoms=== &lt;br /&gt;
''It represent the number of people that have symptoms but that were not to the doctor, after 14 they are in the recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Diagnost)*Symptomatic/TTA sympt&lt;br /&gt;
&lt;br /&gt;
===New Diagnostic=== &lt;br /&gt;
''It represent the number of new people that are diagnosed each day, they stay 3 days before having the diagnostic.''&lt;br /&gt;
&lt;br /&gt;
=Symptomatic*Ratio Diagnost/TTA Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Ratio Diagnost===&lt;br /&gt;
''the ratio of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=0.4&lt;br /&gt;
&lt;br /&gt;
===Diagnosed=== &lt;br /&gt;
''The stock of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic-New Hospitalization-New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===New Recovery from Diagnostic===&lt;br /&gt;
''It represent the number of people that are diagnosed and not sent to the hospital. they stay 9 days before going in the Recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Hospitalize)*Diagnosed/TTA diag&lt;br /&gt;
&lt;br /&gt;
===New Hospitalization=== &lt;br /&gt;
''It represent the number of people that are diagnosed and sent to the hospital. they stay 1 day before being sent.''&lt;br /&gt;
&lt;br /&gt;
=(Diagnosed*Ratio Hospitalize)/TTA Hospitalization Ratio Hospitalize&lt;br /&gt;
&lt;br /&gt;
===Ratio Hospitalize===&lt;br /&gt;
''The ratio of people that are Hospitalized.''&lt;br /&gt;
&lt;br /&gt;
=0.3&lt;br /&gt;
&lt;br /&gt;
===Hospitalized=== &lt;br /&gt;
''The stock of people that are hospitalized before being Recovered or Dead.''&lt;br /&gt;
&lt;br /&gt;
=New Hospitalization-New Death-New Recovery&lt;br /&gt;
&lt;br /&gt;
===New Recovery=== &lt;br /&gt;
''The number of people that recover each day from the hospitalization. It depends from the Mortality Rate which is depend from the hospital utilization (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=((1-Mortality Rate)*Hospitalized)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===New Death===&lt;br /&gt;
''The number of people that die each day from the hospitalization. It depends from the Mortality Rate which is depend from the hospital utilization (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized*Mortality Rate)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===hospital bed=== &lt;br /&gt;
''The number of bed in Switzerland 356 beds for 100k people with 8.5M people it gives that number: https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704''&lt;br /&gt;
&lt;br /&gt;
=30260&lt;br /&gt;
&lt;br /&gt;
===hospital utilization=== &lt;br /&gt;
''The utilization of the hospital we assume that there is already 8260 beds used for patient outside the covid pandemic. The more utilization we have, the greater the probability to die. Indeed, if hospitals get busier, the medical staff will be less available and health care quality might decrease.''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized/(hospital bed - 8260)) &lt;br /&gt;
&lt;br /&gt;
===lk mortality===&lt;br /&gt;
''The lookup function is used to described the mortality rate.''&lt;br /&gt;
&lt;br /&gt;
[(0,0)-(1000,0.3)],(0,0.065),(0.6,0.065),(0.8,0.12),(1,0.25),(1.2,0.3),(10,0.3),(1000,0.3)&lt;br /&gt;
&lt;br /&gt;
===Mortality Rate=== &lt;br /&gt;
''The mortality rate depends on the hospital utilization. For example based on the above function, if the capacity reach 100% the hospital is full and the chance to die is then 25%.''&lt;br /&gt;
&lt;br /&gt;
=lk mortality (hospital utilization)&lt;br /&gt;
&lt;br /&gt;
===Dead=== &lt;br /&gt;
''The stock of Dead people killed by the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New Death&lt;br /&gt;
&lt;br /&gt;
===Recovered=== &lt;br /&gt;
''The Total amount of people who recovered from the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New recoveries from infected+New recoveries from symptoms+New Recovery+New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===official active cases===&lt;br /&gt;
''It represent the number of people that were tested and it's this number that will be used by the government to follow the pandemic and take decision of lockdown.''&lt;br /&gt;
&lt;br /&gt;
=Diagnosed+Hosptitalized&lt;br /&gt;
&lt;br /&gt;
===Ratio official cases/pop=== &lt;br /&gt;
''The ratio that will be used for lockdown. ''&lt;br /&gt;
&lt;br /&gt;
=official active cases/ Initial population&lt;br /&gt;
&lt;br /&gt;
===New Diagnosed.1=== &lt;br /&gt;
''It's is just the same as New Diagnostic, it is used in the model to have the Total Diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Total Diagnosed=== &lt;br /&gt;
''Used in the model to have the official number of cases in the model.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnosed.1&lt;br /&gt;
&lt;br /&gt;
===TTA recoveries=== &lt;br /&gt;
''Time to recover after being infected and not having symptoms.''&lt;br /&gt;
&lt;br /&gt;
=19&lt;br /&gt;
&lt;br /&gt;
===TTA Symptoms=== &lt;br /&gt;
''The time you take to develop symptoms.''&lt;br /&gt;
&lt;br /&gt;
=5&lt;br /&gt;
&lt;br /&gt;
===TTA sympt===&lt;br /&gt;
''The time you take for recovering after being symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
===TTA Diagnostic=== &lt;br /&gt;
''Time to go to the doctor and have the result.''&lt;br /&gt;
&lt;br /&gt;
=3&lt;br /&gt;
&lt;br /&gt;
===TTA diag===&lt;br /&gt;
''The time you take for recovering after being diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=11&lt;br /&gt;
&lt;br /&gt;
===TTA Hospitalization=== &lt;br /&gt;
''Time to go to the Hospital.''&lt;br /&gt;
&lt;br /&gt;
=1&lt;br /&gt;
&lt;br /&gt;
===TTA Hospital===&lt;br /&gt;
''The time you stay at the hospital before recovering or dying.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
As explained in the problem definition we will focused our results on 3 cases. The first one is the normal scenario, the second is the same scenario but the lockdown is delayed for 1 day, and the last scenario is the normal scenario with a number of hospital beds reduce by 10 000 beds.&lt;br /&gt;
&lt;br /&gt;
==Normal Scenario==&lt;br /&gt;
&lt;br /&gt;
The first scenario take place in Switzerland with 8 500 000 peoples and a hospital capacity of 356 beds for 100k people. The first case was detected the 25 february 2019 and 20 days after the Government of Switzerland have decided to take some serious measures that is in our case represented by a lockdown. &lt;br /&gt;
&lt;br /&gt;
The following table show us the official number of new cases per day:&lt;br /&gt;
&lt;br /&gt;
[[File:Newcases.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
From the simulation we get:&lt;br /&gt;
&lt;br /&gt;
[[File:Yes.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
We can see that the model is really closed to the reality with a pic of 1350 after 35 days. The simulation stopped after 100 days so we just want to focused on these first 100 days. The reality display a pic at 1243 days after 30 days.&lt;br /&gt;
&lt;br /&gt;
The true number of new death per day, and the number from the simulation is also display below:&lt;br /&gt;
&lt;br /&gt;
[[File: deat.png|500px|left]]        [[File:Deats.18.png|500px|rigth]]&lt;br /&gt;
&lt;br /&gt;
We can see that the model is one more time really closed to the reality with a pic of 43 deaths after 50 days, while the reality display a pic at 44 days after 36 days.&lt;br /&gt;
&lt;br /&gt;
We have seen that the simulation is really closed from the data obtained for the Switzerland, but now lets go trough some special cases to see the impact of some decision on the variables.&lt;br /&gt;
&lt;br /&gt;
==Scenario 1: Late lockdown==&lt;br /&gt;
&lt;br /&gt;
In this scenario we will see what could have happened if the government take 1 more day to react and to set up the lockdown. To simulate such a scenario I simply increase the number of &amp;quot;Ratio official cases/pop&amp;quot; in the function IF THEN ELSE in &amp;quot;contact&amp;quot; and &amp;quot;contagion rate&amp;quot; from 0.00015 to 0.00018 and it delay the reaction of the government for 1 day.&lt;br /&gt;
&lt;br /&gt;
[[File: Deathz1.png|450px|left]][[File: Deathz2.png|500px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graph, the total number of official cases (=total diagnosed) jump from 33 000 to 45 000 cases. An increase of 35% in the number of official cases by just delaying for 1 day the government decisions. It illustrates well the exponential effect on the model, indeed we don't have to forget that the delay is just one day but if it has been 4-5 days the number of cases would have been exponentially higher. The second graph shows the deaths jump from 1600 to 2300, that is due to increasing number of cases and the hospital capacity reaching more than 60% utilization. Indeed due to the lookup function if the hospital capacity exceed 60% the mortality increase in the hospital. This is a very interesting scenarios that shows quite well the importance of the early lockdown and highlight the most important point in our model, '''the reaction time'''.&lt;br /&gt;
&lt;br /&gt;
==Scenario 2: Small Hospital capacity==&lt;br /&gt;
&lt;br /&gt;
In this scenario the number of hospital beds goes from 356/100k people to 238/100k people, a loss of -10 000 in variable ''hospital bed'' for Switzerland. This number of beds corresponds to the number of beds for a less developing country, such as Iceland (https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704). &lt;br /&gt;
&lt;br /&gt;
[[File: Utiliz.png|500px|left]][[File: Dead.png|480px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graphs, the hospital utilization reach almost 80%. Patients are not treated as well as they would if the utilization was lower, and it involves more deaths for these patients (right graph). We can see the importance of hospital capacity and for government to have a '''good amount of hospitals'''.&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
Simulation of such complex evnironment as crop rotation in farming was challenging. Created VENSIM model of crop rotation is simplified with some parameters based on just few studies. Real world behaviour can be different because there are many variables affecting the whole process. Although with dramatic simplification, it can be used as a starting point for creating more complex models in agriculture sector. My goal to demonstrate changing of yield, greenhouse gas emissions and nitrogen level was achieved.&lt;br /&gt;
&lt;br /&gt;
Yields results could be extended with price and demand of market implementation for comparsion with different crop yields.&lt;br /&gt;
&lt;br /&gt;
N2O and CO2 emissions were highest in CCC crop strategy, providing speculation that monoculture is enviromentaly unfriendly in compare with polyculture strategies. SSS strategy was providing lowest N2O emissions, on other hand it showed highest CH4 emissions which are specific for legumes as soybean.&lt;br /&gt;
&lt;br /&gt;
Soil nitrogen levels were highly dependent on soybean in crop rotation strategy. With no soybean in crop strategy - in CCC strategy, dramaticaly more inorganic fertilization inputs were necessary&lt;br /&gt;
&lt;br /&gt;
Due to the scope of model, different tillage scenario (0 - no-til) was not simulated. Provided study concluded higher yield and lower emission levels with tillage sceario (1 - tillage, default for simulated model)&lt;br /&gt;
&lt;br /&gt;
===Model extension===&lt;br /&gt;
More complexity can be implemented in the future, for example:&lt;br /&gt;
&lt;br /&gt;
Detailed description of parameteres like Temperature, Pests, Natural disasters or Precipitation.&lt;br /&gt;
&lt;br /&gt;
More crop strategies or new crops.&lt;br /&gt;
&lt;br /&gt;
Market variables like demand or prices of crop seeds or harvesting costs could be also implemented.&lt;br /&gt;
&lt;br /&gt;
Monthly changes (instead of yearly) with more detailed fluctuations during seasons (in Spring there is bigger demand for fertilizers, temperature spikes)&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
&lt;br /&gt;
[http://www.simulace.info/index.php/File:Crop_rotation_finished.mdl Crop rotation VENSIM model]&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
#BEHNKE, Gevan D., Stacy M. ZUBER, Cameron M. PITTELKOW, Emerson D. NAFZIGER a María B. VILLAMIL. Long-term crop rotation and tillage effects on soil greenhouse gas emissions and crop production in Illinois, USA. Agriculture, Ecosystems &amp;amp; Environment [online]. 2018, 261, 62-70 [cit. 2020-01-26]. DOI: 10.1016/j.agee.2018.03.007. ISSN 01678809. Availiable: https://linkinghub.elsevier.com/retrieve/pii/S0167880918301221&lt;br /&gt;
#KOLLAS, Chris, Kurt Christian KERSEBAUM, Claas NENDEL, et al. Crop rotation modelling—A European model intercomparison. European Journal of Agronomy [online]. 2015, 70, 98-111 [cit. 2020-01-26]. DOI: 10.1016/j.eja.2015.06.007. ISSN 11610301. Availiable: https://linkinghub.elsevier.com/retrieve/pii/S1161030115300010&lt;br /&gt;
#BRANKATSCHK, Gerhard a Matthias FINKBEINER. Modeling crop rotation in agricultural LCAs — Challenges and potential solutions. Agricultural Systems [online]. 2015, 138, 66-76 [cit. 2020-01-26]. DOI: 10.1016/j.agsy.2015.05.008. ISSN 0308521X. Availiable: https://linkinghub.elsevier.com/retrieve/pii/S0308521X1500075X&lt;/div&gt;</summary>
		<author><name>Toscool</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20282</id>
		<title>Impact of late lockdown and hospital capacity on 19-COVID spread</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20282"/>
		<updated>2021-01-07T16:15:15Z</updated>

		<summary type="html">&lt;p&gt;Toscool: /* Scenario 2: Small Hospital capacity */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Introduction&lt;br /&gt;
&lt;br /&gt;
=Problem definition=&lt;br /&gt;
&lt;br /&gt;
=Method=&lt;br /&gt;
&lt;br /&gt;
=Model=&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
&lt;br /&gt;
=Problem definition=&lt;br /&gt;
Crop rotation is based on growing a series of different types of crops in the same area in sequential seasons. The planned rotation may vary from a growing season to a few years or even longer periods. It is one of the most effective agricultural control strategies that is used in preventing the loss of soil fertility. It also helps in reducing soil erosion and increases crop yield. Planning an effective crop rotation requires weighing fixed and fluctuating production circumstances: market, farm size, labor supply, climate, soil type, growing practices, etc.&lt;br /&gt;
&lt;br /&gt;
In this simulation I will try to find parameters which have impact on the whole process of crop rotation with goal to find model providing desired outputs (these were slightly changed from concept) - crop yields, greenhouse gas emissions (N2O, CO2, NH4), soil fertility (nitrogen levels).&lt;br /&gt;
&lt;br /&gt;
I will focus on four crop rotation strategies with three different crops - corn, soybean, wheat:&lt;br /&gt;
&lt;br /&gt;
'''CCC''' (continuous corn) - only corn will be farmed for the whole observed time period (40 years)&lt;br /&gt;
&lt;br /&gt;
'''CS''' (corn-soybean) - rotation of corn and soybean will be used in year cycles for the whole observed time period (40 years), first year corn, second year soybean, repeat..&lt;br /&gt;
&lt;br /&gt;
'''SSS''' (continuous soybean) - only soybean will be farmed for the whole observed time period (40 years) &lt;br /&gt;
&lt;br /&gt;
'''CSW''' (corn-soybean-wheat) - rotation of corn, soybean and wheat will be used in year cycles for the whole observed time period (40 years), first year corn, second year soybean, third year wheat, repeat..&lt;br /&gt;
&lt;br /&gt;
Goal of this simulation is to observe dynamic changes with yields, greenhouse gas emissions, tillage strategy and soil nitrogen levels, while changing different crop rotation strategies.&lt;br /&gt;
&lt;br /&gt;
=Method=&lt;br /&gt;
&lt;br /&gt;
Vensim modelling approach was selected due to dynamic behavior of the simulated system.&lt;br /&gt;
&lt;br /&gt;
Our model shows the evolution of the number of people who got infected by the covid-19 virus in&lt;br /&gt;
countries where the population have a high health care protection and where the government has&lt;br /&gt;
decided to make a decision about the virus propagation. The model will explain us how fast the&lt;br /&gt;
virus spreads itself and how political decisions can change the number of infected people at a&lt;br /&gt;
given point in time. The construction of our model is simple: at the beginning one person is&lt;br /&gt;
infected and will, then, infect other people. When you are infected many possibilities are open:&lt;br /&gt;
- You can be a healthy virus carrier. In that case you will not know that you have the virus and&lt;br /&gt;
after 19 days you will be recovered.&lt;br /&gt;
- After 5 days you get symptoms, but you do not have any important health problems, you will&lt;br /&gt;
recover in the next 14 days.&lt;br /&gt;
- After 5 days, you get symptoms and you are very sick and have respiratory problems, after 5&lt;br /&gt;
more days, still feeling bad, you decide to go to the doctor to get a diagnosis. The doctor has than&lt;br /&gt;
two options: to send you back home, where you will recover after 9 more days or hospitalized you&lt;br /&gt;
the next day.&lt;br /&gt;
- The doctor had decided to hospitalize you, you then spend two weeks in intensive care, where&lt;br /&gt;
you will need artificial ventilation and 24-hour nursing care. You can then recover or unfortunately&lt;br /&gt;
die. The higher the hospital utilisation, the greater the probability to die. Indeed, if hospitals get&lt;br /&gt;
busier, the medical staff will be less available and health care quality might decrease.&lt;br /&gt;
When the number of diagnosed and hospitalised people (which are the official number of cases)&lt;br /&gt;
is greater than 3% of the population, the government will take decisions to slow down the spread&lt;br /&gt;
of the virus. This is to say that governments will take some measures, such as installing a forced&lt;br /&gt;
lockdown of the population to decrease the number of contacts per habitant. Moreover, such a&lt;br /&gt;
decision will have an impact of the population, which will be more aware of the situation and will&lt;br /&gt;
be more careful to not spread or contract the virus. So, the contagion rate as the number of contacts&lt;br /&gt;
per people will slow down. They will be less hospitalised people, that means less people in the&lt;br /&gt;
hospital, meaning a better service and so less people who die.&lt;br /&gt;
&lt;br /&gt;
=Model=&lt;br /&gt;
&lt;br /&gt;
Following vensim model was developed based on the study.&lt;br /&gt;
&lt;br /&gt;
[[File:Model1.png|900px|thumb|center|COVID-19 pandemic in Switzerland Stock Flow Diagram]]&lt;br /&gt;
&lt;br /&gt;
== Variables ==&lt;br /&gt;
&lt;br /&gt;
===Initial population=== &lt;br /&gt;
''The Population of Switzerland can be found here: https://en.wikipedia.org/wiki/Demographics_of_Switzerland''&lt;br /&gt;
&lt;br /&gt;
=8 500 000&lt;br /&gt;
&lt;br /&gt;
===Ratio susceptible people=== &lt;br /&gt;
''Decrease the susceptible people by the number of deaths due to the COVID-19.''&lt;br /&gt;
&lt;br /&gt;
=Susceptible population / (Initial population-Dead)&lt;br /&gt;
&lt;br /&gt;
===Susceptible population=== &lt;br /&gt;
''Decrease the susceptible population by the number of new infections.''&lt;br /&gt;
&lt;br /&gt;
=-New infections&lt;br /&gt;
&lt;br /&gt;
===contact=== &lt;br /&gt;
'''Lockdown:''' ''Function IF THEN ELSE that bring the number of new people you meet (contact) from 5 to 0.05 if the ratio exceed 0.015%''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot;&amp;gt; 0.00015, 0.05 , 5 )&lt;br /&gt;
&lt;br /&gt;
===Contagion Rate=== &lt;br /&gt;
'''Lockdown:''' ''contagion rate: IF THEN ELSE that bring the contagion rate from 0.1 to 0.075 if the ratio exceed 0.015%. Function of the awareness in the population (washing more often their hands if lockdown)''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot; &amp;gt; 0.00015 , 0.075 , 0.1 )&lt;br /&gt;
&lt;br /&gt;
===New infections=== &lt;br /&gt;
''It represent the new number of people infected each day.''&lt;br /&gt;
&lt;br /&gt;
=contact*Infected*Ratio susceptible people*Contagion Rate&lt;br /&gt;
&lt;br /&gt;
===Infected=== &lt;br /&gt;
''It represent the stock of the new people infected. We start the model with 1 infected people.''&lt;br /&gt;
&lt;br /&gt;
=New infections-New recoveries from infected-New symptoms ///// Initial value: 1&lt;br /&gt;
&lt;br /&gt;
===New recoveries from infected===&lt;br /&gt;
''It represent the number of people without symptoms and they go in the recovered stock after 19 days.''&lt;br /&gt;
&lt;br /&gt;
=((1-Ratio Symptoms)*Infected)/TTA recoveries&lt;br /&gt;
&lt;br /&gt;
===New symptoms=== &lt;br /&gt;
''It represent the number of new people that develop symptoms during 5 days before going to the symptomatic stock.''&lt;br /&gt;
&lt;br /&gt;
=(Infected*Ratio Symptoms)/TTA Symptoms&lt;br /&gt;
&lt;br /&gt;
===Ratio Symptoms=== &lt;br /&gt;
''The ratio of people who develop some symptoms.''&lt;br /&gt;
&lt;br /&gt;
=0.2&lt;br /&gt;
&lt;br /&gt;
===Symptomatic=== &lt;br /&gt;
''The stock of people symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=New symptoms-New Diagnostic-New recoveries from symptoms&lt;br /&gt;
&lt;br /&gt;
===New recoveries from symptoms=== &lt;br /&gt;
''It represent the number of people that have symptoms but that were not to the doctor, after 14 they are in the recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Diagnost)*Symptomatic/TTA sympt&lt;br /&gt;
&lt;br /&gt;
===New Diagnostic=== &lt;br /&gt;
''It represent the number of new people that are diagnosed each day, they stay 3 days before having the diagnostic.''&lt;br /&gt;
&lt;br /&gt;
=Symptomatic*Ratio Diagnost/TTA Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Ratio Diagnost===&lt;br /&gt;
''the ratio of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=0.4&lt;br /&gt;
&lt;br /&gt;
===Diagnosed=== &lt;br /&gt;
''The stock of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic-New Hospitalization-New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===New Recovery from Diagnostic===&lt;br /&gt;
''It represent the number of people that are diagnosed and not sent to the hospital. they stay 9 days before going in the Recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Hospitalize)*Diagnosed/TTA diag&lt;br /&gt;
&lt;br /&gt;
===New Hospitalization=== &lt;br /&gt;
''It represent the number of people that are diagnosed and sent to the hospital. they stay 1 day before being sent.''&lt;br /&gt;
&lt;br /&gt;
=(Diagnosed*Ratio Hospitalize)/TTA Hospitalization Ratio Hospitalize&lt;br /&gt;
&lt;br /&gt;
===Ratio Hospitalize===&lt;br /&gt;
''The ratio of people that are Hospitalized.''&lt;br /&gt;
&lt;br /&gt;
=0.3&lt;br /&gt;
&lt;br /&gt;
===Hospitalized=== &lt;br /&gt;
''The stock of people that are hospitalized before being Recovered or Dead.''&lt;br /&gt;
&lt;br /&gt;
=New Hospitalization-New Death-New Recovery&lt;br /&gt;
&lt;br /&gt;
===New Recovery=== &lt;br /&gt;
''The number of people that recover each day from the hospitalization. It depends from the Mortality Rate which is depend from the hospital utilization (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=((1-Mortality Rate)*Hospitalized)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===New Death===&lt;br /&gt;
''The number of people that die each day from the hospitalization. It depends from the Mortality Rate which is depend from the hospital utilization (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized*Mortality Rate)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===hospital bed=== &lt;br /&gt;
''The number of bed in Switzerland 356 beds for 100k people with 8.5M people it gives that number: https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704''&lt;br /&gt;
&lt;br /&gt;
=30260&lt;br /&gt;
&lt;br /&gt;
===hospital utilization=== &lt;br /&gt;
''The utilization of the hospital we assume that there is already 8260 beds used for patient outside the covid pandemic. The more utilization we have, the greater the probability to die. Indeed, if hospitals get busier, the medical staff will be less available and health care quality might decrease.''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized/(hospital bed - 8260)) &lt;br /&gt;
&lt;br /&gt;
===lk mortality===&lt;br /&gt;
''The lookup function is used to described the mortality rate.''&lt;br /&gt;
&lt;br /&gt;
[(0,0)-(1000,0.3)],(0,0.065),(0.6,0.065),(0.8,0.12),(1,0.25),(1.2,0.3),(10,0.3),(1000,0.3)&lt;br /&gt;
&lt;br /&gt;
===Mortality Rate=== &lt;br /&gt;
''The mortality rate depends on the hospital utilization. For example based on the above function, if the capacity reach 100% the hospital is full and the chance to die is then 25%.''&lt;br /&gt;
&lt;br /&gt;
=lk mortality (hospital utilization)&lt;br /&gt;
&lt;br /&gt;
===Dead=== &lt;br /&gt;
''The stock of Dead people killed by the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New Death&lt;br /&gt;
&lt;br /&gt;
===Recovered=== &lt;br /&gt;
''The Total amount of people who recovered from the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New recoveries from infected+New recoveries from symptoms+New Recovery+New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===official active cases===&lt;br /&gt;
''It represent the number of people that were tested and it's this number that will be used by the government to follow the pandemic and take decision of lockdown.''&lt;br /&gt;
&lt;br /&gt;
=Diagnosed+Hosptitalized&lt;br /&gt;
&lt;br /&gt;
===Ratio official cases/pop=== &lt;br /&gt;
''The ratio that will be used for lockdown. ''&lt;br /&gt;
&lt;br /&gt;
=official active cases/ Initial population&lt;br /&gt;
&lt;br /&gt;
===New Diagnosed.1=== &lt;br /&gt;
''It's is just the same as New Diagnostic, it is used in the model to have the Total Diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Total Diagnosed=== &lt;br /&gt;
''Used in the model to have the official number of cases in the model.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnosed.1&lt;br /&gt;
&lt;br /&gt;
===TTA recoveries=== &lt;br /&gt;
''Time to recover after being infected and not having symptoms.''&lt;br /&gt;
&lt;br /&gt;
=19&lt;br /&gt;
&lt;br /&gt;
===TTA Symptoms=== &lt;br /&gt;
''The time you take to develop symptoms.''&lt;br /&gt;
&lt;br /&gt;
=5&lt;br /&gt;
&lt;br /&gt;
===TTA sympt===&lt;br /&gt;
''The time you take for recovering after being symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
===TTA Diagnostic=== &lt;br /&gt;
''Time to go to the doctor and have the result.''&lt;br /&gt;
&lt;br /&gt;
=3&lt;br /&gt;
&lt;br /&gt;
===TTA diag===&lt;br /&gt;
''The time you take for recovering after being diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=11&lt;br /&gt;
&lt;br /&gt;
===TTA Hospitalization=== &lt;br /&gt;
''Time to go to the Hospital.''&lt;br /&gt;
&lt;br /&gt;
=1&lt;br /&gt;
&lt;br /&gt;
===TTA Hospital===&lt;br /&gt;
''The time you stay at the hospital before recovering or dying.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
As explained in the problem definition we will focused our results on 3 cases. The first one is the normal scenario, the second is the same scenario but the lockdown is delayed for 1 day, and the last scenario is the normal scenario with a number of hospital beds reduce by 10 000 beds.&lt;br /&gt;
&lt;br /&gt;
==Normal Scenario==&lt;br /&gt;
&lt;br /&gt;
The first scenario take place in Switzerland with 8 500 000 peoples and a hospital capacity of 356 beds for 100k people. The first case was detected the 25 february 2019 and 20 days after the Government of Switzerland have decided to take some serious measures that is in our case represented by a lockdown. &lt;br /&gt;
&lt;br /&gt;
The following table show us the official number of new cases per day:&lt;br /&gt;
&lt;br /&gt;
[[File:Newcases.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
From the simulation we get:&lt;br /&gt;
&lt;br /&gt;
[[File:Yes.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
We can see that the model is really closed to the reality with a pic of 1350 after 35 days. The simulation stopped after 100 days so we just want to focused on these first 100 days. The reality display a pic at 1243 days after 30 days.&lt;br /&gt;
&lt;br /&gt;
The true number of new death per day, and the number from the simulation is also display below:&lt;br /&gt;
&lt;br /&gt;
[[File: deat.png|500px|left]]        [[File:Deats.18.png|500px|rigth]]&lt;br /&gt;
&lt;br /&gt;
We can see that the model is one more time really closed to the reality with a pic of 43 deaths after 50 days, while the reality display a pic at 44 days after 36 days.&lt;br /&gt;
&lt;br /&gt;
We have seen that the simulation is really closed from the data obtained for the Switzerland, but now lets go trough some special cases to see the impact of some decision on the variables.&lt;br /&gt;
&lt;br /&gt;
==Scenario 1: Late lockdown==&lt;br /&gt;
&lt;br /&gt;
In this scenario we will see what could have happened if the government take 1 more day to react and to set up the lockdown. To simulate such a scenario I simply increase the number of &amp;quot;Ratio official cases/pop&amp;quot; in the function IF THEN ELSE in &amp;quot;contact&amp;quot; and &amp;quot;contagion rate&amp;quot; from 0.00015 to 0.00018 and it delay the reaction of the government for 1 day.&lt;br /&gt;
&lt;br /&gt;
[[File: Deathz1.png|450px|left]][[File: Deathz2.png|500px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graph, the total number of official cases (=total diagnosed) jump from 33 000 to 45 000 cases. An increase of 35% in the number of official cases by just delaying for 1 day the government decisions. It illustrates well the exponential effect on the model, indeed we don't have to forget that the delay is just one day but if it has been 4-5 days the number of cases would have been exponentially higher. The second graph shows the deaths jump from 1600 to 2300, that is due to increasing number of cases and the hospital capacity reaching more than 60% utilization. Indeed due to the lookup function if the hospital capacity exceed 60% the mortality increase in the hospital. This is a very interesting scenarios that shows quite well the importance of the early lockdown and highlight the most important point in our model, '''the reaction time'''.&lt;br /&gt;
&lt;br /&gt;
==Scenario 2: Small Hospital capacity==&lt;br /&gt;
&lt;br /&gt;
In this scenario the number of hospital beds goes from 356/100k people to 238/100k people, a loss of -10 000 in variable ''hospital bed'' for Switzerland. This number of beds corresponds to the number of beds for a less developing country, such as Iceland (https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704). &lt;br /&gt;
&lt;br /&gt;
[[File: Utiliz.png|500px|left]][[File: Dead.png|480px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graphs, the hospital utilization reach almost 80%, patients are not treated as well as they would if the utilization was lower, and it involves a pic in the deaths for these patients (right graph). We can see the importance of hospital capacity and for government to have a '''good amount of hospitals'''.&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
Simulation of such complex evnironment as crop rotation in farming was challenging. Created VENSIM model of crop rotation is simplified with some parameters based on just few studies. Real world behaviour can be different because there are many variables affecting the whole process. Although with dramatic simplification, it can be used as a starting point for creating more complex models in agriculture sector. My goal to demonstrate changing of yield, greenhouse gas emissions and nitrogen level was achieved.&lt;br /&gt;
&lt;br /&gt;
Yields results could be extended with price and demand of market implementation for comparsion with different crop yields.&lt;br /&gt;
&lt;br /&gt;
N2O and CO2 emissions were highest in CCC crop strategy, providing speculation that monoculture is enviromentaly unfriendly in compare with polyculture strategies. SSS strategy was providing lowest N2O emissions, on other hand it showed highest CH4 emissions which are specific for legumes as soybean.&lt;br /&gt;
&lt;br /&gt;
Soil nitrogen levels were highly dependent on soybean in crop rotation strategy. With no soybean in crop strategy - in CCC strategy, dramaticaly more inorganic fertilization inputs were necessary&lt;br /&gt;
&lt;br /&gt;
Due to the scope of model, different tillage scenario (0 - no-til) was not simulated. Provided study concluded higher yield and lower emission levels with tillage sceario (1 - tillage, default for simulated model)&lt;br /&gt;
&lt;br /&gt;
===Model extension===&lt;br /&gt;
More complexity can be implemented in the future, for example:&lt;br /&gt;
&lt;br /&gt;
Detailed description of parameteres like Temperature, Pests, Natural disasters or Precipitation.&lt;br /&gt;
&lt;br /&gt;
More crop strategies or new crops.&lt;br /&gt;
&lt;br /&gt;
Market variables like demand or prices of crop seeds or harvesting costs could be also implemented.&lt;br /&gt;
&lt;br /&gt;
Monthly changes (instead of yearly) with more detailed fluctuations during seasons (in Spring there is bigger demand for fertilizers, temperature spikes)&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
&lt;br /&gt;
[http://www.simulace.info/index.php/File:Crop_rotation_finished.mdl Crop rotation VENSIM model]&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
#BEHNKE, Gevan D., Stacy M. ZUBER, Cameron M. PITTELKOW, Emerson D. NAFZIGER a María B. VILLAMIL. Long-term crop rotation and tillage effects on soil greenhouse gas emissions and crop production in Illinois, USA. Agriculture, Ecosystems &amp;amp; Environment [online]. 2018, 261, 62-70 [cit. 2020-01-26]. DOI: 10.1016/j.agee.2018.03.007. ISSN 01678809. Availiable: https://linkinghub.elsevier.com/retrieve/pii/S0167880918301221&lt;br /&gt;
#KOLLAS, Chris, Kurt Christian KERSEBAUM, Claas NENDEL, et al. Crop rotation modelling—A European model intercomparison. European Journal of Agronomy [online]. 2015, 70, 98-111 [cit. 2020-01-26]. DOI: 10.1016/j.eja.2015.06.007. ISSN 11610301. Availiable: https://linkinghub.elsevier.com/retrieve/pii/S1161030115300010&lt;br /&gt;
#BRANKATSCHK, Gerhard a Matthias FINKBEINER. Modeling crop rotation in agricultural LCAs — Challenges and potential solutions. Agricultural Systems [online]. 2015, 138, 66-76 [cit. 2020-01-26]. DOI: 10.1016/j.agsy.2015.05.008. ISSN 0308521X. Availiable: https://linkinghub.elsevier.com/retrieve/pii/S0308521X1500075X&lt;/div&gt;</summary>
		<author><name>Toscool</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20281</id>
		<title>Impact of late lockdown and hospital capacity on 19-COVID spread</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20281"/>
		<updated>2021-01-07T16:15:06Z</updated>

		<summary type="html">&lt;p&gt;Toscool: /* Scenario 2: Small Hospital capacity */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Introduction&lt;br /&gt;
&lt;br /&gt;
=Problem definition=&lt;br /&gt;
&lt;br /&gt;
=Method=&lt;br /&gt;
&lt;br /&gt;
=Model=&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
&lt;br /&gt;
=Problem definition=&lt;br /&gt;
Crop rotation is based on growing a series of different types of crops in the same area in sequential seasons. The planned rotation may vary from a growing season to a few years or even longer periods. It is one of the most effective agricultural control strategies that is used in preventing the loss of soil fertility. It also helps in reducing soil erosion and increases crop yield. Planning an effective crop rotation requires weighing fixed and fluctuating production circumstances: market, farm size, labor supply, climate, soil type, growing practices, etc.&lt;br /&gt;
&lt;br /&gt;
In this simulation I will try to find parameters which have impact on the whole process of crop rotation with goal to find model providing desired outputs (these were slightly changed from concept) - crop yields, greenhouse gas emissions (N2O, CO2, NH4), soil fertility (nitrogen levels).&lt;br /&gt;
&lt;br /&gt;
I will focus on four crop rotation strategies with three different crops - corn, soybean, wheat:&lt;br /&gt;
&lt;br /&gt;
'''CCC''' (continuous corn) - only corn will be farmed for the whole observed time period (40 years)&lt;br /&gt;
&lt;br /&gt;
'''CS''' (corn-soybean) - rotation of corn and soybean will be used in year cycles for the whole observed time period (40 years), first year corn, second year soybean, repeat..&lt;br /&gt;
&lt;br /&gt;
'''SSS''' (continuous soybean) - only soybean will be farmed for the whole observed time period (40 years) &lt;br /&gt;
&lt;br /&gt;
'''CSW''' (corn-soybean-wheat) - rotation of corn, soybean and wheat will be used in year cycles for the whole observed time period (40 years), first year corn, second year soybean, third year wheat, repeat..&lt;br /&gt;
&lt;br /&gt;
Goal of this simulation is to observe dynamic changes with yields, greenhouse gas emissions, tillage strategy and soil nitrogen levels, while changing different crop rotation strategies.&lt;br /&gt;
&lt;br /&gt;
=Method=&lt;br /&gt;
&lt;br /&gt;
Vensim modelling approach was selected due to dynamic behavior of the simulated system.&lt;br /&gt;
&lt;br /&gt;
Our model shows the evolution of the number of people who got infected by the covid-19 virus in&lt;br /&gt;
countries where the population have a high health care protection and where the government has&lt;br /&gt;
decided to make a decision about the virus propagation. The model will explain us how fast the&lt;br /&gt;
virus spreads itself and how political decisions can change the number of infected people at a&lt;br /&gt;
given point in time. The construction of our model is simple: at the beginning one person is&lt;br /&gt;
infected and will, then, infect other people. When you are infected many possibilities are open:&lt;br /&gt;
- You can be a healthy virus carrier. In that case you will not know that you have the virus and&lt;br /&gt;
after 19 days you will be recovered.&lt;br /&gt;
- After 5 days you get symptoms, but you do not have any important health problems, you will&lt;br /&gt;
recover in the next 14 days.&lt;br /&gt;
- After 5 days, you get symptoms and you are very sick and have respiratory problems, after 5&lt;br /&gt;
more days, still feeling bad, you decide to go to the doctor to get a diagnosis. The doctor has than&lt;br /&gt;
two options: to send you back home, where you will recover after 9 more days or hospitalized you&lt;br /&gt;
the next day.&lt;br /&gt;
- The doctor had decided to hospitalize you, you then spend two weeks in intensive care, where&lt;br /&gt;
you will need artificial ventilation and 24-hour nursing care. You can then recover or unfortunately&lt;br /&gt;
die. The higher the hospital utilisation, the greater the probability to die. Indeed, if hospitals get&lt;br /&gt;
busier, the medical staff will be less available and health care quality might decrease.&lt;br /&gt;
When the number of diagnosed and hospitalised people (which are the official number of cases)&lt;br /&gt;
is greater than 3% of the population, the government will take decisions to slow down the spread&lt;br /&gt;
of the virus. This is to say that governments will take some measures, such as installing a forced&lt;br /&gt;
lockdown of the population to decrease the number of contacts per habitant. Moreover, such a&lt;br /&gt;
decision will have an impact of the population, which will be more aware of the situation and will&lt;br /&gt;
be more careful to not spread or contract the virus. So, the contagion rate as the number of contacts&lt;br /&gt;
per people will slow down. They will be less hospitalised people, that means less people in the&lt;br /&gt;
hospital, meaning a better service and so less people who die.&lt;br /&gt;
&lt;br /&gt;
=Model=&lt;br /&gt;
&lt;br /&gt;
Following vensim model was developed based on the study.&lt;br /&gt;
&lt;br /&gt;
[[File:Model1.png|900px|thumb|center|COVID-19 pandemic in Switzerland Stock Flow Diagram]]&lt;br /&gt;
&lt;br /&gt;
== Variables ==&lt;br /&gt;
&lt;br /&gt;
===Initial population=== &lt;br /&gt;
''The Population of Switzerland can be found here: https://en.wikipedia.org/wiki/Demographics_of_Switzerland''&lt;br /&gt;
&lt;br /&gt;
=8 500 000&lt;br /&gt;
&lt;br /&gt;
===Ratio susceptible people=== &lt;br /&gt;
''Decrease the susceptible people by the number of deaths due to the COVID-19.''&lt;br /&gt;
&lt;br /&gt;
=Susceptible population / (Initial population-Dead)&lt;br /&gt;
&lt;br /&gt;
===Susceptible population=== &lt;br /&gt;
''Decrease the susceptible population by the number of new infections.''&lt;br /&gt;
&lt;br /&gt;
=-New infections&lt;br /&gt;
&lt;br /&gt;
===contact=== &lt;br /&gt;
'''Lockdown:''' ''Function IF THEN ELSE that bring the number of new people you meet (contact) from 5 to 0.05 if the ratio exceed 0.015%''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot;&amp;gt; 0.00015, 0.05 , 5 )&lt;br /&gt;
&lt;br /&gt;
===Contagion Rate=== &lt;br /&gt;
'''Lockdown:''' ''contagion rate: IF THEN ELSE that bring the contagion rate from 0.1 to 0.075 if the ratio exceed 0.015%. Function of the awareness in the population (washing more often their hands if lockdown)''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot; &amp;gt; 0.00015 , 0.075 , 0.1 )&lt;br /&gt;
&lt;br /&gt;
===New infections=== &lt;br /&gt;
''It represent the new number of people infected each day.''&lt;br /&gt;
&lt;br /&gt;
=contact*Infected*Ratio susceptible people*Contagion Rate&lt;br /&gt;
&lt;br /&gt;
===Infected=== &lt;br /&gt;
''It represent the stock of the new people infected. We start the model with 1 infected people.''&lt;br /&gt;
&lt;br /&gt;
=New infections-New recoveries from infected-New symptoms ///// Initial value: 1&lt;br /&gt;
&lt;br /&gt;
===New recoveries from infected===&lt;br /&gt;
''It represent the number of people without symptoms and they go in the recovered stock after 19 days.''&lt;br /&gt;
&lt;br /&gt;
=((1-Ratio Symptoms)*Infected)/TTA recoveries&lt;br /&gt;
&lt;br /&gt;
===New symptoms=== &lt;br /&gt;
''It represent the number of new people that develop symptoms during 5 days before going to the symptomatic stock.''&lt;br /&gt;
&lt;br /&gt;
=(Infected*Ratio Symptoms)/TTA Symptoms&lt;br /&gt;
&lt;br /&gt;
===Ratio Symptoms=== &lt;br /&gt;
''The ratio of people who develop some symptoms.''&lt;br /&gt;
&lt;br /&gt;
=0.2&lt;br /&gt;
&lt;br /&gt;
===Symptomatic=== &lt;br /&gt;
''The stock of people symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=New symptoms-New Diagnostic-New recoveries from symptoms&lt;br /&gt;
&lt;br /&gt;
===New recoveries from symptoms=== &lt;br /&gt;
''It represent the number of people that have symptoms but that were not to the doctor, after 14 they are in the recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Diagnost)*Symptomatic/TTA sympt&lt;br /&gt;
&lt;br /&gt;
===New Diagnostic=== &lt;br /&gt;
''It represent the number of new people that are diagnosed each day, they stay 3 days before having the diagnostic.''&lt;br /&gt;
&lt;br /&gt;
=Symptomatic*Ratio Diagnost/TTA Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Ratio Diagnost===&lt;br /&gt;
''the ratio of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=0.4&lt;br /&gt;
&lt;br /&gt;
===Diagnosed=== &lt;br /&gt;
''The stock of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic-New Hospitalization-New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===New Recovery from Diagnostic===&lt;br /&gt;
''It represent the number of people that are diagnosed and not sent to the hospital. they stay 9 days before going in the Recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Hospitalize)*Diagnosed/TTA diag&lt;br /&gt;
&lt;br /&gt;
===New Hospitalization=== &lt;br /&gt;
''It represent the number of people that are diagnosed and sent to the hospital. they stay 1 day before being sent.''&lt;br /&gt;
&lt;br /&gt;
=(Diagnosed*Ratio Hospitalize)/TTA Hospitalization Ratio Hospitalize&lt;br /&gt;
&lt;br /&gt;
===Ratio Hospitalize===&lt;br /&gt;
''The ratio of people that are Hospitalized.''&lt;br /&gt;
&lt;br /&gt;
=0.3&lt;br /&gt;
&lt;br /&gt;
===Hospitalized=== &lt;br /&gt;
''The stock of people that are hospitalized before being Recovered or Dead.''&lt;br /&gt;
&lt;br /&gt;
=New Hospitalization-New Death-New Recovery&lt;br /&gt;
&lt;br /&gt;
===New Recovery=== &lt;br /&gt;
''The number of people that recover each day from the hospitalization. It depends from the Mortality Rate which is depend from the hospital utilization (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=((1-Mortality Rate)*Hospitalized)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===New Death===&lt;br /&gt;
''The number of people that die each day from the hospitalization. It depends from the Mortality Rate which is depend from the hospital utilization (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized*Mortality Rate)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===hospital bed=== &lt;br /&gt;
''The number of bed in Switzerland 356 beds for 100k people with 8.5M people it gives that number: https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704''&lt;br /&gt;
&lt;br /&gt;
=30260&lt;br /&gt;
&lt;br /&gt;
===hospital utilization=== &lt;br /&gt;
''The utilization of the hospital we assume that there is already 8260 beds used for patient outside the covid pandemic. The more utilization we have, the greater the probability to die. Indeed, if hospitals get busier, the medical staff will be less available and health care quality might decrease.''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized/(hospital bed - 8260)) &lt;br /&gt;
&lt;br /&gt;
===lk mortality===&lt;br /&gt;
''The lookup function is used to described the mortality rate.''&lt;br /&gt;
&lt;br /&gt;
[(0,0)-(1000,0.3)],(0,0.065),(0.6,0.065),(0.8,0.12),(1,0.25),(1.2,0.3),(10,0.3),(1000,0.3)&lt;br /&gt;
&lt;br /&gt;
===Mortality Rate=== &lt;br /&gt;
''The mortality rate depends on the hospital utilization. For example based on the above function, if the capacity reach 100% the hospital is full and the chance to die is then 25%.''&lt;br /&gt;
&lt;br /&gt;
=lk mortality (hospital utilization)&lt;br /&gt;
&lt;br /&gt;
===Dead=== &lt;br /&gt;
''The stock of Dead people killed by the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New Death&lt;br /&gt;
&lt;br /&gt;
===Recovered=== &lt;br /&gt;
''The Total amount of people who recovered from the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New recoveries from infected+New recoveries from symptoms+New Recovery+New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===official active cases===&lt;br /&gt;
''It represent the number of people that were tested and it's this number that will be used by the government to follow the pandemic and take decision of lockdown.''&lt;br /&gt;
&lt;br /&gt;
=Diagnosed+Hosptitalized&lt;br /&gt;
&lt;br /&gt;
===Ratio official cases/pop=== &lt;br /&gt;
''The ratio that will be used for lockdown. ''&lt;br /&gt;
&lt;br /&gt;
=official active cases/ Initial population&lt;br /&gt;
&lt;br /&gt;
===New Diagnosed.1=== &lt;br /&gt;
''It's is just the same as New Diagnostic, it is used in the model to have the Total Diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Total Diagnosed=== &lt;br /&gt;
''Used in the model to have the official number of cases in the model.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnosed.1&lt;br /&gt;
&lt;br /&gt;
===TTA recoveries=== &lt;br /&gt;
''Time to recover after being infected and not having symptoms.''&lt;br /&gt;
&lt;br /&gt;
=19&lt;br /&gt;
&lt;br /&gt;
===TTA Symptoms=== &lt;br /&gt;
''The time you take to develop symptoms.''&lt;br /&gt;
&lt;br /&gt;
=5&lt;br /&gt;
&lt;br /&gt;
===TTA sympt===&lt;br /&gt;
''The time you take for recovering after being symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
===TTA Diagnostic=== &lt;br /&gt;
''Time to go to the doctor and have the result.''&lt;br /&gt;
&lt;br /&gt;
=3&lt;br /&gt;
&lt;br /&gt;
===TTA diag===&lt;br /&gt;
''The time you take for recovering after being diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=11&lt;br /&gt;
&lt;br /&gt;
===TTA Hospitalization=== &lt;br /&gt;
''Time to go to the Hospital.''&lt;br /&gt;
&lt;br /&gt;
=1&lt;br /&gt;
&lt;br /&gt;
===TTA Hospital===&lt;br /&gt;
''The time you stay at the hospital before recovering or dying.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
As explained in the problem definition we will focused our results on 3 cases. The first one is the normal scenario, the second is the same scenario but the lockdown is delayed for 1 day, and the last scenario is the normal scenario with a number of hospital beds reduce by 10 000 beds.&lt;br /&gt;
&lt;br /&gt;
==Normal Scenario==&lt;br /&gt;
&lt;br /&gt;
The first scenario take place in Switzerland with 8 500 000 peoples and a hospital capacity of 356 beds for 100k people. The first case was detected the 25 february 2019 and 20 days after the Government of Switzerland have decided to take some serious measures that is in our case represented by a lockdown. &lt;br /&gt;
&lt;br /&gt;
The following table show us the official number of new cases per day:&lt;br /&gt;
&lt;br /&gt;
[[File:Newcases.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
From the simulation we get:&lt;br /&gt;
&lt;br /&gt;
[[File:Yes.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
We can see that the model is really closed to the reality with a pic of 1350 after 35 days. The simulation stopped after 100 days so we just want to focused on these first 100 days. The reality display a pic at 1243 days after 30 days.&lt;br /&gt;
&lt;br /&gt;
The true number of new death per day, and the number from the simulation is also display below:&lt;br /&gt;
&lt;br /&gt;
[[File: deat.png|500px|left]]        [[File:Deats.18.png|500px|rigth]]&lt;br /&gt;
&lt;br /&gt;
We can see that the model is one more time really closed to the reality with a pic of 43 deaths after 50 days, while the reality display a pic at 44 days after 36 days.&lt;br /&gt;
&lt;br /&gt;
We have seen that the simulation is really closed from the data obtained for the Switzerland, but now lets go trough some special cases to see the impact of some decision on the variables.&lt;br /&gt;
&lt;br /&gt;
==Scenario 1: Late lockdown==&lt;br /&gt;
&lt;br /&gt;
In this scenario we will see what could have happened if the government take 1 more day to react and to set up the lockdown. To simulate such a scenario I simply increase the number of &amp;quot;Ratio official cases/pop&amp;quot; in the function IF THEN ELSE in &amp;quot;contact&amp;quot; and &amp;quot;contagion rate&amp;quot; from 0.00015 to 0.00018 and it delay the reaction of the government for 1 day.&lt;br /&gt;
&lt;br /&gt;
[[File: Deathz1.png|450px|left]][[File: Deathz2.png|500px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graph, the total number of official cases (=total diagnosed) jump from 33 000 to 45 000 cases. An increase of 35% in the number of official cases by just delaying for 1 day the government decisions. It illustrates well the exponential effect on the model, indeed we don't have to forget that the delay is just one day but if it has been 4-5 days the number of cases would have been exponentially higher. The second graph shows the deaths jump from 1600 to 2300, that is due to increasing number of cases and the hospital capacity reaching more than 60% utilization. Indeed due to the lookup function if the hospital capacity exceed 60% the mortality increase in the hospital. This is a very interesting scenarios that shows quite well the importance of the early lockdown and highlight the most important point in our model, '''the reaction time'''.&lt;br /&gt;
&lt;br /&gt;
==Scenario 2: Small Hospital capacity==&lt;br /&gt;
&lt;br /&gt;
In this scenario the number of hospital beds goes from 356/100k people to 238/100k people, a loss of -10 000 in variable ''hospital bed'' for Switzerland. This number of beds corresponds to the number of beds for a less developing country, such as Iceland (https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704). &lt;br /&gt;
&lt;br /&gt;
[[File: Utiliz.png|500px|left]][[File: Dead.png|450px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graphs, the hospital utilization reach almost 80%, patients are not treated as well as they would if the utilization was lower, and it involves a pic in the deaths for these patients (right graph). We can see the importance of hospital capacity and for government to have a '''good amount of hospitals'''.&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
Simulation of such complex evnironment as crop rotation in farming was challenging. Created VENSIM model of crop rotation is simplified with some parameters based on just few studies. Real world behaviour can be different because there are many variables affecting the whole process. Although with dramatic simplification, it can be used as a starting point for creating more complex models in agriculture sector. My goal to demonstrate changing of yield, greenhouse gas emissions and nitrogen level was achieved.&lt;br /&gt;
&lt;br /&gt;
Yields results could be extended with price and demand of market implementation for comparsion with different crop yields.&lt;br /&gt;
&lt;br /&gt;
N2O and CO2 emissions were highest in CCC crop strategy, providing speculation that monoculture is enviromentaly unfriendly in compare with polyculture strategies. SSS strategy was providing lowest N2O emissions, on other hand it showed highest CH4 emissions which are specific for legumes as soybean.&lt;br /&gt;
&lt;br /&gt;
Soil nitrogen levels were highly dependent on soybean in crop rotation strategy. With no soybean in crop strategy - in CCC strategy, dramaticaly more inorganic fertilization inputs were necessary&lt;br /&gt;
&lt;br /&gt;
Due to the scope of model, different tillage scenario (0 - no-til) was not simulated. Provided study concluded higher yield and lower emission levels with tillage sceario (1 - tillage, default for simulated model)&lt;br /&gt;
&lt;br /&gt;
===Model extension===&lt;br /&gt;
More complexity can be implemented in the future, for example:&lt;br /&gt;
&lt;br /&gt;
Detailed description of parameteres like Temperature, Pests, Natural disasters or Precipitation.&lt;br /&gt;
&lt;br /&gt;
More crop strategies or new crops.&lt;br /&gt;
&lt;br /&gt;
Market variables like demand or prices of crop seeds or harvesting costs could be also implemented.&lt;br /&gt;
&lt;br /&gt;
Monthly changes (instead of yearly) with more detailed fluctuations during seasons (in Spring there is bigger demand for fertilizers, temperature spikes)&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
&lt;br /&gt;
[http://www.simulace.info/index.php/File:Crop_rotation_finished.mdl Crop rotation VENSIM model]&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
#BEHNKE, Gevan D., Stacy M. ZUBER, Cameron M. PITTELKOW, Emerson D. NAFZIGER a María B. VILLAMIL. Long-term crop rotation and tillage effects on soil greenhouse gas emissions and crop production in Illinois, USA. Agriculture, Ecosystems &amp;amp; Environment [online]. 2018, 261, 62-70 [cit. 2020-01-26]. DOI: 10.1016/j.agee.2018.03.007. ISSN 01678809. Availiable: https://linkinghub.elsevier.com/retrieve/pii/S0167880918301221&lt;br /&gt;
#KOLLAS, Chris, Kurt Christian KERSEBAUM, Claas NENDEL, et al. Crop rotation modelling—A European model intercomparison. European Journal of Agronomy [online]. 2015, 70, 98-111 [cit. 2020-01-26]. DOI: 10.1016/j.eja.2015.06.007. ISSN 11610301. Availiable: https://linkinghub.elsevier.com/retrieve/pii/S1161030115300010&lt;br /&gt;
#BRANKATSCHK, Gerhard a Matthias FINKBEINER. Modeling crop rotation in agricultural LCAs — Challenges and potential solutions. Agricultural Systems [online]. 2015, 138, 66-76 [cit. 2020-01-26]. DOI: 10.1016/j.agsy.2015.05.008. ISSN 0308521X. Availiable: https://linkinghub.elsevier.com/retrieve/pii/S0308521X1500075X&lt;/div&gt;</summary>
		<author><name>Toscool</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20280</id>
		<title>Impact of late lockdown and hospital capacity on 19-COVID spread</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20280"/>
		<updated>2021-01-07T16:14:55Z</updated>

		<summary type="html">&lt;p&gt;Toscool: /* Scenario 2: Small Hospital capacity */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Introduction&lt;br /&gt;
&lt;br /&gt;
=Problem definition=&lt;br /&gt;
&lt;br /&gt;
=Method=&lt;br /&gt;
&lt;br /&gt;
=Model=&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
&lt;br /&gt;
=Problem definition=&lt;br /&gt;
Crop rotation is based on growing a series of different types of crops in the same area in sequential seasons. The planned rotation may vary from a growing season to a few years or even longer periods. It is one of the most effective agricultural control strategies that is used in preventing the loss of soil fertility. It also helps in reducing soil erosion and increases crop yield. Planning an effective crop rotation requires weighing fixed and fluctuating production circumstances: market, farm size, labor supply, climate, soil type, growing practices, etc.&lt;br /&gt;
&lt;br /&gt;
In this simulation I will try to find parameters which have impact on the whole process of crop rotation with goal to find model providing desired outputs (these were slightly changed from concept) - crop yields, greenhouse gas emissions (N2O, CO2, NH4), soil fertility (nitrogen levels).&lt;br /&gt;
&lt;br /&gt;
I will focus on four crop rotation strategies with three different crops - corn, soybean, wheat:&lt;br /&gt;
&lt;br /&gt;
'''CCC''' (continuous corn) - only corn will be farmed for the whole observed time period (40 years)&lt;br /&gt;
&lt;br /&gt;
'''CS''' (corn-soybean) - rotation of corn and soybean will be used in year cycles for the whole observed time period (40 years), first year corn, second year soybean, repeat..&lt;br /&gt;
&lt;br /&gt;
'''SSS''' (continuous soybean) - only soybean will be farmed for the whole observed time period (40 years) &lt;br /&gt;
&lt;br /&gt;
'''CSW''' (corn-soybean-wheat) - rotation of corn, soybean and wheat will be used in year cycles for the whole observed time period (40 years), first year corn, second year soybean, third year wheat, repeat..&lt;br /&gt;
&lt;br /&gt;
Goal of this simulation is to observe dynamic changes with yields, greenhouse gas emissions, tillage strategy and soil nitrogen levels, while changing different crop rotation strategies.&lt;br /&gt;
&lt;br /&gt;
=Method=&lt;br /&gt;
&lt;br /&gt;
Vensim modelling approach was selected due to dynamic behavior of the simulated system.&lt;br /&gt;
&lt;br /&gt;
Our model shows the evolution of the number of people who got infected by the covid-19 virus in&lt;br /&gt;
countries where the population have a high health care protection and where the government has&lt;br /&gt;
decided to make a decision about the virus propagation. The model will explain us how fast the&lt;br /&gt;
virus spreads itself and how political decisions can change the number of infected people at a&lt;br /&gt;
given point in time. The construction of our model is simple: at the beginning one person is&lt;br /&gt;
infected and will, then, infect other people. When you are infected many possibilities are open:&lt;br /&gt;
- You can be a healthy virus carrier. In that case you will not know that you have the virus and&lt;br /&gt;
after 19 days you will be recovered.&lt;br /&gt;
- After 5 days you get symptoms, but you do not have any important health problems, you will&lt;br /&gt;
recover in the next 14 days.&lt;br /&gt;
- After 5 days, you get symptoms and you are very sick and have respiratory problems, after 5&lt;br /&gt;
more days, still feeling bad, you decide to go to the doctor to get a diagnosis. The doctor has than&lt;br /&gt;
two options: to send you back home, where you will recover after 9 more days or hospitalized you&lt;br /&gt;
the next day.&lt;br /&gt;
- The doctor had decided to hospitalize you, you then spend two weeks in intensive care, where&lt;br /&gt;
you will need artificial ventilation and 24-hour nursing care. You can then recover or unfortunately&lt;br /&gt;
die. The higher the hospital utilisation, the greater the probability to die. Indeed, if hospitals get&lt;br /&gt;
busier, the medical staff will be less available and health care quality might decrease.&lt;br /&gt;
When the number of diagnosed and hospitalised people (which are the official number of cases)&lt;br /&gt;
is greater than 3% of the population, the government will take decisions to slow down the spread&lt;br /&gt;
of the virus. This is to say that governments will take some measures, such as installing a forced&lt;br /&gt;
lockdown of the population to decrease the number of contacts per habitant. Moreover, such a&lt;br /&gt;
decision will have an impact of the population, which will be more aware of the situation and will&lt;br /&gt;
be more careful to not spread or contract the virus. So, the contagion rate as the number of contacts&lt;br /&gt;
per people will slow down. They will be less hospitalised people, that means less people in the&lt;br /&gt;
hospital, meaning a better service and so less people who die.&lt;br /&gt;
&lt;br /&gt;
=Model=&lt;br /&gt;
&lt;br /&gt;
Following vensim model was developed based on the study.&lt;br /&gt;
&lt;br /&gt;
[[File:Model1.png|900px|thumb|center|COVID-19 pandemic in Switzerland Stock Flow Diagram]]&lt;br /&gt;
&lt;br /&gt;
== Variables ==&lt;br /&gt;
&lt;br /&gt;
===Initial population=== &lt;br /&gt;
''The Population of Switzerland can be found here: https://en.wikipedia.org/wiki/Demographics_of_Switzerland''&lt;br /&gt;
&lt;br /&gt;
=8 500 000&lt;br /&gt;
&lt;br /&gt;
===Ratio susceptible people=== &lt;br /&gt;
''Decrease the susceptible people by the number of deaths due to the COVID-19.''&lt;br /&gt;
&lt;br /&gt;
=Susceptible population / (Initial population-Dead)&lt;br /&gt;
&lt;br /&gt;
===Susceptible population=== &lt;br /&gt;
''Decrease the susceptible population by the number of new infections.''&lt;br /&gt;
&lt;br /&gt;
=-New infections&lt;br /&gt;
&lt;br /&gt;
===contact=== &lt;br /&gt;
'''Lockdown:''' ''Function IF THEN ELSE that bring the number of new people you meet (contact) from 5 to 0.05 if the ratio exceed 0.015%''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot;&amp;gt; 0.00015, 0.05 , 5 )&lt;br /&gt;
&lt;br /&gt;
===Contagion Rate=== &lt;br /&gt;
'''Lockdown:''' ''contagion rate: IF THEN ELSE that bring the contagion rate from 0.1 to 0.075 if the ratio exceed 0.015%. Function of the awareness in the population (washing more often their hands if lockdown)''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot; &amp;gt; 0.00015 , 0.075 , 0.1 )&lt;br /&gt;
&lt;br /&gt;
===New infections=== &lt;br /&gt;
''It represent the new number of people infected each day.''&lt;br /&gt;
&lt;br /&gt;
=contact*Infected*Ratio susceptible people*Contagion Rate&lt;br /&gt;
&lt;br /&gt;
===Infected=== &lt;br /&gt;
''It represent the stock of the new people infected. We start the model with 1 infected people.''&lt;br /&gt;
&lt;br /&gt;
=New infections-New recoveries from infected-New symptoms ///// Initial value: 1&lt;br /&gt;
&lt;br /&gt;
===New recoveries from infected===&lt;br /&gt;
''It represent the number of people without symptoms and they go in the recovered stock after 19 days.''&lt;br /&gt;
&lt;br /&gt;
=((1-Ratio Symptoms)*Infected)/TTA recoveries&lt;br /&gt;
&lt;br /&gt;
===New symptoms=== &lt;br /&gt;
''It represent the number of new people that develop symptoms during 5 days before going to the symptomatic stock.''&lt;br /&gt;
&lt;br /&gt;
=(Infected*Ratio Symptoms)/TTA Symptoms&lt;br /&gt;
&lt;br /&gt;
===Ratio Symptoms=== &lt;br /&gt;
''The ratio of people who develop some symptoms.''&lt;br /&gt;
&lt;br /&gt;
=0.2&lt;br /&gt;
&lt;br /&gt;
===Symptomatic=== &lt;br /&gt;
''The stock of people symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=New symptoms-New Diagnostic-New recoveries from symptoms&lt;br /&gt;
&lt;br /&gt;
===New recoveries from symptoms=== &lt;br /&gt;
''It represent the number of people that have symptoms but that were not to the doctor, after 14 they are in the recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Diagnost)*Symptomatic/TTA sympt&lt;br /&gt;
&lt;br /&gt;
===New Diagnostic=== &lt;br /&gt;
''It represent the number of new people that are diagnosed each day, they stay 3 days before having the diagnostic.''&lt;br /&gt;
&lt;br /&gt;
=Symptomatic*Ratio Diagnost/TTA Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Ratio Diagnost===&lt;br /&gt;
''the ratio of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=0.4&lt;br /&gt;
&lt;br /&gt;
===Diagnosed=== &lt;br /&gt;
''The stock of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic-New Hospitalization-New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===New Recovery from Diagnostic===&lt;br /&gt;
''It represent the number of people that are diagnosed and not sent to the hospital. they stay 9 days before going in the Recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Hospitalize)*Diagnosed/TTA diag&lt;br /&gt;
&lt;br /&gt;
===New Hospitalization=== &lt;br /&gt;
''It represent the number of people that are diagnosed and sent to the hospital. they stay 1 day before being sent.''&lt;br /&gt;
&lt;br /&gt;
=(Diagnosed*Ratio Hospitalize)/TTA Hospitalization Ratio Hospitalize&lt;br /&gt;
&lt;br /&gt;
===Ratio Hospitalize===&lt;br /&gt;
''The ratio of people that are Hospitalized.''&lt;br /&gt;
&lt;br /&gt;
=0.3&lt;br /&gt;
&lt;br /&gt;
===Hospitalized=== &lt;br /&gt;
''The stock of people that are hospitalized before being Recovered or Dead.''&lt;br /&gt;
&lt;br /&gt;
=New Hospitalization-New Death-New Recovery&lt;br /&gt;
&lt;br /&gt;
===New Recovery=== &lt;br /&gt;
''The number of people that recover each day from the hospitalization. It depends from the Mortality Rate which is depend from the hospital utilization (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=((1-Mortality Rate)*Hospitalized)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===New Death===&lt;br /&gt;
''The number of people that die each day from the hospitalization. It depends from the Mortality Rate which is depend from the hospital utilization (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized*Mortality Rate)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===hospital bed=== &lt;br /&gt;
''The number of bed in Switzerland 356 beds for 100k people with 8.5M people it gives that number: https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704''&lt;br /&gt;
&lt;br /&gt;
=30260&lt;br /&gt;
&lt;br /&gt;
===hospital utilization=== &lt;br /&gt;
''The utilization of the hospital we assume that there is already 8260 beds used for patient outside the covid pandemic. The more utilization we have, the greater the probability to die. Indeed, if hospitals get busier, the medical staff will be less available and health care quality might decrease.''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized/(hospital bed - 8260)) &lt;br /&gt;
&lt;br /&gt;
===lk mortality===&lt;br /&gt;
''The lookup function is used to described the mortality rate.''&lt;br /&gt;
&lt;br /&gt;
[(0,0)-(1000,0.3)],(0,0.065),(0.6,0.065),(0.8,0.12),(1,0.25),(1.2,0.3),(10,0.3),(1000,0.3)&lt;br /&gt;
&lt;br /&gt;
===Mortality Rate=== &lt;br /&gt;
''The mortality rate depends on the hospital utilization. For example based on the above function, if the capacity reach 100% the hospital is full and the chance to die is then 25%.''&lt;br /&gt;
&lt;br /&gt;
=lk mortality (hospital utilization)&lt;br /&gt;
&lt;br /&gt;
===Dead=== &lt;br /&gt;
''The stock of Dead people killed by the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New Death&lt;br /&gt;
&lt;br /&gt;
===Recovered=== &lt;br /&gt;
''The Total amount of people who recovered from the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New recoveries from infected+New recoveries from symptoms+New Recovery+New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===official active cases===&lt;br /&gt;
''It represent the number of people that were tested and it's this number that will be used by the government to follow the pandemic and take decision of lockdown.''&lt;br /&gt;
&lt;br /&gt;
=Diagnosed+Hosptitalized&lt;br /&gt;
&lt;br /&gt;
===Ratio official cases/pop=== &lt;br /&gt;
''The ratio that will be used for lockdown. ''&lt;br /&gt;
&lt;br /&gt;
=official active cases/ Initial population&lt;br /&gt;
&lt;br /&gt;
===New Diagnosed.1=== &lt;br /&gt;
''It's is just the same as New Diagnostic, it is used in the model to have the Total Diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Total Diagnosed=== &lt;br /&gt;
''Used in the model to have the official number of cases in the model.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnosed.1&lt;br /&gt;
&lt;br /&gt;
===TTA recoveries=== &lt;br /&gt;
''Time to recover after being infected and not having symptoms.''&lt;br /&gt;
&lt;br /&gt;
=19&lt;br /&gt;
&lt;br /&gt;
===TTA Symptoms=== &lt;br /&gt;
''The time you take to develop symptoms.''&lt;br /&gt;
&lt;br /&gt;
=5&lt;br /&gt;
&lt;br /&gt;
===TTA sympt===&lt;br /&gt;
''The time you take for recovering after being symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
===TTA Diagnostic=== &lt;br /&gt;
''Time to go to the doctor and have the result.''&lt;br /&gt;
&lt;br /&gt;
=3&lt;br /&gt;
&lt;br /&gt;
===TTA diag===&lt;br /&gt;
''The time you take for recovering after being diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=11&lt;br /&gt;
&lt;br /&gt;
===TTA Hospitalization=== &lt;br /&gt;
''Time to go to the Hospital.''&lt;br /&gt;
&lt;br /&gt;
=1&lt;br /&gt;
&lt;br /&gt;
===TTA Hospital===&lt;br /&gt;
''The time you stay at the hospital before recovering or dying.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
As explained in the problem definition we will focused our results on 3 cases. The first one is the normal scenario, the second is the same scenario but the lockdown is delayed for 1 day, and the last scenario is the normal scenario with a number of hospital beds reduce by 10 000 beds.&lt;br /&gt;
&lt;br /&gt;
==Normal Scenario==&lt;br /&gt;
&lt;br /&gt;
The first scenario take place in Switzerland with 8 500 000 peoples and a hospital capacity of 356 beds for 100k people. The first case was detected the 25 february 2019 and 20 days after the Government of Switzerland have decided to take some serious measures that is in our case represented by a lockdown. &lt;br /&gt;
&lt;br /&gt;
The following table show us the official number of new cases per day:&lt;br /&gt;
&lt;br /&gt;
[[File:Newcases.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
From the simulation we get:&lt;br /&gt;
&lt;br /&gt;
[[File:Yes.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
We can see that the model is really closed to the reality with a pic of 1350 after 35 days. The simulation stopped after 100 days so we just want to focused on these first 100 days. The reality display a pic at 1243 days after 30 days.&lt;br /&gt;
&lt;br /&gt;
The true number of new death per day, and the number from the simulation is also display below:&lt;br /&gt;
&lt;br /&gt;
[[File: deat.png|500px|left]]        [[File:Deats.18.png|500px|rigth]]&lt;br /&gt;
&lt;br /&gt;
We can see that the model is one more time really closed to the reality with a pic of 43 deaths after 50 days, while the reality display a pic at 44 days after 36 days.&lt;br /&gt;
&lt;br /&gt;
We have seen that the simulation is really closed from the data obtained for the Switzerland, but now lets go trough some special cases to see the impact of some decision on the variables.&lt;br /&gt;
&lt;br /&gt;
==Scenario 1: Late lockdown==&lt;br /&gt;
&lt;br /&gt;
In this scenario we will see what could have happened if the government take 1 more day to react and to set up the lockdown. To simulate such a scenario I simply increase the number of &amp;quot;Ratio official cases/pop&amp;quot; in the function IF THEN ELSE in &amp;quot;contact&amp;quot; and &amp;quot;contagion rate&amp;quot; from 0.00015 to 0.00018 and it delay the reaction of the government for 1 day.&lt;br /&gt;
&lt;br /&gt;
[[File: Deathz1.png|450px|left]][[File: Deathz2.png|500px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graph, the total number of official cases (=total diagnosed) jump from 33 000 to 45 000 cases. An increase of 35% in the number of official cases by just delaying for 1 day the government decisions. It illustrates well the exponential effect on the model, indeed we don't have to forget that the delay is just one day but if it has been 4-5 days the number of cases would have been exponentially higher. The second graph shows the deaths jump from 1600 to 2300, that is due to increasing number of cases and the hospital capacity reaching more than 60% utilization. Indeed due to the lookup function if the hospital capacity exceed 60% the mortality increase in the hospital. This is a very interesting scenarios that shows quite well the importance of the early lockdown and highlight the most important point in our model, '''the reaction time'''.&lt;br /&gt;
&lt;br /&gt;
==Scenario 2: Small Hospital capacity==&lt;br /&gt;
&lt;br /&gt;
In this scenario the number of hospital beds goes from 356/100k people to 238/100k people, a loss of -10 000 in variable ''hospital bed'' for Switzerland. This number of beds corresponds to the number of beds for a less developing country, such as Iceland (https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704). &lt;br /&gt;
&lt;br /&gt;
[[File: Utiliz.png|500px|left]][[File: Dead.png|500px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graphs, the hospital utilization reach almost 80%, patients are not treated as well as they would if the utilization was lower, and it involves a pic in the deaths for these patients (right graph). We can see the importance of hospital capacity and for government to have a '''good amount of hospitals'''.&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
Simulation of such complex evnironment as crop rotation in farming was challenging. Created VENSIM model of crop rotation is simplified with some parameters based on just few studies. Real world behaviour can be different because there are many variables affecting the whole process. Although with dramatic simplification, it can be used as a starting point for creating more complex models in agriculture sector. My goal to demonstrate changing of yield, greenhouse gas emissions and nitrogen level was achieved.&lt;br /&gt;
&lt;br /&gt;
Yields results could be extended with price and demand of market implementation for comparsion with different crop yields.&lt;br /&gt;
&lt;br /&gt;
N2O and CO2 emissions were highest in CCC crop strategy, providing speculation that monoculture is enviromentaly unfriendly in compare with polyculture strategies. SSS strategy was providing lowest N2O emissions, on other hand it showed highest CH4 emissions which are specific for legumes as soybean.&lt;br /&gt;
&lt;br /&gt;
Soil nitrogen levels were highly dependent on soybean in crop rotation strategy. With no soybean in crop strategy - in CCC strategy, dramaticaly more inorganic fertilization inputs were necessary&lt;br /&gt;
&lt;br /&gt;
Due to the scope of model, different tillage scenario (0 - no-til) was not simulated. Provided study concluded higher yield and lower emission levels with tillage sceario (1 - tillage, default for simulated model)&lt;br /&gt;
&lt;br /&gt;
===Model extension===&lt;br /&gt;
More complexity can be implemented in the future, for example:&lt;br /&gt;
&lt;br /&gt;
Detailed description of parameteres like Temperature, Pests, Natural disasters or Precipitation.&lt;br /&gt;
&lt;br /&gt;
More crop strategies or new crops.&lt;br /&gt;
&lt;br /&gt;
Market variables like demand or prices of crop seeds or harvesting costs could be also implemented.&lt;br /&gt;
&lt;br /&gt;
Monthly changes (instead of yearly) with more detailed fluctuations during seasons (in Spring there is bigger demand for fertilizers, temperature spikes)&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
&lt;br /&gt;
[http://www.simulace.info/index.php/File:Crop_rotation_finished.mdl Crop rotation VENSIM model]&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
#BEHNKE, Gevan D., Stacy M. ZUBER, Cameron M. PITTELKOW, Emerson D. NAFZIGER a María B. VILLAMIL. Long-term crop rotation and tillage effects on soil greenhouse gas emissions and crop production in Illinois, USA. Agriculture, Ecosystems &amp;amp; Environment [online]. 2018, 261, 62-70 [cit. 2020-01-26]. DOI: 10.1016/j.agee.2018.03.007. ISSN 01678809. Availiable: https://linkinghub.elsevier.com/retrieve/pii/S0167880918301221&lt;br /&gt;
#KOLLAS, Chris, Kurt Christian KERSEBAUM, Claas NENDEL, et al. Crop rotation modelling—A European model intercomparison. European Journal of Agronomy [online]. 2015, 70, 98-111 [cit. 2020-01-26]. DOI: 10.1016/j.eja.2015.06.007. ISSN 11610301. Availiable: https://linkinghub.elsevier.com/retrieve/pii/S1161030115300010&lt;br /&gt;
#BRANKATSCHK, Gerhard a Matthias FINKBEINER. Modeling crop rotation in agricultural LCAs — Challenges and potential solutions. Agricultural Systems [online]. 2015, 138, 66-76 [cit. 2020-01-26]. DOI: 10.1016/j.agsy.2015.05.008. ISSN 0308521X. Availiable: https://linkinghub.elsevier.com/retrieve/pii/S0308521X1500075X&lt;/div&gt;</summary>
		<author><name>Toscool</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20279</id>
		<title>Impact of late lockdown and hospital capacity on 19-COVID spread</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20279"/>
		<updated>2021-01-07T16:14:46Z</updated>

		<summary type="html">&lt;p&gt;Toscool: /* Scenario 2: Small Hospital capacity */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Introduction&lt;br /&gt;
&lt;br /&gt;
=Problem definition=&lt;br /&gt;
&lt;br /&gt;
=Method=&lt;br /&gt;
&lt;br /&gt;
=Model=&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
&lt;br /&gt;
=Problem definition=&lt;br /&gt;
Crop rotation is based on growing a series of different types of crops in the same area in sequential seasons. The planned rotation may vary from a growing season to a few years or even longer periods. It is one of the most effective agricultural control strategies that is used in preventing the loss of soil fertility. It also helps in reducing soil erosion and increases crop yield. Planning an effective crop rotation requires weighing fixed and fluctuating production circumstances: market, farm size, labor supply, climate, soil type, growing practices, etc.&lt;br /&gt;
&lt;br /&gt;
In this simulation I will try to find parameters which have impact on the whole process of crop rotation with goal to find model providing desired outputs (these were slightly changed from concept) - crop yields, greenhouse gas emissions (N2O, CO2, NH4), soil fertility (nitrogen levels).&lt;br /&gt;
&lt;br /&gt;
I will focus on four crop rotation strategies with three different crops - corn, soybean, wheat:&lt;br /&gt;
&lt;br /&gt;
'''CCC''' (continuous corn) - only corn will be farmed for the whole observed time period (40 years)&lt;br /&gt;
&lt;br /&gt;
'''CS''' (corn-soybean) - rotation of corn and soybean will be used in year cycles for the whole observed time period (40 years), first year corn, second year soybean, repeat..&lt;br /&gt;
&lt;br /&gt;
'''SSS''' (continuous soybean) - only soybean will be farmed for the whole observed time period (40 years) &lt;br /&gt;
&lt;br /&gt;
'''CSW''' (corn-soybean-wheat) - rotation of corn, soybean and wheat will be used in year cycles for the whole observed time period (40 years), first year corn, second year soybean, third year wheat, repeat..&lt;br /&gt;
&lt;br /&gt;
Goal of this simulation is to observe dynamic changes with yields, greenhouse gas emissions, tillage strategy and soil nitrogen levels, while changing different crop rotation strategies.&lt;br /&gt;
&lt;br /&gt;
=Method=&lt;br /&gt;
&lt;br /&gt;
Vensim modelling approach was selected due to dynamic behavior of the simulated system.&lt;br /&gt;
&lt;br /&gt;
Our model shows the evolution of the number of people who got infected by the covid-19 virus in&lt;br /&gt;
countries where the population have a high health care protection and where the government has&lt;br /&gt;
decided to make a decision about the virus propagation. The model will explain us how fast the&lt;br /&gt;
virus spreads itself and how political decisions can change the number of infected people at a&lt;br /&gt;
given point in time. The construction of our model is simple: at the beginning one person is&lt;br /&gt;
infected and will, then, infect other people. When you are infected many possibilities are open:&lt;br /&gt;
- You can be a healthy virus carrier. In that case you will not know that you have the virus and&lt;br /&gt;
after 19 days you will be recovered.&lt;br /&gt;
- After 5 days you get symptoms, but you do not have any important health problems, you will&lt;br /&gt;
recover in the next 14 days.&lt;br /&gt;
- After 5 days, you get symptoms and you are very sick and have respiratory problems, after 5&lt;br /&gt;
more days, still feeling bad, you decide to go to the doctor to get a diagnosis. The doctor has than&lt;br /&gt;
two options: to send you back home, where you will recover after 9 more days or hospitalized you&lt;br /&gt;
the next day.&lt;br /&gt;
- The doctor had decided to hospitalize you, you then spend two weeks in intensive care, where&lt;br /&gt;
you will need artificial ventilation and 24-hour nursing care. You can then recover or unfortunately&lt;br /&gt;
die. The higher the hospital utilisation, the greater the probability to die. Indeed, if hospitals get&lt;br /&gt;
busier, the medical staff will be less available and health care quality might decrease.&lt;br /&gt;
When the number of diagnosed and hospitalised people (which are the official number of cases)&lt;br /&gt;
is greater than 3% of the population, the government will take decisions to slow down the spread&lt;br /&gt;
of the virus. This is to say that governments will take some measures, such as installing a forced&lt;br /&gt;
lockdown of the population to decrease the number of contacts per habitant. Moreover, such a&lt;br /&gt;
decision will have an impact of the population, which will be more aware of the situation and will&lt;br /&gt;
be more careful to not spread or contract the virus. So, the contagion rate as the number of contacts&lt;br /&gt;
per people will slow down. They will be less hospitalised people, that means less people in the&lt;br /&gt;
hospital, meaning a better service and so less people who die.&lt;br /&gt;
&lt;br /&gt;
=Model=&lt;br /&gt;
&lt;br /&gt;
Following vensim model was developed based on the study.&lt;br /&gt;
&lt;br /&gt;
[[File:Model1.png|900px|thumb|center|COVID-19 pandemic in Switzerland Stock Flow Diagram]]&lt;br /&gt;
&lt;br /&gt;
== Variables ==&lt;br /&gt;
&lt;br /&gt;
===Initial population=== &lt;br /&gt;
''The Population of Switzerland can be found here: https://en.wikipedia.org/wiki/Demographics_of_Switzerland''&lt;br /&gt;
&lt;br /&gt;
=8 500 000&lt;br /&gt;
&lt;br /&gt;
===Ratio susceptible people=== &lt;br /&gt;
''Decrease the susceptible people by the number of deaths due to the COVID-19.''&lt;br /&gt;
&lt;br /&gt;
=Susceptible population / (Initial population-Dead)&lt;br /&gt;
&lt;br /&gt;
===Susceptible population=== &lt;br /&gt;
''Decrease the susceptible population by the number of new infections.''&lt;br /&gt;
&lt;br /&gt;
=-New infections&lt;br /&gt;
&lt;br /&gt;
===contact=== &lt;br /&gt;
'''Lockdown:''' ''Function IF THEN ELSE that bring the number of new people you meet (contact) from 5 to 0.05 if the ratio exceed 0.015%''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot;&amp;gt; 0.00015, 0.05 , 5 )&lt;br /&gt;
&lt;br /&gt;
===Contagion Rate=== &lt;br /&gt;
'''Lockdown:''' ''contagion rate: IF THEN ELSE that bring the contagion rate from 0.1 to 0.075 if the ratio exceed 0.015%. Function of the awareness in the population (washing more often their hands if lockdown)''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot; &amp;gt; 0.00015 , 0.075 , 0.1 )&lt;br /&gt;
&lt;br /&gt;
===New infections=== &lt;br /&gt;
''It represent the new number of people infected each day.''&lt;br /&gt;
&lt;br /&gt;
=contact*Infected*Ratio susceptible people*Contagion Rate&lt;br /&gt;
&lt;br /&gt;
===Infected=== &lt;br /&gt;
''It represent the stock of the new people infected. We start the model with 1 infected people.''&lt;br /&gt;
&lt;br /&gt;
=New infections-New recoveries from infected-New symptoms ///// Initial value: 1&lt;br /&gt;
&lt;br /&gt;
===New recoveries from infected===&lt;br /&gt;
''It represent the number of people without symptoms and they go in the recovered stock after 19 days.''&lt;br /&gt;
&lt;br /&gt;
=((1-Ratio Symptoms)*Infected)/TTA recoveries&lt;br /&gt;
&lt;br /&gt;
===New symptoms=== &lt;br /&gt;
''It represent the number of new people that develop symptoms during 5 days before going to the symptomatic stock.''&lt;br /&gt;
&lt;br /&gt;
=(Infected*Ratio Symptoms)/TTA Symptoms&lt;br /&gt;
&lt;br /&gt;
===Ratio Symptoms=== &lt;br /&gt;
''The ratio of people who develop some symptoms.''&lt;br /&gt;
&lt;br /&gt;
=0.2&lt;br /&gt;
&lt;br /&gt;
===Symptomatic=== &lt;br /&gt;
''The stock of people symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=New symptoms-New Diagnostic-New recoveries from symptoms&lt;br /&gt;
&lt;br /&gt;
===New recoveries from symptoms=== &lt;br /&gt;
''It represent the number of people that have symptoms but that were not to the doctor, after 14 they are in the recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Diagnost)*Symptomatic/TTA sympt&lt;br /&gt;
&lt;br /&gt;
===New Diagnostic=== &lt;br /&gt;
''It represent the number of new people that are diagnosed each day, they stay 3 days before having the diagnostic.''&lt;br /&gt;
&lt;br /&gt;
=Symptomatic*Ratio Diagnost/TTA Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Ratio Diagnost===&lt;br /&gt;
''the ratio of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=0.4&lt;br /&gt;
&lt;br /&gt;
===Diagnosed=== &lt;br /&gt;
''The stock of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic-New Hospitalization-New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===New Recovery from Diagnostic===&lt;br /&gt;
''It represent the number of people that are diagnosed and not sent to the hospital. they stay 9 days before going in the Recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Hospitalize)*Diagnosed/TTA diag&lt;br /&gt;
&lt;br /&gt;
===New Hospitalization=== &lt;br /&gt;
''It represent the number of people that are diagnosed and sent to the hospital. they stay 1 day before being sent.''&lt;br /&gt;
&lt;br /&gt;
=(Diagnosed*Ratio Hospitalize)/TTA Hospitalization Ratio Hospitalize&lt;br /&gt;
&lt;br /&gt;
===Ratio Hospitalize===&lt;br /&gt;
''The ratio of people that are Hospitalized.''&lt;br /&gt;
&lt;br /&gt;
=0.3&lt;br /&gt;
&lt;br /&gt;
===Hospitalized=== &lt;br /&gt;
''The stock of people that are hospitalized before being Recovered or Dead.''&lt;br /&gt;
&lt;br /&gt;
=New Hospitalization-New Death-New Recovery&lt;br /&gt;
&lt;br /&gt;
===New Recovery=== &lt;br /&gt;
''The number of people that recover each day from the hospitalization. It depends from the Mortality Rate which is depend from the hospital utilization (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=((1-Mortality Rate)*Hospitalized)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===New Death===&lt;br /&gt;
''The number of people that die each day from the hospitalization. It depends from the Mortality Rate which is depend from the hospital utilization (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized*Mortality Rate)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===hospital bed=== &lt;br /&gt;
''The number of bed in Switzerland 356 beds for 100k people with 8.5M people it gives that number: https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704''&lt;br /&gt;
&lt;br /&gt;
=30260&lt;br /&gt;
&lt;br /&gt;
===hospital utilization=== &lt;br /&gt;
''The utilization of the hospital we assume that there is already 8260 beds used for patient outside the covid pandemic. The more utilization we have, the greater the probability to die. Indeed, if hospitals get busier, the medical staff will be less available and health care quality might decrease.''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized/(hospital bed - 8260)) &lt;br /&gt;
&lt;br /&gt;
===lk mortality===&lt;br /&gt;
''The lookup function is used to described the mortality rate.''&lt;br /&gt;
&lt;br /&gt;
[(0,0)-(1000,0.3)],(0,0.065),(0.6,0.065),(0.8,0.12),(1,0.25),(1.2,0.3),(10,0.3),(1000,0.3)&lt;br /&gt;
&lt;br /&gt;
===Mortality Rate=== &lt;br /&gt;
''The mortality rate depends on the hospital utilization. For example based on the above function, if the capacity reach 100% the hospital is full and the chance to die is then 25%.''&lt;br /&gt;
&lt;br /&gt;
=lk mortality (hospital utilization)&lt;br /&gt;
&lt;br /&gt;
===Dead=== &lt;br /&gt;
''The stock of Dead people killed by the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New Death&lt;br /&gt;
&lt;br /&gt;
===Recovered=== &lt;br /&gt;
''The Total amount of people who recovered from the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New recoveries from infected+New recoveries from symptoms+New Recovery+New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===official active cases===&lt;br /&gt;
''It represent the number of people that were tested and it's this number that will be used by the government to follow the pandemic and take decision of lockdown.''&lt;br /&gt;
&lt;br /&gt;
=Diagnosed+Hosptitalized&lt;br /&gt;
&lt;br /&gt;
===Ratio official cases/pop=== &lt;br /&gt;
''The ratio that will be used for lockdown. ''&lt;br /&gt;
&lt;br /&gt;
=official active cases/ Initial population&lt;br /&gt;
&lt;br /&gt;
===New Diagnosed.1=== &lt;br /&gt;
''It's is just the same as New Diagnostic, it is used in the model to have the Total Diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Total Diagnosed=== &lt;br /&gt;
''Used in the model to have the official number of cases in the model.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnosed.1&lt;br /&gt;
&lt;br /&gt;
===TTA recoveries=== &lt;br /&gt;
''Time to recover after being infected and not having symptoms.''&lt;br /&gt;
&lt;br /&gt;
=19&lt;br /&gt;
&lt;br /&gt;
===TTA Symptoms=== &lt;br /&gt;
''The time you take to develop symptoms.''&lt;br /&gt;
&lt;br /&gt;
=5&lt;br /&gt;
&lt;br /&gt;
===TTA sympt===&lt;br /&gt;
''The time you take for recovering after being symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
===TTA Diagnostic=== &lt;br /&gt;
''Time to go to the doctor and have the result.''&lt;br /&gt;
&lt;br /&gt;
=3&lt;br /&gt;
&lt;br /&gt;
===TTA diag===&lt;br /&gt;
''The time you take for recovering after being diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=11&lt;br /&gt;
&lt;br /&gt;
===TTA Hospitalization=== &lt;br /&gt;
''Time to go to the Hospital.''&lt;br /&gt;
&lt;br /&gt;
=1&lt;br /&gt;
&lt;br /&gt;
===TTA Hospital===&lt;br /&gt;
''The time you stay at the hospital before recovering or dying.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
As explained in the problem definition we will focused our results on 3 cases. The first one is the normal scenario, the second is the same scenario but the lockdown is delayed for 1 day, and the last scenario is the normal scenario with a number of hospital beds reduce by 10 000 beds.&lt;br /&gt;
&lt;br /&gt;
==Normal Scenario==&lt;br /&gt;
&lt;br /&gt;
The first scenario take place in Switzerland with 8 500 000 peoples and a hospital capacity of 356 beds for 100k people. The first case was detected the 25 february 2019 and 20 days after the Government of Switzerland have decided to take some serious measures that is in our case represented by a lockdown. &lt;br /&gt;
&lt;br /&gt;
The following table show us the official number of new cases per day:&lt;br /&gt;
&lt;br /&gt;
[[File:Newcases.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
From the simulation we get:&lt;br /&gt;
&lt;br /&gt;
[[File:Yes.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
We can see that the model is really closed to the reality with a pic of 1350 after 35 days. The simulation stopped after 100 days so we just want to focused on these first 100 days. The reality display a pic at 1243 days after 30 days.&lt;br /&gt;
&lt;br /&gt;
The true number of new death per day, and the number from the simulation is also display below:&lt;br /&gt;
&lt;br /&gt;
[[File: deat.png|500px|left]]        [[File:Deats.18.png|500px|rigth]]&lt;br /&gt;
&lt;br /&gt;
We can see that the model is one more time really closed to the reality with a pic of 43 deaths after 50 days, while the reality display a pic at 44 days after 36 days.&lt;br /&gt;
&lt;br /&gt;
We have seen that the simulation is really closed from the data obtained for the Switzerland, but now lets go trough some special cases to see the impact of some decision on the variables.&lt;br /&gt;
&lt;br /&gt;
==Scenario 1: Late lockdown==&lt;br /&gt;
&lt;br /&gt;
In this scenario we will see what could have happened if the government take 1 more day to react and to set up the lockdown. To simulate such a scenario I simply increase the number of &amp;quot;Ratio official cases/pop&amp;quot; in the function IF THEN ELSE in &amp;quot;contact&amp;quot; and &amp;quot;contagion rate&amp;quot; from 0.00015 to 0.00018 and it delay the reaction of the government for 1 day.&lt;br /&gt;
&lt;br /&gt;
[[File: Deathz1.png|450px|left]][[File: Deathz2.png|500px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graph, the total number of official cases (=total diagnosed) jump from 33 000 to 45 000 cases. An increase of 35% in the number of official cases by just delaying for 1 day the government decisions. It illustrates well the exponential effect on the model, indeed we don't have to forget that the delay is just one day but if it has been 4-5 days the number of cases would have been exponentially higher. The second graph shows the deaths jump from 1600 to 2300, that is due to increasing number of cases and the hospital capacity reaching more than 60% utilization. Indeed due to the lookup function if the hospital capacity exceed 60% the mortality increase in the hospital. This is a very interesting scenarios that shows quite well the importance of the early lockdown and highlight the most important point in our model, '''the reaction time'''.&lt;br /&gt;
&lt;br /&gt;
==Scenario 2: Small Hospital capacity==&lt;br /&gt;
&lt;br /&gt;
In this scenario the number of hospital beds goes from 356/100k people to 238/100k people, a loss of -10 000 in variable ''hospital bed'' for Switzerland. This number of beds corresponds to the number of beds for a less developing country, such as Iceland (https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704). &lt;br /&gt;
&lt;br /&gt;
[[File: Utiliz.png|500px|left]][[File: Dead.png|500px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graphs, the hospital utilization reach almost 80%, patients are not treated as well as they would if the utilization was lower, and it involves a pic in the deaths for these patients (right graph). We can see the importance of hospital capacity and for government to have a '''good amount of hospitals'''.&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
Simulation of such complex evnironment as crop rotation in farming was challenging. Created VENSIM model of crop rotation is simplified with some parameters based on just few studies. Real world behaviour can be different because there are many variables affecting the whole process. Although with dramatic simplification, it can be used as a starting point for creating more complex models in agriculture sector. My goal to demonstrate changing of yield, greenhouse gas emissions and nitrogen level was achieved.&lt;br /&gt;
&lt;br /&gt;
Yields results could be extended with price and demand of market implementation for comparsion with different crop yields.&lt;br /&gt;
&lt;br /&gt;
N2O and CO2 emissions were highest in CCC crop strategy, providing speculation that monoculture is enviromentaly unfriendly in compare with polyculture strategies. SSS strategy was providing lowest N2O emissions, on other hand it showed highest CH4 emissions which are specific for legumes as soybean.&lt;br /&gt;
&lt;br /&gt;
Soil nitrogen levels were highly dependent on soybean in crop rotation strategy. With no soybean in crop strategy - in CCC strategy, dramaticaly more inorganic fertilization inputs were necessary&lt;br /&gt;
&lt;br /&gt;
Due to the scope of model, different tillage scenario (0 - no-til) was not simulated. Provided study concluded higher yield and lower emission levels with tillage sceario (1 - tillage, default for simulated model)&lt;br /&gt;
&lt;br /&gt;
===Model extension===&lt;br /&gt;
More complexity can be implemented in the future, for example:&lt;br /&gt;
&lt;br /&gt;
Detailed description of parameteres like Temperature, Pests, Natural disasters or Precipitation.&lt;br /&gt;
&lt;br /&gt;
More crop strategies or new crops.&lt;br /&gt;
&lt;br /&gt;
Market variables like demand or prices of crop seeds or harvesting costs could be also implemented.&lt;br /&gt;
&lt;br /&gt;
Monthly changes (instead of yearly) with more detailed fluctuations during seasons (in Spring there is bigger demand for fertilizers, temperature spikes)&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
&lt;br /&gt;
[http://www.simulace.info/index.php/File:Crop_rotation_finished.mdl Crop rotation VENSIM model]&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
#BEHNKE, Gevan D., Stacy M. ZUBER, Cameron M. PITTELKOW, Emerson D. NAFZIGER a María B. VILLAMIL. Long-term crop rotation and tillage effects on soil greenhouse gas emissions and crop production in Illinois, USA. Agriculture, Ecosystems &amp;amp; Environment [online]. 2018, 261, 62-70 [cit. 2020-01-26]. DOI: 10.1016/j.agee.2018.03.007. ISSN 01678809. Availiable: https://linkinghub.elsevier.com/retrieve/pii/S0167880918301221&lt;br /&gt;
#KOLLAS, Chris, Kurt Christian KERSEBAUM, Claas NENDEL, et al. Crop rotation modelling—A European model intercomparison. European Journal of Agronomy [online]. 2015, 70, 98-111 [cit. 2020-01-26]. DOI: 10.1016/j.eja.2015.06.007. ISSN 11610301. Availiable: https://linkinghub.elsevier.com/retrieve/pii/S1161030115300010&lt;br /&gt;
#BRANKATSCHK, Gerhard a Matthias FINKBEINER. Modeling crop rotation in agricultural LCAs — Challenges and potential solutions. Agricultural Systems [online]. 2015, 138, 66-76 [cit. 2020-01-26]. DOI: 10.1016/j.agsy.2015.05.008. ISSN 0308521X. Availiable: https://linkinghub.elsevier.com/retrieve/pii/S0308521X1500075X&lt;/div&gt;</summary>
		<author><name>Toscool</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20278</id>
		<title>Impact of late lockdown and hospital capacity on 19-COVID spread</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Impact_of_late_lockdown_and_hospital_capacity_on_19-COVID_spread&amp;diff=20278"/>
		<updated>2021-01-07T16:14:32Z</updated>

		<summary type="html">&lt;p&gt;Toscool: /* Scenario 2: Small Hospital capacity */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Introduction&lt;br /&gt;
&lt;br /&gt;
=Problem definition=&lt;br /&gt;
&lt;br /&gt;
=Method=&lt;br /&gt;
&lt;br /&gt;
=Model=&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
&lt;br /&gt;
=Problem definition=&lt;br /&gt;
Crop rotation is based on growing a series of different types of crops in the same area in sequential seasons. The planned rotation may vary from a growing season to a few years or even longer periods. It is one of the most effective agricultural control strategies that is used in preventing the loss of soil fertility. It also helps in reducing soil erosion and increases crop yield. Planning an effective crop rotation requires weighing fixed and fluctuating production circumstances: market, farm size, labor supply, climate, soil type, growing practices, etc.&lt;br /&gt;
&lt;br /&gt;
In this simulation I will try to find parameters which have impact on the whole process of crop rotation with goal to find model providing desired outputs (these were slightly changed from concept) - crop yields, greenhouse gas emissions (N2O, CO2, NH4), soil fertility (nitrogen levels).&lt;br /&gt;
&lt;br /&gt;
I will focus on four crop rotation strategies with three different crops - corn, soybean, wheat:&lt;br /&gt;
&lt;br /&gt;
'''CCC''' (continuous corn) - only corn will be farmed for the whole observed time period (40 years)&lt;br /&gt;
&lt;br /&gt;
'''CS''' (corn-soybean) - rotation of corn and soybean will be used in year cycles for the whole observed time period (40 years), first year corn, second year soybean, repeat..&lt;br /&gt;
&lt;br /&gt;
'''SSS''' (continuous soybean) - only soybean will be farmed for the whole observed time period (40 years) &lt;br /&gt;
&lt;br /&gt;
'''CSW''' (corn-soybean-wheat) - rotation of corn, soybean and wheat will be used in year cycles for the whole observed time period (40 years), first year corn, second year soybean, third year wheat, repeat..&lt;br /&gt;
&lt;br /&gt;
Goal of this simulation is to observe dynamic changes with yields, greenhouse gas emissions, tillage strategy and soil nitrogen levels, while changing different crop rotation strategies.&lt;br /&gt;
&lt;br /&gt;
=Method=&lt;br /&gt;
&lt;br /&gt;
Vensim modelling approach was selected due to dynamic behavior of the simulated system.&lt;br /&gt;
&lt;br /&gt;
Our model shows the evolution of the number of people who got infected by the covid-19 virus in&lt;br /&gt;
countries where the population have a high health care protection and where the government has&lt;br /&gt;
decided to make a decision about the virus propagation. The model will explain us how fast the&lt;br /&gt;
virus spreads itself and how political decisions can change the number of infected people at a&lt;br /&gt;
given point in time. The construction of our model is simple: at the beginning one person is&lt;br /&gt;
infected and will, then, infect other people. When you are infected many possibilities are open:&lt;br /&gt;
- You can be a healthy virus carrier. In that case you will not know that you have the virus and&lt;br /&gt;
after 19 days you will be recovered.&lt;br /&gt;
- After 5 days you get symptoms, but you do not have any important health problems, you will&lt;br /&gt;
recover in the next 14 days.&lt;br /&gt;
- After 5 days, you get symptoms and you are very sick and have respiratory problems, after 5&lt;br /&gt;
more days, still feeling bad, you decide to go to the doctor to get a diagnosis. The doctor has than&lt;br /&gt;
two options: to send you back home, where you will recover after 9 more days or hospitalized you&lt;br /&gt;
the next day.&lt;br /&gt;
- The doctor had decided to hospitalize you, you then spend two weeks in intensive care, where&lt;br /&gt;
you will need artificial ventilation and 24-hour nursing care. You can then recover or unfortunately&lt;br /&gt;
die. The higher the hospital utilisation, the greater the probability to die. Indeed, if hospitals get&lt;br /&gt;
busier, the medical staff will be less available and health care quality might decrease.&lt;br /&gt;
When the number of diagnosed and hospitalised people (which are the official number of cases)&lt;br /&gt;
is greater than 3% of the population, the government will take decisions to slow down the spread&lt;br /&gt;
of the virus. This is to say that governments will take some measures, such as installing a forced&lt;br /&gt;
lockdown of the population to decrease the number of contacts per habitant. Moreover, such a&lt;br /&gt;
decision will have an impact of the population, which will be more aware of the situation and will&lt;br /&gt;
be more careful to not spread or contract the virus. So, the contagion rate as the number of contacts&lt;br /&gt;
per people will slow down. They will be less hospitalised people, that means less people in the&lt;br /&gt;
hospital, meaning a better service and so less people who die.&lt;br /&gt;
&lt;br /&gt;
=Model=&lt;br /&gt;
&lt;br /&gt;
Following vensim model was developed based on the study.&lt;br /&gt;
&lt;br /&gt;
[[File:Model1.png|900px|thumb|center|COVID-19 pandemic in Switzerland Stock Flow Diagram]]&lt;br /&gt;
&lt;br /&gt;
== Variables ==&lt;br /&gt;
&lt;br /&gt;
===Initial population=== &lt;br /&gt;
''The Population of Switzerland can be found here: https://en.wikipedia.org/wiki/Demographics_of_Switzerland''&lt;br /&gt;
&lt;br /&gt;
=8 500 000&lt;br /&gt;
&lt;br /&gt;
===Ratio susceptible people=== &lt;br /&gt;
''Decrease the susceptible people by the number of deaths due to the COVID-19.''&lt;br /&gt;
&lt;br /&gt;
=Susceptible population / (Initial population-Dead)&lt;br /&gt;
&lt;br /&gt;
===Susceptible population=== &lt;br /&gt;
''Decrease the susceptible population by the number of new infections.''&lt;br /&gt;
&lt;br /&gt;
=-New infections&lt;br /&gt;
&lt;br /&gt;
===contact=== &lt;br /&gt;
'''Lockdown:''' ''Function IF THEN ELSE that bring the number of new people you meet (contact) from 5 to 0.05 if the ratio exceed 0.015%''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot;&amp;gt; 0.00015, 0.05 , 5 )&lt;br /&gt;
&lt;br /&gt;
===Contagion Rate=== &lt;br /&gt;
'''Lockdown:''' ''contagion rate: IF THEN ELSE that bring the contagion rate from 0.1 to 0.075 if the ratio exceed 0.015%. Function of the awareness in the population (washing more often their hands if lockdown)''&lt;br /&gt;
&lt;br /&gt;
=IF THEN ELSE(&amp;quot;Ratio official cases/pop&amp;quot; &amp;gt; 0.00015 , 0.075 , 0.1 )&lt;br /&gt;
&lt;br /&gt;
===New infections=== &lt;br /&gt;
''It represent the new number of people infected each day.''&lt;br /&gt;
&lt;br /&gt;
=contact*Infected*Ratio susceptible people*Contagion Rate&lt;br /&gt;
&lt;br /&gt;
===Infected=== &lt;br /&gt;
''It represent the stock of the new people infected. We start the model with 1 infected people.''&lt;br /&gt;
&lt;br /&gt;
=New infections-New recoveries from infected-New symptoms ///// Initial value: 1&lt;br /&gt;
&lt;br /&gt;
===New recoveries from infected===&lt;br /&gt;
''It represent the number of people without symptoms and they go in the recovered stock after 19 days.''&lt;br /&gt;
&lt;br /&gt;
=((1-Ratio Symptoms)*Infected)/TTA recoveries&lt;br /&gt;
&lt;br /&gt;
===New symptoms=== &lt;br /&gt;
''It represent the number of new people that develop symptoms during 5 days before going to the symptomatic stock.''&lt;br /&gt;
&lt;br /&gt;
=(Infected*Ratio Symptoms)/TTA Symptoms&lt;br /&gt;
&lt;br /&gt;
===Ratio Symptoms=== &lt;br /&gt;
''The ratio of people who develop some symptoms.''&lt;br /&gt;
&lt;br /&gt;
=0.2&lt;br /&gt;
&lt;br /&gt;
===Symptomatic=== &lt;br /&gt;
''The stock of people symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=New symptoms-New Diagnostic-New recoveries from symptoms&lt;br /&gt;
&lt;br /&gt;
===New recoveries from symptoms=== &lt;br /&gt;
''It represent the number of people that have symptoms but that were not to the doctor, after 14 they are in the recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Diagnost)*Symptomatic/TTA sympt&lt;br /&gt;
&lt;br /&gt;
===New Diagnostic=== &lt;br /&gt;
''It represent the number of new people that are diagnosed each day, they stay 3 days before having the diagnostic.''&lt;br /&gt;
&lt;br /&gt;
=Symptomatic*Ratio Diagnost/TTA Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Ratio Diagnost===&lt;br /&gt;
''the ratio of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=0.4&lt;br /&gt;
&lt;br /&gt;
===Diagnosed=== &lt;br /&gt;
''The stock of people that are diagnosed by a doctor.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic-New Hospitalization-New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===New Recovery from Diagnostic===&lt;br /&gt;
''It represent the number of people that are diagnosed and not sent to the hospital. they stay 9 days before going in the Recovered stock.''&lt;br /&gt;
&lt;br /&gt;
=(1-Ratio Hospitalize)*Diagnosed/TTA diag&lt;br /&gt;
&lt;br /&gt;
===New Hospitalization=== &lt;br /&gt;
''It represent the number of people that are diagnosed and sent to the hospital. they stay 1 day before being sent.''&lt;br /&gt;
&lt;br /&gt;
=(Diagnosed*Ratio Hospitalize)/TTA Hospitalization Ratio Hospitalize&lt;br /&gt;
&lt;br /&gt;
===Ratio Hospitalize===&lt;br /&gt;
''The ratio of people that are Hospitalized.''&lt;br /&gt;
&lt;br /&gt;
=0.3&lt;br /&gt;
&lt;br /&gt;
===Hospitalized=== &lt;br /&gt;
''The stock of people that are hospitalized before being Recovered or Dead.''&lt;br /&gt;
&lt;br /&gt;
=New Hospitalization-New Death-New Recovery&lt;br /&gt;
&lt;br /&gt;
===New Recovery=== &lt;br /&gt;
''The number of people that recover each day from the hospitalization. It depends from the Mortality Rate which is depend from the hospital utilization (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=((1-Mortality Rate)*Hospitalized)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===New Death===&lt;br /&gt;
''The number of people that die each day from the hospitalization. It depends from the Mortality Rate which is depend from the hospital utilization (capacity or number of beds...).''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized*Mortality Rate)/TTA Hospitalization&lt;br /&gt;
&lt;br /&gt;
===hospital bed=== &lt;br /&gt;
''The number of bed in Switzerland 356 beds for 100k people with 8.5M people it gives that number: https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704''&lt;br /&gt;
&lt;br /&gt;
=30260&lt;br /&gt;
&lt;br /&gt;
===hospital utilization=== &lt;br /&gt;
''The utilization of the hospital we assume that there is already 8260 beds used for patient outside the covid pandemic. The more utilization we have, the greater the probability to die. Indeed, if hospitals get busier, the medical staff will be less available and health care quality might decrease.''&lt;br /&gt;
&lt;br /&gt;
=(Hospitalized/(hospital bed - 8260)) &lt;br /&gt;
&lt;br /&gt;
===lk mortality===&lt;br /&gt;
''The lookup function is used to described the mortality rate.''&lt;br /&gt;
&lt;br /&gt;
[(0,0)-(1000,0.3)],(0,0.065),(0.6,0.065),(0.8,0.12),(1,0.25),(1.2,0.3),(10,0.3),(1000,0.3)&lt;br /&gt;
&lt;br /&gt;
===Mortality Rate=== &lt;br /&gt;
''The mortality rate depends on the hospital utilization. For example based on the above function, if the capacity reach 100% the hospital is full and the chance to die is then 25%.''&lt;br /&gt;
&lt;br /&gt;
=lk mortality (hospital utilization)&lt;br /&gt;
&lt;br /&gt;
===Dead=== &lt;br /&gt;
''The stock of Dead people killed by the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New Death&lt;br /&gt;
&lt;br /&gt;
===Recovered=== &lt;br /&gt;
''The Total amount of people who recovered from the pandemic.''&lt;br /&gt;
&lt;br /&gt;
=New recoveries from infected+New recoveries from symptoms+New Recovery+New Recovery from Diagnostic&lt;br /&gt;
&lt;br /&gt;
===official active cases===&lt;br /&gt;
''It represent the number of people that were tested and it's this number that will be used by the government to follow the pandemic and take decision of lockdown.''&lt;br /&gt;
&lt;br /&gt;
=Diagnosed+Hosptitalized&lt;br /&gt;
&lt;br /&gt;
===Ratio official cases/pop=== &lt;br /&gt;
''The ratio that will be used for lockdown. ''&lt;br /&gt;
&lt;br /&gt;
=official active cases/ Initial population&lt;br /&gt;
&lt;br /&gt;
===New Diagnosed.1=== &lt;br /&gt;
''It's is just the same as New Diagnostic, it is used in the model to have the Total Diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnostic&lt;br /&gt;
&lt;br /&gt;
===Total Diagnosed=== &lt;br /&gt;
''Used in the model to have the official number of cases in the model.''&lt;br /&gt;
&lt;br /&gt;
=New Diagnosed.1&lt;br /&gt;
&lt;br /&gt;
===TTA recoveries=== &lt;br /&gt;
''Time to recover after being infected and not having symptoms.''&lt;br /&gt;
&lt;br /&gt;
=19&lt;br /&gt;
&lt;br /&gt;
===TTA Symptoms=== &lt;br /&gt;
''The time you take to develop symptoms.''&lt;br /&gt;
&lt;br /&gt;
=5&lt;br /&gt;
&lt;br /&gt;
===TTA sympt===&lt;br /&gt;
''The time you take for recovering after being symptomatic.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
===TTA Diagnostic=== &lt;br /&gt;
''Time to go to the doctor and have the result.''&lt;br /&gt;
&lt;br /&gt;
=3&lt;br /&gt;
&lt;br /&gt;
===TTA diag===&lt;br /&gt;
''The time you take for recovering after being diagnosed.''&lt;br /&gt;
&lt;br /&gt;
=11&lt;br /&gt;
&lt;br /&gt;
===TTA Hospitalization=== &lt;br /&gt;
''Time to go to the Hospital.''&lt;br /&gt;
&lt;br /&gt;
=1&lt;br /&gt;
&lt;br /&gt;
===TTA Hospital===&lt;br /&gt;
''The time you stay at the hospital before recovering or dying.''&lt;br /&gt;
&lt;br /&gt;
=14&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
As explained in the problem definition we will focused our results on 3 cases. The first one is the normal scenario, the second is the same scenario but the lockdown is delayed for 1 day, and the last scenario is the normal scenario with a number of hospital beds reduce by 10 000 beds.&lt;br /&gt;
&lt;br /&gt;
==Normal Scenario==&lt;br /&gt;
&lt;br /&gt;
The first scenario take place in Switzerland with 8 500 000 peoples and a hospital capacity of 356 beds for 100k people. The first case was detected the 25 february 2019 and 20 days after the Government of Switzerland have decided to take some serious measures that is in our case represented by a lockdown. &lt;br /&gt;
&lt;br /&gt;
The following table show us the official number of new cases per day:&lt;br /&gt;
&lt;br /&gt;
[[File:Newcases.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
From the simulation we get:&lt;br /&gt;
&lt;br /&gt;
[[File:Yes.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
We can see that the model is really closed to the reality with a pic of 1350 after 35 days. The simulation stopped after 100 days so we just want to focused on these first 100 days. The reality display a pic at 1243 days after 30 days.&lt;br /&gt;
&lt;br /&gt;
The true number of new death per day, and the number from the simulation is also display below:&lt;br /&gt;
&lt;br /&gt;
[[File: deat.png|500px|left]]        [[File:Deats.18.png|500px|rigth]]&lt;br /&gt;
&lt;br /&gt;
We can see that the model is one more time really closed to the reality with a pic of 43 deaths after 50 days, while the reality display a pic at 44 days after 36 days.&lt;br /&gt;
&lt;br /&gt;
We have seen that the simulation is really closed from the data obtained for the Switzerland, but now lets go trough some special cases to see the impact of some decision on the variables.&lt;br /&gt;
&lt;br /&gt;
==Scenario 1: Late lockdown==&lt;br /&gt;
&lt;br /&gt;
In this scenario we will see what could have happened if the government take 1 more day to react and to set up the lockdown. To simulate such a scenario I simply increase the number of &amp;quot;Ratio official cases/pop&amp;quot; in the function IF THEN ELSE in &amp;quot;contact&amp;quot; and &amp;quot;contagion rate&amp;quot; from 0.00015 to 0.00018 and it delay the reaction of the government for 1 day.&lt;br /&gt;
&lt;br /&gt;
[[File: Deathz1.png|450px|left]][[File: Deathz2.png|500px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graph, the total number of official cases (=total diagnosed) jump from 33 000 to 45 000 cases. An increase of 35% in the number of official cases by just delaying for 1 day the government decisions. It illustrates well the exponential effect on the model, indeed we don't have to forget that the delay is just one day but if it has been 4-5 days the number of cases would have been exponentially higher. The second graph shows the deaths jump from 1600 to 2300, that is due to increasing number of cases and the hospital capacity reaching more than 60% utilization. Indeed due to the lookup function if the hospital capacity exceed 60% the mortality increase in the hospital. This is a very interesting scenarios that shows quite well the importance of the early lockdown and highlight the most important point in our model, '''the reaction time'''.&lt;br /&gt;
&lt;br /&gt;
==Scenario 2: Small Hospital capacity==&lt;br /&gt;
&lt;br /&gt;
In this scenario the number of hospital beds goes from 356/100k people to 238/100k people, a loss of -10 000 in variable ''hospital bed'' for Switzerland. This number of beds corresponds to the number of beds for a less developing country, such as Iceland (https://www.swissinfo.ch/eng/coronavirus-crisis-_has-switzerland-got-enough-hospital-beds--/45671704). &lt;br /&gt;
&lt;br /&gt;
[[File: Utiliz.png|450px|left]][[File: Dead.png|500px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see in the first graphs, the hospital utilization reach almost 80%, patients are not treated as well as they would if the utilization was lower, and it involves a pic in the deaths for these patients (right graph). We can see the importance of hospital capacity and for government to have a '''good amount of hospitals'''.&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
Simulation of such complex evnironment as crop rotation in farming was challenging. Created VENSIM model of crop rotation is simplified with some parameters based on just few studies. Real world behaviour can be different because there are many variables affecting the whole process. Although with dramatic simplification, it can be used as a starting point for creating more complex models in agriculture sector. My goal to demonstrate changing of yield, greenhouse gas emissions and nitrogen level was achieved.&lt;br /&gt;
&lt;br /&gt;
Yields results could be extended with price and demand of market implementation for comparsion with different crop yields.&lt;br /&gt;
&lt;br /&gt;
N2O and CO2 emissions were highest in CCC crop strategy, providing speculation that monoculture is enviromentaly unfriendly in compare with polyculture strategies. SSS strategy was providing lowest N2O emissions, on other hand it showed highest CH4 emissions which are specific for legumes as soybean.&lt;br /&gt;
&lt;br /&gt;
Soil nitrogen levels were highly dependent on soybean in crop rotation strategy. With no soybean in crop strategy - in CCC strategy, dramaticaly more inorganic fertilization inputs were necessary&lt;br /&gt;
&lt;br /&gt;
Due to the scope of model, different tillage scenario (0 - no-til) was not simulated. Provided study concluded higher yield and lower emission levels with tillage sceario (1 - tillage, default for simulated model)&lt;br /&gt;
&lt;br /&gt;
===Model extension===&lt;br /&gt;
More complexity can be implemented in the future, for example:&lt;br /&gt;
&lt;br /&gt;
Detailed description of parameteres like Temperature, Pests, Natural disasters or Precipitation.&lt;br /&gt;
&lt;br /&gt;
More crop strategies or new crops.&lt;br /&gt;
&lt;br /&gt;
Market variables like demand or prices of crop seeds or harvesting costs could be also implemented.&lt;br /&gt;
&lt;br /&gt;
Monthly changes (instead of yearly) with more detailed fluctuations during seasons (in Spring there is bigger demand for fertilizers, temperature spikes)&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
&lt;br /&gt;
[http://www.simulace.info/index.php/File:Crop_rotation_finished.mdl Crop rotation VENSIM model]&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
#BEHNKE, Gevan D., Stacy M. ZUBER, Cameron M. PITTELKOW, Emerson D. NAFZIGER a María B. VILLAMIL. Long-term crop rotation and tillage effects on soil greenhouse gas emissions and crop production in Illinois, USA. Agriculture, Ecosystems &amp;amp; Environment [online]. 2018, 261, 62-70 [cit. 2020-01-26]. DOI: 10.1016/j.agee.2018.03.007. ISSN 01678809. Availiable: https://linkinghub.elsevier.com/retrieve/pii/S0167880918301221&lt;br /&gt;
#KOLLAS, Chris, Kurt Christian KERSEBAUM, Claas NENDEL, et al. Crop rotation modelling—A European model intercomparison. European Journal of Agronomy [online]. 2015, 70, 98-111 [cit. 2020-01-26]. DOI: 10.1016/j.eja.2015.06.007. ISSN 11610301. Availiable: https://linkinghub.elsevier.com/retrieve/pii/S1161030115300010&lt;br /&gt;
#BRANKATSCHK, Gerhard a Matthias FINKBEINER. Modeling crop rotation in agricultural LCAs — Challenges and potential solutions. Agricultural Systems [online]. 2015, 138, 66-76 [cit. 2020-01-26]. DOI: 10.1016/j.agsy.2015.05.008. ISSN 0308521X. Availiable: https://linkinghub.elsevier.com/retrieve/pii/S0308521X1500075X&lt;/div&gt;</summary>
		<author><name>Toscool</name></author>
		
	</entry>
</feed>