示例#1
0
    public RandomReplacer()
      : base() {
      Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("Quality", "The quality of a solution."));
      Parameters.Add(new ValueLookupParameter<BoolValue>("Maximization", "True if the problem is a maximization problem, otherwise false."));
      Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator to use."));

      RandomSelector randomSelector = new RandomSelector();
      randomSelector.RandomParameter.ActualName = RandomParameter.Name;
      ReplacedSelectorParameter.Value = randomSelector;
      ReplacedSelectorParameter.Hidden = true;
      BestSelector bestSelector = new BestSelector();
      bestSelector.MaximizationParameter.ActualName = MaximizationParameter.Name;
      bestSelector.QualityParameter.ActualName = QualityParameter.Name;
      SelectedSelectorParameter.Value = bestSelector;
      SelectedSelectorParameter.Hidden = true;
    }
示例#2
0
        public RandomReplacer()
            : base()
        {
            Parameters.Add(new ScopeTreeLookupParameter <DoubleValue>("Quality", "The quality of a solution."));
            Parameters.Add(new ValueLookupParameter <BoolValue>("Maximization", "True if the problem is a maximization problem, otherwise false."));
            Parameters.Add(new LookupParameter <IRandom>("Random", "The pseudo random number generator to use."));

            RandomSelector randomSelector = new RandomSelector();

            randomSelector.RandomParameter.ActualName = RandomParameter.Name;
            ReplacedSelectorParameter.Value           = randomSelector;
            ReplacedSelectorParameter.Hidden          = true;
            BestSelector bestSelector = new BestSelector();

            bestSelector.MaximizationParameter.ActualName = MaximizationParameter.Name;
            bestSelector.QualityParameter.ActualName      = QualityParameter.Name;
            SelectedSelectorParameter.Value  = bestSelector;
            SelectedSelectorParameter.Hidden = true;
        }
示例#3
0
 private RandomSelector(RandomSelector original, Cloner cloner)
     : base(original, cloner)
 {
 }
示例#4
0
 private RandomSelector(RandomSelector original, Cloner cloner)
   : base(original, cloner) {
 }