public static void FullSearchPrintResult(ResultDataAfterGrouping data, int countFloor, Label resultFullSearchLabel)
        {
            const string resultFullSearch = MessagesText.ResultComprehensiveSearch;

            resultFullSearchLabel.Text += resultFullSearch + MessagesText.NextLine;
            var minFine = string.Format(MessagesText.Fine, data.Fine);

            resultFullSearchLabel.Text += minFine + MessagesText.NextLine;

            if (countFloor != 1)
            {
                for (var numberFloor = 0; numberFloor < countFloor; ++numberFloor)
                {
                    resultFullSearchLabel.Text += MessagesText.DividingLine;
                    PrintFloor(data.ListResultOneFlat, resultFullSearchLabel);
                    resultFullSearchLabel.Text += MessagesText.DividingLine;
                    PrintFloor(data.ListResultTwoFlat, resultFullSearchLabel);
                    PrintStroke(data.ListResultOneFlat.Count, numberFloor, countFloor, resultFullSearchLabel);
                }
            }

            else
            {
                const string optArrangeOne = MessagesText.OptimalContainerPackage;
                resultFullSearchLabel.Text += optArrangeOne;
                resultFullSearchLabel.Text += MessagesText.NextLine;
                resultFullSearchLabel.Text += MessagesText.DividingLine;
                PrintFloor(data.ListResultOneFlat, resultFullSearchLabel);
                resultFullSearchLabel.Text += MessagesText.DividingLine;
                PrintFloor(data.ListResultTwoFlat, resultFullSearchLabel);
            }
            PrintExceedFlat(data.ListExcessOneFlat, resultFullSearchLabel, MessagesText.RectanglesAiNotList);
            PrintExceedFlat(data.ListExcessTwoFlat, resultFullSearchLabel, MessagesText.RectanglesBiNotList);
        }
        public static ResultDataAfterGrouping FullSearch(DataPerformAlgorithm data, int optCountFlat)
        {
            var        result = new ResultDataAfterGrouping();
            const bool isPermutationForOneFlat  = true;
            const bool isPermutationForTwoFlat  = true;
            var        permListOneFlat          = Resursion.Data(data.ListLenOneFlat.Count, optCountFlat, isPermutationForOneFlat); //gereration permutations
            var        permListTwoFlat          = Resursion.Data(data.ListLenTwoFlat.Count, optCountFlat, isPermutationForTwoFlat); //gereration permutations
            var        permutDataOneFlat        = VariantsFlats.VariantsFlat(permListOneFlat, data.ListLenOneFlat);
            var        permutDataTwoFlat        = VariantsFlats.VariantsFlat(permListTwoFlat, data.ListLenTwoFlat);
            var        totalOptimalExceedSquare = double.MaxValue;

            var countI = -1;

            foreach (var i in permutDataOneFlat.ListVariantsFlat)
            {
                var countJ = -1;
                countI++;
                foreach (var j in permutDataTwoFlat.ListVariantsFlat)
                {
                    countJ++;
                    var resultApartLen = CreatePlacementForCompSearch.CreatePlacement(i, j, Constraints.StepH);

                    if (!(resultApartLen.FineAfterGrouping < totalOptimalExceedSquare))
                    {
                        continue;
                    }
                    totalOptimalExceedSquare = Math.Round(resultApartLen.FineAfterGrouping, 1);
                    result.Fine = resultApartLen.FineAfterGrouping;
                    result.ListResultOneFlat = resultApartLen.ListLenOneFlat;
                    result.ListResultTwoFlat = resultApartLen.ListLenTwoFlat;
                    result.ListExcessOneFlat = permutDataOneFlat.ListExceedFlat[countI].ToList();
                    result.ListExcessTwoFlat = permutDataTwoFlat.ListExceedFlat[countJ].ToList();
                }
            }
            return(result);
        }
        public static void DynamicProgrammingPrintResult(List <Container> listContainers, int countFloor, ResultDataAfterGrouping resDataAftGrouping, Label resultGreedyLabel)
        {
            resultGreedyLabel.Text +=
                string.Format(MessagesText.ValueFunctionalF,
                              listContainers.Last().FineChain *countFloor + resDataAftGrouping.Fine)
                .ToString(CultureInfo.InvariantCulture);

            //Превращаем в список для удобного отображения
            var listOneFlat = new List <double>();
            var listTwoFlat = new List <double>();

            foreach (var container in listContainers)
            {
                //Приведение длин для конечного отображения
                var resultAddingPlace = ResultAddingPlace.CalculateAddingPlace(container.DataContainer, 0.3);
                listOneFlat.Add(resultAddingPlace.A1);
                listOneFlat.Add(resultAddingPlace.A2);
                listTwoFlat.Add(container.DataContainer.B1);
                listTwoFlat.Add(container.DataContainer.B2);
            }

            for (var numberFloor = 0; numberFloor < countFloor; ++numberFloor)
            {
                resultGreedyLabel.Text += MessagesText.DividingLine;
                PrintFloor(listOneFlat, resultGreedyLabel);
                resultGreedyLabel.Text += MessagesText.DividingLine;
                PrintFloor(listTwoFlat, resultGreedyLabel);
                PrintStroke(listOneFlat.Count, numberFloor, countFloor, resultGreedyLabel);
            }
            PrintExceedFlat(resDataAftGrouping.ListExcessOneFlat, resultGreedyLabel, MessagesText.RectanglesAiNotList);
            PrintExceedFlat(resDataAftGrouping.ListExcessTwoFlat, resultGreedyLabel, MessagesText.RectanglesBiNotList);
        }