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