/// <summary> /// Initializes a new instance of the <see cref="MOEASolution"/> class. /// </summary> /// <param name="map"> The map to represent. </param> public MOEASolution(EvolvableMap map) { this.Rank = 1000; this.DominationCount = 0; this.Distance = 0; this.Map = map; this.DominatedSolutions = new List <MOEASolution>(); }
/// <summary> /// Creates the initial population. /// </summary> /// <returns> The solutions of the initial population. </returns> private List <MOEASolution> CreateInitialPopulation() { var pop = new List <MOEASolution>(); for (var i = 0; i < this.PopulationSize; i++) { var temp = new EvolvableMap(this.MapSearchOptions, this.MutationChance, this.Random, this.MapFitnessOptions); temp.InitializeObject(); pop.Add(new MOEASolution(temp)); } return(pop); }
/// <summary> /// Checks if this map is dominates another map. /// </summary> /// <param name="other">The potentially dominated map.</param> /// <returns>True if this map dominates the other map, false if not.</returns> public bool Dominates(EvolvableMap other) { return(this.MapFitnessValues.Dominates(other.MapFitnessValues)); }
/// <summary> /// Checks if this map is dominated by another map. /// </summary> /// <param name="other">The potentially dominating map.</param> /// <returns>True if this map is dominated by the other map, false if not.</returns> public bool IsDominatedBy(EvolvableMap other) { return(this.MapFitnessValues.IsDominatedBy(other.MapFitnessValues)); }