Skip to content

Commit

Permalink
btach for ab paper
Browse files Browse the repository at this point in the history
  • Loading branch information
smuellervsp committed Oct 2, 2023
1 parent a7e2daa commit 680cb2b
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 14 deletions.
6 changes: 3 additions & 3 deletions src/main/java/org/matsim/episim/InfectionEventHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -782,9 +782,9 @@ public void reset(int iteration) {
// uncomment if you want immunization stats to be printed on a certain
// date or e.g. every month. This produces a lot of large files so use
// sparingly.
// if (date.getDayOfMonth() == 1) {
// reporting.reportDetailedPersonStats(date, personMap.values());
// }
if (date.getDayOfMonth() == 1) {
reporting.reportDetailedPersonStats(date, personMap.values());
}


reporting.reportCpuTime(iteration, "ProgressionModelParallel", "start", -2);
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/matsim/run/CreateBatteryForCluster.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@ public class CreateBatteryForCluster<T> implements Callable<Integer> {
@CommandLine.Option(names = "--jvm-opts", description = "Additional options for JVM", defaultValue = "-Xms82G -Xmx82G -XX:+UseParallelGC")
private String jvmOpts;

@CommandLine.Option(names = "--setup", defaultValue = "org.matsim.run.batch.CologneBMBF202212XX_bq1")
@CommandLine.Option(names = "--setup", defaultValue = "org.matsim.run.batch.CologneBMBF202212XX_soup")
private Class<? extends BatchRun<T>> setup;

@CommandLine.Option(names = "--params", defaultValue = "org.matsim.run.batch.CologneBMBF202212XX_bq1$Params")
@CommandLine.Option(names = "--params", defaultValue = "org.matsim.run.batch.CologneBMBF202212XX_soup$Params")
private Class<T> params;

@SuppressWarnings("rawtypes")
Expand Down
26 changes: 19 additions & 7 deletions src/main/java/org/matsim/run/batch/CologneBMBF202212XX_soup.java
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,9 @@ public Config prepareConfig(int id, Params params) {
// vary amount of "school" activity that takes place during vacation
builder.restrict(LocalDate.parse("2022-06-27"), 0.8, "educ_primary", "educ_kiga", "educ_secondary", "educ_tertiary", "educ_other");

builder.restrict(LocalDate.parse("2023-01-01"), Restriction.ofCiCorrection(params.ciCorr), "leisPublic", "leisPrivate", "educ_higher");
builder.restrict(LocalDate.parse("2023-01-01"), Restriction.ofCiCorrection(params.ciCorr * 0.75), "educ_primary", "educ_kiga", "educ_secondary", "educ_tertiary", "educ_other");

episimConfig.setPolicy(builder.build());


Expand Down Expand Up @@ -617,32 +620,41 @@ public static final class Params {
@StringParameter({"base"})
String vacCamp;

@StringParameter({"1.7"})
@StringParameter({"1.5"})
public String StrainA;

// @StringParameter({"2022-08-15", "2022-08-22", "2022-08-29", "2022-09-05", "2022-09-12", "2022-09-19", "2022-09-26"})
@StringParameter({"2022-09-12"})
public String strainADate;

@Parameter({6., 12., 24.})
@Parameter({1.})
public double esc;

@Parameter({1., 6.})
@Parameter({12.})
public double escL;

// @Parameter({1., 0.5, 0.25})
@Parameter({1.})
public double ciCorr;

// @IntParameter({30, 120})
@IntParameter({30})
public int days;

// @StringParameter({"no", "4711"})
@StringParameter({"no"})
public String strainRnd;

@StringParameter({"true", "false"})
// @StringParameter({"true", "false"})
@StringParameter({"false"})
public String lineB;

@StringParameter({"true", "false"})
// @StringParameter({"true", "false"})
@StringParameter({"true"})
public String iga;

@StringParameter({"true", "false"})
// @StringParameter({"true", "false"})
@StringParameter({"true"})
public String seasonal;

}
Expand Down Expand Up @@ -714,7 +726,7 @@ private static ArrayList<LocalDate> getDatesNewStrains(ArrayList<VirusStrain> st
ArrayList<LocalDate> dates = new ArrayList<LocalDate>();

if (seed.equals("no")) {
for (LocalDate date = start; ; date = date.plusDays(1)) {
for (LocalDate date = start.plusDays(1); ; date = date.plusDays(1)) {
long daysBetween = ChronoUnit.DAYS.between(start, date);
if (daysBetween % days == 0)
dates.add(date);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
import org.matsim.episim.model.input.CreateRestrictionsFromCSV;
import org.matsim.episim.model.listener.HouseholdSusceptibility;
import org.matsim.episim.model.listener.WriteAntibodies;
import org.matsim.episim.model.progression.AgeDependentDiseaseStatusTransitionModel;
import org.matsim.episim.model.listener.WriteContactsPerDay;
import org.matsim.episim.model.progression.AgeDependentDiseaseStatusTransitionModel;
import org.matsim.episim.model.progression.DiseaseStatusTransitionModel;
import org.matsim.episim.model.testing.TestType;
import org.matsim.episim.model.testing.TestingModel;
Expand Down Expand Up @@ -262,10 +263,11 @@ protected void configure() {
Multibinder<SimulationListener> listener = Multibinder.newSetBinder(binder(), SimulationListener.class);

listener.addBinding().to(HouseholdSusceptibility.class);
// listener.addBinding().to(WriteContactsPerDay.class);

// Write antibodies, iteration is hard-coded

// listener.addBinding().to(WriteAntibodies.class);
// listener.addBinding().to(WriteAntibodies.class);

}

Expand Down

0 comments on commit 680cb2b

Please sign in to comment.