Exemplo n.º 1
0
        public void DailyAverageTicksBug()
        {
            Series   s    = TestData.LindCouleeWW1InstantanousStage2004;
            DateTime date = DateTime.Parse("2004-01-02");
            Point    pt   = Math.TimeWeightedAverageForDay(s, date);

            Console.WriteLine(pt);
            Assert.AreEqual(0, pt.DateTime.Millisecond, "error #1");
        }
Exemplo n.º 2
0
        public void SingleDayAverageBanks()
        {
            Console.WriteLine("SingleDayAverageBanks Test:  banks lake average water level may 17, 2005 (raw scada data)");
            Series   input = TestData.Banks;
            DateTime date  = new DateTime(2005, 5, 17);
            Point    point = Math.TimeWeightedAverageForDay(input, date);

            Console.WriteLine("Average from raw scada = " + point.Value);
            Assert.AreEqual(1568.5, point.Value, 0.1);
        }
Exemplo n.º 3
0
        public void AverageForDay()
        {
            Series input = TestData.Simple1Day;

            input.WriteToConsole();
            Point pt = Math.TimeWeightedAverageForDay(input, input[0].DateTime);

            Assert.AreEqual(72.291667, pt.Value, 0.0001);

//--call cbp.Soi_DailyAverage('Records','value','2000-01-01','2025-01-01',0,null,0,0)
//-- result = 72.291667
        }