コード例 #1
0
        public ControlSignal(string identifier, List <Point> points, int smaPeriod, bool isLogEnabled)
        {
            this.inputSmoother = new Smoother(smaPeriod);

            this.identifier = identifier;
            this.points     = points;
            this.points.Sort((p1, p2) => p1.value.CompareTo(p2.value));
            this.isLogEnabled = isLogEnabled;
        }
コード例 #2
0
        public SlowTargetController(int smaPeriod, int delayPeriod, int initialTarget, bool isLogEnabled)
        {
            this.isLogEnabled = isLogEnabled;

            smaPeriod = Math.Max(smaPeriod, delayPeriod / 10);

            inputSmoother  = new Smoother(smaPeriod);
            outputSmoother = new Smoother(smaPeriod);

            delayPeriod     = Math.Max(delayPeriod, smaPeriod);
            this.tickLength = Math.Max(1, smaPeriod / 10);

            delayBuf = new int[Math.Max(1, delayPeriod / this.tickLength)];

            InitialUpdate(initialTarget);
        }