Пример #1
0
 public decimal GetdHdt(
     Iα α,
     C19M.M.C.A.Safi2010.Interfaces.Parameters.RecoveryRateHospitalizedIndividuals.Iγ γ_2,
     C19M.M.C.A.Safi2010.Interfaces.Parameters.DiseaseInducedDeathRateHospitalizedIndividuals.Iδ δ_2,
     Iμ μ,
     Iϕ ϕ,
     double H,
     double I,
     double Q)
 {
     return
         (α.Value.Value.Value * (decimal)Q
          -
          ϕ.Value.Value.Value * (decimal)I
          -
          (γ_2.Value.Value.Value + μ.Value.Value.Value + δ_2.Value.Value.Value) * (decimal)H);
 }
Пример #2
0
 public decimal GetdRdt(
     C19M.M.C.A.Safi2010.Interfaces.Parameters.NaturalRecoveryRateInfectiousIndividuals.Iγ γ_1,
     C19M.M.C.A.Safi2010.Interfaces.Parameters.RecoveryRateHospitalizedIndividuals.Iγ γ_2,
     Iμ μ,
     Iψ ψ,
     double H,
     double I,
     double R)
 {
     return
         (γ_1.Value.Value.Value
          *
          (decimal)I
          +
          γ_2.Value.Value.Value
          *
          (decimal)H
          -
          (ψ.Value.Value.Value + μ.Value.Value.Value)
          *
          (decimal)R);
 }
 // https://stackoverflow.com/a/55004295
 private Func <double, MathNet.Numerics.LinearAlgebra.Vector <double>, MathNet.Numerics.LinearAlgebra.Vector <double> > f(
     It t,
     C19M.M.C.A.Safi2010.Interfaces.Parameters.HospitalizationRateQuarantinedIndividuals.Iα α,
     C19M.M.C.A.Safi2010.Interfaces.Parameters.EffectiveContactRate.Iβ β,
     C19M.M.C.A.Safi2010.Interfaces.Parameters.NaturalRecoveryRateInfectiousIndividuals.Iγ γ_1,
     C19M.M.C.A.Safi2010.Interfaces.Parameters.RecoveryRateHospitalizedIndividuals.Iγ γ_2,
     C19M.M.C.A.Safi2010.Interfaces.Parameters.DiseaseInducedDeathRateInfectiousIndividuals.Iδ δ_1,
     C19M.M.C.A.Safi2010.Interfaces.Parameters.DiseaseInducedDeathRateHospitalizedIndividuals.Iδ δ_2,
     C19M.M.C.A.Safi2010.Interfaces.Parameters.EfficacyIsolationTreatmentHospitalizedIndividuals.Iη η,
     C19M.M.C.A.Safi2010.Interfaces.Parameters.DevelopmentDiseaseSymptomsRateExposedIndividuals.Iκ κ,
     C19M.M.C.A.Safi2010.Interfaces.Parameters.AcquireInfectionRateSusceptibleIndividuals.Iλ λ,
     C19M.M.C.A.Safi2010.Interfaces.Parameters.NaturalDeathRate.Iμ μ,
     C19M.M.C.A.Safi2010.Interfaces.Parameters.RecruitmentRateSusceptibleIndividuals.IΠ Π,
     C19M.M.C.A.Safi2010.Interfaces.Parameters.QuarantineRateExposedIndividuals.Iσ σ,
     C19M.M.C.A.Safi2010.Interfaces.Parameters.HospitalizationRateInfectiousIndividuals.Iϕ ϕ,
     C19M.M.C.A.Safi2010.Interfaces.Parameters.InfectionAcquiredImmunityLossRateRecoveredIndividuals.Iψ ψ,
     C19M.M.C.A.Safi2010.Interfaces.Variables.ExposedIndividuals.IE E,
     C19M.M.C.A.Safi2010.Interfaces.Variables.HospitalizedIndividuals.IH H,
     C19M.M.C.A.Safi2010.Interfaces.Variables.InfectiousIndividuals.II I,
     C19M.M.C.A.Safi2010.Interfaces.Variables.QuarantinedIndividuals.IQ Q,
     C19M.M.C.A.Safi2010.Interfaces.Variables.RecoveredIndividuals.IR R,
     C19M.M.C.A.Safi2010.Interfaces.Variables.SusceptibleIndividuals.IS S)
 {
     return((T, x) =>
     {
         return MathNet.Numerics.LinearAlgebra.Vector <double> .Build.Dense(new[] {
             (double)E.GetdEdt(
                 β,
                 η,
                 κ,
                 λ,
                 μ,
                 σ,
                 E: x[0],
                 H: x[1],
                 I: x[2],
                 N: x.Sum(),
                 S: x[5]),
             (double)H.GetdHdt(
                 α,
                 γ_2,
                 δ_2,
                 μ,
                 ϕ,
                 H: x[1],
                 I: x[2],
                 Q: x[3]),
             (double)I.GetdIdt(
                 γ_1,
                 δ_1,
                 κ,
                 μ,
                 ϕ,
                 E: x[0],
                 I: x[2]),
             (double)Q.GetdQdt(
                 α,
                 μ,
                 σ,
                 E: x[0],
                 Q: x[3]),
             (double)R.GetdRdt(
                 γ_1,
                 γ_2,
                 μ,
                 ψ,
                 H: x[1],
                 I: x[2],
                 R: x[4])
         });
     });
 }