source: branches/HeuristicLab.Problems.BioBoost/HeuristicLab.Problems.BioBoost/3.3/Operators/Mutation/PlantKiller.cs @ 13069

Last change on this file since 13069 was 13069, checked in by gkronber, 7 years ago

#2499: imported source code for HeuristicLab.BioBoost from private repository with some changes

File size: 851 bytes
Line 
1using System.Collections.Generic;
2using HeuristicLab.Common;
3using HeuristicLab.Encodings.RealVectorEncoding;
4using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
5
6namespace HeuristicLab.BioBoost.Operators.Mutation {
7
8  public class PlantKiller : PlantBasedUtilizationModifier {
9
10    #region Construction & Cloning
11    [StorableConstructor]
12    public PlantKiller(bool isDeserializing) {}
13    public PlantKiller(PlantKiller orig, Cloner cloner) : base(orig, cloner) {}
14    public PlantKiller() {}
15    public override IDeepCloneable Clone(Cloner cloner) {
16      return new PlantKiller(this, cloner);
17    }
18    #endregion
19
20    public override void Redistribute(RealVector utilizations, List<int> supplierIndices) {
21      foreach (var i in supplierIndices) {
22        utilizations[i] = 0;
23      }
24    }
25  }
26}
Note: See TracBrowser for help on using the repository browser.