Пример #1
0
        public void CloseLoopTest()
        {
            var reference = ReferenceDataLoader.Load(projectPath + @"/LoopReferenceData/Close/reference_data.txt");

            CloseLoop loop = new CloseLoop(system, controller);

            Simulate.Step(loop, 2d, 0.1d);

            Assert.True(OutputSamplesComparator.Compare(reference, loop.Data));
        }
Пример #2
0
        public void BareSystemTest()
        {
            var reference = ReferenceDataLoader.Load(projectPath + @"\LoopReferenceData\Bare\reference_data.txt");

            BareSystem loop = new BareSystem(system);

            Simulate.Step(loop, 10d, 0.1d);

            Assert.True(OutputSamplesComparator.Compare(reference, loop.Data));
        }
Пример #3
0
        public void ControlSystemTest()
        {
            var reference = ReferenceDataLoader.Load(projectPath + @"/LoopReferenceData/Control/reference_data.txt");

            ControlSystem loop = new ControlSystem(system, controller);

            Simulate.Step(loop, 4d, 0.1d, (iteration, time) => {
                if (iteration == 20)
                {
                    loop.mode = ControlSystemMode.OpenLoop;
                }
            });

            Assert.True(OutputSamplesComparator.Compare(reference, loop.Data));
        }