- Timestamp:
- 07/10/15 16:38:17 (10 years ago)
- Location:
- branches/HeuristicLab.Problems.Orienteering
- Files:
-
- 1 deleted
- 29 edited
- 1 copied
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Problems.Orienteering/HeuristicLab 3.3.sln
r12694 r12721 127 127 {0C2917C8-7AA8-4E18-800A-C4D064F992ED} = {0C2917C8-7AA8-4E18-800A-C4D064F992ED} 128 128 {79271BC8-4446-40E2-BB89-9BE4E17174FE} = {79271BC8-4446-40E2-BB89-9BE4E17174FE} 129 {BBF2CCC8-4D87-4297-8E18-8241FF93F966} = {BBF2CCC8-4D87-4297-8E18-8241FF93F966} 130 {D1EFA4CC-909F-41D5-9C1F-C3AF1957A372} = {D1EFA4CC-909F-41D5-9C1F-C3AF1957A372} 129 131 {7A2531CE-3F7C-4F13-BCCA-ED6DC27A7086} = {7A2531CE-3F7C-4F13-BCCA-ED6DC27A7086} 130 132 {102BC7D3-0EF9-439C-8F6D-96FF0FDB8E1B} = {102BC7D3-0EF9-439C-8F6D-96FF0FDB8E1B} … … 134 136 {1F2718DA-BF13-40EE-A7FD-EEDB4912E64E} = {1F2718DA-BF13-40EE-A7FD-EEDB4912E64E} 135 137 {DDFB14DD-2A85-493C-A52D-E69729BBAEB0} = {DDFB14DD-2A85-493C-A52D-E69729BBAEB0} 138 {B37BF2DD-752C-456A-9DEF-FF5B41FC3C77} = {B37BF2DD-752C-456A-9DEF-FF5B41FC3C77} 136 139 {05BAE4E1-A9FA-4644-AA77-42558720159E} = {05BAE4E1-A9FA-4644-AA77-42558720159E} 137 140 {88B9B0E3-344E-4196-82A3-0F9732506FE8} = {88B9B0E3-344E-4196-82A3-0F9732506FE8} -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Instances.Orienteering/3.3/HeuristicLab.Problems.Instances.Orienteering-3.3.csproj
r11305 r12721 10 10 <RootNamespace>HeuristicLab.Problems.Instances.Orienteering</RootNamespace> 11 11 <AssemblyName>HeuristicLab.Problems.Instances.Orienteering-3.3</AssemblyName> 12 <TargetFrameworkVersion>v4. 0</TargetFrameworkVersion>12 <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> 13 13 <FileAlignment>512</FileAlignment> 14 <TargetFrameworkProfile /> 14 15 </PropertyGroup> 15 16 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> … … 21 22 <ErrorReport>prompt</ErrorReport> 22 23 <WarningLevel>4</WarningLevel> 24 <Prefer32Bit>false</Prefer32Bit> 23 25 </PropertyGroup> 24 26 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> … … 29 31 <ErrorReport>prompt</ErrorReport> 30 32 <WarningLevel>4</WarningLevel> 33 <Prefer32Bit>false</Prefer32Bit> 31 34 </PropertyGroup> 32 35 <PropertyGroup> … … 38 41 <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'"> 39 42 <DebugSymbols>true</DebugSymbols> 40 <OutputPath> bin\x64\Debug\</OutputPath>43 <OutputPath>..\..\bin\</OutputPath> 41 44 <DefineConstants>DEBUG;TRACE</DefineConstants> 42 45 <DebugType>full</DebugType> … … 44 47 <ErrorReport>prompt</ErrorReport> 45 48 <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> 49 <Prefer32Bit>false</Prefer32Bit> 46 50 </PropertyGroup> 47 51 <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'"> 48 <OutputPath> bin\x64\Release\</OutputPath>52 <OutputPath>..\..\bin\</OutputPath> 49 53 <DefineConstants>TRACE</DefineConstants> 50 54 <Optimize>true</Optimize> … … 53 57 <ErrorReport>prompt</ErrorReport> 54 58 <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> 59 <Prefer32Bit>false</Prefer32Bit> 55 60 </PropertyGroup> 56 61 <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'"> 57 62 <DebugSymbols>true</DebugSymbols> 58 <OutputPath> bin\x86\Debug\</OutputPath>63 <OutputPath>..\..\bin\</OutputPath> 59 64 <DefineConstants>DEBUG;TRACE</DefineConstants> 60 65 <DebugType>full</DebugType> … … 62 67 <ErrorReport>prompt</ErrorReport> 63 68 <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> 69 <Prefer32Bit>false</Prefer32Bit> 64 70 </PropertyGroup> 65 71 <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'"> 66 <OutputPath> bin\x86\Release\</OutputPath>72 <OutputPath>..\..\bin\</OutputPath> 67 73 <DefineConstants>TRACE</DefineConstants> 68 74 <Optimize>true</Optimize> … … 71 77 <ErrorReport>prompt</ErrorReport> 72 78 <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> 79 <Prefer32Bit>false</Prefer32Bit> 73 80 </PropertyGroup> 74 81 <ItemGroup> 75 <Reference Include="ICSharpCode.SharpZipLib, Version=0.85.4.369, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL">76 <SpecificVersion>False</SpecificVersion>77 <HintPath>..\..\HeuristicLab.PluginInfrastructure\3.3\ICSharpCode.SharpZipLib.dll</HintPath>78 </Reference>79 82 <Reference Include="System" /> 83 <Reference Include="System.IO.Compression" /> 80 84 </ItemGroup> 81 85 <ItemGroup> -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Instances.Orienteering/3.3/Plugin.cs.frame
r11307 r12721 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 23 23 24 24 namespace HeuristicLab.Problems.Instances.Orienteering { 25 [Plugin("HeuristicLab.Problems.Instances.Orienteering", "3.3.1 0.$WCREV$")]25 [Plugin("HeuristicLab.Problems.Instances.Orienteering", "3.3.11.$WCREV$")] 26 26 [PluginFile("HeuristicLab.Problems.Instances.Orienteering-3.3.dll", PluginFileType.Assembly)] 27 27 [PluginDependency("HeuristicLab.Problems.Instances", "3.3")] -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Instances.Orienteering/3.3/Properties/AssemblyInfo.cs.frame
r11258 r12721 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 27 27 // set of attributes. Change these attribute values to modify the information 28 28 // associated with an assembly. 29 [assembly: AssemblyTitle("HeuristicLab.Problems.Instances.Orienteering -3.3")]29 [assembly: AssemblyTitle("HeuristicLab.Problems.Instances.Orienteering")] 30 30 [assembly: AssemblyDescription("")] 31 31 [assembly: AssemblyConfiguration("")] 32 32 [assembly: AssemblyCompany("HEAL")] 33 33 [assembly: AssemblyProduct("HeuristicLab")] 34 [assembly: AssemblyCopyright("(c) 2002-201 4HEAL")]34 [assembly: AssemblyCopyright("(c) 2002-2015 HEAL")] 35 35 [assembly: AssemblyTrademark("")] 36 36 [assembly: AssemblyCulture("")] … … 54 54 // by using the '*' as shown below: 55 55 [assembly: AssemblyVersion("3.3.0.0")] 56 [assembly: AssemblyFileVersion("3.3.1 0.$WCREV$")]56 [assembly: AssemblyFileVersion("3.3.11.$WCREV$")] -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Instances.Orienteering/3.3/SchildeInstanceProvider.cs
r11323 r12721 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 23 23 using System.Collections.Generic; 24 24 using System.IO; 25 using System.IO.Compression; 25 26 using System.Linq; 26 27 using System.Reflection; 27 28 using System.Text.RegularExpressions; 28 29 using HeuristicLab.Problems.Instances.Types; 29 using ICSharpCode.SharpZipLib.Zip;30 30 31 31 namespace HeuristicLab.Problems.Instances.Orienteering { … … 54 54 if (String.IsNullOrEmpty(instanceArchiveName)) yield break; 55 55 56 using (var instanceStream = new Zip InputStream(GetType().Assembly.GetManifestResourceStream(instanceArchiveName))) {57 foreach (var entry in GetZipContents(instanceStream).OrderBy(x => x)) {56 using (var instanceStream = new ZipArchive(GetType().Assembly.GetManifestResourceStream(instanceArchiveName))) { 57 foreach (var entry in instanceStream.Entries.Select(x => x.Name).OrderBy(x => x)) { 58 58 yield return new OPDataDescriptor(Path.GetFileNameWithoutExtension(entry), GetInstanceDescription(), entry); 59 59 } … … 64 64 var instanceArchiveName = GetResourceName(FileName + @"\.zip"); 65 65 var parser = new SchildeParser(); 66 using (var instancesZipFile = new Zip File(GetType().Assembly.GetManifestResourceStream(instanceArchiveName))) {66 using (var instancesZipFile = new ZipArchive(GetType().Assembly.GetManifestResourceStream(instanceArchiveName))) { 67 67 var entry = instancesZipFile.GetEntry(descriptor.InstanceIdentifier); 68 using (var stream = instancesZipFile.GetInputStream(entry)) {68 using (var stream = entry.Open()) { 69 69 parser.Parse(stream); 70 70 var instance = LoadInstance(parser); … … 109 109 .SingleOrDefault(x => Regex.Match(x, @".*\.Data\." + fileName).Success); 110 110 } 111 protected IEnumerable<string> GetZipContents(ZipInputStream zipFile) { 112 ZipEntry entry; 113 while ((entry = zipFile.GetNextEntry()) != null) { 114 yield return entry.Name; 115 } 116 } 111 117 112 protected virtual string GetInstanceDescription() { 118 113 return "Embedded instance of plugin version " + Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyFileVersionAttribute), true).Cast<AssemblyFileVersionAttribute>().First().Version + "."; -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Instances.Orienteering/3.3/SchildeParser.cs
r11319 r12721 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Instances/3.3/Types/OPData.cs
r11320 r12721 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering.Views/3.3/HeuristicLab.Problems.Orienteering.Views-3.3.csproj
r11305 r12721 10 10 <RootNamespace>HeuristicLab.Problems.Orienteering.Views</RootNamespace> 11 11 <AssemblyName>HeuristicLab.Problems.Orienteering.Views-3.3</AssemblyName> 12 <TargetFrameworkVersion>v4. 0</TargetFrameworkVersion>12 <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> 13 13 <FileAlignment>512</FileAlignment> 14 <TargetFrameworkProfile /> 14 15 </PropertyGroup> 15 16 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> … … 21 22 <ErrorReport>prompt</ErrorReport> 22 23 <WarningLevel>4</WarningLevel> 24 <Prefer32Bit>false</Prefer32Bit> 23 25 </PropertyGroup> 24 26 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> … … 29 31 <ErrorReport>prompt</ErrorReport> 30 32 <WarningLevel>4</WarningLevel> 33 <Prefer32Bit>false</Prefer32Bit> 31 34 </PropertyGroup> 32 35 <PropertyGroup> … … 38 41 <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'"> 39 42 <DebugSymbols>true</DebugSymbols> 40 <OutputPath> bin\x64\Debug\</OutputPath>43 <OutputPath>..\..\bin\</OutputPath> 41 44 <DefineConstants>DEBUG;TRACE</DefineConstants> 42 45 <DebugType>full</DebugType> … … 44 47 <ErrorReport>prompt</ErrorReport> 45 48 <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> 49 <Prefer32Bit>false</Prefer32Bit> 46 50 </PropertyGroup> 47 51 <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'"> 48 <OutputPath> bin\x64\Release\</OutputPath>52 <OutputPath>..\..\bin\</OutputPath> 49 53 <DefineConstants>TRACE</DefineConstants> 50 54 <Optimize>true</Optimize> … … 53 57 <ErrorReport>prompt</ErrorReport> 54 58 <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> 59 <Prefer32Bit>false</Prefer32Bit> 55 60 </PropertyGroup> 56 61 <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'"> 57 62 <DebugSymbols>true</DebugSymbols> 58 <OutputPath> bin\x86\Debug\</OutputPath>63 <OutputPath>..\..\bin\</OutputPath> 59 64 <DefineConstants>DEBUG;TRACE</DefineConstants> 60 65 <DebugType>full</DebugType> … … 62 67 <ErrorReport>prompt</ErrorReport> 63 68 <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> 69 <Prefer32Bit>false</Prefer32Bit> 64 70 </PropertyGroup> 65 71 <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'"> 66 <OutputPath> bin\x86\Release\</OutputPath>72 <OutputPath>..\..\bin\</OutputPath> 67 73 <DefineConstants>TRACE</DefineConstants> 68 74 <Optimize>true</Optimize> … … 71 77 <ErrorReport>prompt</ErrorReport> 72 78 <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> 79 <Prefer32Bit>false</Prefer32Bit> 73 80 </PropertyGroup> 74 81 <ItemGroup> 82 <Reference Include="HeuristicLab.Data.Views-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 83 <SpecificVersion>False</SpecificVersion> 84 <HintPath>..\..\bin\HeuristicLab.Data.Views-3.3.dll</HintPath> 85 </Reference> 86 <Reference Include="HeuristicLab.Encodings.PermutationEncoding-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 87 <SpecificVersion>False</SpecificVersion> 88 <HintPath>..\..\bin\HeuristicLab.Encodings.PermutationEncoding-3.3.dll</HintPath> 89 </Reference> 90 <Reference Include="HeuristicLab.Problems.LinearAssignment-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 91 <SpecificVersion>False</SpecificVersion> 92 <HintPath>..\..\bin\HeuristicLab.Problems.LinearAssignment-3.3.dll</HintPath> 93 </Reference> 75 94 <Reference Include="System" /> 76 95 <Reference Include="System.Core" /> … … 150 169 <Name>HeuristicLab.Problems.Instances-3.3</Name> 151 170 </ProjectReference> 171 <ProjectReference Include="..\..\HeuristicLab.Problems.LinearAssignment.Views\3.3\HeuristicLab.Problems.LinearAssignment.Views-3.3.csproj"> 172 <Project>{8A7C524C-4B72-45FD-8274-EFB67C27C169}</Project> 173 <Name>HeuristicLab.Problems.LinearAssignment.Views-3.3</Name> 174 </ProjectReference> 152 175 <ProjectReference Include="..\..\HeuristicLab.Problems.Orienteering\3.3\HeuristicLab.Problems.Orienteering-3.3.csproj"> 153 176 <Project>{D1EFA4CC-909F-41D5-9C1F-C3AF1957A372}</Project> -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering.Views/3.3/OrienteeringProblemView.Designer.cs
r11245 r12721 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering.Views/3.3/OrienteeringProblemView.cs
r11327 r12721 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 25 25 26 26 namespace HeuristicLab.Problems.Orienteering.Views { 27 28 27 [View("Orienteering Problem View")] 29 28 [Content(typeof(OrienteeringProblem), true)] … … 39 38 40 39 protected override void DeregisterContentEvents() { 41 Content.CoordinatesParameter.ValueChanged -= new EventHandler(CoordinatesParameter_ValueChanged);42 Content.StartingPointParameter.ValueChanged -= new EventHandler(StartingPointParameter_ValueChanged);43 Content.TerminalPointParameter.ValueChanged -= new EventHandler(TerminalPointParameter_ValueChanged);44 Content.ScoresParameter.ValueChanged -= new EventHandler(ScoresParameter_ValueChanged);45 Content.BestKnownQualityParameter.ValueChanged -= new EventHandler(BestKnownQualityParameter_ValueChanged);46 Content.BestKnownSolutionParameter.ValueChanged -= new EventHandler(BestKnownSolutionParameter_ValueChanged);40 Content.CoordinatesParameter.ValueChanged -= CoordinatesParameter_ValueChanged; 41 Content.StartingPointParameter.ValueChanged -= StartingPointParameter_ValueChanged; 42 Content.TerminalPointParameter.ValueChanged -= TerminalPointParameter_ValueChanged; 43 Content.ScoresParameter.ValueChanged -= ScoresParameter_ValueChanged; 44 Content.BestKnownQualityParameter.ValueChanged -= BestKnownQualityParameter_ValueChanged; 45 Content.BestKnownSolutionParameter.ValueChanged -= BestKnownSolutionParameter_ValueChanged; 47 46 base.DeregisterContentEvents(); 48 47 } 49 48 protected override void RegisterContentEvents() { 50 49 base.RegisterContentEvents(); 51 Content.CoordinatesParameter.ValueChanged += new EventHandler(CoordinatesParameter_ValueChanged);52 Content.StartingPointParameter.ValueChanged += new EventHandler(StartingPointParameter_ValueChanged);53 Content.TerminalPointParameter.ValueChanged += new EventHandler(TerminalPointParameter_ValueChanged);54 Content.ScoresParameter.ValueChanged += new EventHandler(ScoresParameter_ValueChanged);55 Content.BestKnownQualityParameter.ValueChanged += new EventHandler(BestKnownQualityParameter_ValueChanged);56 Content.BestKnownSolutionParameter.ValueChanged += new EventHandler(BestKnownSolutionParameter_ValueChanged);50 Content.CoordinatesParameter.ValueChanged += CoordinatesParameter_ValueChanged; 51 Content.StartingPointParameter.ValueChanged += StartingPointParameter_ValueChanged; 52 Content.TerminalPointParameter.ValueChanged += TerminalPointParameter_ValueChanged; 53 Content.ScoresParameter.ValueChanged += ScoresParameter_ValueChanged; 54 Content.BestKnownQualityParameter.ValueChanged += BestKnownQualityParameter_ValueChanged; 55 Content.BestKnownSolutionParameter.ValueChanged += BestKnownSolutionParameter_ValueChanged; 57 56 } 58 57 … … 78 77 orienteeringSolutionView.Content.Coordinates = Content.Coordinates; 79 78 } 79 80 80 private void StartingPointParameter_ValueChanged(object sender, EventArgs e) { 81 81 orienteeringSolutionView.Content.StartingPoint.Value = Content.StartingPoint; 82 82 } 83 83 84 private void TerminalPointParameter_ValueChanged(object sender, EventArgs e) { 84 85 orienteeringSolutionView.Content.TerminalPoint.Value = Content.TerminalPoint; 85 86 } 87 86 88 private void ScoresParameter_ValueChanged(object sender, EventArgs e) { 87 89 orienteeringSolutionView.Content.Scores = Content.Scores; 88 90 } 91 89 92 private void BestKnownQualityParameter_ValueChanged(object sender, EventArgs e) { 90 93 orienteeringSolutionView.Content.Quality = Content.BestKnownQuality; 91 94 } 95 92 96 private void BestKnownSolutionParameter_ValueChanged(object sender, EventArgs e) { 93 97 orienteeringSolutionView.Content.IntegerVector = Content.BestKnownSolution; -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering.Views/3.3/OrienteeringSolutionView.Designer.cs
r11329 r12721 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 52 52 this.tourViewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost(); 53 53 this.splitContainer = new System.Windows.Forms.SplitContainer(); 54 this.quality GroupBox = new System.Windows.Forms.GroupBox();55 this. qualityViewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost();56 this. distanceGroupBox = new System.Windows.Forms.GroupBox();57 this. distanceViewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost();58 this. penaltyGroupBox = new System.Windows.Forms.GroupBox();59 this.penalty ViewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost();54 this.qualityValueView = new HeuristicLab.Data.Views.StringConvertibleValueView(); 55 this.distanceValueView = new HeuristicLab.Data.Views.StringConvertibleValueView(); 56 this.penaltyValueView = new HeuristicLab.Data.Views.StringConvertibleValueView(); 57 this.qualityLabel = new System.Windows.Forms.Label(); 58 this.distanceLabel = new System.Windows.Forms.Label(); 59 this.penaltyLabel = new System.Windows.Forms.Label(); 60 60 ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).BeginInit(); 61 61 this.tabControl.SuspendLayout(); … … 67 67 this.splitContainer.Panel2.SuspendLayout(); 68 68 this.splitContainer.SuspendLayout(); 69 this.qualityGroupBox.SuspendLayout();70 this.distanceGroupBox.SuspendLayout();71 this.penaltyGroupBox.SuspendLayout();72 69 this.SuspendLayout(); 73 70 // 74 71 // pictureBox 75 72 // 76 this.pictureBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 77 | System.Windows.Forms.AnchorStyles.Left) 73 this.pictureBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 74 | System.Windows.Forms.AnchorStyles.Left) 78 75 | System.Windows.Forms.AnchorStyles.Right))); 79 76 this.pictureBox.BackColor = System.Drawing.Color.White; … … 81 78 this.pictureBox.Location = new System.Drawing.Point(6, 6); 82 79 this.pictureBox.Name = "pictureBox"; 83 this.pictureBox.Size = new System.Drawing.Size( 199, 362);80 this.pictureBox.Size = new System.Drawing.Size(403, 271); 84 81 this.pictureBox.TabIndex = 0; 85 82 this.pictureBox.TabStop = false; … … 89 86 // 90 87 this.tabControl.AllowDrop = true; 91 this.tabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 92 | System.Windows.Forms.AnchorStyles.Left) 88 this.tabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 89 | System.Windows.Forms.AnchorStyles.Left) 93 90 | System.Windows.Forms.AnchorStyles.Right))); 94 91 this.tabControl.Controls.Add(this.visualizationTabPage); … … 97 94 this.tabControl.Name = "tabControl"; 98 95 this.tabControl.SelectedIndex = 0; 99 this.tabControl.Size = new System.Drawing.Size( 219, 396);96 this.tabControl.Size = new System.Drawing.Size(423, 305); 100 97 this.tabControl.TabIndex = 0; 101 98 // … … 106 103 this.visualizationTabPage.Name = "visualizationTabPage"; 107 104 this.visualizationTabPage.Padding = new System.Windows.Forms.Padding(3); 108 this.visualizationTabPage.Size = new System.Drawing.Size( 211, 370);105 this.visualizationTabPage.Size = new System.Drawing.Size(415, 279); 109 106 this.visualizationTabPage.TabIndex = 0; 110 107 this.visualizationTabPage.Text = "Visualization"; … … 124 121 // tourGroupBox 125 122 // 126 this.tourGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 127 | System.Windows.Forms.AnchorStyles.Left) 123 this.tourGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 124 | System.Windows.Forms.AnchorStyles.Left) 128 125 | System.Windows.Forms.AnchorStyles.Right))); 129 126 this.tourGroupBox.Controls.Add(this.tourViewHost); … … 137 134 // tourViewHost 138 135 // 139 this.tourViewHost.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 140 | System.Windows.Forms.AnchorStyles.Left) 136 this.tourViewHost.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 137 | System.Windows.Forms.AnchorStyles.Left) 141 138 | System.Windows.Forms.AnchorStyles.Right))); 142 139 this.tourViewHost.Caption = "View"; … … 157 154 this.splitContainer.Location = new System.Drawing.Point(0, 0); 158 155 this.splitContainer.Name = "splitContainer"; 156 this.splitContainer.Orientation = System.Windows.Forms.Orientation.Horizontal; 159 157 // 160 158 // splitContainer.Panel1 161 159 // 162 this.splitContainer.Panel1.Controls.Add(this.qualityGroupBox); 163 this.splitContainer.Panel1.Controls.Add(this.distanceGroupBox); 164 this.splitContainer.Panel1.Controls.Add(this.penaltyGroupBox); 160 this.splitContainer.Panel1.Controls.Add(this.penaltyLabel); 161 this.splitContainer.Panel1.Controls.Add(this.distanceLabel); 162 this.splitContainer.Panel1.Controls.Add(this.qualityLabel); 163 this.splitContainer.Panel1.Controls.Add(this.qualityValueView); 164 this.splitContainer.Panel1.Controls.Add(this.distanceValueView); 165 this.splitContainer.Panel1.Controls.Add(this.penaltyValueView); 165 166 this.splitContainer.Panel1.Margin = new System.Windows.Forms.Padding(0, 0, 5, 0); 166 167 this.splitContainer.Panel1MinSize = 0; … … 170 171 this.splitContainer.Panel2.Controls.Add(this.tabControl); 171 172 this.splitContainer.Size = new System.Drawing.Size(423, 402); 172 this.splitContainer.SplitterDistance = 200;173 this.splitContainer.SplitterDistance = 87; 173 174 this.splitContainer.TabIndex = 0; 174 175 // 175 // qualityGroupBox 176 // 177 this.qualityGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 178 | System.Windows.Forms.AnchorStyles.Right))); 179 this.qualityGroupBox.Controls.Add(this.qualityViewHost); 180 this.qualityGroupBox.Location = new System.Drawing.Point(0, 0); 181 this.qualityGroupBox.Name = "qualityGroupBox"; 182 this.qualityGroupBox.Size = new System.Drawing.Size(194, 46); 183 this.qualityGroupBox.TabIndex = 0; 184 this.qualityGroupBox.TabStop = false; 185 this.qualityGroupBox.Text = "Quality"; 186 // 187 // qualityViewHost 188 // 189 this.qualityViewHost.Caption = "View"; 190 this.qualityViewHost.Content = null; 191 this.qualityViewHost.Dock = System.Windows.Forms.DockStyle.Fill; 192 this.qualityViewHost.Enabled = false; 193 this.qualityViewHost.Location = new System.Drawing.Point(3, 16); 194 this.qualityViewHost.Name = "qualityViewHost"; 195 this.qualityViewHost.ReadOnly = false; 196 this.qualityViewHost.Size = new System.Drawing.Size(188, 27); 197 this.qualityViewHost.TabIndex = 0; 198 this.qualityViewHost.ViewsLabelVisible = true; 199 this.qualityViewHost.ViewType = null; 200 // 201 // distanceGroupBox 202 // 203 this.distanceGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 204 | System.Windows.Forms.AnchorStyles.Right))); 205 this.distanceGroupBox.Controls.Add(this.distanceViewHost); 206 this.distanceGroupBox.Location = new System.Drawing.Point(0, 49); 207 this.distanceGroupBox.Name = "distanceGroupBox"; 208 this.distanceGroupBox.Size = new System.Drawing.Size(194, 46); 209 this.distanceGroupBox.TabIndex = 1; 210 this.distanceGroupBox.TabStop = false; 211 this.distanceGroupBox.Text = "Distance"; 212 // 213 // distanceViewHost 214 // 215 this.distanceViewHost.Caption = "View"; 216 this.distanceViewHost.Content = null; 217 this.distanceViewHost.Dock = System.Windows.Forms.DockStyle.Fill; 218 this.distanceViewHost.Enabled = false; 219 this.distanceViewHost.Location = new System.Drawing.Point(3, 16); 220 this.distanceViewHost.Name = "distanceViewHost"; 221 this.distanceViewHost.ReadOnly = false; 222 this.distanceViewHost.Size = new System.Drawing.Size(188, 27); 223 this.distanceViewHost.TabIndex = 0; 224 this.distanceViewHost.ViewsLabelVisible = true; 225 this.distanceViewHost.ViewType = null; 226 // 227 // penaltyGroupBox 228 // 229 this.penaltyGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 230 | System.Windows.Forms.AnchorStyles.Right))); 231 this.penaltyGroupBox.Controls.Add(this.penaltyViewHost); 232 this.penaltyGroupBox.Location = new System.Drawing.Point(0, 101); 233 this.penaltyGroupBox.Name = "penaltyGroupBox"; 234 this.penaltyGroupBox.Size = new System.Drawing.Size(194, 46); 235 this.penaltyGroupBox.TabIndex = 2; 236 this.penaltyGroupBox.TabStop = false; 237 this.penaltyGroupBox.Text = "Penalty"; 238 // 239 // penaltyViewHost 240 // 241 this.penaltyViewHost.Caption = "View"; 242 this.penaltyViewHost.Content = null; 243 this.penaltyViewHost.Dock = System.Windows.Forms.DockStyle.Fill; 244 this.penaltyViewHost.Enabled = false; 245 this.penaltyViewHost.Location = new System.Drawing.Point(3, 16); 246 this.penaltyViewHost.Name = "penaltyViewHost"; 247 this.penaltyViewHost.ReadOnly = false; 248 this.penaltyViewHost.Size = new System.Drawing.Size(188, 27); 249 this.penaltyViewHost.TabIndex = 0; 250 this.penaltyViewHost.ViewsLabelVisible = true; 251 this.penaltyViewHost.ViewType = null; 176 // qualityValueView 177 // 178 this.qualityValueView.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 179 | System.Windows.Forms.AnchorStyles.Right))); 180 this.qualityValueView.Caption = "StringConvertibleValue View"; 181 this.qualityValueView.Content = null; 182 this.qualityValueView.LabelVisible = false; 183 this.qualityValueView.Location = new System.Drawing.Point(65, 7); 184 this.qualityValueView.Name = "qualityValueView"; 185 this.qualityValueView.ReadOnly = false; 186 this.qualityValueView.Size = new System.Drawing.Size(354, 21); 187 this.qualityValueView.TabIndex = 0; 188 // 189 // distanceValueView 190 // 191 this.distanceValueView.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 192 | System.Windows.Forms.AnchorStyles.Right))); 193 this.distanceValueView.Caption = "StringConvertibleValue View"; 194 this.distanceValueView.Content = null; 195 this.distanceValueView.LabelVisible = false; 196 this.distanceValueView.Location = new System.Drawing.Point(65, 34); 197 this.distanceValueView.Name = "distanceValueView"; 198 this.distanceValueView.ReadOnly = false; 199 this.distanceValueView.Size = new System.Drawing.Size(354, 21); 200 this.distanceValueView.TabIndex = 0; 201 // 202 // penaltyValueView 203 // 204 this.penaltyValueView.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 205 | System.Windows.Forms.AnchorStyles.Right))); 206 this.penaltyValueView.Caption = "StringConvertibleValue View"; 207 this.penaltyValueView.Content = null; 208 this.penaltyValueView.LabelVisible = false; 209 this.penaltyValueView.Location = new System.Drawing.Point(65, 61); 210 this.penaltyValueView.Name = "penaltyValueView"; 211 this.penaltyValueView.ReadOnly = false; 212 this.penaltyValueView.Size = new System.Drawing.Size(354, 21); 213 this.penaltyValueView.TabIndex = 0; 214 // 215 // qualityLabel 216 // 217 this.qualityLabel.AutoSize = true; 218 this.qualityLabel.Location = new System.Drawing.Point(7, 11); 219 this.qualityLabel.Name = "qualityLabel"; 220 this.qualityLabel.Size = new System.Drawing.Size(42, 13); 221 this.qualityLabel.TabIndex = 1; 222 this.qualityLabel.Text = "Quality:"; 223 // 224 // distanceLabel 225 // 226 this.distanceLabel.AutoSize = true; 227 this.distanceLabel.Location = new System.Drawing.Point(7, 38); 228 this.distanceLabel.Name = "distanceLabel"; 229 this.distanceLabel.Size = new System.Drawing.Size(52, 13); 230 this.distanceLabel.TabIndex = 1; 231 this.distanceLabel.Text = "Distance:"; 232 // 233 // penaltyLabel 234 // 235 this.penaltyLabel.AutoSize = true; 236 this.penaltyLabel.Location = new System.Drawing.Point(7, 64); 237 this.penaltyLabel.Name = "penaltyLabel"; 238 this.penaltyLabel.Size = new System.Drawing.Size(45, 13); 239 this.penaltyLabel.TabIndex = 1; 240 this.penaltyLabel.Text = "Penalty:"; 252 241 // 253 242 // OrienteeringSolutionView … … 263 252 this.tourGroupBox.ResumeLayout(false); 264 253 this.splitContainer.Panel1.ResumeLayout(false); 254 this.splitContainer.Panel1.PerformLayout(); 265 255 this.splitContainer.Panel2.ResumeLayout(false); 266 256 ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).EndInit(); 267 257 this.splitContainer.ResumeLayout(false); 268 this.qualityGroupBox.ResumeLayout(false);269 this.distanceGroupBox.ResumeLayout(false);270 this.penaltyGroupBox.ResumeLayout(false);271 258 this.ResumeLayout(false); 272 259 … … 282 269 private HeuristicLab.MainForm.WindowsForms.ViewHost tourViewHost; 283 270 private System.Windows.Forms.SplitContainer splitContainer; 284 private System.Windows.Forms. GroupBox qualityGroupBox;285 private HeuristicLab.MainForm.WindowsForms.ViewHost qualityViewHost;286 private System.Windows.Forms. GroupBox distanceGroupBox;287 private MainForm.WindowsForms.ViewHost distanceViewHost;288 private System.Windows.Forms.GroupBox penaltyGroupBox;289 private MainForm.WindowsForms.ViewHost penaltyViewHost;271 private System.Windows.Forms.Label penaltyLabel; 272 private System.Windows.Forms.Label distanceLabel; 273 private System.Windows.Forms.Label qualityLabel; 274 private Data.Views.StringConvertibleValueView qualityValueView; 275 private Data.Views.StringConvertibleValueView distanceValueView; 276 private Data.Views.StringConvertibleValueView penaltyValueView; 290 277 } 291 278 } -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering.Views/3.3/OrienteeringSolutionView.cs
r11329 r12721 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 28 28 29 29 namespace HeuristicLab.Problems.Orienteering.Views { 30 31 30 [View("OrienteeringSolution View")] 32 31 [Content(typeof(OrienteeringSolution), true)] … … 41 40 42 41 protected override void DeregisterContentEvents() { 43 Content.QualityChanged -= new EventHandler(Content_QualityChanged);44 Content.PenaltyChanged -= new EventHandler(Content_PenaltyChanged);45 Content.DistanceChanged -= new EventHandler(Content_DistanceChanged);46 Content.CoordinatesChanged -= new EventHandler(Content_CoordinatesChanged);47 Content.StartingPointChanged -= new EventHandler(Content_StartingPointChanged);48 Content.TerminalPointChanged -= new EventHandler(Content_TerminalPointChanged);49 Content.ScoresChanged -= new EventHandler(Content_ScoresChanged);50 Content.IntegerVectorChanged -= new EventHandler(Content_IntegerVectorChanged);42 Content.QualityChanged -= Content_QualityChanged; 43 Content.PenaltyChanged -= Content_PenaltyChanged; 44 Content.DistanceChanged -= Content_DistanceChanged; 45 Content.CoordinatesChanged -= Content_CoordinatesChanged; 46 Content.StartingPointChanged -= Content_StartingPointChanged; 47 Content.TerminalPointChanged -= Content_TerminalPointChanged; 48 Content.ScoresChanged -= Content_ScoresChanged; 49 Content.IntegerVectorChanged -= Content_IntegerVectorChanged; 51 50 base.DeregisterContentEvents(); 52 51 } 53 52 protected override void RegisterContentEvents() { 54 53 base.RegisterContentEvents(); 55 Content.QualityChanged += new EventHandler(Content_QualityChanged);56 Content.PenaltyChanged += new EventHandler(Content_PenaltyChanged);57 Content.DistanceChanged += new EventHandler(Content_DistanceChanged);58 Content.CoordinatesChanged += new EventHandler(Content_CoordinatesChanged);59 Content.StartingPointChanged += new EventHandler(Content_StartingPointChanged);60 Content.TerminalPointChanged += new EventHandler(Content_TerminalPointChanged);61 Content.ScoresChanged += new EventHandler(Content_ScoresChanged);62 Content.IntegerVectorChanged += new EventHandler(Content_IntegerVectorChanged);54 Content.QualityChanged += Content_QualityChanged; 55 Content.PenaltyChanged += Content_PenaltyChanged; 56 Content.DistanceChanged += Content_DistanceChanged; 57 Content.CoordinatesChanged += Content_CoordinatesChanged; 58 Content.StartingPointChanged += Content_StartingPointChanged; 59 Content.TerminalPointChanged += Content_TerminalPointChanged; 60 Content.ScoresChanged += Content_ScoresChanged; 61 Content.IntegerVectorChanged += Content_IntegerVectorChanged; 63 62 } 64 63 … … 66 65 base.OnContentChanged(); 67 66 if (Content == null) { 68 qualityV iewHost.Content = null;69 penaltyV iewHost.Content = null;70 distanceV iewHost.Content = null;67 qualityValueView.Content = null; 68 penaltyValueView.Content = null; 69 distanceValueView.Content = null; 71 70 splitContainer.Panel1Collapsed = true; 72 71 pictureBox.Image = null; 73 72 tourViewHost.Content = null; 74 73 } else { 75 qualityV iewHost.Content = Content.Quality;76 penaltyV iewHost.Content = Content.Penalty;77 distanceV iewHost.Content = Content.Distance;74 qualityValueView.Content = Content.Quality; 75 penaltyValueView.Content = Content.Penalty; 76 distanceValueView.Content = Content.Distance; 78 77 SetPanelCollapsing(); 79 78 GenerateImage(); … … 84 83 protected override void SetEnabledStateOfControls() { 85 84 base.SetEnabledStateOfControls(); 86 quality GroupBox.Enabled = Content != null;87 penalty GroupBox.Enabled = Content != null;88 distance GroupBox.Enabled = Content != null;85 qualityValueView.Enabled = Content != null; 86 penaltyValueView.Enabled = Content != null; 87 distanceValueView.Enabled = Content != null; 89 88 pictureBox.Enabled = Content != null; 90 89 tourGroupBox.Enabled = Content != null; … … 164 163 165 164 private void SetPanelCollapsing() { 166 splitContainer.Panel1Collapsed = qualityV iewHost.Content == null && penaltyViewHost.Content == null && distanceViewHost.Content == null;165 splitContainer.Panel1Collapsed = qualityValueView.Content == null && penaltyValueView.Content == null && distanceValueView.Content == null; 167 166 } 168 167 169 168 private void Content_QualityChanged(object sender, EventArgs e) { 170 if (InvokeRequired) 171 Invoke(new EventHandler(Content_QualityChanged), sender, e); 172 else { 173 qualityViewHost.Content = Content.Quality; 169 if (InvokeRequired) Invoke((Action<object, EventArgs>)Content_QualityChanged, sender, e); 170 else { 171 qualityValueView.Content = Content.Quality; 174 172 SetPanelCollapsing(); 175 173 } 176 174 } 177 175 private void Content_PenaltyChanged(object sender, EventArgs e) { 178 if (InvokeRequired) 179 Invoke(new EventHandler(Content_PenaltyChanged), sender, e); 180 else { 181 penaltyViewHost.Content = Content.Penalty; 176 if (InvokeRequired) Invoke((Action<object, EventArgs>)Content_PenaltyChanged, sender, e); 177 else { 178 penaltyValueView.Content = Content.Penalty; 182 179 GenerateImage(); 183 180 SetPanelCollapsing(); … … 186 183 187 184 private void Content_DistanceChanged(object sender, EventArgs e) { 188 if (InvokeRequired) 189 Invoke(new EventHandler(Content_DistanceChanged), sender, e);190 else {191 distanceViewHost.Content = Content.Distance;192 SetPanelCollapsing();193 194 } 185 if (InvokeRequired) Invoke((Action<object, EventArgs>)Content_DistanceChanged, sender, e); 186 else { 187 distanceValueView.Content = Content.Distance; 188 SetPanelCollapsing(); 189 } 190 } 191 195 192 private void Content_CoordinatesChanged(object sender, EventArgs e) { 196 if (InvokeRequired) 197 Invoke(new EventHandler(Content_CoordinatesChanged), sender, e); 198 else 199 GenerateImage(); 200 } 193 if (InvokeRequired) Invoke((Action<object, EventArgs>)Content_CoordinatesChanged, sender, e); 194 else GenerateImage(); 195 } 196 201 197 private void Content_StartingPointChanged(object sender, EventArgs e) { 202 if (InvokeRequired) 203 Invoke(new EventHandler(Content_StartingPointChanged), sender, e); 204 else 205 GenerateImage(); 206 } 198 if (InvokeRequired) Invoke((Action<object, EventArgs>)Content_StartingPointChanged, sender, e); 199 else GenerateImage(); 200 } 201 207 202 private void Content_TerminalPointChanged(object sender, EventArgs e) { 208 if (InvokeRequired) 209 Invoke(new EventHandler(Content_TerminalPointChanged), sender, e); 210 else 211 GenerateImage(); 212 } 203 if (InvokeRequired) Invoke((Action<object, EventArgs>)Content_TerminalPointChanged, sender, e); 204 else GenerateImage(); 205 } 206 213 207 private void Content_ScoresChanged(object sender, EventArgs e) { 214 if (InvokeRequired) 215 Invoke(new EventHandler(Content_ScoresChanged), sender, e); 216 else 217 GenerateImage(); 218 } 208 if (InvokeRequired) Invoke((Action<object, EventArgs>)Content_ScoresChanged, sender, e); 209 else GenerateImage(); 210 } 211 219 212 private void Content_IntegerVectorChanged(object sender, EventArgs e) { 220 if (InvokeRequired) 221 Invoke(new EventHandler(Content_IntegerVectorChanged), sender, e); 213 if (InvokeRequired) Invoke((Action<object, EventArgs>)Content_IntegerVectorChanged, sender, e); 222 214 else { 223 215 GenerateImage(); -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering.Views/3.3/Plugin.cs.frame
r11307 r12721 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 26 26 /// Plugin class for HeuristicLab.Problems.Orienteering.Views. 27 27 /// </summary> 28 [Plugin("HeuristicLab.Problems.Orienteering.Views", "3.3.1 0.$WCREV$")]28 [Plugin("HeuristicLab.Problems.Orienteering.Views", "3.3.11.$WCREV$")] 29 29 [PluginFile("HeuristicLab.Problems.Orienteering.Views-3.3.dll", PluginFileType.Assembly)] 30 30 [PluginDependency("HeuristicLab.Common", "3.3")] -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering.Views/3.3/Properties/AssemblyInfo.cs.frame
r11188 r12721 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 31 31 [assembly: AssemblyCompany("")] 32 32 [assembly: AssemblyProduct("HeuristicLab")] 33 [assembly: AssemblyCopyright("(c) 2002-201 4HEAL")]33 [assembly: AssemblyCopyright("(c) 2002-2015 HEAL")] 34 34 [assembly: AssemblyTrademark("")] 35 35 [assembly: AssemblyCulture("")] … … 53 53 // by using the '*' as shown below: 54 54 [assembly: AssemblyVersion("3.3.0.0")] 55 [assembly: AssemblyFileVersion("3.3.1 0.$WCREV$")]55 [assembly: AssemblyFileVersion("3.3.11.$WCREV$")] -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3
- Property svn:ignore
-
old new 2 2 obj 3 3 Plugin.cs 4 *.DotSettings
-
- Property svn:ignore
-
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/Analyzers/BestOrienteeringSolutionAnalyzer.cs
r12693 r12721 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 31 31 32 32 namespace HeuristicLab.Problems.Orienteering { 33 public sealed class BestOrienteeringSolutionAnaly ser : SingleSuccessorOperator, IAnalyzer {33 public sealed class BestOrienteeringSolutionAnalyzer : SingleSuccessorOperator, IAnalyzer { 34 34 public bool EnabledByDefault { 35 35 get { return true; } … … 78 78 79 79 [StorableConstructor] 80 private BestOrienteeringSolutionAnaly ser(bool deserializing) : base(deserializing) { }81 private BestOrienteeringSolutionAnaly ser(BestOrienteeringSolutionAnalyser original, Cloner cloner) : base(original, cloner) { }80 private BestOrienteeringSolutionAnalyzer(bool deserializing) : base(deserializing) { } 81 private BestOrienteeringSolutionAnalyzer(BestOrienteeringSolutionAnalyzer original, Cloner cloner) : base(original, cloner) { } 82 82 public override IDeepCloneable Clone(Cloner cloner) { 83 return new BestOrienteeringSolutionAnaly ser(this, cloner);83 return new BestOrienteeringSolutionAnalyzer(this, cloner); 84 84 } 85 public BestOrienteeringSolutionAnaly ser()85 public BestOrienteeringSolutionAnalyzer() 86 86 : base() { 87 87 Parameters.Add(new ScopeTreeLookupParameter<IntegerVector>("IntegerVector", "The Orienteering solutions which should be analysed.")); -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/Creators/GreedyOrienteeringTourCreator.cs
r11321 r12721 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 30 30 31 31 namespace HeuristicLab.Problems.Orienteering { 32 [Item("GreedyOrienteeringTourCreator", @"The initial solution for P-VNS is generated by means of a greedy algorithm that takes into 33 account all vertices vi that are located within the cost limit Tmax. These points are sorted 34 in descending order regarding the sum of their objective values. Afterwards, the algorithm 35 starts with a tour only including the starting and ending point and successively inserts the 36 points from this list at the first position in which they can feasibly be inserted. (Schilde et. al. 2009)")] 32 /// <summary> 33 /// The initial solution for P-VNS is generated by means of a greedy algorithm that takes into 34 /// account all vertices vi that are located within the cost limit Tmax. These points are sorted 35 /// in descending order regarding the sum of their objective values. Afterwards, the algorithm 36 /// starts with a tour only including the starting and ending point and successively inserts the 37 /// points from this list at the first position in which they can feasibly be inserted. 38 /// (Schilde et. al. 2009) 39 /// </summary> 40 [Item("GreedyOrienteeringTourCreator", @"Implements the solution creation procedure described in Schilde M., Doerner K.F., Hartl R.F., Kiechle G. 2009. Metaheuristics for the bi-objective orienteering problem. Swarm Intelligence, Volume 3, Issue 3, pp 179-201.")] 37 41 [StorableClass] 38 42 public sealed class GreedyOrienteeringTourCreator : IntegerVectorCreator, IOrienteeringSolutionCreator { … … 80 84 } 81 85 82 protected override IntegerVector Create(IRandom _, IntValue __, IntMatrix ___) {86 protected override IntegerVector Create(IRandom random, IntValue length, IntMatrix bounds) { 83 87 int startPoint = StartingPointParameter.ActualValue.Value; 84 88 int endPoint = TerminalPointParameter.ActualValue.Value; … … 105 109 endPoint 106 110 }; 107 double length = distances[startPoint, endPoint];111 double tourLength = distances[startPoint, endPoint]; 108 112 109 113 // Add points in a greedy way … … 118 122 119 123 // If the insertion would be feasible, perform it 120 if ( length + detour <= maxDistance) {124 if (tourLength + detour <= maxDistance) { 121 125 tour.Insert(insertPosition, feasiblePoints[i]); 122 length += detour;126 tourLength += detour; 123 127 feasiblePoints.RemoveAt(i); 124 128 insertionPerformed = true; -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/DistanceMatrix.cs
r11320 r12721 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/Evaluators/OrienteeringEvaluator.cs
r11327 r12721 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 30 30 31 31 namespace HeuristicLab.Problems.Orienteering { 32 [Item("OrienteeringEvaluator", "Operator to evaluate a solution to the orienteering problem.")] 33 [StorableClass] 32 34 public class OrienteeringEvaluator : InstrumentedOperator, IOrienteeringEvaluator { 33 35 … … 82 84 } 83 85 84 public static OrienteeringEvaluation Apply(IntegerVector solution, DoubleArray scores,86 public static OrienteeringEvaluationResult Apply(IntegerVector solution, DoubleArray scores, 85 87 DistanceMatrix distances, double maximumDistance, double pointVisitingCosts, double distancePenaltyFactor) { 86 88 … … 95 97 double quality = score - penalty; 96 98 97 return new OrienteeringEvaluation {99 return new OrienteeringEvaluationResult { 98 100 Quality = new DoubleValue(quality), 99 101 Penalty = new DoubleValue(penalty), … … 113 115 } 114 116 115 public OrienteeringEvaluation Evaluate(IntegerVector solution, DoubleArray scores,117 public OrienteeringEvaluationResult Evaluate(IntegerVector solution, DoubleArray scores, 116 118 DistanceMatrix distances, double maximumDistance, double pointVisitingCosts) { 117 119 return Apply(solution, scores, distances, maximumDistance, pointVisitingCosts, -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/HeuristicLab.Problems.Orienteering-3.3.csproj
r11327 r12721 10 10 <RootNamespace>HeuristicLab.Problems.Orienteering</RootNamespace> 11 11 <AssemblyName>HeuristicLab.Problems.Orienteering-3.3</AssemblyName> 12 <TargetFrameworkVersion>v4. 0</TargetFrameworkVersion>12 <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> 13 13 <FileAlignment>512</FileAlignment> 14 <TargetFrameworkProfile /> 14 15 </PropertyGroup> 15 16 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> … … 21 22 <ErrorReport>prompt</ErrorReport> 22 23 <WarningLevel>4</WarningLevel> 24 <Prefer32Bit>false</Prefer32Bit> 23 25 </PropertyGroup> 24 26 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> … … 29 31 <ErrorReport>prompt</ErrorReport> 30 32 <WarningLevel>4</WarningLevel> 33 <Prefer32Bit>false</Prefer32Bit> 31 34 </PropertyGroup> 32 35 <PropertyGroup> … … 41 44 <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'"> 42 45 <DebugSymbols>true</DebugSymbols> 43 <OutputPath> bin\x64\Debug\</OutputPath>46 <OutputPath>..\..\bin\</OutputPath> 44 47 <DefineConstants>DEBUG;TRACE</DefineConstants> 45 48 <DebugType>full</DebugType> … … 47 50 <ErrorReport>prompt</ErrorReport> 48 51 <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> 52 <Prefer32Bit>false</Prefer32Bit> 49 53 </PropertyGroup> 50 54 <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'"> 51 <OutputPath> bin\x64\Release\</OutputPath>55 <OutputPath>..\..\bin\</OutputPath> 52 56 <DefineConstants>TRACE</DefineConstants> 53 57 <Optimize>true</Optimize> … … 56 60 <ErrorReport>prompt</ErrorReport> 57 61 <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> 62 <Prefer32Bit>false</Prefer32Bit> 58 63 </PropertyGroup> 59 64 <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'"> 60 65 <DebugSymbols>true</DebugSymbols> 61 <OutputPath> bin\x86\Debug\</OutputPath>66 <OutputPath>..\..\bin\</OutputPath> 62 67 <DefineConstants>DEBUG;TRACE</DefineConstants> 63 68 <DebugType>full</DebugType> … … 65 70 <ErrorReport>prompt</ErrorReport> 66 71 <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> 72 <Prefer32Bit>false</Prefer32Bit> 67 73 </PropertyGroup> 68 74 <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'"> 69 <OutputPath> bin\x86\Release\</OutputPath>75 <OutputPath>..\..\bin\</OutputPath> 70 76 <DefineConstants>TRACE</DefineConstants> 71 77 <Optimize>true</Optimize> … … 74 80 <ErrorReport>prompt</ErrorReport> 75 81 <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> 82 <Prefer32Bit>false</Prefer32Bit> 76 83 </PropertyGroup> 77 84 <ItemGroup> … … 82 89 </ItemGroup> 83 90 <ItemGroup> 84 <Compile Include="Analyzers\BestOrienteeringSolutionAnaly ser.cs" />91 <Compile Include="Analyzers\BestOrienteeringSolutionAnalyzer.cs" /> 85 92 <Compile Include="Creators\GreedyOrienteeringTourCreator.cs" /> 86 93 <Compile Include="DistanceMatrix.cs" /> 87 <Compile Include="OrienteeringEvaluation .cs" />94 <Compile Include="OrienteeringEvaluationResult.cs" /> 88 95 <Compile Include="Improvers\OrienteeringLocalImprovementOperator.cs" /> 89 96 <Compile Include="Interfaces\IOrienteeringEvaluator.cs" /> … … 91 98 <Compile Include="Interfaces\IOrienteeringSolutionCreator.cs" /> 92 99 <Compile Include="OrienteeringProblem.cs" /> 93 <Compile Include="OrienteeringScript.cs" />94 100 <Compile Include="OrienteeringSolution.cs" /> 95 101 <Compile Include="Plugin.cs" /> -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/Improvers/OrienteeringLocalImprovementOperator.cs
r11323 r12721 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 20 20 #endregion 21 21 22 using System;23 22 using System.Collections.Generic; 24 23 using System.Linq; … … 33 32 34 33 namespace HeuristicLab.Problems.Orienteering { 35 [Item("OrienteeringLocalImprovementOperator", @"Iterative improvement consists of three basic operators: shortening, vertex insert and vertex 36 exchange. The shortening operator tries to rearrange the vertices within a tour in order to 37 minimize the cost of the tour. As shortening operator a 2-opt is applied. (Schilde et. al. 2009)")] 34 /// <summary> 35 /// Iterative improvement consists of three basic operators: shortening, vertex insert and vertex 36 /// exchange. The shortening operator tries to rearrange the vertices within a tour in order to 37 /// minimize the cost of the tour. As shortening operator a 2-opt is applied. (Schilde et. al. 2009) 38 /// </summary> 39 [Item("OrienteeringLocalImprovementOperator", @"Implements the iterative improvement procedure described in Schilde M., Doerner K.F., Hartl R.F., Kiechle G. 2009. Metaheuristics for the bi-objective orienteering problem. Swarm Intelligence, Volume 3, Issue 3, pp 179-201.")] 38 40 [StorableClass] 39 41 public sealed class OrienteeringLocalImprovementOperator : SingleSuccessorOperator, ILocalImprovementOperator { … … 125 127 bool useMaxBlockLength = UseMaximumBlockLengthParmeter.Value.Value; 126 128 127 bool optimizationDone= true;129 bool solutionChanged = true; 128 130 129 131 var tour = IntegerVectorParameter.ActualValue.ToList(); … … 137 139 138 140 // Check if the tour can be improved by adding or replacing points 139 while ( optimizationDone&& localIterations.Value < maxIterations) {140 optimizationDone= false;141 while (solutionChanged && localIterations.Value < maxIterations) { 142 solutionChanged = false; 141 143 142 144 if (localIterations.Value == 0) … … 152 154 IncludeNewPoints(tour, visitablePoints, 153 155 distances, pointVisitingCosts, maxLength, scores, 154 ref tourLength, ref tourScore, ref evaluations, ref optimizationDone);156 ref tourLength, ref tourScore, ref evaluations, ref solutionChanged); 155 157 156 158 // Determine if any of the visitable points can take the place of an already visited point in the tour to improve the scores 157 159 ReplacePoints(tour, visitablePoints, 158 160 distances, maxLength, scores, 159 ref tourLength, ref tourScore, ref evaluations, ref optimizationDone);161 ref tourLength, ref tourScore, ref evaluations, ref solutionChanged); 160 162 161 163 localIterations.Value++; … … 173 175 174 176 private void ShortenPath(List<int> tour, DistanceMatrix distances, int maxBlockLength, bool useMaxBlockLength, ref double tourLength, ref int evaluations) { 175 bool optimizationDone = true;177 bool solutionChanged; 176 178 int pathSize = tour.Count; 177 179 maxBlockLength = (useMaxBlockLength && (pathSize > maxBlockLength + 1)) ? maxBlockLength : (pathSize - 2); 178 180 179 181 // Perform a 2-opt 180 while (optimizationDone){181 optimizationDone= false;182 do { 183 solutionChanged = false; 182 184 183 185 for (int blockLength = 2; blockLength < maxBlockLength; blockLength++) { 184 186 // If an optimization has been done, start from the beginning 185 if ( optimizationDone) break;187 if (solutionChanged) break; 186 188 187 189 for (int position = 1; position < (pathSize - blockLength); position++) { 188 190 // If an optimization has been done, start from the beginning 189 if ( optimizationDone) break;191 if (solutionChanged) break; 190 192 191 193 evaluations++; … … 198 200 newLength += distances[tour[position], tour[position + blockLength]]; 199 201 200 if (newLength < tourLength - 0.00001) { // Avoid cycling caused by precision 202 if (newLength < tourLength - 0.00001) { 203 // Avoid cycling caused by precision 201 204 var reversePart = tour.GetRange(position, blockLength).AsEnumerable().Reverse(); 202 205 … … 207 210 208 211 // Re-run the optimization 209 optimizationDone= true;212 solutionChanged = true; 210 213 } 211 214 } 212 215 } 213 } 214 } 216 } while (solutionChanged); 217 } 218 215 219 private void IncludeNewPoints(List<int> tour, List<int> visitablePoints, 216 220 DistanceMatrix distances, double pointVisitingCosts, double maxLength, DoubleArray scores, 217 ref double tourLength, ref double tourScore, ref int evaluations, ref bool optimizationDone) {221 ref double tourLength, ref double tourScore, ref int evaluations, ref bool solutionChanged) { 218 222 219 223 for (int tourPosition = 1; tourPosition < tour.Count; tourPosition++) { 220 224 // If an optimization has been done, start from the beginning 221 if ( optimizationDone) break;225 if (solutionChanged) break; 222 226 223 227 for (int i = 0; i < visitablePoints.Count; i++) { 224 228 // If an optimization has been done, start from the beginning 225 if ( optimizationDone) break;229 if (solutionChanged) break; 226 230 227 231 evaluations++; … … 239 243 240 244 // Re-run this optimization 241 optimizationDone= true;245 solutionChanged = true; 242 246 } 243 247 } 244 248 } 245 249 } 250 246 251 private void ReplacePoints(List<int> tour, List<int> visitablePoints, 247 252 DistanceMatrix distances, double maxLength, DoubleArray scores, 248 ref double tourLength, ref double tourScore, ref int evaluations, ref bool optimizationDone) {253 ref double tourLength, ref double tourScore, ref int evaluations, ref bool solutionChanged) { 249 254 250 255 for (int tourPosition = 1; tourPosition < tour.Count - 1; tourPosition++) { 251 256 // If an optimization has been done, start from the beginning 252 if ( optimizationDone) break;257 if (solutionChanged) break; 253 258 254 259 for (int i = 0; i < visitablePoints.Count; i++) { 255 260 // If an optimization has been done, start from the beginning 256 if ( optimizationDone) break;261 if (solutionChanged) break; 257 262 258 263 evaluations++; … … 274 279 275 280 // Re-run this optimization 276 optimizationDone= true;281 solutionChanged = true; 277 282 } 278 283 } -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/Interfaces/IOrienteeringEvaluator.cs
r11327 r12721 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 34 34 ILookupParameter<DoubleValue> PenaltyParameter { get; } 35 35 36 OrienteeringEvaluation Evaluate(IntegerVector solution, DoubleArray scores,36 OrienteeringEvaluationResult Evaluate(IntegerVector solution, DoubleArray scores, 37 37 DistanceMatrix distances, double maximumDistance, double pointVisitingCosts); 38 38 } -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/Interfaces/IOrienteeringSolutionCreator.cs
r11321 r12721 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/OrienteeringEvaluationResult.cs
r12693 r12721 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2015 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 1 22 using HeuristicLab.Data; 2 23 3 24 namespace HeuristicLab.Problems.Orienteering { 4 public class OrienteeringEvaluation {25 public class OrienteeringEvaluationResult { 5 26 public DoubleValue Quality; 6 27 public DoubleValue Penalty; -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/OrienteeringProblem.cs
r11328 r12721 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 34 34 35 35 namespace HeuristicLab.Problems.Orienteering { 36 37 [Item("Orienteering Problem", "Represents a single objective Orienteering Problem.")] 38 [Creatable("Problems")] 36 [Item("Orienteering Problem", "Represents a single-objective Orienteering Problem.")] 37 [Creatable(CreatableAttribute.Categories.CombinatorialProblems, Priority = 115)] 39 38 [StorableClass] 40 39 public sealed class OrienteeringProblem … … 106 105 set { BestKnownSolutionParameter.Value = value; } 107 106 } 108 private BestOrienteeringSolutionAnaly ser BestOrienteeringSolutionAnalyser {109 get { return Operators.OfType<BestOrienteeringSolutionAnaly ser>().SingleOrDefault(); }107 private BestOrienteeringSolutionAnalyzer BestOrienteeringSolutionAnalyser { 108 get { return Operators.OfType<BestOrienteeringSolutionAnalyzer>().SingleOrDefault(); } 110 109 } 111 110 #endregion … … 268 267 } 269 268 private void InitializeOperators() { 270 Operators.Add(new BestOrienteeringSolutionAnaly ser());269 Operators.Add(new BestOrienteeringSolutionAnalyzer()); 271 270 ParameterizeAnalyzer(); 272 271 -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/OrienteeringSolution.cs
r11327 r12721 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2015 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 1 22 using System; 2 23 using System.Drawing; -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/Plugin.cs.frame
r11307 r12721 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 26 26 /// Plugin class for HeuristicLab.Problems.Orienteering. 27 27 /// </summary> 28 [Plugin("HeuristicLab.Problems.Orienteering", "3.3.1 0.$WCREV$")]28 [Plugin("HeuristicLab.Problems.Orienteering", "3.3.11.$WCREV$")] 29 29 [PluginFile("HeuristicLab.Problems.Orienteering-3.3.dll", PluginFileType.Assembly)] 30 30 [PluginDependency("HeuristicLab.Analysis", "3.3")] -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/Properties/AssemblyInfo.cs.frame
r11185 r12721 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 31 31 [assembly: AssemblyCompany("")] 32 32 [assembly: AssemblyProduct("HeuristicLab")] 33 [assembly: AssemblyCopyright("(c) 2002-201 4HEAL")]33 [assembly: AssemblyCopyright("(c) 2002-2015 HEAL")] 34 34 [assembly: AssemblyTrademark("")] 35 35 [assembly: AssemblyCulture("")] … … 53 53 // by using the '*' as shown below: 54 54 [assembly: AssemblyVersion("3.3.0.0")] 55 [assembly: AssemblyFileVersion("3.3.1 0.$WCREV$")]55 [assembly: AssemblyFileVersion("3.3.11.$WCREV$")] -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/Shakers/OrienteeringShakingOperator.cs
r11320 r12721 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 32 32 33 33 namespace HeuristicLab.Problems.Orienteering { 34 [Item("OrienteeringShakingOperator", @"The used neighborhood operator is based on a two point exchange move. A move in 35 the k-th neighborhood consists of removing k consecutive vertices from the tour, starting 36 at a randomly selected position. Afterwards, a sorted list of all vertices not yet included 37 in the current tour is built. The vertices are sorted in descending order with respect to the 38 objective value increase using the current weights. Out of the first three entries with the 39 highest ranking in this list, one randomly selected vertex is reinserted into the current tour 40 at the same position as the removed vertices. This way, l new vertices are inserted into the 41 tour. The largest neighborhood is a complete exchange of all vertices on the tour. 42 The shaking procedure does not guarantee that the new tour does not exceed the cost 43 limit Tmax. Therefore, in a repair step, a sorted list of all vertices in the tour is created. The 44 vertices are sorted in descending order with respect to costs saved when removing the vertex 45 from the tour. Vertices are removed as long as the cost limit is violated. 46 (Schilde et. al. 2009)")] 34 /// <summary> 35 /// The used neighborhood operator is based on a two point exchange move. A move in 36 /// the k-th neighborhood consists of removing k consecutive vertices from the tour, starting 37 /// at a randomly selected position. Afterwards, a sorted list of all vertices not yet included 38 /// in the current tour is built. The vertices are sorted in descending order with respect to the 39 /// objective value increase using the current weights. Out of the first three entries with the 40 /// highest ranking in this list, one randomly selected vertex is reinserted into the current tour 41 /// at the same position as the removed vertices. This way, l new vertices are inserted into the 42 /// tour. The largest neighborhood is a complete exchange of all vertices on the tour. 43 /// The shaking procedure does not guarantee that the new tour does not exceed the cost 44 /// limit Tmax. Therefore, in a repair step, a sorted list of all vertices in the tour is created. The 45 /// vertices are sorted in descending order with respect to costs saved when removing the vertex 46 /// from the tour. Vertices are removed as long as the cost limit is violated. 47 /// (Schilde et. al. 2009) 48 /// </summary> 49 [Item("OrienteeringShakingOperator", @"Implements the shaking procedure described in Schilde M., Doerner K.F., Hartl R.F., Kiechle G. 2009. Metaheuristics for the bi-objective orienteering problem. Swarm Intelligence, Volume 3, Issue 3, pp 179-201.")] 47 50 [StorableClass] 48 51 public sealed class OrienteeringShakingOperator : SingleSuccessorOperator, IMultiNeighborhoodShakingOperator, IStochasticOperator { … … 131 134 int maximumNeighborhood = initialTour.Length - 2; // neighborhood limit within [0, changable tour length - 1) 132 135 maximumNeighborhood = (maximumNeighborhood > currentNeighborhood) ? currentNeighborhood : maximumNeighborhood; 133 int neighborhood = maximumNeighborhood; //random.Next(maximumNeighborhood) + 1;136 int neighborhood = maximumNeighborhood; 134 137 135 138 // Find all points that are not yet included in the tour and are … … 165 168 return base.Apply(); 166 169 } 170 167 171 private void InsertPoints(List<int> actualTour, IntegerVector initialTour, 168 172 int neighborhood, List<int> visitablePoints, IRandom random) { … … 208 212 } 209 213 } 214 210 215 private void CleanupTour(List<int> actualTour, DistanceMatrix distances, double maxDistance, double pointVisitingCosts) { 211 216 // Sort the points on the tour according to their costs savings when removed … … 235 240 } 236 241 } 237 // 242 238 243 private class SavingInfo { 239 244 public int Index; -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Tests/HeuristicLab-3.3/Samples/VnsOpSampleTest.cs
r12694 r12721 22 22 using System.IO; 23 23 using System.Linq; 24 using HeuristicLab.Algorithms.LocalSearch;25 24 using HeuristicLab.Algorithms.VariableNeighborhoodSearch; 26 25 using HeuristicLab.Data; 27 using HeuristicLab.Encodings. PermutationEncoding;26 using HeuristicLab.Encodings.IntegerVectorEncoding; 28 27 using HeuristicLab.Persistence.Default.Xml; 29 using HeuristicLab.Problems. TravelingSalesman;28 using HeuristicLab.Problems.Orienteering; 30 29 using Microsoft.VisualStudio.TestTools.UnitTesting; 31 30 32 31 namespace HeuristicLab.Tests { 33 32 [TestClass] 34 public class Vns TspSampleTest {35 private const string SampleFileName = "VNS_ TSP";33 public class VnsOpSampleTest { 34 private const string SampleFileName = "VNS_OP"; 36 35 37 36 [TestMethod] … … 50 49 vns.SetSeedRandomly = false; 51 50 SamplesUtils.RunAlgorithm(vns); 52 Assert.AreEqual( 867, SamplesUtils.GetDoubleResult(vns, "BestQuality"));53 Assert.AreEqual( 867, SamplesUtils.GetDoubleResult(vns, "CurrentAverageQuality"));54 Assert.AreEqual( 867, SamplesUtils.GetDoubleResult(vns, "CurrentWorstQuality"));55 Assert.AreEqual( 12975173, SamplesUtils.GetIntResult(vns, "EvaluatedSolutions"));51 Assert.AreEqual(1182, SamplesUtils.GetDoubleResult(vns, "BestQuality")); 52 Assert.AreEqual(1182, SamplesUtils.GetDoubleResult(vns, "CurrentAverageQuality")); 53 Assert.AreEqual(1182, SamplesUtils.GetDoubleResult(vns, "CurrentWorstQuality")); 54 Assert.AreEqual(42651753, SamplesUtils.GetIntResult(vns, "EvaluatedSolutions")); 56 55 } 57 56 … … 59 58 VariableNeighborhoodSearch vns = new VariableNeighborhoodSearch(); 60 59 #region Problem Configuration 61 TravelingSalesmanProblem tspProblem = new TravelingSalesmanProblem(); 62 tspProblem.BestKnownSolution = new Permutation(PermutationTypes.Absolute, new int[] { 63 117, 65, 73, 74, 75, 76, 82, 86, 87, 94, 100, 106, 115, 120, 124, 107, 101, 108, 109, 102, 97, 90, 96, 95, 88, 89, 84, 78, 69, 57, 68, 56, 44, 55, 45, 36, 46, 37, 38, 47, 48, 59, 49, 58, 70, 77, 83, 79, 50, 80, 85, 98, 103, 110, 116, 121, 125, 133, 132, 138, 139, 146, 147, 159, 168, 169, 175, 182, 188, 201, 213, 189, 214, 221, 230, 246, 262, 276, 284, 275, 274, 261, 245, 229, 220, 228, 243, 259, 273, 282, 272, 258, 242, 257, 293, 292, 302, 310, 319, 320, 327, 326, 333, 340, 346, 339, 345, 344, 337, 338, 332, 325, 318, 309, 301, 291, 271, 251, 270, 233, 250, 269, 268, 280, 290, 300, 415, 440, 416, 417, 441, 458, 479, 418, 419, 395, 420, 442, 421, 396, 397, 422, 423, 461, 481, 502, 460, 501, 459, 480, 500, 517, 531, 516, 530, 499, 478, 457, 439, 414, 413, 412, 438, 456, 477, 498, 515, 529, 538, 547, 558, 559, 560, 548, 539, 549, 561, 562, 551, 550, 532, 540, 533, 541, 518, 534, 542, 552, 553, 554, 555, 535, 543, 556, 544, 536, 522, 505, 521, 520, 504, 519, 503, 482, 462, 463, 464, 483, 443, 465, 484, 506, 485, 507, 508, 487, 467, 486, 466, 445, 428, 444, 424, 425, 426, 427, 398, 399, 400, 381, 382, 371, 372, 401, 429, 446, 430, 402, 383, 366, 356, 357, 352, 385, 384, 403, 431, 447, 469, 468, 488, 489, 490, 470, 471, 448, 432, 433, 404, 405, 386, 373, 374, 367, 376, 375, 387, 491, 509, 537, 510, 492, 472, 449, 388, 389, 406, 450, 407, 377, 368, 359, 354, 350, 335, 324, 330, 390, 434, 451, 473, 493, 511, 523, 545, 563, 565, 567, 570, 569, 578, 577, 576, 575, 574, 573, 572, 580, 584, 583, 582, 587, 586, 585, 581, 579, 571, 568, 566, 564, 557, 546, 527, 513, 526, 525, 524, 512, 495, 494, 474, 452, 436, 409, 435, 453, 475, 496, 514, 528, 497, 455, 476, 454, 437, 411, 410, 394, 393, 392, 380, 370, 379, 408, 391, 378, 369, 364, 365, 361, 355, 351, 343, 336, 331, 317, 299, 286, 287, 278, 263, 264, 265, 223, 202, 248, 266, 279, 288, 289, 281, 267, 249, 232, 224, 216, 215, 204, 192, 193, 194, 186, 179, 185, 203, 191, 190, 177, 171, 161, 128, 135, 140, 149, 162, 150, 163, 172, 178, 173, 164, 152, 151, 141, 153, 165, 154, 142, 155, 143, 137, 136, 130, 129, 118, 114, 113, 105, 119, 123, 131, 144, 156, 157, 145, 158, 166, 167, 174, 180, 181, 187, 195, 205, 217, 226, 236, 225, 234, 252, 235, 253, 254, 255, 238, 239, 240, 241, 256, 237, 206, 207, 208, 196, 197, 198, 209, 199, 200, 211, 212, 219, 210, 218, 227, 244, 260, 283, 294, 295, 303, 296, 311, 304, 297, 298, 305, 285, 306, 314, 329, 321, 313, 312, 328, 334, 341, 347, 348, 353, 358, 362, 363, 360, 349, 342, 322, 323, 315, 316, 308, 307, 277, 247, 231, 222, 184, 183, 176, 170, 160, 148, 134, 127, 126, 111, 104, 92, 91, 71, 60, 51, 52, 40, 32, 23, 21, 20, 18, 17, 16, 14, 13, 11, 10, 7, 6, 5, 2, 1, 0, 3, 4, 31, 39, 25, 30, 35, 34, 33, 43, 54, 42, 27, 28, 29, 9, 8, 12, 15, 19, 22, 24, 26, 41, 67, 66, 64, 63, 53, 62, 61, 72, 81, 93, 99, 112, 122, 60 OrienteeringProblem opProblem = new OrienteeringProblem(); 61 opProblem.BestKnownQuality = new DoubleValue(1188); 62 opProblem.BestKnownSolution = new IntegerVector(new[] { 63 0, 1, 3, 6, 11, 17, 24, 18, 13, 19, 14, 20, 26, 34, 27, 35, 42, 48, 53, 57, 52, 47, 41, 33, 25, 32, 40, 46, 39, 31, 38, 50, 44, 37, 30, 23, 16, 10, 15, 22, 29, 21, 28, 36, 43, 49, 54, 58, 61, 63 64 64 }); 65 tspProblem.Coordinates = new DoubleMatrix(new double[,] {66 { 48, 71}, {49, 71}, {50, 71}, {44, 70}, {45, 70}, {52, 70}, {53, 70}, {54, 70}, {41, 69}, {42, 69}, {55, 69}, {56, 69}, {40, 68}, {56, 68}, {57, 68}, {39, 67}, {57, 67}, {58, 67}, {59, 67}, {38, 66}, {59, 66}, {60, 66}, {37, 65}, {60, 65}, {36, 64}, {43, 64}, {35, 63}, {37, 63}, {41, 63}, {42, 63}, {43, 63}, {47, 63}, {61, 63}, {40, 62}, {41, 62}, {42, 62}, {43, 62}, {45, 62}, {46, 62}, {47, 62}, {62, 62}, {34, 61}, {38, 61}, {39, 61}, {42, 61}, {43, 61}, {44, 61}, {45, 61}, {46, 61}, {47, 61}, {52, 61}, {62, 61}, {63, 61}, {26, 60}, {38, 60}, {42, 60}, {43, 60}, {44, 60}, {46, 60}, {47, 60}, {63, 60}, {23, 59}, {24, 59}, {27, 59}, {29, 59}, {30, 59}, {31, 59}, {33, 59}, {42, 59}, {46, 59}, {47, 59}, {63, 59}, {21, 58}, {32, 58}, {33, 58}, {34, 58}, {35, 58}, {46, 58}, {47, 58}, {48, 58}, {53, 58}, {21, 57}, {35, 57}, {47, 57}, {48, 57}, {53, 57}, {36, 56}, {37, 56}, {46, 56}, {47, 56}, {48, 56}, {64, 56}, {65, 56}, {20, 55}, {38, 55}, {46, 55}, {47, 55}, {48, 55}, {52, 55}, {21, 54}, {40, 54}, {47, 54}, {48, 54}, {52, 54}, {65, 54}, {30, 53}, {41, 53}, {46, 53}, {47, 53}, {48, 53}, {52, 53}, {65, 53}, {21, 52}, {32, 52}, {33, 52}, {42, 52}, {51, 52}, {21, 51}, {33, 51}, {34, 51}, {43, 51}, {51, 51}, {21, 50}, {35, 50}, {44, 50}, {50, 50}, {66, 50}, {67, 50}, {21, 49}, {34, 49}, {36, 49}, {37, 49}, {46, 49}, {49, 49}, {67, 49}, {22, 48}, {36, 48}, {37, 48}, {46, 48}, {47, 48}, {22, 47}, {30, 47}, {34, 47}, {37, 47}, {38, 47}, {39, 47}, {47, 47}, {48, 47}, {67, 47}, {23, 46}, {28, 46}, {29, 46}, {30, 46}, {31, 46}, {32, 46}, {35, 46}, {37, 46}, {38, 46}, {39, 46}, {49, 46}, {67, 46}, {23, 45}, {28, 45}, {29, 45}, {31, 45}, {32, 45}, {40, 45}, {41, 45}, {49, 45}, {50, 45}, {68, 45}, {24, 44}, {29, 44}, {32, 44}, {41, 44}, {51, 44}, {68, 44}, {25, 43}, {30, 43}, {32, 43}, {42, 43}, {43, 43}, {51, 43}, {68, 43}, {69, 43}, {31, 42}, {32, 42}, {43, 42}, {52, 42}, {55, 42}, {26, 41}, {27, 41}, {31, 41}, {32, 41}, {33, 41}, {44, 41}, {45, 41}, {46, 41}, {47, 41}, {48, 41}, {49, 41}, {53, 41}, {25, 40}, {27, 40}, {32, 40}, {43, 40}, {44, 40}, {45, 40}, {46, 40}, {48, 40}, {49, 40}, {50, 40}, {51, 40}, {53, 40}, {56, 40}, {32, 39}, {33, 39}, {43, 39}, {50, 39}, {51, 39}, {54, 39}, {56, 39}, {69, 39}, {24, 38}, {32, 38}, {41, 38}, {42, 38}, {51, 38}, {52, 38}, {54, 38}, {57, 38}, {69, 38}, {31, 37}, {32, 37}, {40, 37}, {41, 37}, {42, 37}, {43, 37}, {44, 37}, {45, 37}, {46, 37}, {47, 37}, {48, 37}, {51, 37}, {52, 37}, {55, 37}, {57, 37}, {69, 37}, {24, 36}, {31, 36}, {32, 36}, {39, 36}, {40, 36}, {41, 36}, {42, 36}, {43, 36}, {45, 36}, {48, 36}, {49, 36}, {51, 36}, {53, 36}, {55, 36}, {58, 36}, {22, 35}, {23, 35}, {24, 35}, {25, 35}, {30, 35}, {31, 35}, {32, 35}, {39, 35}, {41, 35}, {49, 35}, {51, 35}, {55, 35}, {56, 35}, {58, 35}, {71, 35}, {20, 34}, {27, 34}, {30, 34}, {31, 34}, {51, 34}, {53, 34}, {57, 34}, {60, 34}, {18, 33}, {19, 33}, {29, 33}, {30, 33}, {31, 33}, {45, 33}, {46, 33}, {47, 33}, {52, 33}, {53, 33}, {55, 33}, {57, 33}, {58, 33}, {17, 32}, {30, 32}, {44, 32}, {47, 32}, {54, 32}, {57, 32}, {59, 32}, {61, 32}, {71, 32}, {72, 32}, {43, 31}, {47, 31}, {56, 31}, {58, 31}, {59, 31}, {61, 31}, {72, 31}, {74, 31}, {16, 30}, {43, 30}, {46, 30}, {47, 30}, {59, 30}, {63, 30}, {71, 30}, {75, 30}, {43, 29}, {46, 29}, {47, 29}, {59, 29}, {60, 29}, {75, 29}, {15, 28}, {43, 28}, {46, 28}, {61, 28}, {76, 28}, {15, 27}, {43, 27}, {44, 27}, {45, 27}, {46, 27}, {60, 27}, {62, 27}, {15, 26}, {43, 26}, {44, 26}, {46, 26}, {59, 26}, {60, 26}, {64, 26}, {77, 26}, {15, 25}, {58, 25}, {61, 25}, {77, 25}, {15, 24}, {53, 24}, {55, 24}, {61, 24}, {77, 24}, {62, 23}, {16, 22}, {61, 22}, {62, 22}, {15, 21}, {16, 21}, {52, 21}, {63, 21}, {77, 21}, {16, 20}, {17, 20}, {46, 20}, {47, 20}, {60, 20}, {62, 20}, {63, 20}, {65, 20}, {76, 20}, {15, 19}, {17, 19}, {18, 19}, {44, 19}, {45, 19}, {48, 19}, {53, 19}, {56, 19}, {60, 19}, {62, 19}, {67, 19}, {68, 19}, {76, 19}, {15, 18}, {18, 18}, {19, 18}, {20, 18}, {32, 18}, {33, 18}, {34, 18}, {41, 18}, {42, 18}, {43, 18}, {46, 18}, {48, 18}, {53, 18}, {59, 18}, {60, 18}, {69, 18}, {75, 18}, {16, 17}, {17, 17}, {20, 17}, {21, 17}, {22, 17}, {23, 17}, {24, 17}, {26, 17}, {28, 17}, {29, 17}, {30, 17}, {31, 17}, {32, 17}, {34, 17}, {35, 17}, {36, 17}, {37, 17}, {38, 17}, {39, 17}, {40, 17}, {44, 17}, {46, 17}, {48, 17}, {53, 17}, {56, 17}, {58, 17}, {75, 17}, {17, 16}, {18, 16}, {20, 16}, {24, 16}, {26, 16}, {27, 16}, {29, 16}, {33, 16}, {41, 16}, {42, 16}, {44, 16}, {47, 16}, {52, 16}, {57, 16}, {70, 16}, {73, 16}, {74, 16}, {17, 15}, {18, 15}, {20, 15}, {22, 15}, {24, 15}, {27, 15}, {29, 15}, {31, 15}, {33, 15}, {35, 15}, {36, 15}, {38, 15}, {39, 15}, {42, 15}, {45, 15}, {47, 15}, {52, 15}, {53, 15}, {55, 15}, {56, 15}, {70, 15}, {73, 15}, {17, 14}, {19, 14}, {21, 14}, {24, 14}, {26, 14}, {29, 14}, {31, 14}, {34, 14}, {37, 14}, {40, 14}, {42, 14}, {44, 14}, {46, 14}, {47, 14}, {53, 14}, {54, 14}, {55, 14}, {62, 14}, {70, 14}, {72, 14}, {17, 13}, {19, 13}, {21, 13}, {23, 13}, {25, 13}, {27, 13}, {30, 13}, {32, 13}, {34, 13}, {36, 13}, {38, 13}, {41, 13}, {43, 13}, {44, 13}, {45, 13}, {60, 13}, {70, 13}, {71, 13}, {18, 12}, {21, 12}, {23, 12}, {26, 12}, {28, 12}, {31, 12}, {34, 12}, {37, 12}, {39, 12}, {41, 12}, {42, 12}, {70, 12}, {18, 11}, {19, 11}, {20, 11}, {21, 11}, {24, 11}, {25, 11}, {27, 11}, {29, 11}, {31, 11}, {33, 11}, {35, 11}, {38, 11}, {41, 11}, {59, 11}, {26, 10}, {29, 10}, {32, 10}, {34, 10}, {36, 10}, {39, 10}, {40, 10}, {69, 10}, {21, 9}, {26, 9}, {28, 9}, {30, 9}, {32, 9}, {33, 9}, {35, 9}, {36, 9}, {37, 9}, {38, 9}, {39, 9}, {22, 8}, {27, 8}, {28, 8}, {29, 8}, {30, 8}, {31, 8}, {68, 8}, {23, 7}, {66, 7}, {24, 6}, {65, 6}, {25, 5}, {62, 5}, {63, 5}, {26, 4}, {55, 4}, {56, 4}, {57, 4}, {58, 4}, {59, 4}, {60, 4}, {61, 4}, {28, 3}, {53, 3}, {29, 2}, {50, 2}, {51, 2}, {52, 2}, {31, 1}, {32, 1}, {48, 1}65 opProblem.Coordinates = new DoubleMatrix(new double[,] { 66 { 7, 0 },{ 6, 1 },{ 8, 1 },{ 5, 2 },{ 7, 2 },{ 9, 2 },{ 4, 3 },{ 6, 3 },{ 8, 3 },{ 10, 3 },{ 3, 4 },{ 5, 4 },{ 7, 4 },{ 9, 4 },{ 11, 4 },{ 2, 5 },{ 4, 5 },{ 6, 5 },{ 8, 5 },{ 10, 5 },{ 12, 5 },{ 1, 6 },{ 3, 6 },{ 5, 6 },{ 7, 6 },{ 9, 6 },{ 11, 6 },{ 13, 6 },{ 0, 7 },{ 2, 7 },{ 4, 7 },{ 6, 7 },{ 8, 7 },{ 10, 7 },{ 12, 7 },{ 14, 7 },{ 1, 8 },{ 3, 8 },{ 5, 8 },{ 7, 8 },{ 9, 8 },{ 11, 8 },{ 13, 8 },{ 2, 9 },{ 4, 9 },{ 6, 9 },{ 8, 9 },{ 10, 9 },{ 12, 9 },{ 3, 10 },{ 5, 10 },{ 7, 10 },{ 9, 10 },{ 11, 10 },{ 4, 11 },{ 6, 11 },{ 8, 11 },{ 10, 11 },{ 5, 12 },{ 7, 12 },{ 9, 12 },{ 6, 13 },{ 8, 13 },{ 7, 14 } 67 67 }); 68 tspProblem.BestKnownQuality = new DoubleValue(867); 68 opProblem.MaximumDistance = 70; 69 opProblem.PointVisitingCosts = 0; 70 opProblem.Scores = new DoubleArray(new double[] { 71 0, 6, 6, 12, 6, 12, 18, 12, 12, 18, 24, 18, 12, 18, 24, 30, 24, 18, 18, 24, 30, 36, 30, 24, 18, 24, 30, 36, 42, 36, 30, 24, 24, 30, 36, 42, 36, 30, 24, 18, 24, 30, 36, 30, 24, 18, 18, 24, 30, 24, 18, 12, 18, 24, 18, 12, 12, 18, 12, 6, 12, 6, 6, 0 72 }); 73 opProblem.StartingPoint = 0; 74 opProblem.TerminalPoint = 63; 69 75 70 tspProblem.EvaluatorParameter.Value = new TSPRoundedEuclideanPathEvaluator(); 71 tspProblem.SolutionCreatorParameter.Value = new RandomPermutationCreator(); 72 tspProblem.UseDistanceMatrix.Value = true; 73 tspProblem.Name = "Funny TSP"; 74 tspProblem.Description = "Represents a symmetric Traveling Salesman Problem."; 76 opProblem.Name = "1_p64_t070"; 77 opProblem.Description = "Represents a symmetric Traveling Salesman Problem."; 75 78 #endregion 76 79 #region Algorithm Configuration 77 80 vns.Name = "Variable Neighborhood Search - TSP"; 78 81 vns.Description = "A variable neighborhood search algorithm which solves a funny TSP instance"; 79 vns.Problem = tspProblem;82 vns.Problem = opProblem; 80 83 81 var localImprovement = vns.LocalImprovementParameter.ValidValues 82 .OfType<LocalSearchImprovementOperator>() 83 .Single(); 84 // move generator has to be set first 85 localImprovement.MoveGenerator = localImprovement.MoveGeneratorParameter.ValidValues 86 .OfType<StochasticInversionMultiMoveGenerator>() 87 .Single(); 88 localImprovement.MoveEvaluator = localImprovement.MoveEvaluatorParameter.ValidValues 89 .OfType<TSPInversionMoveRoundedEuclideanPathEvaluator>() 90 .Single(); 91 localImprovement.MoveMaker = localImprovement.MoveMakerParameter.ValidValues 92 .OfType<InversionMoveMaker>() 93 .Single(); 94 localImprovement.SampleSizeParameter.Value = new IntValue(500); 95 vns.LocalImprovement = localImprovement; 96 97 vns.LocalImprovementMaximumIterations = 150; 84 vns.LocalImprovement = vns.LocalImprovementParameter.ValidValues.OfType<OrienteeringLocalImprovementOperator>().Single(); 85 vns.LocalImprovementMaximumIterations = 200; 98 86 vns.MaximumIterations = 25; 99 87 vns.Seed = 0; 100 88 vns.SetSeedRandomly = true; 101 var shakingOperator = vns.ShakingOperatorParameter.ValidValues 102 .OfType<PermutationShakingOperator>() 103 .Single(); 104 shakingOperator.Operators.SetItemCheckedState(shakingOperator.Operators 105 .OfType<Swap2Manipulator>() 106 .Single(), false); 107 shakingOperator.Operators.SetItemCheckedState(shakingOperator.Operators 108 .OfType<Swap3Manipulator>() 109 .Single(), false); 110 vns.ShakingOperator = shakingOperator; 89 vns.ShakingOperator = vns.ShakingOperatorParameter.ValidValues.OfType<OrienteeringShakingOperator>().Single(); 111 90 #endregion 112 91 vns.Engine = new ParallelEngine.ParallelEngine(); -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Tests/HeuristicLab.Tests.csproj
r12694 r12721 422 422 <Compile Include="HeuristicLab-3.3\PluginDependenciesTest.cs" /> 423 423 <Compile Include="HeuristicLab-3.3\PluginLoader.cs" /> 424 <Compile Include="HeuristicLab-3.3\Samples\VnsOpSampleTest.cs" /> 424 425 <Compile Include="HeuristicLab-3.3\Samples\EsGriewankSampleTest.cs" /> 425 426 <Compile Include="HeuristicLab-3.3\Samples\GaussianProcessRegressionSampleTest.cs" />
Note: See TracChangeset
for help on using the changeset viewer.