Exemplo n.º 1
0
        public void HongKong()
        {
            C19M.D.Gumel2004.Interfaces.IHongKong HK = new C19M.D.Gumel2004.Classes.HongKong();

            // Context
            C19M.M.C.A.Gumel2004.Interfaces.Contexts.IGumel2004_Context context = new C19M.M.C.A.Gumel2004.Classes.Contexts.Gumel2004_Context(
                HK.EndDate,
                HK.NumberDaysAfterStartDate,
                HK.StartDate,
                HK.DiseaseInducedDeathRateSymptomaticIndividuals,
                HK.DiseaseInducedDeathRateIsolatedIndividuals,
                HK.InitialValueAsymptomaticIndividuals,
                HK.InitialValueSymptomaticIndividuals,
                HK.InitialValueIsolatedIndividuals,
                HK.RecruitmentRateAsymptomaticIndividuals,
                HK.InitialValueQuarantinedIndividuals,
                HK.InitialValueRecoveredIndividuals,
                null, // GTA.BasicReproductionNumber,
                null, // GTA.ControlReproductionNumber,
                HK.InitialValueSusceptibleIndividuals,
                HK.BasicTransmissionCoefficient,
                HK.QuarantineRateAsymptomaticIndividuals,
                HK.IsolationRateSymptomaticIndividuals,
                HK.TransmissionCoefficientModificationFactorAsymptomaticIndividuals,
                HK.TransmissionCoefficientModificationFactorIsolatedIndividuals,
                HK.TransmissionCoefficientModificationFactorQuarantinedIndividuals,
                HK.DevelopmentClinicalSymptomsRateAsymptomaticIndividuals,
                HK.DevelopmentClinicalSymptomsRateQuarantinedIndividuals,
                HK.NaturalDeathRate,
                HK.NetInflowRateSusceptibleIndividuals,
                HK.RecoveryRateSymptomaticIndividuals,
                HK.RecoveryRateIsolatedIndividuals);

            C19M.M.C.A.Gumel2004.Interfaces.Exports.IGumel2004_Export export = new C19M.M.C.A.Gumel2004.Classes.Exports.Gumel2004_Export(
                context);

            export.Solve();

            ImmutableList <System.Tuple <FhirDateTime, FhirDecimal> > E = export.DayAsymptomaticIndividuals;

            ImmutableList <System.Tuple <FhirDateTime, FhirDecimal> > I = export.DaySymptomaticIndividuals;

            ImmutableList <System.Tuple <FhirDateTime, FhirDecimal> > J = export.DayIsolatedIndividuals;

            ImmutableList <System.Tuple <FhirDateTime, FhirDecimal> > Q = export.DayQuarantinedIndividuals;

            ImmutableList <System.Tuple <FhirDateTime, FhirDecimal> > R = export.DayRecoveredIndividuals;

            ImmutableList <System.Tuple <FhirDateTime, FhirDecimal> > S = export.DaySusceptibleIndividuals;

            var dayCumulativeProbableCases = export.DayCumulativeProbableCases;

            for (DateTime i = HK.StartDate.ToPartialDateTime().Value.ToUniversalTime().DateTime.Date; i <= HK.EndDate.ToPartialDateTime().Value.ToUniversalTime().DateTime.Date; i = i.AddDays(1))
            {
                System.Diagnostics.Debug.WriteLine(
                    dayCumulativeProbableCases.Where(w => w.Item1.ToPartialDateTime().Value.ToUniversalTime().DateTime.Date == i).Select(w => w.Item2.Value.Value).SingleOrDefault());
            }
        }
Exemplo n.º 2
0
        public HongKong()
        {
            C19M.D.Gumel2004.Interfaces.IHongKong HongKong = new C19M.D.Gumel2004.Classes.HongKong();

            C19M.M.C.A.Gumel2004.Interfaces.Contexts.IGumel2004_Context HongKong_Context = new C19M.M.C.A.Gumel2004.Classes.Contexts.Gumel2004_Context(
                HongKong.EndDate,
                HongKong.NumberDaysAfterStartDate,
                HongKong.StartDate,
                HongKong.DiseaseInducedDeathRateSymptomaticIndividuals,
                HongKong.DiseaseInducedDeathRateIsolatedIndividuals,
                HongKong.InitialValueAsymptomaticIndividuals,
                HongKong.InitialValueSymptomaticIndividuals,
                HongKong.InitialValueIsolatedIndividuals,
                HongKong.RecruitmentRateAsymptomaticIndividuals,
                HongKong.InitialValueQuarantinedIndividuals,
                HongKong.InitialValueRecoveredIndividuals,
                null, // GTA.BasicReproductionNumber,
                null, // GTA.ControlReproductionNumber,
                HongKong.InitialValueSusceptibleIndividuals,
                HongKong.BasicTransmissionCoefficient,
                HongKong.QuarantineRateAsymptomaticIndividuals,
                HongKong.IsolationRateSymptomaticIndividuals,
                HongKong.TransmissionCoefficientModificationFactorAsymptomaticIndividuals,
                HongKong.TransmissionCoefficientModificationFactorIsolatedIndividuals,
                HongKong.TransmissionCoefficientModificationFactorQuarantinedIndividuals,
                HongKong.DevelopmentClinicalSymptomsRateAsymptomaticIndividuals,
                HongKong.DevelopmentClinicalSymptomsRateQuarantinedIndividuals,
                HongKong.NaturalDeathRate,
                HongKong.NetInflowRateSusceptibleIndividuals,
                HongKong.RecoveryRateSymptomaticIndividuals,
                HongKong.RecoveryRateIsolatedIndividuals);

            C19M.M.C.A.Gumel2004.Interfaces.Exports.IGumel2004_Export HongKong_Export = new C19M.M.C.A.Gumel2004.Classes.Exports.Gumel2004_Export(
                HongKong_Context);

            HongKong_Export.Solve();

            this.DayCumulativeDiseaseInducedDeaths = HongKong_Export.DayCumulativeDiseaseInducedDeaths;

            this.DayAsymptomaticIndividuals = HongKong_Export.DayAsymptomaticIndividuals;

            this.DaySymptomaticIndividuals = HongKong_Export.DaySymptomaticIndividuals;

            this.DayIsolatedIndividuals = HongKong_Export.DayIsolatedIndividuals;

            this.DayQuarantinedIndividuals = HongKong_Export.DayQuarantinedIndividuals;

            this.DayRecoveredIndividuals = HongKong_Export.DayRecoveredIndividuals;

            this.DaySusceptibleIndividuals = HongKong_Export.DaySusceptibleIndividuals;
        }