Beispiel #1
0
        public FuzzySolutionTabVM(AltSolutionModel altSolutionModel, int stepCount, int solutionCount, List <OptimizationPoint> currentPath) : base(altSolutionModel, $"E_{stepCount}_{solutionCount}")
        {
            CurrentPath = currentPath;
            ApplySteppingStoneChange(1);
            ActualSolutionMatrix = MathOperations.NewSolution(altSolutionModel.FirstSolution, CurrentPath);

            _firstCost = altSolutionModel.FirstFuzzyCost;

            CurrentCost         = MathOperations.CalculateCost(ActualSolutionMatrix, altSolutionModel.Source.FuzzySourceCostMatrix, out string equation);
            CurrentCostEquation = equation;

            FirstCostTitle   = $"Z_{stepCount}_1";
            CurrentCostTitle = $"Z_{stepCount}_{solutionCount}";

            FuzzyMeasurements = new Collection <FuzzyMeasurement>
            {
                new FuzzyMeasurement
                {
                    FirstX       = _firstCost.Left,
                    SecondX      = CurrentCost.Left,
                    ProbabilityY = 0
                },
                new FuzzyMeasurement
                {
                    FirstX       = _firstCost.Middle,
                    SecondX      = CurrentCost.Middle,
                    ProbabilityY = 1
                },
                new FuzzyMeasurement
                {
                    FirstX       = _firstCost.Right,
                    SecondX      = CurrentCost.Right,
                    ProbabilityY = 0
                },
            };
        }