Skip to content

Commit

Permalink
43 parameter inputs can be make more robust (#45)
Browse files Browse the repository at this point in the history
* work around for column order in ODMs

* Created a test suite that checks that the model can run without certain parameter files being declared and that if something has gone wrong in loading in parameters, the model will raise error

* removed all references to covid testing as this will make the covid testing PR a lot easier

* further stripping of loading test files
  • Loading branch information
RobertManningSmith authored Sep 27, 2024
1 parent 0f3dfa0 commit 0ddb9ca
Show file tree
Hide file tree
Showing 33 changed files with 514 additions and 176 deletions.
31 changes: 3 additions & 28 deletions Protecs/src/main/java/uk/ac/ucl/protecs/objects/Person.java
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,7 @@ public static OCCUPATION getValue(String x) {
boolean recovered = false;
boolean hasCovid = false;
boolean hadCovid = false;
public boolean elligableForTesting = false;
boolean hasBeenTested = false;
boolean hasTestedPositive = false;
boolean hasSpuriousSymptoms = false;
public int timeToRemoveSymptoms = 100000000;




Expand Down Expand Up @@ -604,17 +600,6 @@ public void sendHome() {

public boolean hasPresymptCovid() { return this.presymptomatic; }

public boolean hasBeenTested() { return this.hasBeenTested; }

public boolean hasTestedPos() { return this.hasTestedPositive; }

public boolean isElligableForTesting() {return this.elligableForTesting; }
public boolean hasSpuriousSymptoms() {return this.hasSpuriousSymptoms; }

public boolean inAnAdminZoneTesting() {
boolean answer = this.myWorld.params.admin_zones_to_test_in.stream().anyMatch(x -> x.equals(this.myHousehold.getRootSuperLocation().myId));
return answer;
}

public void setInfection(Infection i){ myInfection = i; }
public boolean hadCovid() { return this.hadCovid; }
Expand Down Expand Up @@ -661,25 +646,15 @@ public boolean inAnAdminZoneTesting() {
public void removeSevere() { this.severe = false; }
public void setCritical() { this.critical = true; }
public void setRecovered() { this.recovered = true; }
public void elligableForTesting() {this.elligableForTesting = true; }
public void notElligableForTesting() {this.elligableForTesting = false; }
public void setTested() { this.hasBeenTested = true; }
public void setTestedPositive() { this.hasTestedPositive = true; }
public void setSymptomRemovalDate(int time) { this.timeToRemoveSymptoms = time; }
public void removeTestedPositive() { this.hasTestedPositive = false; }

public void removeCovid() {
this.asymptomatic = false;
this.mild = false;
this.severe = false;
this.critical = false;
this.hasCovid = false;
}
public void removeSpuriousSymptoms() {
this.hasSpuriousSymptoms = false;
}
public void setSpuriousSymptoms() {
this.hasSpuriousSymptoms = true;
}

public String getCurrentAdminZone() {return this.getHousehold().getRootSuperLocation().myId;}

// UTILS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,6 @@ public double next(Steppable s, double time) {
}
if (!i.getHost().hasMild()) {
i.getHost().setMild();
i.getHost().elligableForTesting();
}


Expand Down Expand Up @@ -520,7 +519,6 @@ public double next(Steppable s, double time) {
i.getHost().getLocation().getRootSuperLocation().metric_new_recovered++;
i.getHost().setRecovered();
i.getHost().removeCovid();
i.getHost().notElligableForTesting();
// the Person may have stopped moving when ill - reactivate!
if(i.getHost().isImmobilised()){
i.getHost().setMobility(true);
Expand Down
Loading

0 comments on commit 0ddb9ca

Please sign in to comment.