Assignments WS 2017/2018
Contents
- 1 Simulation Proposal (feld00)
- 2 Simulation Proposal (xvatj00)
- 3 Social media post (Amelievh)
- 4 Simulation Proposal (A_V)
- 5 Method and Goal
- 6 How It Works
- 7 Results
- 8 Conclusion
- 9 How It Works
- 10 Results
- 11 Conclusion
- 12 1. Introduction
- 13 2. Problem definition
- 14 3. Method
- 15 4. Model
- 16 Results
- 17 Conclusion
- 18 Code
Simulation Proposal (feld00)
I am going to simulate a public transport system. The idea came from travelling around Europe, being surprised how often public transport systems fail in large cities and still they are very expensive. Prague public transport is rare exception. Buses, trams and subway trains arrive with minimal deviation from planned arrival time usually in seconds. I believe that there is sophisticated simulation software behind this.
In order to simplify the task let’s presume that it is not about money. We are not going to optimize costs and incomes. The purpose of this simulation is to optimize:
• Numbers of transportation units (TU) needed
• Frequency of releasing TUs
• their arrival time
All stated above in order to prevent people queueing on public transportation stops and to prevent transportation units from crowding. Microsoft Excel and SimProcess if needed will be used to perform this simulation.
- for Monte Carlo or Simprocess you need solid quality hard data - what particular solid resources would you bas the simulation on? In addition I think you simplify it so much into some artificial "Numbers of transportation units", that would make the simulation unusable. I would suggest something less ambitious - spacial simulation(agent based, simprocess) of one type of transportation based on real data, if you find some.Oleg.Svatos (talk) 15:49, 15 December 2017 (CET)
- You are right, maybe I can do less ambitious project. What about evacuation from a building:
- It will be a Agent-based simulation model. I will use NetLogo software to build an building enviroment, which will include walls and staff inside. Agents will randomly move around the building. If they colide with a wall they turn different direction. If they colide with a staff member, he will navigate them to the exit. Is that possible?
- feld00 (talk) 22:35, 15 December 2017 (CET)
- I found project "school on fire". Is that it? This would be simulation of any planned evacuation. You can upload any building plan. There would be also navigators guiding the agents to the nearest exits. Agents will move towards an exit (it will simulate an intuition), but wouldnt know the real path. Navigators and wall will guide them.
- feld00 (talk) 18:00, 18 December 2017 (CET)
- The goal is to find out how people will act in these kind of events.
- If there are still concerns, maybe we can discuss it personaly to avoid this endless conversation and figure it out at once. I understand you may not be at office, we can do it on phone as well (606 439 385). Please call or comment if further discussion is necessary, Thank you.
- feld00 (talk) 10:43, 27 December 2017 (CET)
- Ok, if you can deal with real building layouts, it is ok (you will need to simplify it reasonably because in some cases, the simulations of real buildings of all possible cases could be tricky). Nevertheless, I don't think you are really able to analyze how real people behave, but you can discover what influences the safety of the building. Also consider that people can in some cases leave not just through regular exits, but through another way. E.g. windows. If you agree, you have it approved. Tomáš (talk) 16:32, 3 January 2018 (CET)
Simulation Proposal (xvatj00)
Software: Vensim
I am a contemporary gospel choir conductor (choir and full professional band). We organize more or less 3 concerts a year. It has been a long time since we released our last CD and now we would like to earn money to be able to start recording a new one. For this purpose, I would like to find out those factors (such as choir performance, band performance, tickets’ price, concert’s location, etc.) that influence potential audience when choosing a band to go see and how to improve them, and thus get more people to come to our concerts - and earn more money for the tickets and in general. I will use a survey to get data about people’s preferences. Xvatj00 (talk) 17:45, 27 November 2017 (CET)
- For this kind of simulation you would need ritch historical data so that you would be able to find premises you would then build the equations on (and to be able to verify the model when you compare its results with the historical data). Unfortunately the survey will not help you to quantify the parameters and the number of concerts is really low to be usable for such simulation. I probabbly would suggest a different topic. Oleg.Svatos (talk) 18:43, 30 November 2017 (CET)
- I can get data up to 10 years back. The number of concerts included only those concert that are organized by us only, but we perform in many other concerts as well. Do you have any suggestions how to make the simulation possible? Thank you. Xvatj00 (talk) 18:59, 30 November 2017 (CET)
- You would have to be able to define parameters that determine the demand for the individual concerts, and based on the data quantify them and quantify their impact on the demand for a concert. Based on that one could then discuss how the concert and its content should be se up so that you get maximum profit out of it. That is not a really easy ...Oleg.Svatos (talk) 15:07, 6 December 2017 (CET)
- I can get data up to 10 years back. The number of concerts included only those concert that are organized by us only, but we perform in many other concerts as well. Do you have any suggestions how to make the simulation possible? Thank you. Xvatj00 (talk) 18:59, 30 November 2017 (CET)
- For this kind of simulation you would need ritch historical data so that you would be able to find premises you would then build the equations on (and to be able to verify the model when you compare its results with the historical data). Unfortunately the survey will not help you to quantify the parameters and the number of concerts is really low to be usable for such simulation. I probabbly would suggest a different topic. Oleg.Svatos (talk) 18:43, 30 November 2017 (CET)
Intersection Optimalization (NEW ASSIGNMENT)
Software: NetLogo
Almost every day, I walk by the intersection of Anglická and Bělehradská / Škrétova. During peak hours, there are traffic jams on only one street leading to the intersection, which I find interesting. Because of this fact, I would like to simulate the intersection in order to find out if the lights are really optimally set there, and potentially, find out the optimal setting of the intersection’s lights.
As I’ve already mentioned, there are lights directing the intersection. Also, there is a tram track on the Bělehradská / Škrétova street which goes straight, while most of the cars coming from Bělehradská street turn left. I will use real intervals of all of the lights from a chosen time during peak hours, and the number of cars and trams coming to the intersection (including their speed, direction, etc.). At first, I will set the lights to constant ticks according to the reality to simulate the real situation. After that, I will try to find out an optimal setting of the lights and evaluate, what the optimal setting is or if it meets with the reality. Xvatj00 (talk) 18:48, 8 December 2017 (CET)
Social media post (Amelievh)
Software: Netlogo
Nowadays social media is a hot topic, and a lot of recruiters and other business people use linked in to attract new employees or just to share their thoughts.
For my simulation, I was thinking about researching the reach of a social media post. Someone posts something on LinkedIn, and depending on the amount of connection and amount of sharing I want to check how many people you can reach with one post. I will try to find real-world numbers and make it a useful tool for the business world.
- Simulations on social media are typically problematic, mostly due to the lack of real data. I would recommend to try finding, something else. Tomáš (talk) 04:11, 12 December 2017 (CET)
New proposal: gender pay gap
Software: Vensim
The gender pay gap is a difficult problem to solve because it is caused by different reasons (education, age, part-time working ...). These are main reasons, but all these reasons are influenced by other aspects and factors.I want to simulate these different reasons + influences in Vensim and work out the most effective solutions to reduce the pay gap. I would specify on 1 country because data is different per country. Easiest and most interesting for me is Belgium.
- What particular literature and data will you base it on? Oleg.Svatos (talk) 12:07, 15 December 2017 (CET)
- I wrote a paper on this topic for another course wherefore I found a lot of statistical data. The EU publishes statistical data about this topic and reasons for it. I came up with the idea after seeing the Vensim example of SchoolLife which also showed a lot of influence on your future career. Only googling 'Gender Pay Gap Belgium' give you already a lot of publications and statistical information on this topic. --Amelievh (talk) 12:20, 15 December 2017 (CET)
- OK, approved, but you have to well argument the parameters and equations of the simulation (including the citations to accesable resources) in the report which has to accompany the simulation so that we can verify that it is based on real data and makes sense.
- I wrote a paper on this topic for another course wherefore I found a lot of statistical data. The EU publishes statistical data about this topic and reasons for it. I came up with the idea after seeing the Vensim example of SchoolLife which also showed a lot of influence on your future career. Only googling 'Gender Pay Gap Belgium' give you already a lot of publications and statistical information on this topic. --Amelievh (talk) 12:20, 15 December 2017 (CET)
- What particular literature and data will you base it on? Oleg.Svatos (talk) 12:07, 15 December 2017 (CET)
Simulation Proposal (A_V)
Software: NetLogo
We own a zoo. We have a huge kennel for hamsters. We have observed a strange behavior of the hamsters. When a female hamster gives birth to babies (usually up to 12), the mother may come under the pressure of nurturing each and everyone of them. After giving the birth a female hamster becomes weak and may die if does not have enough food and vitamins. Also when the mother is weak, she can not lactate milk for all of her babies. Since the quality of food provided by the zoo does not always satisfy the hamster, the mother eats her weakest babies to get extra protein to feed other babies, which increases the probability of survival of her and the rest babies. Another reason of the deaths of hamsters, as mentioned above, is the adequate quality of food. If the food does not satisfy the hamsters, they do not eat it and the food rots by polluting the kernel which leads to an increased number of hamster deaths. In the simulation I will focus on how much the food quality, the amount of food and keeping the kernel clean influences the number of hamster deaths.
- Makes sense, however it is necessary to obtain real data. Implementation of some of them will not be easy. Approved. Tomáš (talk) 01:06, 19 December 2017 (CET)
Method and Goal
Software:
For the simulation I have used NetLogo 6.0.2 (2D version). This software was chosen due to the specifics of the problem where the communication between agents takes place and because it is the most appropriate tool for simulation of multi-agent modeling environment. Moreover, NetLogo allows interface customization making the model user-friendly, giving the possibility to change variables from the UI and monitor their effects on the hamsters’ population.
Simulation Goal:
The goal of the simulation is to identify the optimal number of female and male hamsters in the kennel, the adequate amount and quality of food as well as the level of cleanness in the kennel. Detailed Description of the Simulation We have male and female hamsters - boyhamsters and girlhamsters breeds. Every now and then some amount of food is added to the kennel. Our boyhamsters and girlhamsters born, live, eat and use the energy from food to grow. When they become adult hamsters, they spawn and they pollute the kennel. Also girlhamsters can eat baby hamsters. Hamsters die if they run out of energy, get old, or the kennel is very polluted. The environment gets polluted from excessive amount of food that is not eaten. Food rots and it is necessary to filter the waste or clean environment in order to save hamsters.
Environment – The Kennel
In order to make the simulation realistic, the kennel-like environment has been created. The kennel has green patches, which represent food. Food patches have foodrot property. Also we have global variables such as clean-e and env-clean that help to control the level of cleanness. If food is not eaten, it will rot and pollute the environment. In order to keep the environment clean, we: (1)Monitor the environment by controlling different food quality variables. If our patches property foodrot is more than 40 and the global variable env-clean is more than 0, then we set the patch color to black, meaning that the food is rotten. (2)Clean the environment by changing the food, where we reset foodrot variable to 0. (3)Filter environment – if env-clean variable is less than 100, we filter the environment by increasing the env-clean variable using FilterFoodKennel Slider from the user interface. (4)Pollute environment – the environment gets polluted according to the number of adult and young hamsters
Breeds and their behavior
Two breeds have been created – boyhamsters and girlhamsters with hamsterhealth, energy and age properties. Initially, male hamsters have energy = 20, size = 2 and age = 10, while girlhamsters have energy = 30, size = 2 and age = 10. Our hamsters do the following: (1)Feed - Both male and female hamsters eat and grow. When they wander into patch with food, their energy raises by 10 and if the size is less than 4, then their size increases by 0.2. (2)Spawn – male and female hamsters spawn and deliver up to 12 babies if:
a.The environment is clean - env-clean > 60 AND If they are near each other within the radius =2, their energy >=30 and the size >=3 b.According to probability p-spawn of spawning based on slider setting in the interface
(3)Pollute Environment – hamsters pollute the environment depending on the number (bighamster and littlehamster) and size (bigpollute and littlepollute) of turtles.
a.If turtles with the size > = 3.5, then the pollution variable bigpollute = bighamster * .03 b.If turtles with the size < 3.5, then the pollution variable littlepollute = littlepollute * .05 c.Finally the env-clean variable is set to env-clean env-clean - (bigpollute + littlepollute)
(4)Eat small hamsters – Female hamsters, who fed only on corn, which lacks vitamins as well as the food lacks proteins, eat their small babies. In the simulation, they eat hamsters that are 0.5 smaller than they are. Another reason to eat youngers is when hamsters understand there is no enough space in the kennel for everyone to live. (For the realistic purposes we took the maximum number of the hamsters living in the kennel = 200.) (5)Die – hamsters death is caused by several reasons:
a.Poor food quality, lacking vitamins b.Not enough food – measuring nofood variable c.Being eaten by adults d.Old age death
Interface
The graphical user interface of the simulation is shown below:
In the center we have our kennel with hamsters. On the left side of the interface we have three buttons and six sliders. On the right side we have seven monitors and one plot.
Buttons
We use “setup” button in order to set up the kennel and create our hamsters, while “go” button starts the simulation. “Clean-environment” button triggers the function that cleans the kennel changing the food by setting the env-clean variable to its initial value (100) and resetting foodrot variable to 0.
Sliders
We have seven sliders:
a.N-boyhamster and N-girlhamster sliders adjust the initial number of male and female hamsters in the kennel. b.P-spawn slider lets us set the probability of our hamsters spawning. The higher the probability is, more baby hamsters are born. c.FilterFoodKennel slider allows us to filter the environment, meaning cleaning from rotten food by increasing env-clean variable. d.Amount-food slider adjust the initial amount of food in the kennel. e.MaxNhamsters – sets up the maximum number of hamsters living in the kennel.
Monitors
We have seven monitors: a.Environment Cleanness –displays the rate of how clean the kennel is and counts the variable env-clean b.Poor Quality Food Death – displays the total number of deaths caused by inadequate quality of water c.No Food Death – displays the number of dead hamsters due to the lack of food d.Total Hamsters – shows the total number of alive hamsters in the kennel e.Number Spawned – displays the total number of hamsters that were born during the simulation f.Number eaten – shows the total number of eaten hamsters during our simulation. g.Old Age Death – displays the total number of dead hamsters due to their old age.
Plot
The plot is used for the visualization of the number of active (alive) male hamsters and female hamsters.
How It Works
1.We create the environment – the kennel - by pressing the button “ setup” 2.Using sliders, we choose the initial number of male and female hamsters and adjust the probability of spawning of our hamsters. We turn the food filter to an amount that is adequate for the number of hamsters in the kennel, and we adjust the amount of food that is provided to our hamsters. 3.The simulation is started by pressing the button “go”
Male and Female hamsters are placed in the kennel. Periodically, some amount of food is added to the kennel. As hamsters walk, they use energy from food, represented as green patches, and age. As hamsters eat, they gain energy, grow to adulthood and add waste to the kennel. Female hamsters eat smaller hamsters. Hamsters die if: energy runs out, they get too old, food quality is poor. Hamsters spawn according to a probability if male hamster and female hamster are near each other, are mature, have enough energy, and the food quality is good. If food (the green patches) is not eaten, it rots and pollutes the kennel. The filter cleans waste and pollution from kennel depending on the flow of the filter. By pressing clean-environment button we are changing the food in the kennel, which is a fast way to improve food quality. By changing the variable we can see the effects of variables on food quality and hamsters population. It’s interesting to monitor the relation between hamsters population and food quality. Also it’s noticeable the relation between amount of food and population range. By changing the variables from sliders we can watch how the hamsters spawn, the baby hamsters grow, are being eaten and grow! The monitors show us the reasons of deaths, and the number of deaths.
Results
In order to make the simulation more realistic, I took the probability of hamsters spawning not higher than 0.5. Also, the maximal number of the hamsters living in the kennel was taken 200, since the kennel is not big enough. Our goal is to have the following statistics: •No Food Death – as minimal as possible •Old Age Death – better to have hamsters dead naturally •Number of Spawned – the more new babies we have – the better •Number of Eaten – the least number of eaten hamsters we have in the kennel, the better •Poor Quality Food Death – as minimal as possible I ran the simulation multiple times applying different settings for the same time period (the same number of ticks). I found the following cases the most interesting to focus on:
In the given six cases two cases satisfy 3 out of 5 aspects of our interest. I decided to elaborate on one of the cases, particularly:
For this case I decided to clean environment and monitor how our monitored numbers are changing. These are the results:
It is obvious from the simulation result that applying the more times we zoo cleans the kennel the least number of no food deaths we have, the higher number of old age deaths, the bigger number of spawned hamsters, the least number of eaten hamsters as well as the least number of poor quality food death we have.
Conclusion
By setting different ratio of male and female hamsters and changing probability of spawning as well as changing amounts of food and efficiency of filter, we found certain relation between the hamsters population, food amount and quality and hamsters deaths reasons. Applying different settings, we came to the conclusion that in order to have the lowest number no food death, eaten hamsters and poor food quality deaths and at the same time have the highest number of old age deaths and spawned hamsters, the zoo needs to set an appropriate rate of food and filtering of the food in the kennel. Moreover, the zoo has to make it sure that the kennel is big enough to have as many hamsters as possible. For our simulation we took the maximal number of hamsters living in the kennel at a time = 200. In our simulation the best relation was found when the food amount was set to 50 and filtering was 500, having the probability of hamsters spawning = 0.2. Moreover, it is recommended to clean the kennel as many as possible, since this leads to much better results.
How It Works
1.We create the environment – the kennel - by pressing the button “ setup” 2.Using sliders, we choose the initial number of male and female hamsters and adjust the probability of spawning of our hamsters. We turn the food filter to an amount that is adequate for the number of hamsters in the kennel, and we adjust the amount of food that is provided to our hamsters. 3.The simulation is started by pressing the button “go”
Male and Female hamsters are placed in the kennel. Periodically, some amount of food is added to the kennel. As hamsters walk, they use energy from food, represented as green patches, and age. As hamsters eat, they gain energy, grow to adulthood and add waste to the kennel. Female hamsters eat smaller hamsters. Hamsters die if: energy runs out, they get too old, food quality is poor. Hamsters spawn according to a probability if male hamster and female hamster are near each other, are mature, have enough energy, and the food quality is good. If food (the green patches) is not eaten, it rots and pollutes the kennel. The filter cleans waste and pollution from kennel depending on the flow of the filter. By pressing clean-environment button we are changing the food in the kennel, which is a fast way to improve food quality. By changing the variable we can see the effects of variables on food quality and hamsters population. It’s interesting to monitor the relation between hamsters population and food quality. Also it’s noticeable the relation between amount of food and population range. By changing the variables from sliders we can watch how the hamsters spawn, the baby hamsters grow, are being eaten and grow! The monitors show us the reasons of deaths, and the number of deaths.
Results
In order to make the simulation more realistic, I took the probability of hamsters spawning not higher than 0.5. Also, the maximal number of the hamsters living in the kennel was taken 200, since the kennel is not big enough. Our goal is to have the following statistics: •No Food Death – as minimal as possible •Old Age Death – better to have hamsters dead naturally •Number of Spawned – the more new babies we have – the better •Number of Eaten – the least number of eaten hamsters we have in the kennel, the better •Poor Quality Food Death – as minimal as possible I ran the simulation multiple times applying different settings for the same time period (the same number of ticks). I found the following cases the most interesting to focus on:
In the given six cases two cases satisfy 3 out of 5 aspects of our interest. I decided to elaborate on one of the cases, particularly:
For this case I decided to clean environment and monitor how our monitored numbers are changing. These are the results:
It is obvious from the simulation result that applying the more times we zoo cleans the kennel the least number of no food deaths we have, the higher number of old age deaths, the bigger number of spawned hamsters, the least number of eaten hamsters as well as the least number of poor quality food death we have.
Conclusion
By setting different ratio of male and female hamsters and changing probability of spawning as well as changing amounts of food and efficiency of filter, we found certain relation between the hamsters population, food amount and quality and hamsters deaths reasons. Applying different settings, we came to the conclusion that in order to have the lowest number no food death, eaten hamsters and poor food quality deaths and at the same time have the highest number of old age deaths and spawned hamsters, the zoo needs to set an appropriate rate of food and filtering of the food in the kennel. Moreover, the zoo has to make it sure that the kennel is big enough to have as many hamsters as possible. For our simulation we took the maximal number of hamsters living in the kennel at a time = 200. In our simulation the best relation was found when the food amount was set to 50 and filtering was 500, having the probability of hamsters spawning = 0.2. Moreover, it is recommended to clean the kennel as many as possible, since this leads to much better results.
1. Introduction
This simulation shows the spread of the virus Chickenpox via person-to-person transmission in the isolated population. It analyzes effect of vaccination on the dynamics of an infection with a person-to-person transmission and development of the immunity to the disease.
- Simulation Name: Virus Chickenpox
- Author: Yauheniya Andreyuk
2. Problem definition
Chickenpox, also known as varicella, is a highly contagious disease caused by the initial infection with varicella zoster virus (VZV). Chickenpox is an airborne disease which spreads easily through the coughs and sneezes of an infected person. The condition usually resolves by itself within a couple of weeks. The rash may, however, last for up to one month. After a chickenpox infection, the virus remains dormant in the body's nerve tissues. The immune system keeps the virus at bay, but later in life, usually in an adult, it can be reactivated and cause a different form of the viral infection called shingles.
3. Method
NetLogo 6.2. was used for this simulation. It was chosen due to the ease of visualization and quick results on a learning curve.
4. Model
4.1. People
The model contains only one turtle, which is humans. People in the simulation are divided into three groups – healthy, sick or immune (not at the beginning of the simulation, but later on). If a human is sick, he may infect other people he comes in contact with. When the person reaches a definite age he dies and is no longer relevant to the model. After the person was sick, but recovered, he also gains the immunity. People are set to move randomly.
4.2. Other sliders
Infectiousness - capability of causing infection;
Vaccination-rate – percentage of vaccinated people;
Immune-time – amount of time for which the person gains immunity;
Duration – how long the person will be sick before he recovers or dies;
Chance-recover - probability that the person will recover or gain the immunity.
Results
I want to follow how the results will vary with the vaccination-rate changing.
Case 1.
Vaccination-rate = 0.
In this case we can see that population gets sick and recovers in a natural way. Without the vaccination up to 98% of the population gets sick, but recovers afterwards, but then the circle happens once again. And not surprisingly this cycles influence a lot the amount of people dying.
Case 2.
Vaccination-rate < 10.
In this case the amount of immune people reaches up to 82% and the amount of people leaving in the area is quite stable. The amount of infected people doesn't reach even more then 12%.
Case 3.
Vaccination-rate = 50.
In this case we can see that the amount of immune people is way bigger then infected individuals (as monitors show - 0.57 infected and 98.86 immune).
Conclusion
It is clear from the results that the vaccination rate influences a lot the amount of immune people and the amount of sick/dying people. So it is concluded that more people care about the vaccination - more immune people are there in society - less people spread the virus and therefore less people die. For me, the vaccination rate was the most important parameter in this simulation, but changing the other parameters at the same time may give different results. The simulation has already a lot of parameters defined, but of course there is a space for improvements, for example - not always the symptoms are obvious at the very beginning, the extension to this simulation could be spreading disease without people even knowing it and capturing the amount of people dying when it is already too late to do something.