public static void DrawMesh(this DrawingDesc desc, Mesh mesh, Pen pen)
 {
     foreach (var item in mesh.Lines)
     {
         desc.AddLine((float)item.P1.X1, (float)item.P1.X2, (float)item.P2.X1, (float)item.P2.X2, pen);
     }
 }
Exemple #2
0
 public void Run(AlgorithmSettings settings)
 {
     settings.OptModel.ResetCallCount();
     Chromosome.ResetIdentity();
     InitialMesh = MeshService.GetMesh(settings.OptModel, settings.InitialPointCount, settings.InitialLoadType);
     Generations = new List<Generation>();
     Generations.Add(new Generation(InitialMesh.Chromosomes, settings));
     int i = 0;
     while (!Generations[i].IsFinal)
     {
         Generations.Add(new Generation(Generations[i]));
         i++;
     }
     CallCount = settings.OptModel.CallCount;
     Best = Generations[i].BestChromosome;
 }