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();
    }
        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();
        }
 protected BestTimeWindowedVRPToursMemorizer(BestTimeWindowedVRPToursMemorizer original, Cloner cloner)
     : base(original, cloner)
 {
 }
 protected BestTimeWindowedVRPToursMemorizer(BestTimeWindowedVRPToursMemorizer original, Cloner cloner)
   : base(original, cloner) {
 }