Changeset 12721


Ignore:
Timestamp:
07/10/15 16:38:17 (6 years ago)
Author:
abeham
Message:

#2208:

  • Added missing license headers
  • Updates copyright year
  • Renamed analyzer (us spelling)
  • Removed script
  • Implemented samples unit test
  • Changed solution view to use horizontal splitting, removed viewhosts
  • Updated instance provider to use .NET45 zip compression
  • Restructuring and reformatting
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  
    127127    {0C2917C8-7AA8-4E18-800A-C4D064F992ED} = {0C2917C8-7AA8-4E18-800A-C4D064F992ED}
    128128    {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}
    129131    {7A2531CE-3F7C-4F13-BCCA-ED6DC27A7086} = {7A2531CE-3F7C-4F13-BCCA-ED6DC27A7086}
    130132    {102BC7D3-0EF9-439C-8F6D-96FF0FDB8E1B} = {102BC7D3-0EF9-439C-8F6D-96FF0FDB8E1B}
     
    134136    {1F2718DA-BF13-40EE-A7FD-EEDB4912E64E} = {1F2718DA-BF13-40EE-A7FD-EEDB4912E64E}
    135137    {DDFB14DD-2A85-493C-A52D-E69729BBAEB0} = {DDFB14DD-2A85-493C-A52D-E69729BBAEB0}
     138    {B37BF2DD-752C-456A-9DEF-FF5B41FC3C77} = {B37BF2DD-752C-456A-9DEF-FF5B41FC3C77}
    136139    {05BAE4E1-A9FA-4644-AA77-42558720159E} = {05BAE4E1-A9FA-4644-AA77-42558720159E}
    137140    {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  
    1010    <RootNamespace>HeuristicLab.Problems.Instances.Orienteering</RootNamespace>
    1111    <AssemblyName>HeuristicLab.Problems.Instances.Orienteering-3.3</AssemblyName>
    12     <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
     12    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
    1313    <FileAlignment>512</FileAlignment>
     14    <TargetFrameworkProfile />
    1415  </PropertyGroup>
    1516  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
     
    2122    <ErrorReport>prompt</ErrorReport>
    2223    <WarningLevel>4</WarningLevel>
     24    <Prefer32Bit>false</Prefer32Bit>
    2325  </PropertyGroup>
    2426  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
     
    2931    <ErrorReport>prompt</ErrorReport>
    3032    <WarningLevel>4</WarningLevel>
     33    <Prefer32Bit>false</Prefer32Bit>
    3134  </PropertyGroup>
    3235  <PropertyGroup>
     
    3841  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
    3942    <DebugSymbols>true</DebugSymbols>
    40     <OutputPath>bin\x64\Debug\</OutputPath>
     43    <OutputPath>..\..\bin\</OutputPath>
    4144    <DefineConstants>DEBUG;TRACE</DefineConstants>
    4245    <DebugType>full</DebugType>
     
    4447    <ErrorReport>prompt</ErrorReport>
    4548    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
     49    <Prefer32Bit>false</Prefer32Bit>
    4650  </PropertyGroup>
    4751  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
    48     <OutputPath>bin\x64\Release\</OutputPath>
     52    <OutputPath>..\..\bin\</OutputPath>
    4953    <DefineConstants>TRACE</DefineConstants>
    5054    <Optimize>true</Optimize>
     
    5357    <ErrorReport>prompt</ErrorReport>
    5458    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
     59    <Prefer32Bit>false</Prefer32Bit>
    5560  </PropertyGroup>
    5661  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
    5762    <DebugSymbols>true</DebugSymbols>
    58     <OutputPath>bin\x86\Debug\</OutputPath>
     63    <OutputPath>..\..\bin\</OutputPath>
    5964    <DefineConstants>DEBUG;TRACE</DefineConstants>
    6065    <DebugType>full</DebugType>
     
    6267    <ErrorReport>prompt</ErrorReport>
    6368    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
     69    <Prefer32Bit>false</Prefer32Bit>
    6470  </PropertyGroup>
    6571  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
    66     <OutputPath>bin\x86\Release\</OutputPath>
     72    <OutputPath>..\..\bin\</OutputPath>
    6773    <DefineConstants>TRACE</DefineConstants>
    6874    <Optimize>true</Optimize>
     
    7177    <ErrorReport>prompt</ErrorReport>
    7278    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
     79    <Prefer32Bit>false</Prefer32Bit>
    7380  </PropertyGroup>
    7481  <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>
    7982    <Reference Include="System" />
     83    <Reference Include="System.IO.Compression" />
    8084  </ItemGroup>
    8185  <ItemGroup>
  • branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Instances.Orienteering/3.3/Plugin.cs.frame

    r11307 r12721  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2323
    2424namespace HeuristicLab.Problems.Instances.Orienteering {
    25   [Plugin("HeuristicLab.Problems.Instances.Orienteering", "3.3.10.$WCREV$")]
     25  [Plugin("HeuristicLab.Problems.Instances.Orienteering", "3.3.11.$WCREV$")]
    2626  [PluginFile("HeuristicLab.Problems.Instances.Orienteering-3.3.dll", PluginFileType.Assembly)]
    2727  [PluginDependency("HeuristicLab.Problems.Instances", "3.3")]
  • branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Instances.Orienteering/3.3/Properties/AssemblyInfo.cs.frame

    r11258 r12721  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2727// set of attributes. Change these attribute values to modify the information
    2828// associated with an assembly.
    29 [assembly: AssemblyTitle("HeuristicLab.Problems.Instances.Orienteering-3.3")]
     29[assembly: AssemblyTitle("HeuristicLab.Problems.Instances.Orienteering")]
    3030[assembly: AssemblyDescription("")]
    3131[assembly: AssemblyConfiguration("")]
    3232[assembly: AssemblyCompany("HEAL")]
    3333[assembly: AssemblyProduct("HeuristicLab")]
    34 [assembly: AssemblyCopyright("(c) 2002-2014 HEAL")]
     34[assembly: AssemblyCopyright("(c) 2002-2015 HEAL")]
    3535[assembly: AssemblyTrademark("")]
    3636[assembly: AssemblyCulture("")]
     
    5454// by using the '*' as shown below:
    5555[assembly: AssemblyVersion("3.3.0.0")]
    56 [assembly: AssemblyFileVersion("3.3.10.$WCREV$")]
     56[assembly: AssemblyFileVersion("3.3.11.$WCREV$")]
  • branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Instances.Orienteering/3.3/SchildeInstanceProvider.cs

    r11323 r12721  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2323using System.Collections.Generic;
    2424using System.IO;
     25using System.IO.Compression;
    2526using System.Linq;
    2627using System.Reflection;
    2728using System.Text.RegularExpressions;
    2829using HeuristicLab.Problems.Instances.Types;
    29 using ICSharpCode.SharpZipLib.Zip;
    3030
    3131namespace HeuristicLab.Problems.Instances.Orienteering {
     
    5454      if (String.IsNullOrEmpty(instanceArchiveName)) yield break;
    5555
    56       using (var instanceStream = new ZipInputStream(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)) {
    5858          yield return new OPDataDescriptor(Path.GetFileNameWithoutExtension(entry), GetInstanceDescription(), entry);
    5959        }
     
    6464      var instanceArchiveName = GetResourceName(FileName + @"\.zip");
    6565      var parser = new SchildeParser();
    66       using (var instancesZipFile = new ZipFile(GetType().Assembly.GetManifestResourceStream(instanceArchiveName))) {
     66      using (var instancesZipFile = new ZipArchive(GetType().Assembly.GetManifestResourceStream(instanceArchiveName))) {
    6767        var entry = instancesZipFile.GetEntry(descriptor.InstanceIdentifier);
    68         using (var stream = instancesZipFile.GetInputStream(entry)) {
     68        using (var stream = entry.Open()) {
    6969          parser.Parse(stream);
    7070          var instance = LoadInstance(parser);
     
    109109        .SingleOrDefault(x => Regex.Match(x, @".*\.Data\." + fileName).Success);
    110110    }
    111     protected IEnumerable<string> GetZipContents(ZipInputStream zipFile) {
    112       ZipEntry entry;
    113       while ((entry = zipFile.GetNextEntry()) != null) {
    114         yield return entry.Name;
    115       }
    116     }
     111
    117112    protected virtual string GetInstanceDescription() {
    118113      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  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Instances/3.3/Types/OPData.cs

    r11320 r12721  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * 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  
    1010    <RootNamespace>HeuristicLab.Problems.Orienteering.Views</RootNamespace>
    1111    <AssemblyName>HeuristicLab.Problems.Orienteering.Views-3.3</AssemblyName>
    12     <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
     12    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
    1313    <FileAlignment>512</FileAlignment>
     14    <TargetFrameworkProfile />
    1415  </PropertyGroup>
    1516  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
     
    2122    <ErrorReport>prompt</ErrorReport>
    2223    <WarningLevel>4</WarningLevel>
     24    <Prefer32Bit>false</Prefer32Bit>
    2325  </PropertyGroup>
    2426  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
     
    2931    <ErrorReport>prompt</ErrorReport>
    3032    <WarningLevel>4</WarningLevel>
     33    <Prefer32Bit>false</Prefer32Bit>
    3134  </PropertyGroup>
    3235  <PropertyGroup>
     
    3841  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
    3942    <DebugSymbols>true</DebugSymbols>
    40     <OutputPath>bin\x64\Debug\</OutputPath>
     43    <OutputPath>..\..\bin\</OutputPath>
    4144    <DefineConstants>DEBUG;TRACE</DefineConstants>
    4245    <DebugType>full</DebugType>
     
    4447    <ErrorReport>prompt</ErrorReport>
    4548    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
     49    <Prefer32Bit>false</Prefer32Bit>
    4650  </PropertyGroup>
    4751  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
    48     <OutputPath>bin\x64\Release\</OutputPath>
     52    <OutputPath>..\..\bin\</OutputPath>
    4953    <DefineConstants>TRACE</DefineConstants>
    5054    <Optimize>true</Optimize>
     
    5357    <ErrorReport>prompt</ErrorReport>
    5458    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
     59    <Prefer32Bit>false</Prefer32Bit>
    5560  </PropertyGroup>
    5661  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
    5762    <DebugSymbols>true</DebugSymbols>
    58     <OutputPath>bin\x86\Debug\</OutputPath>
     63    <OutputPath>..\..\bin\</OutputPath>
    5964    <DefineConstants>DEBUG;TRACE</DefineConstants>
    6065    <DebugType>full</DebugType>
     
    6267    <ErrorReport>prompt</ErrorReport>
    6368    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
     69    <Prefer32Bit>false</Prefer32Bit>
    6470  </PropertyGroup>
    6571  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
    66     <OutputPath>bin\x86\Release\</OutputPath>
     72    <OutputPath>..\..\bin\</OutputPath>
    6773    <DefineConstants>TRACE</DefineConstants>
    6874    <Optimize>true</Optimize>
     
    7177    <ErrorReport>prompt</ErrorReport>
    7278    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
     79    <Prefer32Bit>false</Prefer32Bit>
    7380  </PropertyGroup>
    7481  <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>
    7594    <Reference Include="System" />
    7695    <Reference Include="System.Core" />
     
    150169      <Name>HeuristicLab.Problems.Instances-3.3</Name>
    151170    </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>
    152175    <ProjectReference Include="..\..\HeuristicLab.Problems.Orienteering\3.3\HeuristicLab.Problems.Orienteering-3.3.csproj">
    153176      <Project>{D1EFA4CC-909F-41D5-9C1F-C3AF1957A372}</Project>
  • branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering.Views/3.3/OrienteeringProblemView.Designer.cs

    r11245 r12721  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering.Views/3.3/OrienteeringProblemView.cs

    r11327 r12721  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2525
    2626namespace HeuristicLab.Problems.Orienteering.Views {
    27 
    2827  [View("Orienteering Problem View")]
    2928  [Content(typeof(OrienteeringProblem), true)]
     
    3938
    4039    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;
    4746      base.DeregisterContentEvents();
    4847    }
    4948    protected override void RegisterContentEvents() {
    5049      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;
    5756    }
    5857
     
    7877      orienteeringSolutionView.Content.Coordinates = Content.Coordinates;
    7978    }
     79
    8080    private void StartingPointParameter_ValueChanged(object sender, EventArgs e) {
    8181      orienteeringSolutionView.Content.StartingPoint.Value = Content.StartingPoint;
    8282    }
     83
    8384    private void TerminalPointParameter_ValueChanged(object sender, EventArgs e) {
    8485      orienteeringSolutionView.Content.TerminalPoint.Value = Content.TerminalPoint;
    8586    }
     87
    8688    private void ScoresParameter_ValueChanged(object sender, EventArgs e) {
    8789      orienteeringSolutionView.Content.Scores = Content.Scores;
    8890    }
     91
    8992    private void BestKnownQualityParameter_ValueChanged(object sender, EventArgs e) {
    9093      orienteeringSolutionView.Content.Quality = Content.BestKnownQuality;
    9194    }
     95
    9296    private void BestKnownSolutionParameter_ValueChanged(object sender, EventArgs e) {
    9397      orienteeringSolutionView.Content.IntegerVector = Content.BestKnownSolution;
  • branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering.Views/3.3/OrienteeringSolutionView.Designer.cs

    r11329 r12721  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    5252      this.tourViewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost();
    5353      this.splitContainer = new System.Windows.Forms.SplitContainer();
    54       this.qualityGroupBox = 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.penaltyViewHost = 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();
    6060      ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).BeginInit();
    6161      this.tabControl.SuspendLayout();
     
    6767      this.splitContainer.Panel2.SuspendLayout();
    6868      this.splitContainer.SuspendLayout();
    69       this.qualityGroupBox.SuspendLayout();
    70       this.distanceGroupBox.SuspendLayout();
    71       this.penaltyGroupBox.SuspendLayout();
    7269      this.SuspendLayout();
    7370      //
    7471      // pictureBox
    7572      //
    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) 
    7875            | System.Windows.Forms.AnchorStyles.Right)));
    7976      this.pictureBox.BackColor = System.Drawing.Color.White;
     
    8178      this.pictureBox.Location = new System.Drawing.Point(6, 6);
    8279      this.pictureBox.Name = "pictureBox";
    83       this.pictureBox.Size = new System.Drawing.Size(199, 362);
     80      this.pictureBox.Size = new System.Drawing.Size(403, 271);
    8481      this.pictureBox.TabIndex = 0;
    8582      this.pictureBox.TabStop = false;
     
    8986      //
    9087      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) 
    9390            | System.Windows.Forms.AnchorStyles.Right)));
    9491      this.tabControl.Controls.Add(this.visualizationTabPage);
     
    9794      this.tabControl.Name = "tabControl";
    9895      this.tabControl.SelectedIndex = 0;
    99       this.tabControl.Size = new System.Drawing.Size(219, 396);
     96      this.tabControl.Size = new System.Drawing.Size(423, 305);
    10097      this.tabControl.TabIndex = 0;
    10198      //
     
    106103      this.visualizationTabPage.Name = "visualizationTabPage";
    107104      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);
    109106      this.visualizationTabPage.TabIndex = 0;
    110107      this.visualizationTabPage.Text = "Visualization";
     
    124121      // tourGroupBox
    125122      //
    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) 
    128125            | System.Windows.Forms.AnchorStyles.Right)));
    129126      this.tourGroupBox.Controls.Add(this.tourViewHost);
     
    137134      // tourViewHost
    138135      //
    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) 
    141138            | System.Windows.Forms.AnchorStyles.Right)));
    142139      this.tourViewHost.Caption = "View";
     
    157154      this.splitContainer.Location = new System.Drawing.Point(0, 0);
    158155      this.splitContainer.Name = "splitContainer";
     156      this.splitContainer.Orientation = System.Windows.Forms.Orientation.Horizontal;
    159157      //
    160158      // splitContainer.Panel1
    161159      //
    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);
    165166      this.splitContainer.Panel1.Margin = new System.Windows.Forms.Padding(0, 0, 5, 0);
    166167      this.splitContainer.Panel1MinSize = 0;
     
    170171      this.splitContainer.Panel2.Controls.Add(this.tabControl);
    171172      this.splitContainer.Size = new System.Drawing.Size(423, 402);
    172       this.splitContainer.SplitterDistance = 200;
     173      this.splitContainer.SplitterDistance = 87;
    173174      this.splitContainer.TabIndex = 0;
    174175      //
    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:";
    252241      //
    253242      // OrienteeringSolutionView
     
    263252      this.tourGroupBox.ResumeLayout(false);
    264253      this.splitContainer.Panel1.ResumeLayout(false);
     254      this.splitContainer.Panel1.PerformLayout();
    265255      this.splitContainer.Panel2.ResumeLayout(false);
    266256      ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).EndInit();
    267257      this.splitContainer.ResumeLayout(false);
    268       this.qualityGroupBox.ResumeLayout(false);
    269       this.distanceGroupBox.ResumeLayout(false);
    270       this.penaltyGroupBox.ResumeLayout(false);
    271258      this.ResumeLayout(false);
    272259
     
    282269    private HeuristicLab.MainForm.WindowsForms.ViewHost tourViewHost;
    283270    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;
    290277  }
    291278}
  • branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering.Views/3.3/OrienteeringSolutionView.cs

    r11329 r12721  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2828
    2929namespace HeuristicLab.Problems.Orienteering.Views {
    30 
    3130  [View("OrienteeringSolution View")]
    3231  [Content(typeof(OrienteeringSolution), true)]
     
    4140
    4241    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;
    5150      base.DeregisterContentEvents();
    5251    }
    5352    protected override void RegisterContentEvents() {
    5453      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;
    6362    }
    6463
     
    6665      base.OnContentChanged();
    6766      if (Content == null) {
    68         qualityViewHost.Content = null;
    69         penaltyViewHost.Content = null;
    70         distanceViewHost.Content = null;
     67        qualityValueView.Content = null;
     68        penaltyValueView.Content = null;
     69        distanceValueView.Content = null;
    7170        splitContainer.Panel1Collapsed = true;
    7271        pictureBox.Image = null;
    7372        tourViewHost.Content = null;
    7473      } else {
    75         qualityViewHost.Content = Content.Quality;
    76         penaltyViewHost.Content = Content.Penalty;
    77         distanceViewHost.Content = Content.Distance;
     74        qualityValueView.Content = Content.Quality;
     75        penaltyValueView.Content = Content.Penalty;
     76        distanceValueView.Content = Content.Distance;
    7877        SetPanelCollapsing();
    7978        GenerateImage();
     
    8483    protected override void SetEnabledStateOfControls() {
    8584      base.SetEnabledStateOfControls();
    86       qualityGroupBox.Enabled = Content != null;
    87       penaltyGroupBox.Enabled = Content != null;
    88       distanceGroupBox.Enabled = Content != null;
     85      qualityValueView.Enabled = Content != null;
     86      penaltyValueView.Enabled = Content != null;
     87      distanceValueView.Enabled = Content != null;
    8988      pictureBox.Enabled = Content != null;
    9089      tourGroupBox.Enabled = Content != null;
     
    164163
    165164    private void SetPanelCollapsing() {
    166       splitContainer.Panel1Collapsed = qualityViewHost.Content == null && penaltyViewHost.Content == null && distanceViewHost.Content == null;
     165      splitContainer.Panel1Collapsed = qualityValueView.Content == null && penaltyValueView.Content == null && distanceValueView.Content == null;
    167166    }
    168167
    169168    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;
    174172        SetPanelCollapsing();
    175173      }
    176174    }
    177175    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;
    182179        GenerateImage();
    183180        SetPanelCollapsing();
     
    186183
    187184    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
    195192    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
    201197    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
    207202    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
    213207    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
    219212    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);
    222214      else {
    223215        GenerateImage();
  • branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering.Views/3.3/Plugin.cs.frame

    r11307 r12721  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2626  /// Plugin class for HeuristicLab.Problems.Orienteering.Views.
    2727  /// </summary>
    28   [Plugin("HeuristicLab.Problems.Orienteering.Views", "3.3.10.$WCREV$")]
     28  [Plugin("HeuristicLab.Problems.Orienteering.Views", "3.3.11.$WCREV$")]
    2929  [PluginFile("HeuristicLab.Problems.Orienteering.Views-3.3.dll", PluginFileType.Assembly)]
    3030  [PluginDependency("HeuristicLab.Common", "3.3")]
  • branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering.Views/3.3/Properties/AssemblyInfo.cs.frame

    r11188 r12721  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    3131[assembly: AssemblyCompany("")]
    3232[assembly: AssemblyProduct("HeuristicLab")]
    33 [assembly: AssemblyCopyright("(c) 2002-2014 HEAL")]
     33[assembly: AssemblyCopyright("(c) 2002-2015 HEAL")]
    3434[assembly: AssemblyTrademark("")]
    3535[assembly: AssemblyCulture("")]
     
    5353// by using the '*' as shown below:
    5454[assembly: AssemblyVersion("3.3.0.0")]
    55 [assembly: AssemblyFileVersion("3.3.10.$WCREV$")]
     55[assembly: AssemblyFileVersion("3.3.11.$WCREV$")]
  • branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3

    • Property svn:ignore
      •  

        old new  
        22obj
        33Plugin.cs
         4*.DotSettings
  • branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/Analyzers/BestOrienteeringSolutionAnalyzer.cs

    r12693 r12721  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    3131
    3232namespace HeuristicLab.Problems.Orienteering {
    33   public sealed class BestOrienteeringSolutionAnalyser : SingleSuccessorOperator, IAnalyzer {
     33  public sealed class BestOrienteeringSolutionAnalyzer : SingleSuccessorOperator, IAnalyzer {
    3434    public bool EnabledByDefault {
    3535      get { return true; }
     
    7878
    7979    [StorableConstructor]
    80     private BestOrienteeringSolutionAnalyser(bool deserializing) : base(deserializing) { }
    81     private BestOrienteeringSolutionAnalyser(BestOrienteeringSolutionAnalyser original, Cloner cloner) : base(original, cloner) { }
     80    private BestOrienteeringSolutionAnalyzer(bool deserializing) : base(deserializing) { }
     81    private BestOrienteeringSolutionAnalyzer(BestOrienteeringSolutionAnalyzer original, Cloner cloner) : base(original, cloner) { }
    8282    public override IDeepCloneable Clone(Cloner cloner) {
    83       return new BestOrienteeringSolutionAnalyser(this, cloner);
     83      return new BestOrienteeringSolutionAnalyzer(this, cloner);
    8484    }
    85     public BestOrienteeringSolutionAnalyser()
     85    public BestOrienteeringSolutionAnalyzer()
    8686      : base() {
    8787      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  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    3030
    3131namespace 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.")]
    3741  [StorableClass]
    3842  public sealed class GreedyOrienteeringTourCreator : IntegerVectorCreator, IOrienteeringSolutionCreator {
     
    8084    }
    8185
    82     protected override IntegerVector Create(IRandom _, IntValue __, IntMatrix ___) {
     86    protected override IntegerVector Create(IRandom random, IntValue length, IntMatrix bounds) {
    8387      int startPoint = StartingPointParameter.ActualValue.Value;
    8488      int endPoint = TerminalPointParameter.ActualValue.Value;
     
    105109        endPoint
    106110      };
    107       double length = distances[startPoint, endPoint];
     111      double tourLength = distances[startPoint, endPoint];
    108112
    109113      // Add points in a greedy way
     
    118122
    119123            // If the insertion would be feasible, perform it
    120             if (length + detour <= maxDistance) {
     124            if (tourLength + detour <= maxDistance) {
    121125              tour.Insert(insertPosition, feasiblePoints[i]);
    122               length += detour;
     126              tourLength += detour;
    123127              feasiblePoints.RemoveAt(i);
    124128              insertionPerformed = true;
  • branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/DistanceMatrix.cs

    r11320 r12721  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/Evaluators/OrienteeringEvaluator.cs

    r11327 r12721  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    3030
    3131namespace HeuristicLab.Problems.Orienteering {
     32  [Item("OrienteeringEvaluator", "Operator to evaluate a solution to the orienteering problem.")]
     33  [StorableClass]
    3234  public class OrienteeringEvaluator : InstrumentedOperator, IOrienteeringEvaluator {
    3335
     
    8284    }
    8385
    84     public static OrienteeringEvaluation Apply(IntegerVector solution, DoubleArray scores,
     86    public static OrienteeringEvaluationResult Apply(IntegerVector solution, DoubleArray scores,
    8587      DistanceMatrix distances, double maximumDistance, double pointVisitingCosts, double distancePenaltyFactor) {
    8688
     
    9597      double quality = score - penalty;
    9698
    97       return new OrienteeringEvaluation {
     99      return new OrienteeringEvaluationResult {
    98100        Quality = new DoubleValue(quality),
    99101        Penalty = new DoubleValue(penalty),
     
    113115    }
    114116
    115     public OrienteeringEvaluation Evaluate(IntegerVector solution, DoubleArray scores,
     117    public OrienteeringEvaluationResult Evaluate(IntegerVector solution, DoubleArray scores,
    116118      DistanceMatrix distances, double maximumDistance, double pointVisitingCosts) {
    117119      return Apply(solution, scores, distances, maximumDistance, pointVisitingCosts,
  • branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/HeuristicLab.Problems.Orienteering-3.3.csproj

    r11327 r12721  
    1010    <RootNamespace>HeuristicLab.Problems.Orienteering</RootNamespace>
    1111    <AssemblyName>HeuristicLab.Problems.Orienteering-3.3</AssemblyName>
    12     <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
     12    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
    1313    <FileAlignment>512</FileAlignment>
     14    <TargetFrameworkProfile />
    1415  </PropertyGroup>
    1516  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
     
    2122    <ErrorReport>prompt</ErrorReport>
    2223    <WarningLevel>4</WarningLevel>
     24    <Prefer32Bit>false</Prefer32Bit>
    2325  </PropertyGroup>
    2426  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
     
    2931    <ErrorReport>prompt</ErrorReport>
    3032    <WarningLevel>4</WarningLevel>
     33    <Prefer32Bit>false</Prefer32Bit>
    3134  </PropertyGroup>
    3235  <PropertyGroup>
     
    4144  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
    4245    <DebugSymbols>true</DebugSymbols>
    43     <OutputPath>bin\x64\Debug\</OutputPath>
     46    <OutputPath>..\..\bin\</OutputPath>
    4447    <DefineConstants>DEBUG;TRACE</DefineConstants>
    4548    <DebugType>full</DebugType>
     
    4750    <ErrorReport>prompt</ErrorReport>
    4851    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
     52    <Prefer32Bit>false</Prefer32Bit>
    4953  </PropertyGroup>
    5054  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
    51     <OutputPath>bin\x64\Release\</OutputPath>
     55    <OutputPath>..\..\bin\</OutputPath>
    5256    <DefineConstants>TRACE</DefineConstants>
    5357    <Optimize>true</Optimize>
     
    5660    <ErrorReport>prompt</ErrorReport>
    5761    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
     62    <Prefer32Bit>false</Prefer32Bit>
    5863  </PropertyGroup>
    5964  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
    6065    <DebugSymbols>true</DebugSymbols>
    61     <OutputPath>bin\x86\Debug\</OutputPath>
     66    <OutputPath>..\..\bin\</OutputPath>
    6267    <DefineConstants>DEBUG;TRACE</DefineConstants>
    6368    <DebugType>full</DebugType>
     
    6570    <ErrorReport>prompt</ErrorReport>
    6671    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
     72    <Prefer32Bit>false</Prefer32Bit>
    6773  </PropertyGroup>
    6874  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
    69     <OutputPath>bin\x86\Release\</OutputPath>
     75    <OutputPath>..\..\bin\</OutputPath>
    7076    <DefineConstants>TRACE</DefineConstants>
    7177    <Optimize>true</Optimize>
     
    7480    <ErrorReport>prompt</ErrorReport>
    7581    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
     82    <Prefer32Bit>false</Prefer32Bit>
    7683  </PropertyGroup>
    7784  <ItemGroup>
     
    8289  </ItemGroup>
    8390  <ItemGroup>
    84     <Compile Include="Analyzers\BestOrienteeringSolutionAnalyser.cs" />
     91    <Compile Include="Analyzers\BestOrienteeringSolutionAnalyzer.cs" />
    8592    <Compile Include="Creators\GreedyOrienteeringTourCreator.cs" />
    8693    <Compile Include="DistanceMatrix.cs" />
    87     <Compile Include="OrienteeringEvaluation.cs" />
     94    <Compile Include="OrienteeringEvaluationResult.cs" />
    8895    <Compile Include="Improvers\OrienteeringLocalImprovementOperator.cs" />
    8996    <Compile Include="Interfaces\IOrienteeringEvaluator.cs" />
     
    9198    <Compile Include="Interfaces\IOrienteeringSolutionCreator.cs" />
    9299    <Compile Include="OrienteeringProblem.cs" />
    93     <Compile Include="OrienteeringScript.cs" />
    94100    <Compile Include="OrienteeringSolution.cs" />
    95101    <Compile Include="Plugin.cs" />
  • branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/Improvers/OrienteeringLocalImprovementOperator.cs

    r11323 r12721  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2020#endregion
    2121
    22 using System;
    2322using System.Collections.Generic;
    2423using System.Linq;
     
    3332
    3433namespace 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.")]
    3840  [StorableClass]
    3941  public sealed class OrienteeringLocalImprovementOperator : SingleSuccessorOperator, ILocalImprovementOperator {
     
    125127      bool useMaxBlockLength = UseMaximumBlockLengthParmeter.Value.Value;
    126128
    127       bool optimizationDone = true;
     129      bool solutionChanged = true;
    128130
    129131      var tour = IntegerVectorParameter.ActualValue.ToList();
     
    137139
    138140      // 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;
    141143
    142144        if (localIterations.Value == 0)
     
    152154        IncludeNewPoints(tour, visitablePoints,
    153155          distances, pointVisitingCosts, maxLength, scores,
    154           ref tourLength, ref tourScore, ref evaluations, ref optimizationDone);
     156          ref tourLength, ref tourScore, ref evaluations, ref solutionChanged);
    155157
    156158        // Determine if any of the visitable points can take the place of an already visited point in the tour to improve the scores
    157159        ReplacePoints(tour, visitablePoints,
    158160          distances, maxLength, scores,
    159           ref tourLength, ref tourScore, ref evaluations, ref optimizationDone);
     161          ref tourLength, ref tourScore, ref evaluations, ref solutionChanged);
    160162
    161163        localIterations.Value++;
     
    173175
    174176    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;
    176178      int pathSize = tour.Count;
    177179      maxBlockLength = (useMaxBlockLength && (pathSize > maxBlockLength + 1)) ? maxBlockLength : (pathSize - 2);
    178180
    179181      // Perform a 2-opt
    180       while (optimizationDone) {
    181         optimizationDone = false;
     182      do {
     183        solutionChanged = false;
    182184
    183185        for (int blockLength = 2; blockLength < maxBlockLength; blockLength++) {
    184186          // If an optimization has been done, start from the beginning
    185           if (optimizationDone) break;
     187          if (solutionChanged) break;
    186188
    187189          for (int position = 1; position < (pathSize - blockLength); position++) {
    188190            // If an optimization has been done, start from the beginning
    189             if (optimizationDone) break;
     191            if (solutionChanged) break;
    190192
    191193            evaluations++;
     
    198200            newLength += distances[tour[position], tour[position + blockLength]];
    199201
    200             if (newLength < tourLength - 0.00001) { // Avoid cycling caused by precision
     202            if (newLength < tourLength - 0.00001) {
     203              // Avoid cycling caused by precision
    201204              var reversePart = tour.GetRange(position, blockLength).AsEnumerable().Reverse();
    202205
     
    207210
    208211              // Re-run the optimization
    209               optimizationDone = true;
     212              solutionChanged = true;
    210213            }
    211214          }
    212215        }
    213       }
    214     }
     216      } while (solutionChanged);
     217    }
     218
    215219    private void IncludeNewPoints(List<int> tour, List<int> visitablePoints,
    216220      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) {
    218222
    219223      for (int tourPosition = 1; tourPosition < tour.Count; tourPosition++) {
    220224        // If an optimization has been done, start from the beginning
    221         if (optimizationDone) break;
     225        if (solutionChanged) break;
    222226
    223227        for (int i = 0; i < visitablePoints.Count; i++) {
    224228          // If an optimization has been done, start from the beginning
    225           if (optimizationDone) break;
     229          if (solutionChanged) break;
    226230
    227231          evaluations++;
     
    239243
    240244            // Re-run this optimization
    241             optimizationDone = true;
     245            solutionChanged = true;
    242246          }
    243247        }
    244248      }
    245249    }
     250
    246251    private void ReplacePoints(List<int> tour, List<int> visitablePoints,
    247252      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) {
    249254
    250255      for (int tourPosition = 1; tourPosition < tour.Count - 1; tourPosition++) {
    251256        // If an optimization has been done, start from the beginning
    252         if (optimizationDone) break;
     257        if (solutionChanged) break;
    253258
    254259        for (int i = 0; i < visitablePoints.Count; i++) {
    255260          // If an optimization has been done, start from the beginning
    256           if (optimizationDone) break;
     261          if (solutionChanged) break;
    257262
    258263          evaluations++;
     
    274279
    275280            // Re-run this optimization
    276             optimizationDone = true;
     281            solutionChanged = true;
    277282          }
    278283        }
  • branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/Interfaces/IOrienteeringEvaluator.cs

    r11327 r12721  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    3434    ILookupParameter<DoubleValue> PenaltyParameter { get; }
    3535
    36     OrienteeringEvaluation Evaluate(IntegerVector solution, DoubleArray scores,
     36    OrienteeringEvaluationResult Evaluate(IntegerVector solution, DoubleArray scores,
    3737      DistanceMatrix distances, double maximumDistance, double pointVisitingCosts);
    3838  }
  • branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/Interfaces/IOrienteeringSolutionCreator.cs

    r11321 r12721  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * 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
    122using HeuristicLab.Data;
    223
    324namespace HeuristicLab.Problems.Orienteering {
    4   public class OrienteeringEvaluation {
     25  public class OrienteeringEvaluationResult {
    526    public DoubleValue Quality;
    627    public DoubleValue Penalty;
  • branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/OrienteeringProblem.cs

    r11328 r12721  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    3434
    3535namespace 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)]
    3938  [StorableClass]
    4039  public sealed class OrienteeringProblem
     
    106105      set { BestKnownSolutionParameter.Value = value; }
    107106    }
    108     private BestOrienteeringSolutionAnalyser BestOrienteeringSolutionAnalyser {
    109       get { return Operators.OfType<BestOrienteeringSolutionAnalyser>().SingleOrDefault(); }
     107    private BestOrienteeringSolutionAnalyzer BestOrienteeringSolutionAnalyser {
     108      get { return Operators.OfType<BestOrienteeringSolutionAnalyzer>().SingleOrDefault(); }
    110109    }
    111110    #endregion
     
    268267    }
    269268    private void InitializeOperators() {
    270       Operators.Add(new BestOrienteeringSolutionAnalyser());
     269      Operators.Add(new BestOrienteeringSolutionAnalyzer());
    271270      ParameterizeAnalyzer();
    272271
  • 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
    122using System;
    223using System.Drawing;
  • branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/Plugin.cs.frame

    r11307 r12721  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2626  /// Plugin class for HeuristicLab.Problems.Orienteering.
    2727  /// </summary>
    28   [Plugin("HeuristicLab.Problems.Orienteering", "3.3.10.$WCREV$")]
     28  [Plugin("HeuristicLab.Problems.Orienteering", "3.3.11.$WCREV$")]
    2929  [PluginFile("HeuristicLab.Problems.Orienteering-3.3.dll", PluginFileType.Assembly)]
    3030  [PluginDependency("HeuristicLab.Analysis", "3.3")]
  • branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/Properties/AssemblyInfo.cs.frame

    r11185 r12721  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    3131[assembly: AssemblyCompany("")]
    3232[assembly: AssemblyProduct("HeuristicLab")]
    33 [assembly: AssemblyCopyright("(c) 2002-2014 HEAL")]
     33[assembly: AssemblyCopyright("(c) 2002-2015 HEAL")]
    3434[assembly: AssemblyTrademark("")]
    3535[assembly: AssemblyCulture("")]
     
    5353// by using the '*' as shown below:
    5454[assembly: AssemblyVersion("3.3.0.0")]
    55 [assembly: AssemblyFileVersion("3.3.10.$WCREV$")]
     55[assembly: AssemblyFileVersion("3.3.11.$WCREV$")]
  • branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/Shakers/OrienteeringShakingOperator.cs

    r11320 r12721  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    3232
    3333namespace 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.")]
    4750  [StorableClass]
    4851  public sealed class OrienteeringShakingOperator : SingleSuccessorOperator, IMultiNeighborhoodShakingOperator, IStochasticOperator {
     
    131134        int maximumNeighborhood = initialTour.Length - 2; // neighborhood limit within [0, changable tour length - 1)
    132135        maximumNeighborhood = (maximumNeighborhood > currentNeighborhood) ? currentNeighborhood : maximumNeighborhood;
    133         int neighborhood = maximumNeighborhood;//random.Next(maximumNeighborhood) + 1;
     136        int neighborhood = maximumNeighborhood;
    134137
    135138        // Find all points that are not yet included in the tour and are
     
    165168      return base.Apply();
    166169    }
     170
    167171    private void InsertPoints(List<int> actualTour, IntegerVector initialTour,
    168172      int neighborhood, List<int> visitablePoints, IRandom random) {
     
    208212      }
    209213    }
     214
    210215    private void CleanupTour(List<int> actualTour, DistanceMatrix distances, double maxDistance, double pointVisitingCosts) {
    211216      // Sort the points on the tour according to their costs savings when removed
     
    235240      }
    236241    }
    237     //
     242
    238243    private class SavingInfo {
    239244      public int Index;
  • branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Tests/HeuristicLab-3.3/Samples/VnsOpSampleTest.cs

    r12694 r12721  
    2222using System.IO;
    2323using System.Linq;
    24 using HeuristicLab.Algorithms.LocalSearch;
    2524using HeuristicLab.Algorithms.VariableNeighborhoodSearch;
    2625using HeuristicLab.Data;
    27 using HeuristicLab.Encodings.PermutationEncoding;
     26using HeuristicLab.Encodings.IntegerVectorEncoding;
    2827using HeuristicLab.Persistence.Default.Xml;
    29 using HeuristicLab.Problems.TravelingSalesman;
     28using HeuristicLab.Problems.Orienteering;
    3029using Microsoft.VisualStudio.TestTools.UnitTesting;
    3130
    3231namespace HeuristicLab.Tests {
    3332  [TestClass]
    34   public class VnsTspSampleTest {
    35     private const string SampleFileName = "VNS_TSP";
     33  public class VnsOpSampleTest {
     34    private const string SampleFileName = "VNS_OP";
    3635
    3736    [TestMethod]
     
    5049      vns.SetSeedRandomly = false;
    5150      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"));
    5655    }
    5756
     
    5958      VariableNeighborhoodSearch vns = new VariableNeighborhoodSearch();
    6059      #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[] {
     630, 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
    6464      });
    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 }
    6767      });
    68       tspProblem.BestKnownQuality = new DoubleValue(867);
     68      opProblem.MaximumDistance = 70;
     69      opProblem.PointVisitingCosts = 0;
     70      opProblem.Scores = new DoubleArray(new double[] {
     710, 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;
    6975
    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.";
    7578      #endregion
    7679      #region Algorithm Configuration
    7780      vns.Name = "Variable Neighborhood Search - TSP";
    7881      vns.Description = "A variable neighborhood search algorithm which solves a funny TSP instance";
    79       vns.Problem = tspProblem;
     82      vns.Problem = opProblem;
    8083
    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;
    9886      vns.MaximumIterations = 25;
    9987      vns.Seed = 0;
    10088      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();
    11190      #endregion
    11291      vns.Engine = new ParallelEngine.ParallelEngine();
  • branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Tests/HeuristicLab.Tests.csproj

    r12694 r12721  
    422422    <Compile Include="HeuristicLab-3.3\PluginDependenciesTest.cs" />
    423423    <Compile Include="HeuristicLab-3.3\PluginLoader.cs" />
     424    <Compile Include="HeuristicLab-3.3\Samples\VnsOpSampleTest.cs" />
    424425    <Compile Include="HeuristicLab-3.3\Samples\EsGriewankSampleTest.cs" />
    425426    <Compile Include="HeuristicLab-3.3\Samples\GaussianProcessRegressionSampleTest.cs" />
Note: See TracChangeset for help on using the changeset viewer.