public ITEBS Calculate(
     ITEBSFactory TEBSFactory,
     Id d,
     IEBS EBS)
 {
     return(TEBSFactory.Create(
                d.Value
                .Select(y => EBS.GetElementAtAsdecimal(
                            y))
                .ToImmutableList()
                .Sum()));
 }
Esempio n. 2
0
 public ITEBS Calculate(
     ITEBSResultElementFactory TEBSResultElementFactory,
     ITEBSFactory TEBSFactory,
     ITEBSResultElementCalculation TEBSResultElementCalculation,
     It t,
     IΛ Λ,
     IEBS EBS)
 {
     return(TEBSFactory.Create(
                Λ.Value
                .Select(w => TEBSResultElementCalculation.Calculate(
                            TEBSResultElementFactory,
                            w,
                            t,
                            EBS))
                .ToImmutableList()));
 }
Esempio n. 3
0
 public Interfaces.Results.TotalExpectedBedShortage.ITEBS Calculate(
     ITEBSFactory TEBSFactory,
     IΛ Λ,
     IΡ Ρ,
     Interfaces.Results.ScenarioTotalExpectedBedShortages.ITEBS TEBS)
 {
     return(TEBSFactory.Create(
                Λ.Value
                .Select(w =>
                        Ρ.GetElementAtAsdecimal(
                            w)
                        *
                        TEBS.GetElementAtAsdecimal(
                            w))
                .ToImmutableList()
                .Sum()));
 }
        public ITEBSFactory CreateTEBSFactory()
        {
            ITEBSFactory factory = null;

            try
            {
                factory = new TEBSFactory();
            }
            catch (Exception exception)
            {
                this.Log.Error(
                    exception.Message,
                    exception);
            }

            return(factory);
        }