Example #1
0
        public OpenLoopDataSample Initialize(double currentTime, double dt)
        {
            controller.Initialize(dt);
            double             systemOutput = system.Initialize(dt);
            OpenLoopDataSample dataSample   = new OpenLoopDataSample()
            {
                time             = currentTime,
                input            = 0d,
                controllerOutput = 0d,
                systemOutput     = systemOutput
            };

            return(dataSample);
        }
Example #2
0
        public OpenLoopDataSample NextIteration(double input, double currentTime, double dt)
        {
            double             controllerOutput = controller.NextIteration(input, 0d, dt);
            double             systemOutput     = system.NextIteration(controllerOutput, currentTime, dt);
            OpenLoopDataSample dataSample       = new OpenLoopDataSample()
            {
                time             = currentTime,
                input            = input,
                controllerOutput = controllerOutput,
                systemOutput     = systemOutput
            };

            return(dataSample);
        }