Changeset 16728 for branches/1614_GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views/3.3
- Timestamp:
- 03/31/19 14:40:15 (5 years ago)
- Location:
- branches/1614_GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1614_GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views
-
Property
svn:mergeinfo
set to
/branches/2936_GQAPIntegration/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views merged eligible
-
Property
svn:mergeinfo
set to
-
branches/1614_GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views/3.3/GQAPAssignmentArchiveView.Designer.cs
r15504 r16728 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 7Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/1614_GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views/3.3/GQAPAssignmentArchiveView.cs
r15504 r16728 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 7Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/1614_GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views/3.3/GQAPAssignmentView.Designer.cs
r15504 r16728 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 7Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/1614_GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views/3.3/GQAPAssignmentView.cs
r15510 r16728 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 7Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 45 45 public GQAPAssignmentView() { 46 46 InitializeComponent(); 47 recalculateButton.Text = string.Empty; 47 48 recalculateButton.Image = VSImageLibrary.Refresh; 48 49 } … … 50 51 #region Register Content Events 51 52 protected override void DeregisterContentEvents() { 52 Content.PropertyChanged -= new PropertyChangedEventHandler(Content_PropertyChanged); 53 DeregisterSolutionEvents(); 54 Content.PropertyChanged -= Content_PropertyChanged; 53 55 base.DeregisterContentEvents(); 54 56 } 55 57 protected override void RegisterContentEvents() { 56 58 base.RegisterContentEvents(); 57 Content.PropertyChanged += new PropertyChangedEventHandler(Content_PropertyChanged); 59 Content.PropertyChanged += Content_PropertyChanged; 60 RegisterSolutionEvents(); 61 } 62 63 private void DeregisterSolutionEvents() { 64 if (Content.Solution != null) Content.Solution.PropertyChanged -= Content_SolutionPropertyChanged; 65 } 66 private void RegisterSolutionEvents() { 67 if (Content.Solution != null) Content.Solution.PropertyChanged += Content_SolutionPropertyChanged; 58 68 } 59 69 #endregion … … 63 73 UpdateEvaluation(); 64 74 UpdateAssignment(); 65 if (Content != null ) assignmentView.Content = Content.Assignment;75 if (Content != null && Content.Solution != null) assignmentView.Content = Content.Solution.Assignment; 66 76 else assignmentView.Content = null; 67 77 } … … 69 79 protected override void SetEnabledStateOfControls() { 70 80 base.SetEnabledStateOfControls(); 81 recalculateButton.Enabled = Content != null && Content.Solution != null && !Locked && !ReadOnly; 71 82 } 72 83 … … 74 85 private void Content_PropertyChanged(object sender, PropertyChangedEventArgs e) { 75 86 switch (e.PropertyName) { 76 case nameof(Content.Evaluation): UpdateEvaluation(); break; 77 case nameof(Content.Assignment): UpdateAssignment(); break; 87 case nameof(Content.Solution): RegisterSolutionEvents(); UpdateEvaluation(); UpdateAssignment(); break; 78 88 case nameof(Content.ProblemInstance): UpdateEvaluation(); UpdateAssignment(); break; 79 89 default: break; 80 90 } 91 SetEnabledStateOfControls(); 92 } 93 94 private void Content_SolutionPropertyChanged(object sender, PropertyChangedEventArgs e) { 95 switch (e.PropertyName) { 96 case nameof(Content.Solution.Assignment): UpdateAssignment(); break; 97 case nameof(Content.Solution.Evaluation): UpdateEvaluation(); break; 98 default: break; 99 } 81 100 } 82 101 … … 88 107 #region Event Handlers 89 108 private void assignmentTreeView_AfterSelect(object sender, TreeViewEventArgs e) { 90 if (Content != null ) {109 if (Content != null && Content.Solution != null) { 91 110 assignmentTreeView.BeginUpdate(); 92 111 try { … … 120 139 if (InvokeRequired) Invoke((Action)UpdateEvaluation); 121 140 else { 122 if (Content == null ) {141 if (Content == null || Content.Solution == null) { 123 142 qualityLabel.Text = "-"; 124 143 flowDistanceQualityLabel.Text = "-"; … … 126 145 overbookedCapacityLabel.Text = "-"; 127 146 } else { 128 qualityLabel.Text = Content.ProblemInstance.ToSingleObjective(Content. Evaluation).ToString();129 flowDistanceQualityLabel.Text = Content. Evaluation.FlowCosts.ToString();130 installationQualityLabel.Text = Content. Evaluation.InstallationCosts.ToString();131 overbookedCapacityLabel.Text = Content. Evaluation.ExcessDemand.ToString();147 qualityLabel.Text = Content.ProblemInstance.ToSingleObjective(Content.Solution.Evaluation).ToString(); 148 flowDistanceQualityLabel.Text = Content.Solution.Evaluation.FlowCosts.ToString(); 149 installationQualityLabel.Text = Content.Solution.Evaluation.InstallationCosts.ToString(); 150 overbookedCapacityLabel.Text = Content.Solution.Evaluation.ExcessDemand.ToString(); 132 151 } 133 152 } … … 138 157 else { 139 158 assignmentTreeView.Nodes.Clear(); 140 if (Content != null ) {141 IntegerVector assignment = Content. Assignment;159 if (Content != null && Content.Solution != null) { 160 IntegerVector assignment = Content.Solution.Assignment; 142 161 Dictionary<int, TreeNode> locationNodes = new Dictionary<int, TreeNode>(); 143 162 for (int i = 0; i < assignment.Length; i++) { … … 169 188 var installationCosts = new Dictionary<EquipmentNode, double>(); 170 189 foreach (var node in GetAllSubNodes(assignmentTreeView.Nodes).OfType<EquipmentNode>()) { 171 int location = Content. Assignment[node.Equipment];190 int location = Content.Solution.Assignment[node.Equipment]; 172 191 installationCosts[node] = Content.ProblemInstance.InstallationCosts[node.Equipment, location]; 173 192 } … … 216 235 217 236 private void ColorByWeight(LocationNode selectedNode) { 218 var equipments = new HashSet<int>(Content. Assignment.Select((v, i) => new { Index = i, Value = v })237 var equipments = new HashSet<int>(Content.Solution.Assignment.Select((v, i) => new { Index = i, Value = v }) 219 238 .Where(x => x.Value == selectedNode.Location).Select(x => x.Index)); 220 239 var rowSums = new Dictionary<int, double>(equipments.Count); … … 279 298 280 299 private void recalculateButton_Click(object sender, EventArgs e) { 281 Content. Evaluation = Content.ProblemInstance.Evaluate(Content.Assignment);300 Content.Solution.Evaluation = Content.ProblemInstance.Evaluate(Content.Solution.Assignment); 282 301 } 283 302 } -
branches/1614_GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views/3.3/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views-3.3.csproj
r15688 r16728 1 1 <?xml version="1.0" encoding="utf-8"?> 2 <Project ToolsVersion=" 4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">2 <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> 3 3 <PropertyGroup> 4 4 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> … … 11 11 <RootNamespace>HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views</RootNamespace> 12 12 <AssemblyName>HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views-3.3</AssemblyName> 13 <TargetFrameworkVersion>v4. 5</TargetFrameworkVersion>13 <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> 14 14 <FileAlignment>512</FileAlignment> 15 15 <TargetFrameworkProfile /> … … 135 135 <Private>False</Private> 136 136 </ProjectReference> 137 <ProjectReference Include="..\..\HeuristicLab.Optimization\3.3\HeuristicLab.Optimization-3.3.csproj">138 <Project>{14ab8d24-25bc-400c-a846-4627aa945192}</Project>139 <Name>HeuristicLab.Optimization-3.3</Name>140 <Private>False</Private>141 </ProjectReference>142 137 <ProjectReference Include="..\..\HeuristicLab.Problems.GeneralizedQuadraticAssignment\3.3\HeuristicLab.Problems.GeneralizedQuadraticAssignment-3.3.csproj"> 143 138 <Project>{C739E6D2-5680-4804-A810-8017DA0C238F}</Project> -
branches/1614_GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views/3.3/Plugin.cs.frame
r13418 r16728 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 23 23 24 24 namespace HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views { 25 [Plugin("HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views", "3.3.1 3.$WCREV$")]25 [Plugin("HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views", "3.3.15.$WCREV$")] 26 26 [PluginFile("HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views-3.3.dll", PluginFileType.Assembly)] 27 27 [PluginDependency("HeuristicLab.Collections", "3.3")] -
branches/1614_GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views/3.3/Properties/AssemblyInfo.cs.frame
r15504 r16728 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 7Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 31 31 [assembly: AssemblyCompany("HEAL")] 32 32 [assembly: AssemblyProduct("HeuristicLab")] 33 [assembly: AssemblyCopyright("(c) 2002-201 7HEAL")]33 [assembly: AssemblyCopyright("(c) 2002-2018 HEAL")] 34 34 [assembly: AssemblyTrademark("")] 35 35 [assembly: AssemblyCulture("")] … … 54 54 // [assembly: AssemblyVersion("1.0.*")] 55 55 [assembly: AssemblyVersion("3.3.0.0")] 56 [assembly: AssemblyFileVersion("3.3.1 4.$WCREV$")]56 [assembly: AssemblyFileVersion("3.3.15.$WCREV$")]
Note: See TracChangeset
for help on using the changeset viewer.