Exemple #1
0
        public OffspringSuccessAnalyzer()
            : base()
        {
            #region Create parameters
            Parameters.Add(new LookupParameter <IntValue>("NumberOfCreatedOffspring", "The current number of created offspring."));
            Parameters.Add(new LookupParameter <IntValue>("NumberOfSuccessfulOffspring", "The current number of successful offspring."));
            Parameters.Add(new LookupParameter <IntValue>("Effort", "The maximum number of offspring created in each generation."));
            Parameters.Add(new LookupParameter <IntValue>("MaximumPopulationSize", "The maximum size of the population in the scope tree which should be analyzed."));
            Parameters.Add(new ValueLookupParameter <DataTable>("OffspringSuccess", "The data table to store the values."));
            Parameters.Add(new ValueLookupParameter <VariableCollection>("Results", "The results collection where the analysis values should be stored."));
            #endregion

            #region Create operators
            DataTableValuesCollector dataTableValuesCollector = new DataTableValuesCollector();
            ResultsCollector         resultsCollector         = new ResultsCollector();

            dataTableValuesCollector.CollectedValues.Add(new LookupParameter <IntValue>("NumberOfCreatedOffspring", null, NumberOfCreatedOffspringParameter.Name));
            dataTableValuesCollector.CollectedValues.Add(new LookupParameter <IntValue>("NumberOfSuccessfulOffspring", null, NumberOfSuccessfulOffspringParameter.Name));
            dataTableValuesCollector.CollectedValues.Add(new LookupParameter <IntValue>("Effort", null, EffortParameter.Name));
            dataTableValuesCollector.CollectedValues.Add(new LookupParameter <IntValue>("MaximumPopulationSize", null, MaximumPopulationSizeParameter.Name));
            dataTableValuesCollector.DataTableParameter.ActualName = OffspringSuccessParameter.Name;

            resultsCollector.CollectedValues.Add(new LookupParameter <DataTable>(OffspringSuccessParameter.Name));
            resultsCollector.ResultsParameter.ActualName = ResultsParameter.Name;
            #endregion

            #region Create operator graph
            OperatorGraph.InitialOperator      = dataTableValuesCollector;
            dataTableValuesCollector.Successor = resultsCollector;
            resultsCollector.Successor         = null;
            #endregion
        }
Exemple #2
0
        public PopulationSizeAnalyzer()
            : base()
        {
            #region Create parameters
            Parameters.Add(new LookupParameter <IntValue>("CurrentPopulationSize", "The current size of the population in the scope tree which should be analyzed."));
            Parameters.Add(new LookupParameter <IntValue>("MaximumPopulationSize", "The maximum size of the population in the scope tree which should be analyzed."));
            Parameters.Add(new LookupParameter <IntValue>("MinimumPopulationSize", "The minimum size of the population in the scope tree which should be analyzed."));
            Parameters.Add(new ValueLookupParameter <DataTable>("PopulationSizes", "The data table to store the values."));
            Parameters.Add(new ValueLookupParameter <VariableCollection>("Results", "The results collection where the analysis values should be stored."));
            #endregion

            #region Create operators
            DataTableValuesCollector dataTableValuesCollector = new DataTableValuesCollector();
            ResultsCollector         resultsCollector         = new ResultsCollector();

            dataTableValuesCollector.CollectedValues.Add(new LookupParameter <IntValue>("CurrentPopulationSize", null, CurrentPopulationSizeParameter.Name));
            dataTableValuesCollector.CollectedValues.Add(new LookupParameter <IntValue>("MaximumPopulationSize", null, MaximumPopulationSizeParameter.Name));
            dataTableValuesCollector.CollectedValues.Add(new LookupParameter <IntValue>("MinimumPopulationSize", null, MinimumPopulationSizeParameter.Name));
            dataTableValuesCollector.DataTableParameter.ActualName = PopulationSizesParameter.Name;

            resultsCollector.CollectedValues.Add(new LookupParameter <DataTable>(PopulationSizesParameter.Name));
            resultsCollector.ResultsParameter.ActualName = ResultsParameter.Name;
            #endregion

            #region Create operator graph
            OperatorGraph.InitialOperator      = dataTableValuesCollector;
            dataTableValuesCollector.Successor = resultsCollector;
            resultsCollector.Successor         = null;
            #endregion
        }
Exemple #3
0
        public SelectionPressureAnalyzer()
            : base()
        {
            #region Create parameters
            Parameters.Add(new LookupParameter <DoubleValue>("ActualSelectionPressure", "The actual selection pressure."));
            Parameters.Add(new ValueLookupParameter <DataTable>("SelectionPressure", "The data table to store the values."));
            Parameters.Add(new ValueLookupParameter <VariableCollection>("Results", "The results collection where the analysis values should be stored."));
            #endregion

            #region Create operators
            DataTableValuesCollector dataTableValuesCollector = new DataTableValuesCollector();
            ResultsCollector         resultsCollector         = new ResultsCollector();

            dataTableValuesCollector.CollectedValues.Add(new LookupParameter <DoubleValue>("ActualSelectionPressure", null, ActualSelectionPressureParameter.Name));
            dataTableValuesCollector.DataTableParameter.ActualName = SelectionPressureParameter.Name;

            resultsCollector.CollectedValues.Add(new LookupParameter <DataTable>(SelectionPressureParameter.Name));
            resultsCollector.ResultsParameter.ActualName = ResultsParameter.Name;
            #endregion

            #region Create operator graph
            OperatorGraph.InitialOperator      = dataTableValuesCollector;
            dataTableValuesCollector.Successor = resultsCollector;
            resultsCollector.Successor         = null;
            #endregion
        }
Exemple #4
0
        private void InitializeOperators()
        {
            prunedNodesReducer = new DataReducer();
            prunedNodesReducer.ParameterToReduce.ActualName = PruningOperator.PrunedNodesParameter.ActualName;
            prunedNodesReducer.ReductionOperation.Value     = new ReductionOperation(ReductionOperations.Sum);    // sum all the pruned subtrees parameter values
            prunedNodesReducer.TargetOperation.Value        = new ReductionOperation(ReductionOperations.Assign); // asign the sum to the target parameter
            prunedNodesReducer.TargetParameter.ActualName   = TotalNumberOfPrunedNodesParameterName;

            prunedSubtreesReducer = new DataReducer();
            prunedSubtreesReducer.ParameterToReduce.ActualName = PruningOperator.PrunedSubtreesParameter.ActualName;
            prunedSubtreesReducer.ReductionOperation.Value     = new ReductionOperation(ReductionOperations.Sum);    // sum all the pruned subtrees parameter values
            prunedSubtreesReducer.TargetOperation.Value        = new ReductionOperation(ReductionOperations.Assign); // asign the sum to the target parameter
            prunedSubtreesReducer.TargetParameter.ActualName   = TotalNumberOfPrunedSubtreesParameterName;

            prunedTreesReducer = new DataReducer();
            prunedTreesReducer.ParameterToReduce.ActualName = PruningOperator.PrunedTreesParameter.ActualName;
            prunedTreesReducer.ReductionOperation.Value     = new ReductionOperation(ReductionOperations.Sum);
            prunedTreesReducer.TargetOperation.Value        = new ReductionOperation(ReductionOperations.Assign);
            prunedTreesReducer.TargetParameter.ActualName   = TotalNumberOfPrunedTreesParameterName;

            valuesCollector = new DataTableValuesCollector();
            valuesCollector.CollectedValues.Add(new LookupParameter <IntValue>(TotalNumberOfPrunedNodesParameterName));
            valuesCollector.CollectedValues.Add(new LookupParameter <IntValue>(TotalNumberOfPrunedSubtreesParameterName));
            valuesCollector.CollectedValues.Add(new LookupParameter <IntValue>(TotalNumberOfPrunedTreesParameterName));
            valuesCollector.DataTableParameter.ActualName = "Population pruning";

            resultsCollector = new ResultsCollector();
            resultsCollector.CollectedValues.Add(new LookupParameter <DataTable>("Population pruning"));
            resultsCollector.ResultsParameter.ActualName = ResultsParameterName;
        }
        public BestAverageWorstPickupAndDeliveryVRPToursAnalyzer()
            : base()
        {
            #region Create parameters
            Parameters.Add(new LookupParameter <IVRPProblemInstance>("ProblemInstance", "The problem instance."));

            Parameters.Add(new ScopeTreeLookupParameter <IntValue>("PickupViolations", "The pickup violations of the VRP solutions which should be analyzed."));
            Parameters.Add(new ValueLookupParameter <IntValue>("BestPickupViolations", "The best pickup violations value."));
            Parameters.Add(new ValueLookupParameter <IntValue>("CurrentBestPickupViolations", "The current best pickup violations value."));
            Parameters.Add(new ValueLookupParameter <DoubleValue>("CurrentAveragePickupViolations", "The current average pickup violations value of all solutions."));
            Parameters.Add(new ValueLookupParameter <IntValue>("CurrentWorstPickupViolations", "The current worst pickup violations value of all solutions."));
            Parameters.Add(new ValueLookupParameter <DataTable>("PickupViolationsValues", "The data table to store the current best, current average, current worst, best and best known pickup violations value."));

            Parameters.Add(new ValueLookupParameter <VariableCollection>("Results", "The results collection where the analysis values should be stored."));
            #endregion

            #region Create operators
            BestPickupAndDeliveryVRPToursMemorizer bestMemorizer           = new BestPickupAndDeliveryVRPToursMemorizer();
            BestAverageWorstPickupAndDeliveryVRPToursCalculator calculator = new BestAverageWorstPickupAndDeliveryVRPToursCalculator();
            ResultsCollector resultsCollector = new ResultsCollector();

            //pickup violations
            bestMemorizer.BestPickupViolationsParameter.ActualName = BestPickupViolationsParameter.Name;
            bestMemorizer.PickupViolationsParameter.ActualName     = PickupViolationsParameter.Name;
            bestMemorizer.PickupViolationsParameter.Depth          = PickupViolationsParameter.Depth;

            calculator.PickupViolationsParameter.ActualName        = PickupViolationsParameter.Name;
            calculator.PickupViolationsParameter.Depth             = PickupViolationsParameter.Depth;
            calculator.BestPickupViolationsParameter.ActualName    = CurrentBestPickupViolationsParameter.Name;
            calculator.AveragePickupViolationsParameter.ActualName = CurrentAveragePickupViolationsParameter.Name;
            calculator.WorstPickupViolationsParameter.ActualName   = CurrentWorstPickupViolationsParameter.Name;

            DataTableValuesCollector pickupViolationsDataTablesCollector = new DataTableValuesCollector();
            pickupViolationsDataTablesCollector.CollectedValues.Add(new LookupParameter <IntValue>("BestPickupViolations", null, BestPickupViolationsParameter.Name));
            pickupViolationsDataTablesCollector.CollectedValues.Add(new LookupParameter <IntValue>("CurrentBestPickupViolations", null, CurrentBestPickupViolationsParameter.Name));
            pickupViolationsDataTablesCollector.CollectedValues.Add(new LookupParameter <DoubleValue>("CurrentAveragePickupViolations", null, CurrentAveragePickupViolationsParameter.Name));
            pickupViolationsDataTablesCollector.CollectedValues.Add(new LookupParameter <IntValue>("CurrentWorstPickupViolations", null, CurrentWorstPickupViolationsParameter.Name));
            pickupViolationsDataTablesCollector.DataTableParameter.ActualName = PickupViolationsValuesParameter.Name;

            resultsCollector.CollectedValues.Add(new LookupParameter <DataTable>(PickupViolationsValuesParameter.Name));
            #endregion

            #region Create operator graph
            OperatorGraph.InitialOperator = bestMemorizer;
            bestMemorizer.Successor       = calculator;
            calculator.Successor          = pickupViolationsDataTablesCollector;
            pickupViolationsDataTablesCollector.Successor = resultsCollector;
            resultsCollector.Successor = null;
            #endregion

            Initialize();
        }
        public BestAverageWorstCapaciatatedVRPToursAnalyzer()
            : base()
        {
            #region Create parameters
            Parameters.Add(new LookupParameter <IVRPProblemInstance>("ProblemInstance", "The problem instance."));

            Parameters.Add(new ScopeTreeLookupParameter <DoubleValue>("Overload", "The overloads of the VRP solutions which should be analyzed."));
            Parameters.Add(new ValueLookupParameter <DoubleValue>("BestOverload", "The best overload value."));
            Parameters.Add(new ValueLookupParameter <DoubleValue>("CurrentBestOverload", "The current best overload value."));
            Parameters.Add(new ValueLookupParameter <DoubleValue>("CurrentAverageOverload", "The current average overload value of all solutions."));
            Parameters.Add(new ValueLookupParameter <DoubleValue>("CurrentWorstOverload", "The current worst overload value of all solutions."));
            Parameters.Add(new ValueLookupParameter <DataTable>("Overloads", "The data table to store the current best, current average, current worst, best and best known overload value."));

            Parameters.Add(new ValueLookupParameter <VariableCollection>("Results", "The results collection where the analysis values should be stored."));
            #endregion

            #region Create operators
            BestCapacitatedVRPToursMemorizer bestMemorizer           = new BestCapacitatedVRPToursMemorizer();
            BestAverageWorstCapacitatedVRPToursCalculator calculator = new BestAverageWorstCapacitatedVRPToursCalculator();
            ResultsCollector resultsCollector = new ResultsCollector();

            //overload
            bestMemorizer.BestOverloadParameter.ActualName = BestOverloadParameter.Name;
            bestMemorizer.OverloadParameter.ActualName     = OverloadParameter.Name;
            bestMemorizer.OverloadParameter.Depth          = OverloadParameter.Depth;

            calculator.OverloadParameter.ActualName        = OverloadParameter.Name;
            calculator.OverloadParameter.Depth             = OverloadParameter.Depth;
            calculator.BestOverloadParameter.ActualName    = CurrentBestOverloadParameter.Name;
            calculator.AverageOverloadParameter.ActualName = CurrentAverageOverloadParameter.Name;
            calculator.WorstOverloadParameter.ActualName   = CurrentWorstOverloadParameter.Name;

            DataTableValuesCollector overloadDataTablesCollector = new DataTableValuesCollector();
            overloadDataTablesCollector.CollectedValues.Add(new LookupParameter <DoubleValue>("BestOverload", null, BestOverloadParameter.Name));
            overloadDataTablesCollector.CollectedValues.Add(new LookupParameter <DoubleValue>("CurrentBestOverload", null, CurrentBestOverloadParameter.Name));
            overloadDataTablesCollector.CollectedValues.Add(new LookupParameter <DoubleValue>("CurrentAverageOverload", null, CurrentAverageOverloadParameter.Name));
            overloadDataTablesCollector.CollectedValues.Add(new LookupParameter <DoubleValue>("CurrentWorstOverload", null, CurrentWorstOverloadParameter.Name));
            overloadDataTablesCollector.DataTableParameter.ActualName = OverloadsParameter.Name;

            resultsCollector.CollectedValues.Add(new LookupParameter <DataTable>(OverloadsParameter.Name));
            #endregion

            #region Create operator graph
            OperatorGraph.InitialOperator         = bestMemorizer;
            bestMemorizer.Successor               = calculator;
            calculator.Successor                  = overloadDataTablesCollector;
            overloadDataTablesCollector.Successor = resultsCollector;
            resultsCollector.Successor            = null;
            #endregion

            Initialize();
        }
        public OldestAverageYoungestAgeAnalyzer()
            : base()
        {
            #region Create parameters
            Parameters.Add(new ScopeTreeLookupParameter <DoubleValue>("Age", "The value which represents the age of a solution."));
            Parameters.Add(new ValueLookupParameter <DoubleValue>("CurrentOldestAge", "The oldest age value found in the current population."));
            Parameters.Add(new ValueLookupParameter <DoubleValue>("CurrentAverageAge", "The average age value of all solutions in the current population."));
            Parameters.Add(new ValueLookupParameter <DoubleValue>("CurrentYoungestAge", "The youngest age value found in the current population."));
            Parameters.Add(new ValueLookupParameter <DataTable>("Ages", "The data table to store the current oldest, current average, current youngest age value."));
            Parameters.Add(new ValueLookupParameter <ResultCollection>("Results", "The results collection where the analysis values should be stored."));

            CurrentOldestAgeParameter.Hidden   = true;
            CurrentAverageAgeParameter.Hidden  = true;
            CurrentYoungestAgeParameter.Hidden = true;
            AgesParameter.Hidden = true;
            #endregion

            #region Create operators
            var oldestAverageYoungestAgeCalculator = new OldestAverageYoungestAgeCalculator();
            var dataTableValuesCollector           = new DataTableValuesCollector();
            var resultsCollector = new ResultsCollector();

            oldestAverageYoungestAgeCalculator.AverageAgeParameter.ActualName  = CurrentAverageAgeParameter.Name;
            oldestAverageYoungestAgeCalculator.OldestAgeParameter.ActualName   = CurrentOldestAgeParameter.Name;
            oldestAverageYoungestAgeCalculator.AgeParameter.ActualName         = AgeParameter.Name;
            oldestAverageYoungestAgeCalculator.AgeParameter.Depth              = AgeParameter.Depth;
            oldestAverageYoungestAgeCalculator.YoungestAgeParameter.ActualName = CurrentYoungestAgeParameter.Name;

            dataTableValuesCollector.CollectedValues.Add(new LookupParameter <DoubleValue>("CurrentOldestAge", null, CurrentOldestAgeParameter.Name));
            dataTableValuesCollector.CollectedValues.Add(new LookupParameter <DoubleValue>("CurrentAverageAge", null, CurrentAverageAgeParameter.Name));
            dataTableValuesCollector.CollectedValues.Add(new LookupParameter <DoubleValue>("CurrentYoungestAge", null, CurrentYoungestAgeParameter.Name));
            dataTableValuesCollector.DataTableParameter.ActualName = AgesParameter.Name;

            resultsCollector.CollectedValues.Add(new LookupParameter <DataTable>(AgesParameter.Name));
            resultsCollector.ResultsParameter.ActualName = ResultsParameter.Name;
            #endregion

            #region Create operator graph
            OperatorGraph.InitialOperator = oldestAverageYoungestAgeCalculator;
            oldestAverageYoungestAgeCalculator.Successor = dataTableValuesCollector;
            dataTableValuesCollector.Successor           = resultsCollector;
            resultsCollector.Successor = null;
            #endregion

            Initialize();
        }
Exemple #8
0
 protected SymbolicDataAnalysisSingleObjectivePruningAnalyzer(SymbolicDataAnalysisSingleObjectivePruningAnalyzer original, Cloner cloner)
     : base(original, cloner)
 {
     if (original.prunedNodesReducer != null)
     {
         this.prunedNodesReducer = (DataReducer)original.prunedNodesReducer.Clone();
     }
     if (original.prunedSubtreesReducer != null)
     {
         this.prunedSubtreesReducer = (DataReducer)original.prunedSubtreesReducer.Clone();
     }
     if (original.prunedTreesReducer != null)
     {
         this.prunedTreesReducer = (DataReducer)original.prunedTreesReducer.Clone();
     }
     if (original.valuesCollector != null)
     {
         this.valuesCollector = (DataTableValuesCollector)original.valuesCollector.Clone();
     }
     if (original.resultsCollector != null)
     {
         this.resultsCollector = (ResultsCollector)original.resultsCollector.Clone();
     }
 }
        public BestAverageWorstVRPToursAnalyzer()
            : base()
        {
            #region Create parameters
            Parameters.Add(new LookupParameter <IVRPProblemInstance>("ProblemInstance", "The problem instance."));

            Parameters.Add(new ScopeTreeLookupParameter <DoubleValue>("Distance", "The distance of the VRP solutions which should be analyzed."));
            Parameters.Add(new ValueLookupParameter <DoubleValue>("BestDistance", "The best distance value."));
            Parameters.Add(new ValueLookupParameter <DoubleValue>("CurrentBestDistance", "The current best distance value."));
            Parameters.Add(new ValueLookupParameter <DoubleValue>("CurrentAverageDistance", "The current average distance value of all solutions."));
            Parameters.Add(new ValueLookupParameter <DoubleValue>("CurrentWorstDistance", "The current worst distance value of all solutions."));
            Parameters.Add(new ValueLookupParameter <DataTable>("Distances", "The data table to store the current best, current average, current worst, best and best known distance value."));

            Parameters.Add(new ScopeTreeLookupParameter <DoubleValue>("VehiclesUtilized", "The vehicles utilized of the VRP solutions which should be analyzed."));
            Parameters.Add(new ValueLookupParameter <DoubleValue>("BestVehiclesUtilized", "The best  vehicles utilized value."));
            Parameters.Add(new ValueLookupParameter <DoubleValue>("CurrentBestVehiclesUtilized", "The current best  vehicles utilized value."));
            Parameters.Add(new ValueLookupParameter <DoubleValue>("CurrentAverageVehiclesUtilized", "The current average  vehicles utilized value of all solutions."));
            Parameters.Add(new ValueLookupParameter <DoubleValue>("CurrentWorstVehiclesUtilized", "The current worst  vehicles utilized value of all solutions."));
            Parameters.Add(new ValueLookupParameter <DataTable>("VehiclesUtilizedValues", "The data table to store the current best, current average, current worst, best and best known vehicles utilized value."));

            Parameters.Add(new ValueLookupParameter <VariableCollection>("Results", "The results collection where the analysis values should be stored."));
            #endregion

            #region Create operators
            BestVRPToursMemorizer bestMemorizer           = new BestVRPToursMemorizer();
            BestAverageWorstVRPToursCalculator calculator = new BestAverageWorstVRPToursCalculator();
            ResultsCollector resultsCollector             = new ResultsCollector();

            //Distance
            bestMemorizer.BestDistanceParameter.ActualName = BestDistanceParameter.Name;
            bestMemorizer.DistanceParameter.ActualName     = DistanceParameter.Name;
            bestMemorizer.DistanceParameter.Depth          = DistanceParameter.Depth;

            calculator.DistanceParameter.ActualName        = DistanceParameter.Name;
            calculator.DistanceParameter.Depth             = DistanceParameter.Depth;
            calculator.BestDistanceParameter.ActualName    = CurrentBestDistanceParameter.Name;
            calculator.AverageDistanceParameter.ActualName = CurrentAverageDistanceParameter.Name;
            calculator.WorstDistanceParameter.ActualName   = CurrentWorstDistanceParameter.Name;

            DataTableValuesCollector distanceDataTablesCollector = new DataTableValuesCollector();
            distanceDataTablesCollector.CollectedValues.Add(new LookupParameter <DoubleValue>("BestDistance", null, BestDistanceParameter.Name));
            distanceDataTablesCollector.CollectedValues.Add(new LookupParameter <DoubleValue>("CurrentBestDistance", null, CurrentBestDistanceParameter.Name));
            distanceDataTablesCollector.CollectedValues.Add(new LookupParameter <DoubleValue>("CurrentAverageDistance", null, CurrentAverageDistanceParameter.Name));
            distanceDataTablesCollector.CollectedValues.Add(new LookupParameter <DoubleValue>("CurrentWorstDistance", null, CurrentWorstDistanceParameter.Name));
            distanceDataTablesCollector.DataTableParameter.ActualName = DistancesParameter.Name;

            resultsCollector.CollectedValues.Add(new LookupParameter <DataTable>(DistancesParameter.Name));

            //Vehicles Utlized
            bestMemorizer.BestVehiclesUtilizedParameter.ActualName = BestVehiclesUtilizedParameter.Name;
            bestMemorizer.VehiclesUtilizedParameter.ActualName     = VehiclesUtilizedParameter.Name;
            bestMemorizer.VehiclesUtilizedParameter.Depth          = VehiclesUtilizedParameter.Depth;

            calculator.VehiclesUtilizedParameter.ActualName        = VehiclesUtilizedParameter.Name;
            calculator.VehiclesUtilizedParameter.Depth             = VehiclesUtilizedParameter.Depth;
            calculator.BestVehiclesUtilizedParameter.ActualName    = CurrentBestVehiclesUtilizedParameter.Name;
            calculator.AverageVehiclesUtilizedParameter.ActualName = CurrentAverageVehiclesUtilizedParameter.Name;
            calculator.WorstVehiclesUtilizedParameter.ActualName   = CurrentWorstVehiclesUtilizedParameter.Name;

            DataTableValuesCollector vehiclesUtilizedDataTablesCollector = new DataTableValuesCollector();
            vehiclesUtilizedDataTablesCollector.CollectedValues.Add(new LookupParameter <DoubleValue>("BestVehiclesUtilized", null, BestVehiclesUtilizedParameter.Name));
            vehiclesUtilizedDataTablesCollector.CollectedValues.Add(new LookupParameter <DoubleValue>("CurrentBestVehiclesUtilized", null, CurrentBestVehiclesUtilizedParameter.Name));
            vehiclesUtilizedDataTablesCollector.CollectedValues.Add(new LookupParameter <DoubleValue>("CurrentAverageVehiclesUtilized", null, CurrentAverageVehiclesUtilizedParameter.Name));
            vehiclesUtilizedDataTablesCollector.CollectedValues.Add(new LookupParameter <DoubleValue>("CurrentWorstVehiclesUtilized", null, CurrentWorstVehiclesUtilizedParameter.Name));
            vehiclesUtilizedDataTablesCollector.DataTableParameter.ActualName = VehiclesUtilizedValuesParameter.Name;

            resultsCollector.CollectedValues.Add(new LookupParameter <DataTable>(VehiclesUtilizedValuesParameter.Name));
            #endregion

            #region Create operator graph
            OperatorGraph.InitialOperator                 = bestMemorizer;
            bestMemorizer.Successor                       = calculator;
            calculator.Successor                          = distanceDataTablesCollector;
            distanceDataTablesCollector.Successor         = vehiclesUtilizedDataTablesCollector;
            vehiclesUtilizedDataTablesCollector.Successor = resultsCollector;
            resultsCollector.Successor                    = null;
            #endregion

            Initialize();
        }
        public BestAverageWorstTimeWindowedVRPToursAnalyzer()
            : base()
        {
            #region Create parameters
            Parameters.Add(new LookupParameter <IVRPProblemInstance>("ProblemInstance", "The problem instance."));

            Parameters.Add(new ScopeTreeLookupParameter <DoubleValue>("Tardiness", "The tardiness of the VRP solutions which should be analyzed."));
            Parameters.Add(new ValueLookupParameter <DoubleValue>("BestTardiness", "The best tardiness value."));
            Parameters.Add(new ValueLookupParameter <DoubleValue>("CurrentBestTardiness", "The current best tardiness value."));
            Parameters.Add(new ValueLookupParameter <DoubleValue>("CurrentAverageTardiness", "The current average tardiness value of all solutions."));
            Parameters.Add(new ValueLookupParameter <DoubleValue>("CurrentWorstTardiness", "The current worst tardiness value of all solutions."));
            Parameters.Add(new ValueLookupParameter <DataTable>("TardinessValues", "The data table to store the current best, current average, current worst, best and best known tardiness value."));

            Parameters.Add(new ScopeTreeLookupParameter <DoubleValue>("TravelTime", "The travel time of the VRP solutions which should be analyzed."));
            Parameters.Add(new ValueLookupParameter <DoubleValue>("BestTravelTime", "The best travel time value."));
            Parameters.Add(new ValueLookupParameter <DoubleValue>("CurrentBestTravelTime", "The current best travel time value."));
            Parameters.Add(new ValueLookupParameter <DoubleValue>("CurrentAverageTravelTime", "The current average travel time value of all solutions."));
            Parameters.Add(new ValueLookupParameter <DoubleValue>("CurrentWorstTravelTime", "The current worst travel time value of all solutions."));
            Parameters.Add(new ValueLookupParameter <DataTable>("TravelTimes", "The data table to store the current best, current average, current worst, best and best known travel time value."));

            Parameters.Add(new ValueLookupParameter <VariableCollection>("Results", "The results collection where the analysis values should be stored."));
            #endregion

            #region Create operators
            BestTimeWindowedVRPToursMemorizer bestMemorizer           = new BestTimeWindowedVRPToursMemorizer();
            BestAverageWorstTimeWindowedVRPToursCalculator calculator = new BestAverageWorstTimeWindowedVRPToursCalculator();
            ResultsCollector resultsCollector = new ResultsCollector();

            //tardiness
            bestMemorizer.BestTardinessParameter.ActualName = BestTardinessParameter.Name;
            bestMemorizer.TardinessParameter.ActualName     = TardinessParameter.Name;
            bestMemorizer.TardinessParameter.Depth          = TardinessParameter.Depth;

            calculator.TardinessParameter.ActualName        = TardinessParameter.Name;
            calculator.TardinessParameter.Depth             = TardinessParameter.Depth;
            calculator.BestTardinessParameter.ActualName    = CurrentBestTardinessParameter.Name;
            calculator.AverageTardinessParameter.ActualName = CurrentAverageTardinessParameter.Name;
            calculator.WorstTardinessParameter.ActualName   = CurrentWorstTardinessParameter.Name;

            DataTableValuesCollector tardinessDataTablesCollector = new DataTableValuesCollector();
            tardinessDataTablesCollector.CollectedValues.Add(new LookupParameter <DoubleValue>("BestTardiness", null, BestTardinessParameter.Name));
            tardinessDataTablesCollector.CollectedValues.Add(new LookupParameter <DoubleValue>("CurrentBestTardiness", null, CurrentBestTardinessParameter.Name));
            tardinessDataTablesCollector.CollectedValues.Add(new LookupParameter <DoubleValue>("CurrentAverageTardiness", null, CurrentAverageTardinessParameter.Name));
            tardinessDataTablesCollector.CollectedValues.Add(new LookupParameter <DoubleValue>("CurrentWorstTardiness", null, CurrentWorstTardinessParameter.Name));
            tardinessDataTablesCollector.DataTableParameter.ActualName = TardinessValuesParameter.Name;

            resultsCollector.CollectedValues.Add(new LookupParameter <DataTable>(TardinessValuesParameter.Name));

            //Travel Time
            bestMemorizer.BestTravelTimeParameter.ActualName = BestTravelTimeParameter.Name;
            bestMemorizer.TravelTimeParameter.ActualName     = TravelTimeParameter.Name;
            bestMemorizer.TravelTimeParameter.Depth          = TravelTimeParameter.Depth;

            calculator.TravelTimeParameter.ActualName        = TravelTimeParameter.Name;
            calculator.TravelTimeParameter.Depth             = TravelTimeParameter.Depth;
            calculator.BestTravelTimeParameter.ActualName    = CurrentBestTravelTimeParameter.Name;
            calculator.AverageTravelTimeParameter.ActualName = CurrentAverageTravelTimeParameter.Name;
            calculator.WorstTravelTimeParameter.ActualName   = CurrentWorstTravelTimeParameter.Name;

            DataTableValuesCollector travelTimeDataTablesCollector = new DataTableValuesCollector();
            travelTimeDataTablesCollector.CollectedValues.Add(new LookupParameter <DoubleValue>("BestTravelTime", null, BestTravelTimeParameter.Name));
            travelTimeDataTablesCollector.CollectedValues.Add(new LookupParameter <DoubleValue>("CurrentBestTravelTime", null, CurrentBestTravelTimeParameter.Name));
            travelTimeDataTablesCollector.CollectedValues.Add(new LookupParameter <DoubleValue>("CurrentAverageTravelTime", null, CurrentAverageTravelTimeParameter.Name));
            travelTimeDataTablesCollector.CollectedValues.Add(new LookupParameter <DoubleValue>("CurrentWorstTravelTime", null, CurrentWorstTravelTimeParameter.Name));
            travelTimeDataTablesCollector.DataTableParameter.ActualName = TravelTimesParameter.Name;

            resultsCollector.CollectedValues.Add(new LookupParameter <DataTable>(TravelTimesParameter.Name));
            #endregion

            #region Create operator graph
            OperatorGraph.InitialOperator           = bestMemorizer;
            bestMemorizer.Successor                 = calculator;
            calculator.Successor                    = tardinessDataTablesCollector;
            tardinessDataTablesCollector.Successor  = travelTimeDataTablesCollector;
            travelTimeDataTablesCollector.Successor = resultsCollector;
            resultsCollector.Successor              = null;
            #endregion

            Initialize();
        }