public IConstraint2 Create(
            Ir r,
            Is s,
            It t,
            Iψ ψ,
            IB B)
        {
            IConstraint2 constraint = null;

            try
            {
                constraint = new Constraint2(
                    r,
                    s,
                    t,
                    ψ,
                    B);
            }
            catch (Exception exception)
            {
                this.Log.Error(
                    exception.Message,
                    exception);
            }

            return(constraint);
        }
示例#2
0
        public IConstraints4ConstraintElement Create(
            IrIndexElement rIndexElement,
            ItIndexElement tIndexElement,
            Iψ ψ,
            Iγ γ)
        {
            IConstraints4ConstraintElement constraintElement = null;

            try
            {
                constraintElement = new Constraints4ConstraintElement(
                    rIndexElement,
                    tIndexElement,
                    ψ,
                    γ);
            }
            catch (Exception exception)
            {
                this.Log.Error(
                    exception.Message,
                    exception);
            }

            return(constraintElement);
        }
示例#3
0
 public decimal GetdSdt(
     Iβ β,
     Iη η,
     Iλ λ,
     C19M.M.C.A.Safi2010.Interfaces.Parameters.NaturalDeathRate.Iμ μ,
     C19M.M.C.A.Safi2010.Interfaces.Parameters.RecruitmentRateSusceptibleIndividuals.IΠ Π,
     Iψ ψ,
     double H,
     double I,
     double N,
     double R,
     double S)
 {
     return
         (Π.Value.Value.Value
          +
          ψ.Value.Value.Value
          *
          (decimal)R
          -
          λ.GetValue(
              β,
              η,
              H,
              I,
              N)
          .Value
          .Value
          *
          (decimal)S
          -
          μ.Value.Value.Value
          *
          (decimal)S);
 }
        public Constraints4ConstraintElement(
            IrIndexElement rIndexElement,
            ItIndexElement tIndexElement,
            Iψ ψ,
            Iγ γ)
        {
            Expression LHS = γ.Value[rIndexElement, tIndexElement];

            int RHS = 1 - ψ.GetElementAtAsint(
                tIndexElement);

            this.Value = LHS <= RHS;
        }
示例#5
0
        public Iψ Create(
            ImmutableList<IψParameterElement> value)
        {
            Iψ parameter = null;

            try
            {
                parameter = new ψ(
                    value);
            }
            catch (Exception exception)
            {
                this.Log.Error(
                    exception.Message,
                    exception);
            }

            return parameter;
        }
示例#6
0
        public Constraint2(
            Ir r,
            Is s,
            It t,
            Iψ ψ,
            IB B)
        {
            Expression LHS = Expression.Sum(
                s.Value
                .Select(x => B.Value[x]));

            int RHS = r.GetR()
                      *
                      t.Value
                      .Select(x => 1 - ψ.GetElementAtAsint(x))
                      .Sum();

            this.Value = LHS == RHS;
        }
示例#7
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);
 }