public IScenarioUtilizedTimesResultElement Calculate(
     IScenarioUtilizedTimesResultElementFactory scenarioUtilizedTimesResultElementFactory,
     IΛIndexElement ΛIndexElement,
     Isrt srt,
     Ih h,
     In n,
     Ix x)
 {
     return(scenarioUtilizedTimesResultElementFactory.Create(
                ΛIndexElement,
                srt.Value.Select(w =>
                                 x.GetElementAtAsint(
                                     w.sIndexElement,
                                     w.rIndexElement,
                                     w.tIndexElement)
                                 *
                                 n.GetElementAtAsint(
                                     w.sIndexElement,
                                     ΛIndexElement)
                                 *
                                 h.GetElementAtAsdecimal(
                                     w.sIndexElement,
                                     ΛIndexElement))
                .Sum()));
 }
        public IScenarioUtilizedTimesResultElementFactory CreateScenarioUtilizedTimesResultElementFactory()
        {
            IScenarioUtilizedTimesResultElementFactory factory = null;

            try
            {
                factory = new ScenarioUtilizedTimesResultElementFactory();
            }
            catch (Exception exception)
            {
                this.Log.Error("Exception message: " + exception.Message + " and stacktrace " + exception.StackTrace);
            }

            return(factory);
        }
示例#3
0
        public IScenarioUtilizedTimesResultElementFactory CreateScenarioUtilizedTimesResultElementFactory()
        {
            IScenarioUtilizedTimesResultElementFactory factory = null;

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

            return(factory);
        }
 public IScenarioUtilizedTimes Calculate(
     IScenarioUtilizedTimesResultElementFactory scenarioUtilizedTimesResultElementFactory,
     IScenarioUtilizedTimesFactory scenarioUtilizedTimesFactory,
     IScenarioUtilizedTimesResultElementCalculation scenarioUtilizedTimesResultElementCalculation,
     IΛ Λ,
     Isrt srt,
     Ih h,
     In n,
     Ix x)
 {
     return(scenarioUtilizedTimesFactory.Create(
                Λ.Value
                .Select(w => scenarioUtilizedTimesResultElementCalculation.Calculate(
                            scenarioUtilizedTimesResultElementFactory,
                            w,
                            srt,
                            h,
                            n,
                            x))
                .ToImmutableList()));
 }