Skip to content

Commit

Permalink
Adapted gcm lesson projects to the ms-util package refactors. (#200)
Browse files Browse the repository at this point in the history
  • Loading branch information
shawnhatch authored Feb 4, 2024
1 parent 404200c commit daa4669
Show file tree
Hide file tree
Showing 34 changed files with 47 additions and 46 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportHeader;
import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportItem;
import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportLabel;
import util.wrappers.MutableInteger;
import gov.hhs.aspr.ms.util.wrappers.MutableInteger;

public class FamilyVaccineReport {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportItem;
import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportLabel;
import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportPeriod;
import util.wrappers.MutableInteger;
import gov.hhs.aspr.ms.util.wrappers.MutableInteger;

public class HourlyVaccineReport extends PeriodicReport {
/* start code_ref=reports_plugin_hourly_vaccine_constructor|code_cap=The hourly vaccine report covers the same content as the family vaccine report. Rather than report events as they happen, it instead periodically summarizes these events.*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportItem;
import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportLabel;
import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportPeriod;
import util.wrappers.MutableInteger;
import gov.hhs.aspr.ms.util.wrappers.MutableInteger;

public class StatelessVaccineReport extends PeriodicReport {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import gov.hhs.aspr.ms.gcm.plugins.stochastics.StochasticsPlugin;
import gov.hhs.aspr.ms.gcm.plugins.stochastics.datamanagers.StochasticsPluginData;
import gov.hhs.aspr.ms.gcm.plugins.stochastics.support.WellState;
import util.random.RandomGeneratorProvider;
import gov.hhs.aspr.ms.util.random.RandomGeneratorProvider;

public final class Example_14 {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
import gov.hhs.aspr.ms.gcm.plugins.people.events.PersonRemovalEvent;
import gov.hhs.aspr.ms.gcm.plugins.people.support.PersonError;
import gov.hhs.aspr.ms.gcm.plugins.people.support.PersonId;
import util.errors.ContractException;
import util.wrappers.MutableInteger;
import gov.hhs.aspr.ms.util.errors.ContractException;
import gov.hhs.aspr.ms.util.wrappers.MutableInteger;

public final class VaccinationDataManager extends DataManager {
/* start code_ref= people_plugin_vaccine_counts|code_cap=The vaccination data manager uses a simple map from person id to a counter to track the number of vaccinations for each person.*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportItem;
import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportLabel;
import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportPeriod;
import util.wrappers.MutableInteger;
import gov.hhs.aspr.ms.util.wrappers.MutableInteger;

public final class VaccineReport extends PeriodicReport {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package gov.hhs.aspr.ms.gcm.lessons.plugins.vaccine.support;

import util.errors.ContractError;
import util.errors.ContractException;
import gov.hhs.aspr.ms.util.errors.ContractError;
import gov.hhs.aspr.ms.util.errors.ContractException;

/**
* An enumeration supporting {@link ContractException} that acts as a general
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import gov.hhs.aspr.ms.gcm.plugins.stochastics.StochasticsPlugin;
import gov.hhs.aspr.ms.gcm.plugins.stochastics.datamanagers.StochasticsPluginData;
import gov.hhs.aspr.ms.gcm.plugins.stochastics.support.WellState;
import util.random.RandomGeneratorProvider;
import gov.hhs.aspr.ms.util.random.RandomGeneratorProvider;

public final class Example_15 {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package gov.hhs.aspr.ms.gcm.lessons.plugins.model;

import util.errors.ContractError;
import util.errors.ContractException;
import gov.hhs.aspr.ms.util.errors.ContractError;
import gov.hhs.aspr.ms.util.errors.ContractException;

/**
* An enumeration supporting {@link ContractException} that acts as a general
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package gov.hhs.aspr.ms.gcm.lessons.plugins.model;

import gov.hhs.aspr.ms.gcm.plugins.regions.support.RegionId;
import gov.hhs.aspr.ms.util.errors.ContractException;
import net.jcip.annotations.Immutable;
import util.errors.ContractException;

/**
* Identifier for all regions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
import gov.hhs.aspr.ms.gcm.plugins.people.events.PersonRemovalEvent;
import gov.hhs.aspr.ms.gcm.plugins.people.support.PersonError;
import gov.hhs.aspr.ms.gcm.plugins.people.support.PersonId;
import util.errors.ContractException;
import util.wrappers.MutableInteger;
import gov.hhs.aspr.ms.util.errors.ContractException;
import gov.hhs.aspr.ms.util.wrappers.MutableInteger;

public final class VaccinationDataManager extends DataManager {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package gov.hhs.aspr.ms.gcm.lessons.plugins.vaccine;

import util.errors.ContractError;
import util.errors.ContractException;
import gov.hhs.aspr.ms.util.errors.ContractError;
import gov.hhs.aspr.ms.util.errors.ContractException;

/**
* An enumeration supporting {@link ContractException} that acts as a general
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportItem;
import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportLabel;
import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportPeriod;
import util.wrappers.MutableInteger;
import gov.hhs.aspr.ms.util.wrappers.MutableInteger;

public final class VaccineReport extends PeriodicReport {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
import gov.hhs.aspr.ms.gcm.plugins.stochastics.StochasticsPlugin;
import gov.hhs.aspr.ms.gcm.plugins.stochastics.datamanagers.StochasticsPluginData;
import gov.hhs.aspr.ms.gcm.plugins.stochastics.support.WellState;
import util.random.RandomGeneratorProvider;
import gov.hhs.aspr.ms.util.random.RandomGeneratorProvider;

public final class Example_16 {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package gov.hhs.aspr.ms.gcm.lessons.plugins.model;

import util.errors.ContractError;
import util.errors.ContractException;
import gov.hhs.aspr.ms.util.errors.ContractError;
import gov.hhs.aspr.ms.util.errors.ContractException;

/**
* An enumeration supporting {@link ContractException} that acts as a general
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package gov.hhs.aspr.ms.gcm.lessons.plugins.model;

import gov.hhs.aspr.ms.gcm.plugins.regions.support.RegionId;
import gov.hhs.aspr.ms.util.errors.ContractException;
import net.jcip.annotations.Immutable;
import util.errors.ContractException;

/**
* Identifier for all regions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
import gov.hhs.aspr.ms.gcm.plugins.globalproperties.datamanagers.GlobalPropertiesDataManager;
import gov.hhs.aspr.ms.gcm.plugins.people.datamanagers.PeopleDataManager;
import gov.hhs.aspr.ms.gcm.plugins.people.support.PersonConstructionData;
import gov.hhs.aspr.ms.gcm.plugins.people.support.PersonId;
import gov.hhs.aspr.ms.gcm.plugins.people.support.PersonConstructionData.Builder;
import gov.hhs.aspr.ms.gcm.plugins.people.support.PersonId;
import gov.hhs.aspr.ms.gcm.plugins.personproperties.datamanagers.PersonPropertiesDataManager;
import gov.hhs.aspr.ms.gcm.plugins.personproperties.support.PersonPropertyDefinitionInitialization;
import gov.hhs.aspr.ms.gcm.plugins.personproperties.support.PersonPropertyValueInitialization;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
import gov.hhs.aspr.ms.gcm.plugins.stochastics.StochasticsPlugin;
import gov.hhs.aspr.ms.gcm.plugins.stochastics.datamanagers.StochasticsPluginData;
import gov.hhs.aspr.ms.gcm.plugins.stochastics.support.WellState;
import util.random.RandomGeneratorProvider;
import gov.hhs.aspr.ms.util.random.RandomGeneratorProvider;

public final class Example_17 {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportHeader;
import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportItem;
import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportLabel;
import util.wrappers.MutableInteger;
import gov.hhs.aspr.ms.util.wrappers.MutableInteger;

public final class ContagionReport {
private final ReportHeader reportHeader = ReportHeader.builder().add("infected").add("count").build();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package gov.hhs.aspr.ms.gcm.lessons.plugins.model.support;

import util.errors.ContractError;
import util.errors.ContractException;
import gov.hhs.aspr.ms.util.errors.ContractError;
import gov.hhs.aspr.ms.util.errors.ContractException;

/**
* An enumeration supporting {@link ContractException} that acts as a general
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package gov.hhs.aspr.ms.gcm.lessons.plugins.model.support;

import gov.hhs.aspr.ms.gcm.plugins.regions.support.RegionId;
import gov.hhs.aspr.ms.util.errors.ContractException;
import net.jcip.annotations.Immutable;
import util.errors.ContractException;

/**
* Identifier for all regions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
import gov.hhs.aspr.ms.gcm.plugins.stochastics.StochasticsPlugin;
import gov.hhs.aspr.ms.gcm.plugins.stochastics.datamanagers.StochasticsPluginData;
import gov.hhs.aspr.ms.gcm.plugins.stochastics.support.WellState;
import util.random.RandomGeneratorProvider;
import gov.hhs.aspr.ms.util.random.RandomGeneratorProvider;


public final class Example_18 {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package gov.hhs.aspr.ms.gcm.lessons.plugins.model;

import util.errors.ContractError;
import util.errors.ContractException;
import gov.hhs.aspr.ms.util.errors.ContractError;
import gov.hhs.aspr.ms.util.errors.ContractException;

/**
* An enumeration supporting {@link ContractException} that acts as a general
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package gov.hhs.aspr.ms.gcm.lessons.plugins.model;

import gov.hhs.aspr.ms.gcm.plugins.regions.support.RegionId;
import gov.hhs.aspr.ms.util.errors.ContractException;
import net.jcip.annotations.Immutable;
import util.errors.ContractException;

/**
* Identifier for all regions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import gov.hhs.aspr.ms.gcm.plugins.regions.datamanagers.RegionsDataManager;
import gov.hhs.aspr.ms.gcm.plugins.regions.support.RegionId;
import gov.hhs.aspr.ms.gcm.plugins.stochastics.datamanagers.StochasticsDataManager;
import util.wrappers.MutableDouble;
import gov.hhs.aspr.ms.util.wrappers.MutableDouble;

public class PopulationLoader {
private RegionId defaultRegionId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportHeader;
import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportItem;
import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportLabel;
import util.stats.MutableStat;
import gov.hhs.aspr.ms.util.stats.MutableStat;

/**
* A report that groups people at the end of the simulation by their shared
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportHeader;
import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportItem;
import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportLabel;
import util.wrappers.MultiKey;
import util.wrappers.MutableInteger;
import gov.hhs.aspr.ms.util.wrappers.MultiKey;
import gov.hhs.aspr.ms.util.wrappers.MutableInteger;

/**
* A report that groups people at the end of the simulation by their shared
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
import gov.hhs.aspr.ms.gcm.plugins.stochastics.StochasticsPlugin;
import gov.hhs.aspr.ms.gcm.plugins.stochastics.datamanagers.StochasticsPluginData;
import gov.hhs.aspr.ms.gcm.plugins.stochastics.support.WellState;
import util.random.RandomGeneratorProvider;
import gov.hhs.aspr.ms.util.random.RandomGeneratorProvider;

public final class Example_19 {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
import gov.hhs.aspr.ms.gcm.plugins.regions.datamanagers.RegionsDataManager;
import gov.hhs.aspr.ms.gcm.plugins.regions.support.RegionId;
import gov.hhs.aspr.ms.gcm.plugins.resources.datamanagers.ResourcesDataManager;
import util.wrappers.MutableDouble;
import util.wrappers.MutableLong;
import gov.hhs.aspr.ms.util.wrappers.MutableDouble;
import gov.hhs.aspr.ms.util.wrappers.MutableLong;

public class Vaccinator {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package gov.hhs.aspr.ms.gcm.lessons.plugins.model.support;

import util.errors.ContractError;
import util.errors.ContractException;
import gov.hhs.aspr.ms.util.errors.ContractError;
import gov.hhs.aspr.ms.util.errors.ContractException;

/**
* An enumeration supporting {@link ContractException} that acts as a general
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package gov.hhs.aspr.ms.gcm.lessons.plugins.model.support;

import gov.hhs.aspr.ms.gcm.plugins.regions.support.RegionId;
import gov.hhs.aspr.ms.util.errors.ContractException;
import net.jcip.annotations.Immutable;
import util.errors.ContractException;

/**
* Identifier for all regions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import gov.hhs.aspr.ms.gcm.plugins.personproperties.events.PersonPropertyUpdateEvent;
import gov.hhs.aspr.ms.gcm.plugins.stochastics.datamanagers.StochasticsDataManager;
import gov.hhs.aspr.ms.gcm.plugins.stochastics.support.Well;
import util.wrappers.MultiKey;
import gov.hhs.aspr.ms.util.wrappers.MultiKey;

public class EventVaccinator {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import gov.hhs.aspr.ms.gcm.plugins.personproperties.datamanagers.PersonPropertiesDataManager;
import gov.hhs.aspr.ms.gcm.plugins.stochastics.datamanagers.StochasticsDataManager;
import gov.hhs.aspr.ms.gcm.plugins.stochastics.support.Well;
import util.wrappers.MultiKey;
import gov.hhs.aspr.ms.util.wrappers.MultiKey;

public class InspectionVaccinator {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportHeader;
import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportItem;
import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportLabel;
import util.wrappers.MultiKey;
import util.wrappers.MutableInteger;
import gov.hhs.aspr.ms.util.wrappers.MultiKey;
import gov.hhs.aspr.ms.util.wrappers.MutableInteger;

public class PersonStatusReport {
private final ReportLabel reportLabel;
Expand Down

0 comments on commit daa4669

Please sign in to comment.