public JsonResult Undetermined2()
        {
            List <Undetermined> undetermineds = new List <Undetermined>();

            for (int i = 1; i < 30; i += 1)
            {
                RandomInputViewModel randomInput = new RandomInputViewModel()
                {
                    PenaltyFrom       = 1,
                    PenaltyTo         = 10000,
                    DeadlineFrom      = 1,
                    DeadlineTo        = 30,
                    NumberOfElements  = i,
                    NumberOfPenalties = 10
                };

                double     percents;
                List <int> list = new List <int>();
                for (int k = 1; k < 10; k++)
                {
                    int summaryPenaltyCount = 0;



                    for (int j = 0; j < 100; j++)
                    {
                        UndeterminedResultViewModel undeterminedResult = randomInput.AlgoGenerator.Answer(randomInput.MakeSchedule());

                        if (undeterminedResult.ResultSchedules.Last() == 10)
                        {
                            summaryPenaltyCount++;
                        }
                    }
                    list.Add(summaryPenaltyCount);
                }

                percents = list.Average();

                Undetermined undetermined = new Undetermined()
                {
                    Step     = i,
                    Percents = percents
                };

                undetermineds.Add(undetermined);
            }

            return(Json(undetermineds));
        }
        public JsonResult UndeterminedTime()
        {
            List <Undetermined> undetermineds = new List <Undetermined>();

            for (int i = 1; i < 50; i += 1)
            {
                RandomInputViewModel randomInput = new RandomInputViewModel()
                {
                    PenaltyFrom       = 1,
                    PenaltyTo         = 10000,
                    DeadlineFrom      = 1,
                    DeadlineTo        = 90,
                    NumberOfElements  = 90,
                    NumberOfPenalties = i
                };

                DateTime moment1;
                DateTime moment2;
                double   diff = 0;

                for (int j = 0; j < 100; j++)
                {
                    moment1 = DateTime.Now;                              //first time
                    _       = randomInput.AlgoGenerator.Answer(randomInput.MakeSchedule());
                    moment2 = DateTime.Now;                              //time after running

                    diff += moment2.Subtract(moment1).TotalMilliseconds; //diff between first and second times
                }

                Undetermined undetermined = new Undetermined()
                {
                    Step     = i,
                    Percents = diff
                };

                undetermineds.Add(undetermined);
            }

            return(Json(undetermineds));
        }