Beispiel #1
0
        private void GetGeneratorTotals()
        {
            foreach (var CoalGenerator in generationReport.CoalGenerators)
            {
                GeneratorTotals.Add(new GeneratorTotals {
                    Name = CoalGenerator.Name, Total = CoalGenerator.TotalGeneration()
                });
                Console.WriteLine(string.Format("CoalGenerator {0} {1}", CoalGenerator.Name, CoalGenerator.TotalGeneration()));
            }

            foreach (var GasGenerator in generationReport.GasGenerators)
            {
                GeneratorTotals.Add(new GeneratorTotals {
                    Name = GasGenerator.Name, Total = GasGenerator.TotalGeneration()
                });
                Console.WriteLine(string.Format("GasGenerator {0} {1}", GasGenerator.Name, GasGenerator.TotalGeneration()));
            }

            foreach (var WindGenerator in generationReport.WindGenerators)
            {
                GeneratorTotals.Add(new GeneratorTotals {
                    Name = WindGenerator.Name, Total = WindGenerator.TotalGeneration()
                });
                Console.WriteLine(string.Format("WindGenerator {0} {1}", WindGenerator.Name, WindGenerator.TotalGeneration()));
            }
        }
Beispiel #2
0
        private List <DailyEmissions> GetFossyGeneratorDailyEmissions()
        {
            List <DailyEmissions> DailyEmissions = new List <DailyEmissions>();

            foreach (var CoalGenerator in generationReport.CoalGenerators)
            {
                DailyEmissions.AddRange(CoalGenerator.CalculateDailyEmissions());

                //Console.WriteLine(string.Format("CoalGenerator {0} {1}", CoalGenerator.Name, CoalGenerator.TotalGeneration()));
            }

            foreach (var GasGenerator in generationReport.GasGenerators)
            {
                DailyEmissions.AddRange(GasGenerator.CalculateDailyEmissions());

                //Console.WriteLine(string.Format("GasGenerator {0} {1}", GasGenerator.Name, GasGenerator.TotalGeneration()));
            }

            return(DailyEmissions);
        }