Skip to content
← Back to Community
Simulator of Spread of COVID-19
Profile icon
adhvaiththurvas

Hi guys,
This is my first post. I was looking at the news (with coronovirus spreading and mass panic ensuing) and decided to make a little simulator of the spread of coronavirus based on infectivity rates and mortality rates. This isn't complete, I'm still adding stuff to this to make it more accurate, but it's pretty good for now. Hope you guys enjoy it!

Voters
Profile icon
DiegoPaternoste
Profile icon
didlly
Profile icon
RyanWong12
Profile icon
BraylanBB121
Profile icon
EricSrinivasan
Profile icon
AgastyaSandhuja
Profile icon
cat_optimist
Profile icon
Epicmuffinepic
Profile icon
MATHyou
Profile icon
ARIANNAXU
Comments
hotnewtop
Profile icon
[deleted]

Good job! One thing I would recommend is to remove using namespace std;, as that is a bad practice

Profile icon
AphixDev

@TaylorLiang It's not really a bad practice in replit. I'd say, having experience in UE4 and Unity, that it is most important to remove in software development and Game Dev, but otherwise, it's a nice thing to have for time's sake.

Profile icon
[deleted]

@nt998302 for something small, I would agree that yeah, its ok. Just that for larger projects, it can cause a hassle and errors later on

Profile icon
AphixDev
Profile icon
MrstupidBoi

Add a new action: 'm' Mask Mandate, Decreases infectivity but increases death rate due to protests against masks

Profile icon
fenbendazole

We are a non-profit page directing our attention to complimentary medical therapies. We conduct research and publish science based articles about nutritional and chemical properties of various products. Our site is not affiliated with any particular company or organization. We are not a commercial enterprise. At Fenbendazole.org we do not offer any products for sale, we are an educational agency.  We are a small but growing non-profit organization and we are always looking for new volunteers that want to contribute to our cause. We welcome all editors to help us with our mission.

https://www.fenbendazole.org/

Profile icon
BaconErie

Does anyone realize that this post is 2 YEARS OLD

The pandemic still hasn't ended

Profile icon
ridoskon

Wow, that looks like a great practice. Did you try to develop this simulator any further? If you can get enough information from doctors about how the virus is spreading and why we keep getting new waves of this damn virus, I think you could simulate a potential "future scenario" of how the virus would spread on a particular territory. Oh man, it has been almost two years of covid-19 right now. I'm so freaking tired of it. Though, I never caught it! I tried to keep my immune system as strong as possible. I even used this powder https://www.fenbenlab.com/product/fenbendazole-powder/. So, it seems that all these products actually helped me a lot.

Profile icon
Heavilyass

I hope that everyone is doing fine here. That pandemic sucks… But still we have some positive sides. Most of us can work remotely. Personally, I prefer to stay at home in my cozy room and work from my bed rather than the office with noisy colleagues in a hot as hell conference room. During lockdown, I managed to dedicate some time for my self-development and read 100 books, do yoga and update my playlist. Despite the fact that my test at https://www.confirmbiosciences.com/covid19-sars-antigen-rapid-swab-test/ showed me that I am ill now, I like the way my life goes up and up. And I wish the same for you guys!

Profile icon
ChezCoder

your feedbak thing doesn't work, clients cant change your server sided text files. it can easily solved with database packages or a database handling lang. (php, nodejs, etc...)

Profile icon
LOLInteresting

image

Ummm.......

Profile icon
SilentShadowBla

C++ should be used more, this is awesome

Profile icon
Mapaor4

How do you program the Try again button?

Profile icon
SilentShadowBla

make a while loop @Mapaor4

Profile icon
Mapaor4

@SilentShadowBla Hey, I can't see the loop. The main funcion ends with simulation(people,day,num_of_ppl);

and at the end of this function we found:

cout << "Any feedback? (Must be 1000 words or less)" << endl; char feedback[1000]; cin >> feedback; file << feedback << "\n"; file.close();

So where exactly is the loop?

Profile icon
adhvaiththurvas

@Mapaor4 the while loop is in the function simulation (vector<int> a, int day, long long int num)

Profile icon
Mapaor4

It's easy to win but really good code

Profile icon
adhvaiththurvas

UPDATE: COVID-19 Simulator is now updated to 0.0.15 (Fuschia)

  • age is now a factor in the pandemic. There are a bunch of old people with twice as high of a mortality rate.
  • the objective is to get under a 3% mortality rate and try to get rid of the pandemic as quick as you can.
  • a few more features to make this more game-like

FUTURE: more features to be added, including the socio-economic effects of the COVID-19 pandemic and means of decreasing the mortality rate

Profile icon
AgastyaSandhuja

I spammed "3" and won the game so you should add things to stop a spam for something that can easily win the game

Profile icon
adhvaiththurvas

UPDATE:

  • fixed bug where simulation wouldn't stop when no one is infected
  • increased "mass panic" threshold
    The infectivity rate is based on real stats, as well as the mortality rate. I am working on increasing the mortality rate.
    This is meant to be a simulation of a real COVID-19 pandemic, which is why I am adding more features, and why the infectivity rate/mortality rate isn't as high.
Profile icon
staticvoidliam7

Screenshot 2020-03-16 at 13.10.12

Profile icon
staticvoidliam7

i just did nothing the whole time lol

Profile icon
staticvoidliam7

It's like plague.inc but for COVID

Profile icon
LizFoster

It's a little bit too easy to win. Also, it doesn't automatically stop when the number of infected people hits zero. Maybe make the infection rate twice as high, or something like that? This is a very good idea, and well thought out if I may. Good work so far!