コード例 #1
0
        public static void BlockE_Calc_DFn(string coeffTypeColumnName,
                                           MainCalcTables tables, int n, int coeffNOffset)
        {
            var resultColumnName = "DF" + n;

            var coeffsArr = Enumerable.Range(0, 5)
                            .Select(i => "a" + (i + coeffNOffset))
                            .ToArray();

            CopyCoeffs(coeffTypeColumnName,
                       tables.BazaInfoHydro, tables.BazaInfoCoeffs, tables.CalcsHydro,
                       coeffsArr);

            tables.CalcsHydro.IterateRows(calcsRow =>
            {
                var res = BlockE_Func_Calc_DF(
                    calcsRow[coeffsArr[0]].DoubleValue,
                    calcsRow[coeffsArr[1]].DoubleValue,
                    calcsRow[coeffsArr[2]].DoubleValue,
                    calcsRow[coeffsArr[3]].DoubleValue,
                    calcsRow[coeffsArr[4]].DoubleValue,
                    calcsRow["kXB"].DoubleValue,
                    calcsRow["kWP"].DoubleValue,
                    calcsRow["kL"].DoubleValue,
                    calcsRow["T2"].DoubleValue
                    );

                calcsRow.Set(resultColumnName, res, CellMapper.Rounder2);
            }, resultColumnName);

            tables.Result.AddColumn(tables.CalcsHydro.Column(resultColumnName));
        }
コード例 #2
0
        public static void BlockE_Calc_DF(string coeffTypeColumnName,
                                          MainCalcTables tables, Dictionary <string, object> calcMemory)
        {
            var coeffNOffset = (int)calcMemory["DF_Offset"];

            BlockE_Calc_DFn(coeffTypeColumnName, tables, 1, coeffNOffset);
            BlockE_Calc_DFn(coeffTypeColumnName, tables, 2, coeffNOffset + 5);
        }
コード例 #3
0
        private void PrepareTables()
        {
            var calcTablesArg = new ConstructorArgument(ArgUserInput, userInput);

            tables = AppContext.Kernel.Get <MainCalcTables>(calcTablesArg);
        }