Changeset 10300
- Timestamp:
- 01/07/14 21:44:36 (11 years ago)
- Location:
- branches/HeuristicLab.EvolutionTracking
- Files:
-
- 1 added
- 36 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking.Views/3.4/GenealogyGraphChart.Designer.cs
r10285 r10300 1 using HeuristicLab.Core; 2 1 3 2 namespace HeuristicLab.EvolutionTracking.Views { 4 partial class GenealogyGraphChart<TGraph, TVertex, TContent> 5 where TGraph : class, IGenealogyGraph<TVertex, TContent> 6 where TVertex : class, IGenealogyGraphNode<TContent>, new() 7 where TContent : class, IItem { 3 partial class GenealogyGraphChart { 8 4 /// <summary> 9 5 /// Required designer variable. -
branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking.Views/3.4/GenealogyGraphChart.cs
r10285 r10300 6 6 using System.Windows.Forms; 7 7 using HeuristicLab.Common; 8 using HeuristicLab.Core;9 8 using HeuristicLab.Visualization; 10 9 11 10 namespace HeuristicLab.EvolutionTracking.Views { 12 public partial class GenealogyGraphChart<TGraph, TVertex, TContent> : ChartControl 13 where TGraph : class, IGenealogyGraph<TVertex, TContent> 14 where TVertex : class, IGenealogyGraphNode<TContent>, new() 15 where TContent : class,IItem { 16 private TGraph genealogyGraph; 11 public partial class GenealogyGraphChart : ChartControl { 12 private IGenealogyGraph genealogyGraph; 17 13 18 14 private const double XIncrement = 30; … … 20 16 private const double Diameter = 20; 21 17 22 public TGraph GenealogyGraph {18 public IGenealogyGraph GenealogyGraph { 23 19 get { return genealogyGraph; } 24 20 set { … … 109 105 110 106 // add arcs 111 foreach (var node in GenealogyGraph.Nodes ) {107 foreach (var node in GenealogyGraph.Nodes.Cast<IGenealogyGraphNode>()) { 112 108 if (node.InArcs == null) continue; 113 109 var visualNode = nodeMap[node]; -
branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking.Views/3.4/GenealogyGraphView.Designer.cs
r10271 r10300 1 1 using HeuristicLab.Visualization; 2 2 3 3 namespace HeuristicLab.EvolutionTracking.Views { … … 26 26 /// </summary> 27 27 private void InitializeComponent() { 28 this.components = new System.ComponentModel.Container();29 this.topControlBox = new System.Windows.Forms.Panel();30 this.graphControlsGroupBox = new System.Windows.Forms.GroupBox();31 this.lockGenealogyCheckBox = new System.Windows.Forms.CheckBox();32 this.highlightAllButton = new System.Windows.Forms.Button();33 this.simpleLineagesCheckBox = new System.Windows.Forms.CheckBox();34 this.toolTip = new System.Windows.Forms.ToolTip(this.components);35 28 this.genealogyGraphChart = new HeuristicLab.EvolutionTracking.Views.GenealogyGraphChart(); 36 this.topControlBox.SuspendLayout();37 this.graphControlsGroupBox.SuspendLayout();38 29 this.SuspendLayout(); 39 //40 // topControlBox41 //42 this.topControlBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)43 | System.Windows.Forms.AnchorStyles.Right)));44 this.topControlBox.Controls.Add(this.graphControlsGroupBox);45 this.topControlBox.Location = new System.Drawing.Point(3, 3);46 this.topControlBox.Name = "topControlBox";47 this.topControlBox.Size = new System.Drawing.Size(1066, 44);48 this.topControlBox.TabIndex = 6;49 //50 // graphControlsGroupBox51 //52 this.graphControlsGroupBox.Controls.Add(this.lockGenealogyCheckBox);53 this.graphControlsGroupBox.Controls.Add(this.highlightAllButton);54 this.graphControlsGroupBox.Controls.Add(this.simpleLineagesCheckBox);55 this.graphControlsGroupBox.Location = new System.Drawing.Point(1, -2);56 this.graphControlsGroupBox.Name = "graphControlsGroupBox";57 this.graphControlsGroupBox.Size = new System.Drawing.Size(98, 44);58 this.graphControlsGroupBox.TabIndex = 11;59 this.graphControlsGroupBox.TabStop = false;60 this.graphControlsGroupBox.Text = "Graph controls";61 //62 // lockGenealogyCheckBox63 //64 this.lockGenealogyCheckBox.Appearance = System.Windows.Forms.Appearance.Button;65 this.lockGenealogyCheckBox.Location = new System.Drawing.Point(66, 14);66 this.lockGenealogyCheckBox.Name = "lockGenealogyCheckBox";67 this.lockGenealogyCheckBox.Size = new System.Drawing.Size(24, 24);68 this.lockGenealogyCheckBox.TabIndex = 17;69 this.toolTip.SetToolTip(this.lockGenealogyCheckBox, "Lock genealogy");70 this.lockGenealogyCheckBox.UseVisualStyleBackColor = true;71 this.lockGenealogyCheckBox.CheckedChanged += new System.EventHandler(this.lockGenealogyCheckBox_CheckedChanged);72 //73 // highlightAllButton74 //75 this.highlightAllButton.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;76 this.highlightAllButton.Location = new System.Drawing.Point(6, 14);77 this.highlightAllButton.Name = "highlightAllButton";78 this.highlightAllButton.Size = new System.Drawing.Size(24, 24);79 this.highlightAllButton.TabIndex = 13;80 this.toolTip.SetToolTip(this.highlightAllButton, "Fitness gradient");81 this.highlightAllButton.UseVisualStyleBackColor = true;82 this.highlightAllButton.Click += new System.EventHandler(this.highlightAllButton_Click);83 //84 // simpleLineagesCheckBox85 //86 this.simpleLineagesCheckBox.Appearance = System.Windows.Forms.Appearance.Button;87 this.simpleLineagesCheckBox.Location = new System.Drawing.Point(36, 14);88 this.simpleLineagesCheckBox.Name = "simpleLineagesCheckBox";89 this.simpleLineagesCheckBox.Size = new System.Drawing.Size(24, 24);90 this.simpleLineagesCheckBox.TabIndex = 12;91 this.toolTip.SetToolTip(this.simpleLineagesCheckBox, "Simple lineages");92 this.simpleLineagesCheckBox.UseVisualStyleBackColor = true;93 this.simpleLineagesCheckBox.CheckedChanged += new System.EventHandler(this.simpleLineagesCheckBox_CheckedChanged);94 30 // 95 31 // genealogyGraphChart 96 32 // 97 this.genealogyGraphChart.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)98 | System.Windows.Forms.AnchorStyles.Right)));99 33 this.genealogyGraphChart.BackColor = System.Drawing.SystemColors.Control; 100 this.genealogyGraphChart.Chart = n ull;101 this.genealogyGraphChart. GenealogyGraph = null;102 this.genealogyGraphChart.Location = new System.Drawing.Point( 3, 51);34 this.genealogyGraphChart.Chart = new Chart(0, 0, genealogyGraphChart.PreferredSize.Width, genealogyGraphChart.PreferredSize.Height); 35 this.genealogyGraphChart.Dock = System.Windows.Forms.DockStyle.Fill; 36 this.genealogyGraphChart.Location = new System.Drawing.Point(0, 0); 103 37 this.genealogyGraphChart.LockGenealogy = false; 104 38 this.genealogyGraphChart.Name = "genealogyGraphChart"; 105 39 this.genealogyGraphChart.ScaleOnResize = true; 106 40 this.genealogyGraphChart.SimpleLineages = false; 107 this.genealogyGraphChart.Size = new System.Drawing.Size(1 066, 724);108 this.genealogyGraphChart.TabIndex = 7;41 this.genealogyGraphChart.Size = new System.Drawing.Size(150, 150); 42 this.genealogyGraphChart.TabIndex = 0; 109 43 // 110 // GenealogyGraphView44 // SymbolicDataAnalysisGenealogyView 111 45 // 112 46 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 113 47 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 114 48 this.Controls.Add(this.genealogyGraphChart); 115 this.Controls.Add(this.topControlBox); 116 this.Name = "GenealogyGraphView"; 117 this.Size = new System.Drawing.Size(1072, 778); 118 this.topControlBox.ResumeLayout(false); 119 this.graphControlsGroupBox.ResumeLayout(false); 49 this.Name = "SymbolicDataAnalysisGenealogyView"; 120 50 this.ResumeLayout(false); 121 51 … … 124 54 #endregion 125 55 126 private System.Windows.Forms.ToolTip toolTip; 127 private System.Windows.Forms.Panel topControlBox; 128 private System.Windows.Forms.GroupBox graphControlsGroupBox; 129 private System.Windows.Forms.Button highlightAllButton; 130 private System.Windows.Forms.CheckBox simpleLineagesCheckBox; 131 private System.Windows.Forms.CheckBox lockGenealogyCheckBox; 132 private GenealogyGraphChart genealogyGraphChart; 133 56 private EvolutionTracking.Views.GenealogyGraphChart genealogyGraphChart; 134 57 } 135 58 } -
branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking.Views/3.4/GenealogyGraphView.cs
r10285 r10300 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 * 5 * This file is part of HeuristicLab. 6 * 7 * HeuristicLab is free software: you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation, either version 3 of the License, or 10 * (at your option) any later version. 11 * 12 * HeuristicLab is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 #endregion 21 22 using System; 23 using System.Linq; 24 using System.Windows.Forms; 25 using HeuristicLab.Core.Views; 1 using HeuristicLab.Core.Views; 26 2 using HeuristicLab.MainForm; 27 3 28 4 namespace HeuristicLab.EvolutionTracking.Views { 29 [View("GenealogyGraph ")]30 [Content(typeof(GenealogyGraph), IsDefaultView = true)]5 [View("GenealogyGraphView")] 6 [Content(typeof(GenealogyGraph), IsDefaultView = false)] 31 7 public sealed partial class GenealogyGraphView : ItemView { 32 public new GenealogyGraph Content {33 get { return ( GenealogyGraph)base.Content; }8 public new IGenealogyGraph Content { 9 get { return (IGenealogyGraph)base.Content; } 34 10 set { base.Content = value; } 35 11 } 36 12 37 public GenealogyGraphView() 38 : base() { 13 public GenealogyGraphView() { 39 14 InitializeComponent(); 40 // set button icons here because if set in the designer file, they get overwritten41 this.highlightAllButton.Image = Common.Resources.VSImageLibrary.Gradient;42 this.simpleLineagesCheckBox.Image = Common.Resources.VSImageLibrary.ArrowDown;43 this.lockGenealogyCheckBox.Image = Common.Resources.VSImageLibrary.ProtectForm;44 15 } 45 16 46 17 protected override void DeregisterContentEvents() { 47 18 // TODO: Deregister your event handlers here 48 Content.GraphUpdated -= GenealogyGraphUpdated;49 19 base.DeregisterContentEvents(); 50 20 } … … 53 23 base.RegisterContentEvents(); 54 24 // TODO: Register your event handlers here 55 Content.GraphUpdated += GenealogyGraphUpdated;56 25 } 57 26 58 27 #region Event Handlers (Content) 59 28 // TODO: Put event handlers of the content here 29 #endregion 30 60 31 protected override void OnContentChanged() { 61 32 base.OnContentChanged(); 62 // genealogyGraphChart.GenealogyGraph = Content ?? null; 33 if (Content == null) { 34 } else { 35 genealogyGraphChart.GenealogyGraph = Content; 36 } 63 37 } 64 private void Content_GraphChanged(object sender, EventArgs e) { 65 } 38 66 39 protected override void SetEnabledStateOfControls() { 67 40 base.SetEnabledStateOfControls(); 68 genealogyGraphChart.Enabled = Content != null;41 // TODO: Enable or disable controls based on whether the content is null or the view is set readonly 69 42 } 70 #endregion71 43 72 44 #region Event Handlers (child controls) 73 private void GenealogyGraphUpdated(object sender, EventArgs args) { 74 genealogyGraphChart.GenealogyGraph = Content; 75 } 76 void MatchNodesAndRepaint() { 77 genealogyGraphChart.Chart.UpdateEnabled = false; 78 genealogyGraphChart.ClearPrimitives(); // clear node colors 79 80 genealogyGraphChart.Chart.UpdateEnabled = true; 81 genealogyGraphChart.Chart.EnforceUpdate(); 82 } 83 84 private void treeChart_SymbolicExpressionTreeNodeDoubleClicked(object sender, MouseEventArgs e) { 85 } 45 // TODO: Put event handlers of child controls here. 86 46 #endregion 87 private void simpleLineagesCheckBox_CheckedChanged(object sender, EventArgs e) {88 genealogyGraphChart.SimpleLineages = simpleLineagesCheckBox.Checked;89 }90 91 private void highlightAllButton_Click(object sender, EventArgs e) {92 }93 94 private void lockGenealogyCheckBox_CheckedChanged(object sender, EventArgs e) {95 genealogyGraphChart.LockGenealogy = lockGenealogyCheckBox.Checked;96 }97 98 private void highlightRootParentsButton_Click(object sender, EventArgs e) {99 var nodes = genealogyGraphChart.GenealogyGraph.Nodes.Where(n => n.InArcs != null && n.InArcs.Count == 2).Select(n => (GenealogyGraphNode)n.InArcs[0].Source).ToList();100 genealogyGraphChart.HighlightNodes(nodes);101 }102 103 private void highlightSecondaryParentsButton_Click(object sender, EventArgs e) {104 var nodes = genealogyGraphChart.GenealogyGraph.Nodes.Where(n => n.InArcs != null && n.InArcs.Count == 2).Select(n => (GenealogyGraphNode)n.InArcs[1].Source).ToList();105 genealogyGraphChart.HighlightNodes(nodes);106 }107 47 } 108 48 } -
branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking.Views/3.4/HeuristicLab.EvolutionTracking.Views-3.4.csproj
r10285 r10300 132 132 <DependentUpon>Resources.resx</DependentUpon> 133 133 </Compile> 134 <Compile Include="GenealogyGraphView.cs"> 135 <SubType>UserControl</SubType> 136 </Compile> 137 <Compile Include="GenealogyGraphView.Designer.cs"> 138 <DependentUpon>GenealogyGraphView.cs</DependentUpon> 139 </Compile> 134 140 <Compile Include="VisualGenealogyGraphArc.cs" /> 135 141 <Compile Include="VisualGenealogyGraphNode.cs" /> -
branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking.Views/3.4/Plugin.cs
r10264 r10300 23 23 24 24 namespace HeuristicLab.EvolutionaryTracking.Views { 25 [Plugin("HeuristicLab.Evolution aryTracking.Views", "Provides controls and views for the evolution graph and related structures.", "3.4.2.7439")]26 [PluginFile("HeuristicLab.Evolution aryTracking.Views-3.4.dll", PluginFileType.Assembly)]25 [Plugin("HeuristicLab.EvolutionTracking.Views", "Provides controls and views for the evolution graph and related structures.", "3.4.2.7439")] 26 [PluginFile("HeuristicLab.EvolutionTracking.Views-3.4.dll", PluginFileType.Assembly)] 27 27 [PluginDependency("HeuristicLab.Core", "3.3")] 28 28 [PluginDependency("HeuristicLab.Core.Views", "3.3")] … … 34 34 [PluginDependency("HeuristicLab.MainForm.WindowsForms", "3.3")] 35 35 [PluginDependency("HeuristicLab.Visualization", "3.3")] 36 [PluginDependency("HeuristicLab.Evolution aryTracking", "3.4")]36 [PluginDependency("HeuristicLab.EvolutionTracking", "3.4")] 37 37 [PluginDependency("HeuristicLab.Problems.DataAnalysis.Symbolic", "3.4")] 38 38 -
branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/Analyzers/GenealogyAnalyzer.cs
r10285 r10300 12 12 [StorableClass] 13 13 [Item("GenealogyAnalyzer", "An analyzer which performs the necessary instrumentation to record the evolution of a genetic algorithm.")] 14 public class GenealogyAnalyzer<TGraph, TVertex, TContent> : SingleSuccessorOperator, IAnalyzer 15 where TGraph : class, IGenealogyGraph<TVertex, TContent> 16 where TVertex : class, IGenealogyGraphNode<TContent>, new() 17 where TContent : class, IItem { 14 public class GenealogyAnalyzer<T> : SingleSuccessorOperator, IAnalyzer 15 where T : class,IItem { 18 16 19 private AfterCrossoverOperator<T Graph, TVertex, TContent> afterCrossoverOperator;20 private AfterManipulatorOperator<T Graph, TVertex, TContent> afterManipulatorOperator;21 private BeforeManipulatorOperator<T Graph, TVertex, TContent> beforeManipulatorOperator;17 private AfterCrossoverOperator<T> afterCrossoverOperator; 18 private AfterManipulatorOperator<T> afterManipulatorOperator; 19 private BeforeManipulatorOperator<T> beforeManipulatorOperator; 22 20 public string CrossoverParentsParameterName { get; set; } 23 21 public string CrossoverChildParameterName { get; set; } … … 25 23 26 24 public IScopeTreeLookupParameter<DoubleValue> QualityParameter; 27 public IScopeTreeLookupParameter<T Content> PopulationParameter;25 public IScopeTreeLookupParameter<T> PopulationParameter; 28 26 29 27 private const string PopulationParameterName = "Population"; … … 94 92 get { return GenerationsParameter.ActualValue; } 95 93 } 96 public IGenealogyGraph <TVertex, TContent>GenealogyGraph {94 public IGenealogyGraph GenealogyGraph { 97 95 get { 98 96 IResult result; 99 97 if (!Results.ContainsKey(PopulationGraphParameterName)) { 100 result = new Result(PopulationGraphParameterName, new GenealogyGraph <TVertex, TContent>());98 result = new Result(PopulationGraphParameterName, new GenealogyGraph()); 101 99 Results.Add(result); 102 100 } else { 103 101 result = Results[PopulationGraphParameterName]; 104 102 } 105 var graph = ( GenealogyGraph<TVertex, TContent>)result.Value;103 var graph = (IGenealogyGraph)result.Value; 106 104 return graph; 107 105 } … … 121 119 Parameters.Add(new LookupParameter<IntValue>(GenerationsParameterName, "The number of generations so far.")); 122 120 Parameters.Add(new LookupParameter<ResultCollection>(ResultsParameterName)); 123 PopulationParameter = new ScopeTreeLookupParameter<T Content>(PopulationParameterName);121 PopulationParameter = new ScopeTreeLookupParameter<T>(PopulationParameterName); 124 122 QualityParameter = new ScopeTreeLookupParameter<DoubleValue>(QualityParameterName); 125 123 Parameters.Add(PopulationParameter); … … 127 125 } 128 126 public override IDeepCloneable Clone(Cloner cloner) { 129 return new GenealogyAnalyzer<T Graph, TVertex, TContent>(this, cloner);127 return new GenealogyAnalyzer<T>(this, cloner); 130 128 } 131 protected GenealogyAnalyzer(GenealogyAnalyzer<T Graph, TVertex, TContent> original, Cloner cloner)129 protected GenealogyAnalyzer(GenealogyAnalyzer<T> original, Cloner cloner) 132 130 : base(original, cloner) { 133 131 } … … 140 138 if (Generations.Value == 0) { 141 139 foreach (var individual in PopulationParameter.ActualValue) { 142 var vertex = new TVertex{140 var vertex = new GenealogyGraphNode<T> { 143 141 Content = individual, 144 142 Rank = Generations.Value … … 149 147 if (EnableCrossoverTracking.Value) { 150 148 if (afterCrossoverOperator == null) { 151 afterCrossoverOperator = new AfterCrossoverOperator<T Graph, TVertex, TContent>();149 afterCrossoverOperator = new AfterCrossoverOperator<T>(); 152 150 afterCrossoverOperator.ParentsParameter.ActualName = CrossoverParentsParameterName; 153 151 afterCrossoverOperator.ChildParameter.ActualName = CrossoverChildParameterName; … … 159 157 if (EnableManipulatorTracking.Value && Manipulator != null) { 160 158 if (beforeManipulatorOperator == null) { 161 beforeManipulatorOperator = new BeforeManipulatorOperator<T Graph, TVertex, TContent>();159 beforeManipulatorOperator = new BeforeManipulatorOperator<T>(); 162 160 beforeManipulatorOperator.ChildParameter.ActualName = ManipulatorChildParameterName; 163 161 } 164 162 if (afterManipulatorOperator == null) { 165 afterManipulatorOperator = new AfterManipulatorOperator<T Graph, TVertex, TContent>();163 afterManipulatorOperator = new AfterManipulatorOperator<T>(); 166 164 afterManipulatorOperator.ChildParameter.ActualName = ManipulatorChildParameterName; 167 165 } … … 173 171 // add missing elite individuals in the current generation 174 172 // TODO: optimize for speed 175 var currGen = new HashSet<T Content>(GenealogyGraph.Ranks[Generations.Value].Select(x => x.Content));173 var currGen = new HashSet<T>(GenealogyGraph.Ranks[Generations.Value].Cast<IGenealogyGraphNode<T>>().Select(x => x.Content)); 176 174 foreach (var individual in PopulationParameter.ActualValue) { 177 175 if (currGen.Contains(individual)) continue; 178 176 // it is an elite which was already added to the graph in the previous generation 179 var vertex = new TVertex{177 var vertex = new GenealogyGraphNode<T> { 180 178 Content = individual, 181 179 Rank = Generations.Value, … … 189 187 var qualities = QualityParameter.ActualValue.ToList(); 190 188 for (int i = 0; i < population.Count; ++i) { 191 foreach (var v in GenealogyGraph[population[i]] ) {189 foreach (var v in GenealogyGraph[population[i]].Cast<IGenealogyGraphNode<T>>()) { 192 190 v.Quality = qualities[i].Value; 193 191 } -
branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/DirectedGraph/DirectedGraph.cs
r10278 r10300 31 31 [Item("DirectedGraph", "Generic class representing a directed graph with custom vertices and content")] 32 32 [StorableClass] 33 public class DirectedGraph <TVertex> : Item, IDirectedGraph<TVertex> where TVertex : class,IVertex{33 public class DirectedGraph : Item, IDirectedGraph { 34 34 [Storable] 35 protected readonly List< TVertex> nodes; // for performance reasons, maybe this should be a linked list (fast remove)36 public List< TVertex> Nodes {35 protected readonly List<IVertex> nodes; // for performance reasons, maybe this should be a linked list (fast remove) 36 public List<IVertex> Nodes { 37 37 get { return nodes; } 38 38 } 39 [Storable] 40 private readonly Dictionary<object, List<IVertex>> contentMap; 39 41 public DirectedGraph() { 40 nodes = new List<TVertex>(); 42 nodes = new List<IVertex>(); 43 contentMap = new Dictionary<object, List<IVertex>>(); 41 44 } 42 45 [StorableConstructor] … … 44 47 : base(serializing) { 45 48 } 46 protected DirectedGraph(DirectedGraph <TVertex>original, Cloner cloner)49 protected DirectedGraph(DirectedGraph original, Cloner cloner) 47 50 : base(original, cloner) { 48 nodes = new List<TVertex>(original.Nodes); 51 nodes = new List<IVertex>(original.Nodes); 52 contentMap = new Dictionary<object, List<IVertex>>(original.contentMap); 49 53 } 50 54 public override IDeepCloneable Clone(Cloner cloner) { 51 return new DirectedGraph <TVertex>(this, cloner);55 return new DirectedGraph(this, cloner); 52 56 } 53 public bool Contains( TVertex t) {57 public bool Contains(IVertex t) { 54 58 return nodes.Contains(t); 55 59 } 56 60 57 public virtual bool Any(Func<TVertex, bool> predicate) { 61 public bool Contains(object content) { 62 return contentMap.ContainsKey(content); 63 } 64 public List<IVertex> this[object key] { 65 get { 66 List<IVertex> result; 67 contentMap.TryGetValue(key, out result); 68 return result; 69 } 70 } 71 public virtual bool Any(Func<IVertex, bool> predicate) { 58 72 return nodes.Any(predicate); 59 73 } … … 61 75 get { return !nodes.Any(); } 62 76 } 63 64 77 public virtual void Clear() { 65 78 nodes.Clear(); 66 79 } 67 68 public virtual void AddVertex(TVertex vertex) { 80 public virtual void AddVertex(IVertex vertex) { 69 81 Nodes.Add(vertex); 82 if (!contentMap.ContainsKey(vertex.Content)) 83 contentMap[vertex.Content] = new List<IVertex>(); 84 contentMap[vertex.Content].Add(vertex); 70 85 } 71 86 72 public virtual void RemoveVertex( TVertex vertex) {87 public virtual void RemoveVertex(IVertex vertex) { 73 88 nodes.Remove(vertex); 74 89 } … … 77 92 } 78 93 } 79 80 [Item("Directed graph", "Generic directed graph base class.")]81 [StorableClass]82 public class DirectedGraph<TVertex, TContent> : DirectedGraph<TVertex>, IDirectedGraph<TVertex, TContent>83 where TVertex : class,IVertex<TContent>84 where TContent : class,IItem {85 86 [StorableConstructor]87 protected DirectedGraph(bool deserializing) : base(deserializing) { }88 89 [Storable]90 private readonly Dictionary<TContent, List<TVertex>> contentMap; // reverse mapping of content to the actual vertices91 public DirectedGraph() {92 contentMap = new Dictionary<TContent, List<TVertex>>();93 }94 public override IDeepCloneable Clone(Cloner cloner) {95 return new DirectedGraph<TVertex, TContent>(this, cloner);96 }97 protected DirectedGraph(DirectedGraph<TVertex, TContent> original, Cloner cloner)98 : base(original, cloner) {99 contentMap = new Dictionary<TContent, List<TVertex>>(original.contentMap);100 }101 public bool Contains(TContent content) {102 return contentMap.ContainsKey(content);103 }104 public List<TVertex> this[TContent key] {105 get {106 List<TVertex> result = null;107 contentMap.TryGetValue(key, out result);108 return result;109 }110 // set {111 // contentMap[key] = value;112 // }113 }114 public override void Clear() {115 contentMap.Clear();116 base.Clear();117 }118 public override void AddVertex(TVertex vertex) {119 if (contentMap.ContainsKey(vertex.Content)) {120 contentMap[vertex.Content].Add(vertex);121 } else {122 contentMap[vertex.Content] = new List<TVertex> { vertex };123 }124 base.AddVertex(vertex);125 }126 127 public override void RemoveVertex(TVertex vertex) {128 if (contentMap.ContainsKey(vertex.Content)) {129 contentMap[vertex.Content].Remove(vertex);130 }131 base.RemoveVertex(vertex);132 }133 }134 94 } -
branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/DirectedGraph/Interfaces/IDirectedGraph.cs
r10278 r10300 25 25 26 26 namespace HeuristicLab.EvolutionTracking { 27 public interface IDirectedGraph : IItem { } 28 public interface IDirectedGraph<TVertex> : IDirectedGraph 29 where TVertex : class, IVertex { 30 bool Contains(TVertex vertex); 31 bool Any(Func<TVertex, bool> predicate); // graph contains any nodes matching the given predicate? 32 void Clear(); // clear graph 33 void AddVertex(TVertex vertex); 34 void RemoveVertex(TVertex vertex); // remove node if contained in the graph 35 List<TVertex> Nodes { get; } 36 } 37 public interface IDirectedGraph<TVertex, in TContent> : IDirectedGraph<TVertex> 38 where TVertex : class, IVertex 39 where TContent : class, IItem { 40 bool Contains(TContent content); // graph contains node with given content? 27 public interface IDirectedGraph : IItem { 28 bool Contains(IVertex vertex); 29 bool Any(Func<IVertex, bool> predicate); 30 void Clear(); 31 void AddVertex(IVertex vertex); 32 void RemoveVertex(IVertex vertex); 33 List<IVertex> Nodes { get; } 34 List<IVertex> this[object content] { get; } 35 bool Contains(object content); 41 36 } 42 37 } -
branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/DirectedGraph/Interfaces/IVertex.cs
r10285 r10300 40 40 void AddReverseArc(IVertex target, double weight = 0.0, object content = null); 41 41 void AddReverseArc(IArc arc); 42 43 object Content { get; set; } 42 44 } 43 45 44 46 public interface IVertex<T> : IVertex 45 47 where T : class,IItem { 46 T Content { get; set; }48 new T Content { get; set; } 47 49 } 48 50 } -
branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/DirectedGraph/Vertex.cs
r10293 r10300 55 55 } 56 56 57 public object Content { get; set; } 58 57 59 protected Vertex(Vertex original, Cloner cloner) 58 60 : base(original, cloner) { … … 106 108 [StorableClass] 107 109 public class Vertex<T> : Vertex, IVertex<T> where T : class,IItem { 108 [Storable] 109 private T content; 110 public T Content { 111 get { return content; } 112 set { 113 if (value == null) 114 throw new ArgumentException("Node content cannot be null."); 115 content = value; 116 } 110 public new T Content { 111 get { return (T)base.Content; } 112 set { base.Content = value; } 117 113 } 118 114 … … 125 121 : base(original, cloner) { 126 122 Content = original.Content; // not sure if to Clone() 127 128 123 } 129 124 … … 131 126 return new Vertex<T>(this, cloner); 132 127 } 133 134 public Vertex(Vertex<T> node) {135 Id = Guid.NewGuid().ToString();136 Label = node.Label;137 Content = node.Content;138 InArcs = new List<IArc>(node.InArcs);139 OutArcs = new List<IArc>(node.OutArcs);140 }141 128 } 142 129 } -
branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/FPGraph.cs
r10278 r10300 28 28 [Item("Symbol graph", "A graph used to store the relationship between symbols in a population of individuals")] 29 29 [StorableClass] 30 public class FPGraph : DirectedGraph <SymbolNode>{30 public class FPGraph : DirectedGraph { 31 31 [Storable] 32 32 public Dictionary<int, List<SymbolNode>> Levels { get { return levels; } } -
branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/GenealogyGraph/GenealogyGraph.cs
r10278 r10300 22 22 using System; 23 23 using System.Collections.Generic; 24 using System.Linq; 24 25 using HeuristicLab.Common; 25 26 using HeuristicLab.Core; … … 28 29 namespace HeuristicLab.EvolutionTracking { 29 30 [StorableClass] 30 [Item("GenealogyGraph", "A class representing a genealogy graph")] 31 public class GenealogyGraph : GenealogyGraph<IGenealogyGraphNode> { 32 } 33 34 [StorableClass] 35 [Item("GenealogyGraph", "A class representing a genealogy graph (of a population of individuals) without storing any content for vertices")] 36 public class GenealogyGraph<TVertex> : DirectedGraph<TVertex>, IGenealogyGraph<TVertex> where TVertex : class,IGenealogyGraphNode { 31 [Item("GenealogyGraph", "")] 32 public class GenealogyGraph : DirectedGraph, IGenealogyGraph { 37 33 [Storable] 38 private Dictionary<double, LinkedList<TVertex>> ranks; // use a linked list for fast insertion/removal 39 40 public Dictionary<double, LinkedList<TVertex>> Ranks { 34 private Dictionary<double, LinkedList<IGenealogyGraphNode>> ranks; // use a linked list for fast insertion/removal 35 public Dictionary<double, LinkedList<IGenealogyGraphNode>> Ranks { 41 36 get { return ranks; } 42 37 set { ranks = value; } 43 38 } 44 39 protected GenealogyGraph(GenealogyGraph original, Cloner cloner) 40 : base(original, cloner) { 41 } 45 42 public override IDeepCloneable Clone(Cloner cloner) { 46 return new GenealogyGraph<TVertex>(this, cloner); 47 } 48 protected GenealogyGraph(GenealogyGraph<TVertex> original, Cloner cloner) 49 : base(original, cloner) { 43 return new GenealogyGraph(this, cloner); 50 44 } 51 45 [StorableConstructor] 52 46 protected GenealogyGraph(bool deserializing) : base(deserializing) { } 53 54 47 public GenealogyGraph() { 55 Ranks = new Dictionary<double, LinkedList< TVertex>>();48 Ranks = new Dictionary<double, LinkedList<IGenealogyGraphNode>>(); 56 49 } 57 public override void AddVertex( TVertex vertex) {58 if (!Ranks.ContainsKey(vertex.Rank)) {59 Ranks[vertex.Rank] = new LinkedList<TVertex>();60 }61 Ranks[ vertex.Rank].AddLast(vertex);50 public override void AddVertex(IVertex vertex) { 51 var ggn = (IGenealogyGraphNode)vertex; 52 if (!Ranks.ContainsKey(ggn.Rank)) 53 Ranks[ggn.Rank] = new LinkedList<IGenealogyGraphNode>(); 54 Ranks[ggn.Rank].AddLast(ggn); 62 55 base.AddVertex(vertex); 63 56 } 64 public override void RemoveVertex(TVertex vertex) { 65 if (Ranks.ContainsKey(vertex.Rank)) { 66 Ranks[vertex.Rank].Remove(vertex); 57 public override void RemoveVertex(IVertex vertex) { 58 var ggn = (IGenealogyGraphNode)vertex; 59 if (Ranks.ContainsKey(ggn.Rank)) { 60 Ranks[ggn.Rank].Remove(ggn); 67 61 } 68 62 base.RemoveVertex(vertex); 69 63 } 70 // updated event71 64 public event EventHandler GraphUpdated; 72 65 private void OnGraphUpdated(object sender, EventArgs args) { … … 74 67 if (updated != null) updated(sender, args); 75 68 } 69 70 public new List<IGenealogyGraphNode> this[object content] { 71 get { 72 var result = base[content]; 73 return result != null ? result.Cast<IGenealogyGraphNode>().ToList() : null; 74 } 75 } 76 76 } 77 77 78 [StorableClass]79 [Item("GenealogyGraph",80 "A class representing a genealogy graph (of a population of individuals) in which each vertex stores a content.")]81 public class GenealogyGraph<TVertex, TContent> : DirectedGraph<TVertex, TContent>, IGenealogyGraph<TVertex, TContent>82 where TVertex : class, IGenealogyGraphNode<TContent>83 where TContent : class, IItem {84 [Storable]85 private Dictionary<double, LinkedList<TVertex>> ranks;86 public Dictionary<double, LinkedList<TVertex>> Ranks {87 get { return ranks; }88 set { ranks = value; }89 }90 protected GenealogyGraph(GenealogyGraph<TVertex, TContent> original, Cloner cloner)91 : base(original, cloner) {92 }93 public override IDeepCloneable Clone(Cloner cloner) {94 return new GenealogyGraph<TVertex, TContent>(this, cloner);95 }96 public GenealogyGraph() {97 Ranks = new Dictionary<double, LinkedList<TVertex>>();98 }99 public override void AddVertex(TVertex vertex) {100 if (!Ranks.ContainsKey(vertex.Rank)) {101 Ranks[vertex.Rank] = new LinkedList<TVertex>();102 }103 Ranks[vertex.Rank].AddLast(vertex);104 base.AddVertex(vertex);105 }106 public override void RemoveVertex(TVertex vertex) {107 if (Ranks.ContainsKey(vertex.Rank)) {108 Ranks[vertex.Rank].Remove(vertex);109 }110 base.RemoveVertex(vertex);111 }112 // updated event113 public event EventHandler GraphUpdated;114 private void OnGraphUpdated(object sender, EventArgs args) {115 var updated = GraphUpdated;116 if (updated != null) updated(sender, args);117 }118 }119 78 } -
branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/GenealogyGraph/GenealogyGraphNode.cs
r10293 r10300 110 110 } 111 111 112 public new void AddForwardArc(IVertex target, double w = 0 , object data = null) {112 public new void AddForwardArc(IVertex target, double w = 0.0, object data = null) { 113 113 var arc = new GenealogyGraphArc { Source = this, Target = (IGenealogyGraphNode)target, Data = data, Weight = w }; 114 114 base.AddForwardArc(arc); … … 122 122 [StorableClass] 123 123 [Item("GenealogyGraphNode", "A genealogy graph node which also has a Content")] 124 public class GenealogyGraphNode<T> : GenealogyGraphNode, IGenealogyGraphNode<T> where T : class,IItem { 125 public T Content { get; set; } 124 public class GenealogyGraphNode<T> : GenealogyGraphNode, IGenealogyGraphNode<T> where T : class, IItem { 125 public new T Content { 126 get { return (T)base.Content; } 127 set { base.Content = value; } 128 } 126 129 public GenealogyGraphNode() { } 130 protected GenealogyGraphNode(GenealogyGraphNode<T> original, Cloner cloner) 131 : base(original, cloner) { 132 Content = original.Content; 133 } 134 public override IDeepCloneable Clone(Cloner cloner) { 135 return new GenealogyGraphNode<T>(this, cloner); 136 } 127 137 } 128 138 } -
branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/GenealogyGraph/Interfaces/IGenealogyGraph.cs
r10278 r10300 24 24 25 25 namespace HeuristicLab.EvolutionTracking { 26 27 28 public interface IGenealogyGraph : IGenealogyGraph<IGenealogyGraphNode> { 29 } 30 public interface IGenealogyGraph<TVertex> : IDirectedGraph<TVertex> where TVertex : class, IGenealogyGraphNode { 31 Dictionary<double, LinkedList<TVertex>> Ranks { get; set; } 26 public interface IGenealogyGraph : IDirectedGraph { 27 Dictionary<double, LinkedList<IGenealogyGraphNode>> Ranks { get; set; } 32 28 } 33 29 34 public interface IGenealogyGraph<TVertex, in TContent> : IDirectedGraph<TVertex, TContent>, IGenealogyGraph<TVertex> 35 where TVertex : class, IGenealogyGraphNode<TContent> 36 where TContent : class, IItem { 37 38 List<TVertex> this[TContent content] { get; } 30 public interface IGenealogyGraph<T> : IDirectedGraph 31 where T : class,IItem { 32 Dictionary<double, LinkedList<IGenealogyGraphNode<T>>> Ranks { get; set; } 39 33 } 40 34 } -
branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/GenealogyGraph/Interfaces/IGenealogyGraphNode.cs
r10285 r10300 36 36 } 37 37 38 public interface IGenealogyGraphNode<T> : IGenealogyGraphNode, IVertex<T> where T : class,IItem { 39 40 } 41 38 public interface IGenealogyGraphNode<T> : IGenealogyGraphNode, IVertex<T> where T : class,IItem { } 42 39 } -
branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/HeuristicLab.EvolutionTracking-3.4.csproj.user
r10269 r10300 2 2 <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> 3 3 <PropertyGroup> 4 <ProjectView> ShowAllFiles</ProjectView>4 <ProjectView>ProjectFiles</ProjectView> 5 5 </PropertyGroup> 6 6 </Project> -
branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/Operators/AfterCrossoverOperator.cs
r10285 r10300 29 29 [StorableClass] 30 30 [Item("AfterCrossoverOperator", "A generic operator that can record genealogical relationships between crossover parents and children.")] 31 public class AfterCrossoverOperator<TGraph, TVertex, TContent> : EvolutionTrackingOperator<TGraph, TVertex, TContent> 32 where TGraph : class,IGenealogyGraph<TVertex, TContent> 33 where TVertex : class,IGenealogyGraphNode<TContent>, new() 34 where TContent : class,IItem { 31 public class AfterCrossoverOperator<T> : EvolutionTrackingOperator 32 where T : class,IItem { 35 33 private const string defaultParentsParameterName = "Parents"; 36 34 private const string defaultChildParameterName = "Child"; 37 public IScopeTreeLookupParameter<T Content> ParentsParameter;38 public ILookupParameter<T Content> ChildParameter;35 public IScopeTreeLookupParameter<T> ParentsParameter; 36 public ILookupParameter<T> ChildParameter; 39 37 40 protected AfterCrossoverOperator(AfterCrossoverOperator<T Graph, TVertex, TContent> original, Cloner cloner)38 protected AfterCrossoverOperator(AfterCrossoverOperator<T> original, Cloner cloner) 41 39 : base(original, cloner) { 42 40 } 43 41 public override IDeepCloneable Clone(Cloner cloner) { 44 return new AfterCrossoverOperator<T Graph, TVertex, TContent>(this, cloner);42 return new AfterCrossoverOperator<T>(this, cloner); 45 43 } 46 44 47 45 public AfterCrossoverOperator() { 48 ParentsParameter = new ScopeTreeLookupParameter<T Content>(defaultParentsParameterName);49 ChildParameter = new LookupParameter<T Content>(defaultChildParameterName);46 ParentsParameter = new ScopeTreeLookupParameter<T>(defaultParentsParameterName); 47 ChildParameter = new LookupParameter<T>(defaultChildParameterName); 50 48 Parameters.Add(ParentsParameter); 51 49 Parameters.Add(ChildParameter); … … 57 55 var parentVertices = ExecutionContext.Scope.SubScopes.Select(s => lastGen[int.Parse(s.Name)]).ToList(); // because the individuals in the execution scope are copies of the ones in the graph 58 56 59 var childVertex = new TVertex{57 var childVertex = new GenealogyGraphNode<T> { 60 58 Content = ChildParameter.ActualValue, 61 59 Rank = parentVertices[0].Rank + 1 -
branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/Operators/AfterManipulatorOperator.cs
r10285 r10300 28 28 [StorableClass] 29 29 [Item("AfterCrossoverOperator", "Performs an action after the crossover operator is applied.")] 30 public class AfterManipulatorOperator<TGraph, TVertex, TContent> : EvolutionTrackingOperator<TGraph, TVertex, TContent> 31 where TGraph : class,IGenealogyGraph<TVertex, TContent> 32 where TVertex : class,IGenealogyGraphNode<TContent>, new() 33 where TContent : class,IItem { 30 public class AfterManipulatorOperator<T> : EvolutionTrackingOperator 31 where T : class,IItem { 34 32 35 33 private const string ChildParameterName = "Child"; 36 public ILookupParameter<T Content> ChildParameter;34 public ILookupParameter<T> ChildParameter; 37 35 38 protected AfterManipulatorOperator(AfterManipulatorOperator<T Graph, TVertex, TContent> original, Cloner cloner)36 protected AfterManipulatorOperator(AfterManipulatorOperator<T> original, Cloner cloner) 39 37 : base(original, cloner) { 40 38 } 41 39 public override IDeepCloneable Clone(Cloner cloner) { 42 return new AfterManipulatorOperator<T Graph, TVertex, TContent>(this, cloner);40 return new AfterManipulatorOperator<T>(this, cloner); 43 41 } 44 42 45 43 public AfterManipulatorOperator() { 46 ChildParameter = new LookupParameter<T Content>(ChildParameterName);44 ChildParameter = new LookupParameter<T>(ChildParameterName); 47 45 Parameters.Add(ChildParameter); 48 46 } -
branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/Operators/AfterSolutionCreatorOperator.cs
r10293 r10300 26 26 [StorableClass] 27 27 [Item("AfterSolutionCreatorOperator", "An operator that runs after the solution creator and performs additional actions.")] 28 public class AfterSolutionCreatorOperator<TGraph, TVertex, TContent> : EvolutionTrackingOperator<TGraph, TVertex, TContent> 29 where TGraph : class,IGenealogyGraph<TVertex, TContent> 30 where TVertex : class,IGenealogyGraphNode<TContent>, new() 31 where TContent : class,IItem { 28 public class AfterSolutionCreatorOperator<T> : EvolutionTrackingOperator 29 where T : class,IItem { 32 30 33 31 public override IOperation Apply() { -
branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/Operators/BeforeManipulatorOperator.cs
r10293 r10300 29 29 [StorableClass] 30 30 [Item("AfterCrossoverOperator", "Performs an action after the crossover operator is applied.")] 31 public class BeforeManipulatorOperator<TGraph, TVertex, TContent> : EvolutionTrackingOperator<TGraph, TVertex, TContent> 32 where TGraph : class,IGenealogyGraph<TVertex, TContent> 33 where TVertex : class,IGenealogyGraphNode<TContent>, new() 34 where TContent : class,IItem { 31 public class BeforeManipulatorOperator<T> : EvolutionTrackingOperator 32 where T : class,IItem { 35 33 36 34 private const string ChildParameterName = "Child"; 37 public ILookupParameter<T Content> ChildParameter;35 public ILookupParameter<T> ChildParameter; 38 36 39 protected BeforeManipulatorOperator(BeforeManipulatorOperator<T Graph, TVertex, TContent> original, Cloner cloner)37 protected BeforeManipulatorOperator(BeforeManipulatorOperator<T> original, Cloner cloner) 40 38 : base(original, cloner) { 41 39 } 42 40 public override IDeepCloneable Clone(Cloner cloner) { 43 return new BeforeManipulatorOperator<T Graph, TVertex, TContent>(this, cloner);41 return new BeforeManipulatorOperator<T>(this, cloner); 44 42 } 45 43 46 44 public BeforeManipulatorOperator() { 47 ChildParameter = new LookupParameter<T Content>(ChildParameterName);45 ChildParameter = new LookupParameter<T>(ChildParameterName); 48 46 Parameters.Add(ChildParameter); 49 47 } … … 52 50 if (GenealogyGraph.Contains(ChildParameter.ActualValue)) { 53 51 var child = ChildParameter.ActualValue; 54 var clone = (T Content)child.Clone();55 var vChild = GenealogyGraph[child].Last();56 var vClone = new TVertex{ Content = clone, Rank = vChild.Rank - 0.5 };52 var clone = (T)child.Clone(); 53 var vChild = (IGenealogyGraphNode<T>)GenealogyGraph[child].Last(); 54 var vClone = new GenealogyGraphNode<T> { Content = clone, Rank = vChild.Rank - 0.5 }; 57 55 GenealogyGraph.AddVertex(vClone); 58 56 // adjust parent-child(clone) relationship in the graph … … 69 67 vClone.AddForwardArc(vChild); 70 68 } else { // this needs to be checked 71 var vChild = new TVertex{ Content = ChildParameter.ActualValue, Rank = Generations.Value };69 var vChild = new GenealogyGraphNode<T> { Content = ChildParameter.ActualValue, Rank = Generations.Value }; 72 70 GenealogyGraph.AddVertex(vChild); 73 71 } -
branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/Operators/EvolutionTrackingOperator.cs
r10285 r10300 28 28 29 29 namespace HeuristicLab.EvolutionTracking { 30 public class EvolutionTrackingOperator<TGraph, TVertex, TContent> : SingleSuccessorOperator 31 where TGraph : class,IGenealogyGraph<TVertex, TContent> 32 where TVertex : class,IGenealogyGraphNode<TContent> 33 where TContent : class,IItem { 30 public class EvolutionTrackingOperator : SingleSuccessorOperator { 34 31 // evolution tracking-related parameters 35 32 private const string resultsParameterName = "Results"; … … 49 46 get { return GenerationsParameter.ActualValue; } 50 47 } 51 public IGenealogyGraph <TVertex, TContent>GenealogyGraph {48 public IGenealogyGraph GenealogyGraph { 52 49 get { 53 50 IResult result; 54 51 if (!Results.ContainsKey(populationGraphParameterName)) { 55 result = new Result(populationGraphParameterName, new GenealogyGraph <TVertex, TContent>());52 result = new Result(populationGraphParameterName, new GenealogyGraph()); 56 53 Results.Add(result); 57 54 } else { 58 55 result = Results[populationGraphParameterName]; 59 56 } 60 var graph = (GenealogyGraph <TVertex, TContent>)result.Value;57 var graph = (GenealogyGraph)result.Value; 61 58 return graph; 62 59 } … … 66 63 Parameters.Add(new LookupParameter<ResultCollection>(resultsParameterName)); 67 64 } 68 protected EvolutionTrackingOperator(EvolutionTrackingOperator <TGraph, TVertex, TContent>original, Cloner cloner)65 protected EvolutionTrackingOperator(EvolutionTrackingOperator original, Cloner cloner) 69 66 : base(original, cloner) { 70 67 } 71 68 public override IDeepCloneable Clone(Cloner cloner) { 72 return new EvolutionTrackingOperator <TGraph, TVertex, TContent>(this, cloner);69 return new EvolutionTrackingOperator(this, cloner); 73 70 } 74 71 } -
branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/Plugin.cs
r10278 r10300 24 24 namespace HeuristicLab.EvolutionTracking { 25 25 [Plugin("HeuristicLab.EvolutionTracking", "Provides operators and related classes for tracking the evolution within a GA.", "3.4.2.7439")] 26 [PluginFile("HeuristicLab.Evolution aryTracking-3.4.dll", PluginFileType.Assembly)]26 [PluginFile("HeuristicLab.EvolutionTracking-3.4.dll", PluginFileType.Assembly)] 27 27 [PluginDependency("HeuristicLab.Analysis", "3.3")] 28 28 [PluginDependency("HeuristicLab.Collections", "3.3")] -
branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/SymbolGraph.cs
r10285 r10300 29 29 [Item("Symbol graph", "A graph used to store the relationship between symbols in a population of individuals")] 30 30 [StorableClass] 31 public class SymbolGraph : DirectedGraph <SymbolNode>{31 public class SymbolGraph : DirectedGraph { 32 32 [Storable] 33 33 private readonly Dictionary<string, SymbolNode> nodeMap = new Dictionary<string, SymbolNode>(); 34 34 35 public overridevoid AddVertex(SymbolNode node) {35 public void AddVertex(SymbolNode node) { 36 36 if (nodeMap.ContainsKey(node.Label)) return; // node already present? do nothing 37 37 nodeMap[node.Label] = node; -
branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic merged: 10295
- Property svn:mergeinfo changed
-
branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Views-3.4.csproj
r10293 r10300 219 219 <DependentUpon>SlidingWindowDataView.cs</DependentUpon> 220 220 </Compile> 221 <Compile Include="SymbolicDataAnalysisGenealogyView.cs">222 <SubType>UserControl</SubType>223 </Compile>224 <Compile Include="SymbolicDataAnalysisGenealogyView.Designer.cs">225 <DependentUpon>SymbolicDataAnalysisGenealogyView.cs</DependentUpon>226 </Compile>227 221 <Compile Include="TextualSymbolicDataAnalysisModelView.cs"> 228 222 <SubType>UserControl</SubType> -
branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisGenealogyAnalyzer.cs
r10293 r10300 7 7 [StorableClass] 8 8 [Item("SymbolicDataAnalysisGenealogyAnalyzer", "")] 9 public class SymbolicDataAnalysisGenealogyAnalyzer : GenealogyAnalyzer<IGenealogyGraph<GenealogyGraphNode<ISymbolicExpressionTree>, ISymbolicExpressionTree>, 10 GenealogyGraphNode<ISymbolicExpressionTree>, ISymbolicExpressionTree> { 9 public class SymbolicDataAnalysisGenealogyAnalyzer : GenealogyAnalyzer<ISymbolicExpressionTree> { 11 10 } 12 11 } -
branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Creators/MultiSymbolicDataAnalysisExpressionCreator.cs
r9456 r10300 95 95 } 96 96 97 public override IOperation Apply() {97 public override IOperation InstrumentedApply() { 98 98 if (ClonedSymbolicExpressionTreeGrammarParameter.ActualValue == null) { 99 99 SymbolicExpressionTreeGrammarParameter.ActualValue.ReadOnly = true; … … 104 104 globalScope.Variables.Add(new Core.Variable(ClonedSymbolicExpressionTreeGrammarParameterName, (ISymbolicExpressionGrammar)SymbolicExpressionTreeGrammarParameter.ActualValue.Clone())); 105 105 } 106 return base. Apply();106 return base.InstrumentedApply(); 107 107 } 108 108 -
branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisSingleObjectiveProblem.cs
r10285 r10300 30 30 using HeuristicLab.Parameters; 31 31 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 32 33 using TGraph = HeuristicLab.EvolutionTracking.IGenealogyGraph<HeuristicLab.EvolutionTracking.GenealogyGraphNode<HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.ISymbolicExpressionTree>,34 HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.ISymbolicExpressionTree>;35 using TVertex = HeuristicLab.EvolutionTracking.GenealogyGraphNode<HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.ISymbolicExpressionTree>;36 32 37 33 namespace HeuristicLab.Problems.DataAnalysis.Symbolic { … … 122 118 } 123 119 124 foreach (var op in Operators.OfType<GenealogyAnalyzer< TGraph, TVertex,ISymbolicExpressionTree>>()) {120 foreach (var op in Operators.OfType<GenealogyAnalyzer<ISymbolicExpressionTree>>()) { 125 121 op.QualityParameter.ActualName = Evaluator.QualityParameter.ActualName; 126 122 op.PopulationParameter.ActualName = Evaluator.SymbolicExpressionTreeParameter.ActualName; -
branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.TravelingSalesman
-
Property
svn:mergeinfo
set to
(toggle deleted branches)
/stable/HeuristicLab.Problems.TravelingSalesman merged eligible /trunk/sources/HeuristicLab.Problems.TravelingSalesman merged eligible /branches/Algorithms.GradientDescent/HeuristicLab.Problems.TravelingSalesman 5516-5520 /branches/Benchmarking/sources/HeuristicLab.Problems.TravelingSalesman 6917-7005 /branches/CloningRefactoring/HeuristicLab.Problems.TravelingSalesman 4656-4721 /branches/DataAnalysis Refactoring/HeuristicLab.Problems.TravelingSalesman 5471-5808 /branches/DataAnalysis SolutionEnsembles/HeuristicLab.Problems.TravelingSalesman 5815-6180 /branches/DataAnalysis/HeuristicLab.Problems.TravelingSalesman 4458-4459,4462,4464 /branches/GP.Grammar.Editor/HeuristicLab.Problems.TravelingSalesman 6284-6795 /branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.Problems.TravelingSalesman 5060 /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.TravelingSalesman 6123-9799 /branches/NET40/sources/HeuristicLab.Problems.TravelingSalesman 5138-5162 /branches/ParallelEngine/HeuristicLab.Problems.TravelingSalesman 5175-5192 /branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.TravelingSalesman 7568-7810 /branches/QAPAlgorithms/HeuristicLab.Problems.TravelingSalesman 6350-6627 /branches/Restructure trunk solution/HeuristicLab.Problems.TravelingSalesman 6828 /branches/RuntimeOptimizer/HeuristicLab.Problems.TravelingSalesman 8943-9078 /branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.TravelingSalesman 7787-8333 /branches/SlaveShutdown/HeuristicLab.Problems.TravelingSalesman 8944-8956 /branches/SuccessProgressAnalysis/HeuristicLab.Problems.TravelingSalesman 5370-5682 /branches/Trunk/HeuristicLab.Problems.TravelingSalesman 6829-6865 /branches/UnloadJobs/HeuristicLab.Problems.TravelingSalesman 9168-9215 /branches/VNS/HeuristicLab.Problems.TravelingSalesman 5594-5752 /branches/histogram/HeuristicLab.Problems.TravelingSalesman 5959-6341
-
Property
svn:mergeinfo
set to
(toggle deleted branches)
-
branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.TravelingSalesman.Views
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.TravelingSalesman.Views/3.3/HeuristicLab.Problems.TravelingSalesman.Views-3.3.csproj
r8600 r10300 41 41 <DebugType>full</DebugType> 42 42 <Optimize>false</Optimize> 43 <OutputPath> $(SolutionDir)\bin\</OutputPath>43 <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath> 44 44 <DefineConstants>DEBUG;TRACE</DefineConstants> 45 45 <ErrorReport>prompt</ErrorReport> … … 50 50 <DebugType>pdbonly</DebugType> 51 51 <Optimize>true</Optimize> 52 <OutputPath> $(SolutionDir)\bin\</OutputPath>52 <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath> 53 53 <DefineConstants>TRACE</DefineConstants> 54 54 <ErrorReport>prompt</ErrorReport> … … 60 60 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> 61 61 <DebugSymbols>true</DebugSymbols> 62 <OutputPath> $(SolutionDir)\bin\</OutputPath>62 <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath> 63 63 <DefineConstants>DEBUG;TRACE</DefineConstants> 64 64 <DebugType>full</DebugType> … … 68 68 </PropertyGroup> 69 69 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> 70 <OutputPath> $(SolutionDir)\bin\</OutputPath>70 <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath> 71 71 <DefineConstants>TRACE</DefineConstants> 72 72 <DocumentationFile> … … 80 80 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' "> 81 81 <DebugSymbols>true</DebugSymbols> 82 <OutputPath> $(SolutionDir)\bin\</OutputPath>82 <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath> 83 83 <DefineConstants>DEBUG;TRACE</DefineConstants> 84 84 <DebugType>full</DebugType> … … 88 88 </PropertyGroup> 89 89 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' "> 90 <OutputPath> $(SolutionDir)\bin\</OutputPath>90 <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath> 91 91 <DefineConstants>TRACE</DefineConstants> 92 92 <DocumentationFile> … … 99 99 </PropertyGroup> 100 100 <ItemGroup> 101 <Reference Include="HeuristicLab.Collections-3.3"> 102 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Collections-3.3.dll</HintPath> 103 <Private>False</Private> 104 </Reference> 105 <Reference Include="HeuristicLab.Common-3.3"> 106 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Common-3.3.dll</HintPath> 107 <Private>False</Private> 108 </Reference> 109 <Reference Include="HeuristicLab.Core-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 110 <SpecificVersion>False</SpecificVersion> 111 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Core-3.3.dll</HintPath> 112 <Private>False</Private> 113 </Reference> 114 <Reference Include="HeuristicLab.Core.Views-3.3"> 115 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Core.Views-3.3.dll</HintPath> 116 <Private>False</Private> 117 </Reference> 118 <Reference Include="HeuristicLab.Data-3.3"> 119 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Data-3.3.dll</HintPath> 120 <Private>False</Private> 121 </Reference> 122 <Reference Include="HeuristicLab.Encodings.PermutationEncoding-3.3"> 123 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Encodings.PermutationEncoding-3.3.dll</HintPath> 124 <Private>False</Private> 125 </Reference> 126 <Reference Include="HeuristicLab.MainForm-3.3"> 127 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.MainForm-3.3.dll</HintPath> 128 <Private>False</Private> 129 </Reference> 130 <Reference Include="HeuristicLab.MainForm.WindowsForms-3.3"> 131 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.MainForm.WindowsForms-3.3.dll</HintPath> 132 <Private>False</Private> 133 </Reference> 134 <Reference Include="HeuristicLab.Optimization-3.3"> 135 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Optimization-3.3.dll</HintPath> 136 <Private>False</Private> 137 </Reference> 138 <Reference Include="HeuristicLab.Optimization.Views-3.3"> 139 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Optimization.Views-3.3.dll</HintPath> 140 <Private>False</Private> 141 </Reference> 142 <Reference Include="HeuristicLab.Parameters-3.3"> 143 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Parameters-3.3.dll</HintPath> 144 <Private>False</Private> 145 </Reference> 146 <Reference Include="HeuristicLab.PluginInfrastructure-3.3"> 147 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath> 148 <Private>False</Private> 149 </Reference> 150 <Reference Include="HeuristicLab.Problems.Instances-3.3"> 151 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.Instances-3.3.dll</HintPath> 152 <Private>False</Private> 153 </Reference> 154 <Reference Include="HeuristicLab.Visualization-3.3, Version=3.3.0.9491, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 155 <SpecificVersion>False</SpecificVersion> 156 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Visualization-3.3.dll</HintPath> 157 </Reference> 101 158 <Reference Include="System" /> 102 159 <Reference Include="System.Core"> … … 153 210 </ItemGroup> 154 211 <ItemGroup> 155 <ProjectReference Include="..\..\HeuristicLab.Collections\3.3\HeuristicLab.Collections-3.3.csproj"> 156 <Project>{958B43BC-CC5C-4FA2-8628-2B3B01D890B6}</Project> 157 <Name>HeuristicLab.Collections-3.3</Name> 158 <Private>False</Private> 212 <ProjectReference Include="..\..\HeuristicLab.EvolutionTracking.Views\3.4\HeuristicLab.EvolutionTracking.Views-3.4.csproj"> 213 <Project>{318dfe8c-ca23-4f1b-a4ac-62b425060241}</Project> 214 <Name>HeuristicLab.EvolutionTracking.Views-3.4</Name> 159 215 </ProjectReference> 160 <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj"> 161 <Project>{A9AD58B9-3EF9-4CC1-97E5-8D909039FF5C}</Project> 162 <Name>HeuristicLab.Common-3.3</Name> 163 <Private>False</Private> 164 </ProjectReference> 165 <ProjectReference Include="..\..\HeuristicLab.Core.Views\3.3\HeuristicLab.Core.Views-3.3.csproj"> 166 <Project>{E226881D-315F-423D-B419-A766FE0D8685}</Project> 167 <Name>HeuristicLab.Core.Views-3.3</Name> 168 <Private>False</Private> 169 </ProjectReference> 170 <ProjectReference Include="..\..\HeuristicLab.Core\3.3\HeuristicLab.Core-3.3.csproj"> 171 <Project>{C36BD924-A541-4A00-AFA8-41701378DDC5}</Project> 172 <Name>HeuristicLab.Core-3.3</Name> 173 <Private>False</Private> 174 </ProjectReference> 175 <ProjectReference Include="..\..\HeuristicLab.Data\3.3\HeuristicLab.Data-3.3.csproj"> 176 <Project>{BBAB9DF5-5EF3-4BA8-ADE9-B36E82114937}</Project> 177 <Name>HeuristicLab.Data-3.3</Name> 178 <Private>False</Private> 179 </ProjectReference> 180 <ProjectReference Include="..\..\HeuristicLab.Encodings.PermutationEncoding\3.3\HeuristicLab.Encodings.PermutationEncoding-3.3.csproj"> 181 <Project>{DBECB8B0-B166-4133-BAF1-ED67C3FD7FCA}</Project> 182 <Name>HeuristicLab.Encodings.PermutationEncoding-3.3</Name> 183 <Private>False</Private> 184 </ProjectReference> 185 <ProjectReference Include="..\..\HeuristicLab.MainForm.WindowsForms\3.3\HeuristicLab.MainForm.WindowsForms-3.3.csproj"> 186 <Project>{AB687BBE-1BFE-476B-906D-44237135431D}</Project> 187 <Name>HeuristicLab.MainForm.WindowsForms-3.3</Name> 188 <Private>False</Private> 189 </ProjectReference> 190 <ProjectReference Include="..\..\HeuristicLab.MainForm\3.3\HeuristicLab.MainForm-3.3.csproj"> 191 <Project>{3BD61258-31DA-4B09-89C0-4F71FEF5F05A}</Project> 192 <Name>HeuristicLab.MainForm-3.3</Name> 193 <Private>False</Private> 194 </ProjectReference> 195 <ProjectReference Include="..\..\HeuristicLab.Optimization.Views\3.3\HeuristicLab.Optimization.Views-3.3.csproj"> 196 <Project>{662B4B15-8F4D-4AE5-B3EB-D91C215F5AF2}</Project> 197 <Name>HeuristicLab.Optimization.Views-3.3</Name> 198 <Private>False</Private> 199 </ProjectReference> 200 <ProjectReference Include="..\..\HeuristicLab.Optimization\3.3\HeuristicLab.Optimization-3.3.csproj"> 201 <Project>{14AB8D24-25BC-400C-A846-4627AA945192}</Project> 202 <Name>HeuristicLab.Optimization-3.3</Name> 203 <Private>False</Private> 204 </ProjectReference> 205 <ProjectReference Include="..\..\HeuristicLab.Parameters\3.3\HeuristicLab.Parameters-3.3.csproj"> 206 <Project>{56F9106A-079F-4C61-92F6-86A84C2D84B7}</Project> 207 <Name>HeuristicLab.Parameters-3.3</Name> 208 <Private>False</Private> 209 </ProjectReference> 210 <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\3.3\HeuristicLab.PluginInfrastructure-3.3.csproj"> 211 <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project> 212 <Name>HeuristicLab.PluginInfrastructure-3.3</Name> 213 <Private>False</Private> 214 </ProjectReference> 215 <ProjectReference Include="..\..\HeuristicLab.Problems.Instances\3.3\HeuristicLab.Problems.Instances-3.3.csproj"> 216 <Project>{3540E29E-4793-49E7-8EE2-FEA7F61C3994}</Project> 217 <Name>HeuristicLab.Problems.Instances-3.3</Name> 218 <Private>False</Private> 216 <ProjectReference Include="..\..\HeuristicLab.EvolutionTracking\3.4\HeuristicLab.EvolutionTracking-3.4.csproj"> 217 <Project>{1f75cea3-464f-4a6f-b2f0-04b9841ebc16}</Project> 218 <Name>HeuristicLab.EvolutionTracking-3.4</Name> 219 219 </ProjectReference> 220 220 <ProjectReference Include="..\..\HeuristicLab.Problems.TravelingSalesman\3.3\HeuristicLab.Problems.TravelingSalesman-3.3.csproj"> 221 <Project>{ D767C38D-8014-46B0-9A32-03A3AECCE34A}</Project>221 <Project>{d767c38d-8014-46b0-9a32-03a3aecce34a}</Project> 222 222 <Name>HeuristicLab.Problems.TravelingSalesman-3.3</Name> 223 223 <Private>False</Private> … … 233 233 --> 234 234 <PropertyGroup> 235 <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir)235 <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir) 236 236 set ProjectDir=$(ProjectDir) 237 237 set SolutionDir=$(SolutionDir) … … 240 240 call PreBuildEvent.cmd 241 241 </PreBuildEvent> 242 <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">242 <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' "> 243 243 export ProjectDir=$(ProjectDir) 244 244 export SolutionDir=$(SolutionDir) -
branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.TravelingSalesman/3.3/HeuristicLab.Problems.TravelingSalesman-3.3.csproj
r9848 r10300 41 41 <DebugType>full</DebugType> 42 42 <Optimize>false</Optimize> 43 <OutputPath> $(SolutionDir)\bin\</OutputPath>43 <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath> 44 44 <DefineConstants>DEBUG;TRACE</DefineConstants> 45 45 <ErrorReport>prompt</ErrorReport> … … 52 52 <DebugType>pdbonly</DebugType> 53 53 <Optimize>true</Optimize> 54 <OutputPath> $(SolutionDir)\bin\</OutputPath>54 <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath> 55 55 <DefineConstants>TRACE</DefineConstants> 56 56 <ErrorReport>prompt</ErrorReport> … … 63 63 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> 64 64 <DebugSymbols>true</DebugSymbols> 65 <OutputPath> $(SolutionDir)\bin\</OutputPath>65 <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath> 66 66 <DefineConstants>DEBUG;TRACE</DefineConstants> 67 67 <DebugType>full</DebugType> … … 71 71 </PropertyGroup> 72 72 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> 73 <OutputPath> $(SolutionDir)\bin\</OutputPath>73 <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath> 74 74 <DefineConstants>TRACE</DefineConstants> 75 75 <DocumentationFile> … … 83 83 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' "> 84 84 <DebugSymbols>true</DebugSymbols> 85 <OutputPath> $(SolutionDir)\bin\</OutputPath>85 <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath> 86 86 <DefineConstants>DEBUG;TRACE</DefineConstants> 87 87 <DebugType>full</DebugType> … … 91 91 </PropertyGroup> 92 92 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' "> 93 <OutputPath> $(SolutionDir)\bin\</OutputPath>93 <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath> 94 94 <DefineConstants>TRACE</DefineConstants> 95 95 <DocumentationFile> … … 102 102 </PropertyGroup> 103 103 <ItemGroup> 104 <Reference Include="HeuristicLab.Analysis-3.3"> 105 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Analysis-3.3.dll</HintPath> 106 <Private>False</Private> 107 </Reference> 108 <Reference Include="HeuristicLab.Collections-3.3"> 109 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Collections-3.3.dll</HintPath> 110 <Private>False</Private> 111 </Reference> 112 <Reference Include="HeuristicLab.Common-3.3"> 113 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Common-3.3.dll</HintPath> 114 <Private>False</Private> 115 </Reference> 116 <Reference Include="HeuristicLab.Common.Resources-3.3"> 117 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Common.Resources-3.3.dll</HintPath> 118 <Private>False</Private> 119 </Reference> 120 <Reference Include="HeuristicLab.Core-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 121 <SpecificVersion>False</SpecificVersion> 122 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Core-3.3.dll</HintPath> 123 <Private>False</Private> 124 </Reference> 125 <Reference Include="HeuristicLab.Data-3.3"> 126 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Data-3.3.dll</HintPath> 127 <Private>False</Private> 128 </Reference> 129 <Reference Include="HeuristicLab.Encodings.PermutationEncoding-3.3"> 130 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Encodings.PermutationEncoding-3.3.dll</HintPath> 131 <Private>False</Private> 132 </Reference> 133 <Reference Include="HeuristicLab.Operators-3.3"> 134 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Operators-3.3.dll</HintPath> 135 <Private>False</Private> 136 </Reference> 137 <Reference Include="HeuristicLab.Optimization-3.3"> 138 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Optimization-3.3.dll</HintPath> 139 <Private>False</Private> 140 </Reference> 141 <Reference Include="HeuristicLab.Optimization.Operators-3.3"> 142 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Optimization.Operators-3.3.dll</HintPath> 143 <Private>False</Private> 144 </Reference> 145 <Reference Include="HeuristicLab.Parameters-3.3"> 146 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Parameters-3.3.dll</HintPath> 147 <Private>False</Private> 148 </Reference> 149 <Reference Include="HeuristicLab.Persistence-3.3"> 150 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Persistence-3.3.dll</HintPath> 151 <Private>False</Private> 152 </Reference> 153 <Reference Include="HeuristicLab.PluginInfrastructure-3.3"> 154 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath> 155 <Private>False</Private> 156 </Reference> 157 <Reference Include="HeuristicLab.Problems.Instances-3.3"> 158 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.Instances-3.3.dll</HintPath> 159 <Private>False</Private> 160 </Reference> 104 161 <Reference Include="System" /> 105 162 <Reference Include="System.Core"> … … 113 170 <ItemGroup> 114 171 <Compile Include="Analyzers\BestTSPSolutionAnalyzer.cs" /> 172 <Compile Include="Analyzers\TSPGenealogyAnalyzer.cs" /> 115 173 <Compile Include="Analyzers\TSPPopulationDiversityAnalyzer.cs" /> 116 174 <Compile Include="Analyzers\TSPAlleleFrequencyAnalyzer.cs" /> … … 150 208 </ItemGroup> 151 209 <ItemGroup> 152 <ProjectReference Include="..\..\HeuristicLab.Analysis\3.3\HeuristicLab.Analysis-3.3.csproj">153 <Project>{887425B4-4348-49ED-A457-B7D2C26DDBF9}</Project>154 <Name>HeuristicLab.Analysis-3.3</Name>155 <Private>False</Private>156 </ProjectReference>157 <ProjectReference Include="..\..\HeuristicLab.Collections\3.3\HeuristicLab.Collections-3.3.csproj">158 <Project>{958B43BC-CC5C-4FA2-8628-2B3B01D890B6}</Project>159 <Name>HeuristicLab.Collections-3.3</Name>160 <Private>False</Private>161 </ProjectReference>162 <ProjectReference Include="..\..\HeuristicLab.Common.Resources\3.3\HeuristicLab.Common.Resources-3.3.csproj">163 <Project>{0E27A536-1C4A-4624-A65E-DC4F4F23E3E1}</Project>164 <Name>HeuristicLab.Common.Resources-3.3</Name>165 <Private>False</Private>166 </ProjectReference>167 <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj">168 <Project>{A9AD58B9-3EF9-4CC1-97E5-8D909039FF5C}</Project>169 <Name>HeuristicLab.Common-3.3</Name>170 <Private>False</Private>171 </ProjectReference>172 <ProjectReference Include="..\..\HeuristicLab.Core\3.3\HeuristicLab.Core-3.3.csproj">173 <Project>{C36BD924-A541-4A00-AFA8-41701378DDC5}</Project>174 <Name>HeuristicLab.Core-3.3</Name>175 <Private>False</Private>176 </ProjectReference>177 <ProjectReference Include="..\..\HeuristicLab.Data\3.3\HeuristicLab.Data-3.3.csproj">178 <Project>{BBAB9DF5-5EF3-4BA8-ADE9-B36E82114937}</Project>179 <Name>HeuristicLab.Data-3.3</Name>180 <Private>False</Private>181 </ProjectReference>182 <ProjectReference Include="..\..\HeuristicLab.Encodings.PermutationEncoding\3.3\HeuristicLab.Encodings.PermutationEncoding-3.3.csproj">183 <Project>{DBECB8B0-B166-4133-BAF1-ED67C3FD7FCA}</Project>184 <Name>HeuristicLab.Encodings.PermutationEncoding-3.3</Name>185 <Private>False</Private>186 </ProjectReference>187 <ProjectReference Include="..\..\HeuristicLab.Operators\3.3\HeuristicLab.Operators-3.3.csproj">188 <Project>{23DA7FF4-D5B8-41B6-AA96-F0561D24F3EE}</Project>189 <Name>HeuristicLab.Operators-3.3</Name>190 <Private>False</Private>191 </ProjectReference>192 <ProjectReference Include="..\..\HeuristicLab.Optimization.Operators\3.3\HeuristicLab.Optimization.Operators-3.3.csproj">193 <Project>{25087811-F74C-4128-BC86-8324271DA13E}</Project>194 <Name>HeuristicLab.Optimization.Operators-3.3</Name>195 </ProjectReference>196 <ProjectReference Include="..\..\HeuristicLab.Optimization\3.3\HeuristicLab.Optimization-3.3.csproj">197 <Project>{14AB8D24-25BC-400C-A846-4627AA945192}</Project>198 <Name>HeuristicLab.Optimization-3.3</Name>199 <Private>False</Private>200 </ProjectReference>201 <ProjectReference Include="..\..\HeuristicLab.Parameters\3.3\HeuristicLab.Parameters-3.3.csproj">202 <Project>{56F9106A-079F-4C61-92F6-86A84C2D84B7}</Project>203 <Name>HeuristicLab.Parameters-3.3</Name>204 <Private>False</Private>205 </ProjectReference>206 <ProjectReference Include="..\..\HeuristicLab.Persistence\3.3\HeuristicLab.Persistence-3.3.csproj">207 <Project>{102BC7D3-0EF9-439C-8F6D-96FF0FDB8E1B}</Project>208 <Name>HeuristicLab.Persistence-3.3</Name>209 <Private>False</Private>210 </ProjectReference>211 <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\3.3\HeuristicLab.PluginInfrastructure-3.3.csproj">212 <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>213 <Name>HeuristicLab.PluginInfrastructure-3.3</Name>214 <Private>False</Private>215 </ProjectReference>216 <ProjectReference Include="..\..\HeuristicLab.Problems.Instances\3.3\HeuristicLab.Problems.Instances-3.3.csproj">217 <Project>{3540E29E-4793-49E7-8EE2-FEA7F61C3994}</Project>218 <Name>HeuristicLab.Problems.Instances-3.3</Name>219 <Private>False</Private>220 </ProjectReference>221 </ItemGroup>222 <ItemGroup>223 210 <None Include="HeuristicLab.snk" /> 224 211 <None Include="Plugin.cs.frame" /> … … 242 229 </BootstrapperPackage> 243 230 </ItemGroup> 231 <ItemGroup> 232 <ProjectReference Include="..\..\HeuristicLab.EvolutionTracking\3.4\HeuristicLab.EvolutionTracking-3.4.csproj"> 233 <Project>{1f75cea3-464f-4a6f-b2f0-04b9841ebc16}</Project> 234 <Name>HeuristicLab.EvolutionTracking-3.4</Name> 235 </ProjectReference> 236 </ItemGroup> 244 237 <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> 245 238 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. … … 251 244 --> 252 245 <PropertyGroup> 253 <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir)246 <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir) 254 247 set ProjectDir=$(ProjectDir) 255 248 set SolutionDir=$(SolutionDir) … … 258 251 call PreBuildEvent.cmd 259 252 </PreBuildEvent> 260 <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">253 <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' "> 261 254 export ProjectDir=$(ProjectDir) 262 255 export SolutionDir=$(SolutionDir) -
branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.TravelingSalesman/3.3/TravelingSalesmanProblem.cs
r9848 r10300 34 34 using HeuristicLab.PluginInfrastructure; 35 35 using HeuristicLab.Problems.Instances; 36 using HeuristicLab.Problems.TravelingSalesman.Analyzers; 36 37 37 38 namespace HeuristicLab.Problems.TravelingSalesman { … … 84 85 private SingleObjectivePopulationDiversityAnalyzer SingleObjectivePopulationDiversityAnalyzer { 85 86 get { return Operators.OfType<SingleObjectivePopulationDiversityAnalyzer>().FirstOrDefault(); } 87 } 88 89 private TSPGenealogyAnalyzer TSPGenealogyAnalyzer { 90 get { return Operators.OfType<TSPGenealogyAnalyzer>().FirstOrDefault(); } 91 } 92 private IPermutationCrossover TSPCrossover { 93 get { return Operators.OfType<IPermutationCrossover>().FirstOrDefault(); } 94 } 95 96 private IPermutationManipulator TSPManipulator { 97 get { return Operators.OfType<IPermutationManipulator>().FirstOrDefault(); } 86 98 } 87 99 #endregion … … 240 252 Operators.Add(new TSPAlleleFrequencyAnalyzer()); 241 253 Operators.Add(new SingleObjectivePopulationDiversityAnalyzer()); 254 Operators.Add(new TSPGenealogyAnalyzer()); 242 255 ParameterizeAnalyzers(); 243 256 var operators = new HashSet<IPermutationOperator>(new IPermutationOperator[] { … … 326 339 SingleObjectivePopulationDiversityAnalyzer.SimilarityCalculator = Operators.OfType<TSPSimilarityCalculator>().SingleOrDefault(); 327 340 } 341 328 342 } 329 343 private void ParameterizeOperators() { … … 369 383 op.SolutionVariableName = SolutionCreator.PermutationParameter.ActualName; 370 384 op.QualityVariableName = Evaluator.QualityParameter.ActualName; 385 } 386 if (TSPGenealogyAnalyzer != null) { 387 if (TSPCrossover != null) { 388 TSPGenealogyAnalyzer.CrossoverParentsParameterName = TSPCrossover.ParentsParameter.Name; 389 TSPGenealogyAnalyzer.CrossoverChildParameterName = TSPCrossover.ChildParameter.Name; 390 } 391 if (TSPManipulator != null) { 392 TSPGenealogyAnalyzer.ManipulatorChildParameterName = TSPManipulator.PermutationParameter.Name; 393 } 394 TSPGenealogyAnalyzer.QualityParameter.ActualName = Evaluator.QualityParameter.ActualName; 395 if (Evaluator is ITSPPathEvaluator) { 396 TSPGenealogyAnalyzer.PopulationParameter.ActualName = SolutionCreator.PermutationParameter.ActualName; 397 } else { 398 throw new Exception("Unknown Evaluator. Could not parameterize genealogy analyzer."); 399 } 371 400 } 372 401 } -
branches/HeuristicLab.EvolutionTracking/HeuristicLab.Tracking.sln
r10271 r10300 24 24 EndProject 25 25 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Problems.DataAnalysis.Symbolic.Views-3.4", "HeuristicLab.Problems.DataAnalysis.Symbolic.Views\3.4\HeuristicLab.Problems.DataAnalysis.Symbolic.Views-3.4.csproj", "{7A2531CE-3F7C-4F13-BCCA-ED6DC27A7086}" 26 EndProject 27 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Problems.TravelingSalesman-3.3", "HeuristicLab.Problems.TravelingSalesman\3.3\HeuristicLab.Problems.TravelingSalesman-3.3.csproj", "{D767C38D-8014-46B0-9A32-03A3AECCE34A}" 28 EndProject 29 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Problems.TravelingSalesman.Views-3.3", "HeuristicLab.Problems.TravelingSalesman.Views\3.3\HeuristicLab.Problems.TravelingSalesman.Views-3.3.csproj", "{CDA28124-ACD0-4231-8EB0-C510B361F84E}" 26 30 EndProject 27 31 Global … … 129 133 {7A2531CE-3F7C-4F13-BCCA-ED6DC27A7086}.Release|x86.ActiveCfg = Release|x86 130 134 {7A2531CE-3F7C-4F13-BCCA-ED6DC27A7086}.Release|x86.Build.0 = Release|x86 135 {D767C38D-8014-46B0-9A32-03A3AECCE34A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 136 {D767C38D-8014-46B0-9A32-03A3AECCE34A}.Debug|Any CPU.Build.0 = Debug|Any CPU 137 {D767C38D-8014-46B0-9A32-03A3AECCE34A}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 138 {D767C38D-8014-46B0-9A32-03A3AECCE34A}.Debug|Mixed Platforms.Build.0 = Debug|x86 139 {D767C38D-8014-46B0-9A32-03A3AECCE34A}.Debug|x64.ActiveCfg = Debug|x64 140 {D767C38D-8014-46B0-9A32-03A3AECCE34A}.Debug|x64.Build.0 = Debug|x64 141 {D767C38D-8014-46B0-9A32-03A3AECCE34A}.Debug|x86.ActiveCfg = Debug|x86 142 {D767C38D-8014-46B0-9A32-03A3AECCE34A}.Debug|x86.Build.0 = Debug|x86 143 {D767C38D-8014-46B0-9A32-03A3AECCE34A}.Release|Any CPU.ActiveCfg = Release|Any CPU 144 {D767C38D-8014-46B0-9A32-03A3AECCE34A}.Release|Any CPU.Build.0 = Release|Any CPU 145 {D767C38D-8014-46B0-9A32-03A3AECCE34A}.Release|Mixed Platforms.ActiveCfg = Release|x86 146 {D767C38D-8014-46B0-9A32-03A3AECCE34A}.Release|Mixed Platforms.Build.0 = Release|x86 147 {D767C38D-8014-46B0-9A32-03A3AECCE34A}.Release|x64.ActiveCfg = Release|x64 148 {D767C38D-8014-46B0-9A32-03A3AECCE34A}.Release|x64.Build.0 = Release|x64 149 {D767C38D-8014-46B0-9A32-03A3AECCE34A}.Release|x86.ActiveCfg = Release|x86 150 {D767C38D-8014-46B0-9A32-03A3AECCE34A}.Release|x86.Build.0 = Release|x86 151 {CDA28124-ACD0-4231-8EB0-C510B361F84E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 152 {CDA28124-ACD0-4231-8EB0-C510B361F84E}.Debug|Any CPU.Build.0 = Debug|Any CPU 153 {CDA28124-ACD0-4231-8EB0-C510B361F84E}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 154 {CDA28124-ACD0-4231-8EB0-C510B361F84E}.Debug|Mixed Platforms.Build.0 = Debug|x86 155 {CDA28124-ACD0-4231-8EB0-C510B361F84E}.Debug|x64.ActiveCfg = Debug|x64 156 {CDA28124-ACD0-4231-8EB0-C510B361F84E}.Debug|x64.Build.0 = Debug|x64 157 {CDA28124-ACD0-4231-8EB0-C510B361F84E}.Debug|x86.ActiveCfg = Debug|x86 158 {CDA28124-ACD0-4231-8EB0-C510B361F84E}.Debug|x86.Build.0 = Debug|x86 159 {CDA28124-ACD0-4231-8EB0-C510B361F84E}.Release|Any CPU.ActiveCfg = Release|Any CPU 160 {CDA28124-ACD0-4231-8EB0-C510B361F84E}.Release|Any CPU.Build.0 = Release|Any CPU 161 {CDA28124-ACD0-4231-8EB0-C510B361F84E}.Release|Mixed Platforms.ActiveCfg = Release|x86 162 {CDA28124-ACD0-4231-8EB0-C510B361F84E}.Release|Mixed Platforms.Build.0 = Release|x86 163 {CDA28124-ACD0-4231-8EB0-C510B361F84E}.Release|x64.ActiveCfg = Release|x64 164 {CDA28124-ACD0-4231-8EB0-C510B361F84E}.Release|x64.Build.0 = Release|x64 165 {CDA28124-ACD0-4231-8EB0-C510B361F84E}.Release|x86.ActiveCfg = Release|x86 166 {CDA28124-ACD0-4231-8EB0-C510B361F84E}.Release|x86.Build.0 = Release|x86 131 167 EndGlobalSection 132 168 GlobalSection(SolutionProperties) = preSolution
Note: See TracChangeset
for help on using the changeset viewer.