using System; using System.Collections.Generic; using System.Drawing; using HeuristicLab.Common; using HeuristicLab.Optimization; using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; namespace HeuristicLab.Problems.MultiObjectiveTestFunctions.Drawings { [StorableClass] class MOSolution : IMOQualities { public bool CanChangeDescription { get { return false; } } public bool CanChangeName { get { return false; } } public string Description { get { return "MYResult"; } set {} } public string Filename { get { return "MyFilename"; } set {} } public string ItemDescription { get { return "this is MOSolutionImplementation"; } } public Image ItemImage { get { return HeuristicLab.Common.Resources.VSImageLibrary.Function; } } public string ItemName { get { return "MyName"; } } public Version ItemVersion { get { return Version.Parse("0.1"); } } public string Name { get { return ItemName; } set {} } private IEnumerable qualities; public IEnumerable Qualities { get { return qualities; } set { qualities= value; } } private int objectives; public int Objectives { get { return objectives; } set { objectives = value; } } private Individual[] solutions; public Individual[] Solutions { get { return solutions; } set { solutions = value; } } private IEnumerable paretoFront; public IEnumerable ParetoFront { get { return paretoFront; } set { paretoFront = value; } } public event EventHandler DescriptionChanged; public event EventHandler ItemImageChanged; public event EventHandler NameChanged; public event EventHandler> NameChanging; public event EventHandler ToStringChanged; [StorableConstructor] protected MOSolution(bool deserializing) : base(){ } protected MOSolution(MOSolution original) : base(){ this.qualities = original.qualities; this.solutions = original.solutions; this.paretoFront = original.paretoFront; this.objectives = original.objectives; } protected MOSolution() : base() { } public MOSolution(IEnumerable qualities, Individual[] solutions, IEnumerable paretoFront, int objectives) { this.qualities = qualities; this.solutions = solutions; this.paretoFront = paretoFront; this.objectives = objectives; } public object Clone() { return new MOSolution(this); } public IDeepCloneable Clone(Cloner cloner) { return (IDeepCloneable)Clone(); } } }