-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create Spurious symptoms as objects #29
Conversation
Fixed a typo in the parameters Fixed an issue in logging where districts with no one alive would cause an error
Made coronavirus infection objects pass their tests
…d uses a set behaviour framework
…gan to create a spatial component to the covidtesting
…oved the names of spurious symptom tests to make things clearer
To help with review: Files that have had a small change: Pom xml - just changed a build requirement that caused the maven build to fail for java 8 Demography - created and used a ticks per year parameter All testing files except Covid spurious symptom/testing tests: changed simulation object to handle an extra boolean Files that need a review: Person: created properties that determine who has symptoms and who should be tested. Also created corresponding getters and setters CoronavirusSpuriousSymptom: creates the spurious symptom object class InfectiousBehaviourFramework: attempted to create a way to generalise disease behaviour frameworks. I didn't manage to do this actually so probably best to discuss SpuriousSymptomBehaviourFramework: creates the behaviours exhibited by the spurious symptom object CovidSpuriousSymptoms: handles the steppable functions which control the creation and removal of symptoms CovidTesting: handles the covid testing administration DiseaseTesting: an interface for general disease testing, implementation didn't seem to be the best, would be good to discuss Logging: created an output file for covid testing SpuriousSymptoms: generalised interface for symptoms WorldBankCovid19Sim: just changes things to handle spurious symptoms and testing CovidSpuriousSymptomTesting: test suite for covid symptom objects CovidTestingTesting: test suite for covid testing |
…testing conditional. Added close statements to file read ins that had been left open
… for CovidTesting.java
…orrectly load in else the model run fails, also included a test and a condition to make sure that all locations selected to test in exist in the model
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! A few minor tweaks as discussed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we're going to delete this file for parsimony
|
||
SpuriousSymptomNodeTitle(String key) { this.key = key; } | ||
|
||
static SpuriousSymptomNodeTitle getValue(String x) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
commenting in the rest of this file is great - can we extend to this part too?
if (symptom.host.hasSymptomaticCovid()) { | ||
symptom.setBehaviourNode(susceptibleNode); | ||
symptom.getHost().removeCovidSpuriousSymptoms(); | ||
return 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we discussed why 1 rather than returning to the weekly check - it's because we don't know when they'll stop having covid and spurious symptoms could start up again as soon as they stop having covid. This is consistent throughout the file!
if (time >= symptom.timeRecovered) { | ||
action = "recover"; | ||
} | ||
switch (action) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@RobertManningSmith wanted to convert these to enums
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changing object name from Title to Type after conversation
@@ -296,7 +315,7 @@ public void step(SimState arg0) { | |||
} | |||
}; | |||
schedule.scheduleRepeating(reporter, this.param_schedule_reporting, params.ticks_per_day); | |||
random = new MersenneTwisterFast(this.seed()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we had a discussion about why this was here twice, and I'm now of the opinion that the second time was unnecessary and doesn't control for what I wanted it to - so no point including it! Good deletion!
@@ -399,6 +397,10 @@ public void load_testing_locations(String testLocationsFilename) { | |||
admin_zones_to_test_in.add(zone_to_test_in); | |||
} | |||
assert (admin_zones_to_test_in.size() > 0): "Number of admin zone to test in not loaded"; | |||
for (String location: admin_zones_to_test_in) { | |||
assert (adminZoneNames.contains(location)): "Location to test in not found in model admin zones"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's add the name of the offending location for error checking!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@RobertManningSmith has opened an issue to create a folder to hold tests in resources directory (pending @swise5 figuring out what is happening with test/resources folder)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
This is part 1 of 2 of the new and tested spurious symptoms/ covid testing PR.
Note that the open pull requests 26 and 27 have been included here, hence the massive number of commits included in this.
This pull request introduces the spurious symptom framework as an object which is created for each person at a given rate. Once created this object will show an "exposed" behaviour node for a week and then revert to a "susceptible" behaviour node. From this point, existing nodes can remain dormant (susceptible) or flare up again.
There is now also a spurious symptom testing suit which is now working.
I should have stopped at just creating these spurious symptoms but i have gone on a bit to include covid testing. The covid testing files are probably subject to change and not worth spending to much time on for now.