Changeset 15572 for branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/Evolutionary/OSGA.cs
- Timestamp:
- 01/03/18 00:28:51 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/Evolutionary/OSGA.cs
r15564 r15572 35 35 [Creatable(CreatableAttribute.Categories.PopulationBasedAlgorithms)] 36 36 [StorableClass] 37 public sealed class OSGA : StochasticAlgorithm<OSGAContext > {37 public sealed class OSGA : StochasticAlgorithm<OSGAContext, IntegerVectorEncoding> { 38 38 39 39 public override bool SupportsPause { … … 127 127 128 128 while (!StoppingCriterion() && Context.NextGeneration.Count < PopulationSize 129 && Context.SelectionPressure < 1000) {129 && Context.SelectionPressure < 500) { 130 130 131 131 var idx1 = Context.Random.Next(PopulationSize); … … 160 160 Context.SelectionPressure += 1.0 / PopulationSize; 161 161 Context.Attempts++; 162 if (Context.SelectionPressure > 1 0163 && Context.NextGeneration.Count / (double)PopulationSize < Context.SelectionPressure / 1000)162 if (Context.SelectionPressure > 1 163 && Context.NextGeneration.Count / (double)PopulationSize < Context.SelectionPressure / 500) 164 164 break; 165 165 if (cancellationToken.IsCancellationRequested) return;
Note: See TracChangeset
for help on using the changeset viewer.