public IEnumerator <IStepContext <float> > GetEnumerator()
        {
            StatisticsCalculator <Person, int>       stats   = new StatisticsCalculator <Person, int>();
            StatisticsCalculator <RobotJoint, float> statsCA = new StatisticsCalculator <RobotJoint, float>();

            int stepsSoFar = 0;

            while (steps < 0 || (stepsSoFar++ < steps))
            {
                SimulatorStep step = new SimulatorStep
                {
                    StatisticsCalculator           = stats,
                    ContinuousStatisticsCalculator = statsCA,
                    EventId    = Guid.NewGuid().ToString(),
                    Person     = GetRandomPerson(),
                    RobotJoint = GetRandomRobotJoint(),
                    SlotCount  = this.slots,
                };

                yield return(step);

                step.RecordContinuousAction(statsCA);
                step.Record(stats);
            }
        }
Пример #2
0
        public IEnumerator <IStepContext <float> > GetEnumerator()
        {
            StatisticsCalculator stats = new StatisticsCalculator();

            int stepsSoFar = 0;

            while (steps < 0 || (stepsSoFar++ < steps))
            {
                SimulatorStep step = new SimulatorStep
                {
                    StatisticsCalculator = stats,
                    EventId = Guid.NewGuid().ToString(),
                    Person  = GetRandomPerson()
                };

                yield return(step);

                step.Record(stats);
            }
        }