Changeset 6772 for branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Moves/MultiVRPMoveOperator/MultiVRPMoveGenerator.cs
- Timestamp:
- 09/15/11 16:32:43 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Moves/MultiVRPMoveOperator/MultiVRPMoveGenerator.cs
r4752 r6772 39 39 [StorableClass] 40 40 public class MultiVRPMoveGenerator : CheckedMultiOperator<IMultiVRPMoveGenerator>, IMultiVRPMoveOperator, 41 IStochasticOperator, IM ultiMoveGenerator, IGeneralVRPOperator, IMultiVRPOperator{41 IStochasticOperator, IMoveGenerator, IGeneralVRPOperator, IMultiVRPOperator { 42 42 public override bool CanChangeName { 43 43 get { return false; } 44 44 } 45 45 46 public IValueLookupParameter<IntValue> S ampleSizeParameter {47 get { return (IValueLookupParameter<IntValue>)Parameters["S ampleSize"]; }46 public IValueLookupParameter<IntValue> SelectedOperatorsParameter { 47 get { return (IValueLookupParameter<IntValue>)Parameters["SelectedOperators"]; } 48 48 } 49 49 … … 80 80 public MultiVRPMoveGenerator() 81 81 : base() { 82 Parameters.Add(new ValueLookupParameter<IntValue>("S ampleSize", "The number of moves to generate."));82 Parameters.Add(new ValueLookupParameter<IntValue>("SelectedOperators", "The number of selected operators.", new IntValue(1))); 83 83 Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator which should be used for stochastic manipulation operators.")); 84 84 Parameters.Add(new ValueLookupParameter<DoubleArray>("Probabilities", "The array of relative probabilities for each operator.", new DoubleArray())); … … 158 158 OperationCollection next = new OperationCollection(base.Apply()); 159 159 160 for (int i = 0; i < S ampleSizeParameter.ActualValue.Value; i++) {160 for (int i = 0; i < SelectedOperatorsParameter.ActualValue.Value; i++) { 161 161 IRandom random = RandomParameter.ActualValue; 162 162 DoubleArray probabilities = ProbabilitiesParameter.ActualValue;
Note: See TracChangeset
for help on using the changeset viewer.