Changeset 17558
- Timestamp:
- 05/25/20 19:10:09 (5 years ago)
- Location:
- branches/2825-NSGA3/HeuristicLab.Algorithms.NSGA3/3.3
- Files:
-
- 2 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2825-NSGA3/HeuristicLab.Algorithms.NSGA3/3.3/HeuristicLab.Algorithms.NSGA3-3.3.csproj
r17557 r17558 111 111 <Compile Include="Plugin.cs" /> 112 112 <Compile Include="Properties\AssemblyInfo.cs" /> 113 <Compile Include="ReferencePoint.cs" /> 113 114 <Compile Include="Solution.cs" /> 115 <Compile Include="Utility.cs" /> 114 116 </ItemGroup> 115 117 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> -
branches/2825-NSGA3/HeuristicLab.Algorithms.NSGA3/3.3/NSGA3.cs
r17557 r17558 1 1 using System; 2 using System.Collections.Generic; 2 3 using System.Linq; 3 4 using System.Threading; … … 62 63 private const string DominateOnEqualQualitiesName = "DominateOnEqualQualities"; 63 64 65 // Results Names 66 67 private const string GeneratedReferencePointsResultName = "Generated Reference Points"; 68 64 69 #endregion ParameterAndResultsNames 65 70 … … 120 125 121 126 #endregion Properties 127 128 #region ResultsProperties 129 130 public DoubleMatrix ResultsGeneratedReferencePoints 131 { 132 get { return (DoubleMatrix)Results[GeneratedReferencePointsResultName].Value; } 133 set { Results[GeneratedReferencePointsResultName].Value = value; } 134 } 135 136 #endregion ResultsProperties 122 137 123 138 public NSGA3() : base() … … 147 162 } 148 163 164 #region Overriden Methods 165 149 166 public override IDeepCloneable Clone(Cloner cloner) 150 167 { … … 152 169 } 153 170 171 protected override void Initialize(CancellationToken cancellationToken) 172 { 173 base.Initialize(cancellationToken); 174 175 InitResults(); 176 InitReferencePoints(); 177 } 178 154 179 protected override void Run(CancellationToken cancellationToken) 155 180 { 156 181 throw new NotImplementedException(); 157 182 } 183 184 #endregion Overriden Methods 185 186 #region Private Methods 187 188 private void InitResults() 189 { 190 Results.Add(new Result(GeneratedReferencePointsResultName, "The initially generated reference points", new DoubleMatrix())); 191 } 192 193 // Generates the structured reference points 194 private void InitReferencePoints() 195 { 196 // Generate reference points and add them to results 197 int nDiv = 5; // todo: figure out the correct number of divisions 198 List<ReferencePoint> referencePoints = ReferencePoint.GenerateReferencePoints(Problem.Encoding.Length, nDiv); 199 ResultsGeneratedReferencePoints = Utility.ConvertToDoubleMatrix(referencePoints); 200 } 201 202 #endregion Private Methods 158 203 } 159 204 }
Note: See TracChangeset
for help on using the changeset viewer.