Index: /trunk/sources/HeuristicLab 3.3.sln
===================================================================
--- /trunk/sources/HeuristicLab 3.3.sln	(revision 5425)
+++ /trunk/sources/HeuristicLab 3.3.sln	(revision 5426)
@@ -327,4 +327,6 @@
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.ParallelEngine-3.3", "HeuristicLab.ParallelEngine\3.3\HeuristicLab.ParallelEngine-3.3.csproj", "{00814351-4AB8-4088-9B99-F62787B89E93}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Algorithms.ParticleSwarmOptimization-3.3", "HeuristicLab.Algorithms.ParticleSwarmOptimization\3.3\HeuristicLab.Algorithms.ParticleSwarmOptimization-3.3.csproj", "{2C429157-9C34-4DD3-9D5F-B444B751E39A}"
 EndProject
 Global
@@ -1481,4 +1483,16 @@
 		{00814351-4AB8-4088-9B99-F62787B89E93}.Release|x86.ActiveCfg = Release|x86
 		{00814351-4AB8-4088-9B99-F62787B89E93}.Release|x86.Build.0 = Release|x86
+		{2C429157-9C34-4DD3-9D5F-B444B751E39A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{2C429157-9C34-4DD3-9D5F-B444B751E39A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{2C429157-9C34-4DD3-9D5F-B444B751E39A}.Debug|x64.ActiveCfg = Debug|x64
+		{2C429157-9C34-4DD3-9D5F-B444B751E39A}.Debug|x64.Build.0 = Debug|x64
+		{2C429157-9C34-4DD3-9D5F-B444B751E39A}.Debug|x86.ActiveCfg = Debug|x86
+		{2C429157-9C34-4DD3-9D5F-B444B751E39A}.Debug|x86.Build.0 = Debug|x86
+		{2C429157-9C34-4DD3-9D5F-B444B751E39A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{2C429157-9C34-4DD3-9D5F-B444B751E39A}.Release|Any CPU.Build.0 = Release|Any CPU
+		{2C429157-9C34-4DD3-9D5F-B444B751E39A}.Release|x64.ActiveCfg = Release|x64
+		{2C429157-9C34-4DD3-9D5F-B444B751E39A}.Release|x64.Build.0 = Release|x64
+		{2C429157-9C34-4DD3-9D5F-B444B751E39A}.Release|x86.ActiveCfg = Release|x86
+		{2C429157-9C34-4DD3-9D5F-B444B751E39A}.Release|x86.Build.0 = Release|x86
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
Index: /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/BestPointInitializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/BestPointInitializer.cs	(revision 5426)
+++ /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/BestPointInitializer.cs	(revision 5426)
@@ -0,0 +1,109 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.RealVectorEncoding;
+using HeuristicLab.Operators;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Algorithms.ParticleSwarmOptimization {
+
+  [Item("Best Point Initializer", "Determines the best quality and point of the current particle population.")]
+  [StorableClass]
+  public class BestPointInitializer : SingleSuccessorOperator {
+
+    #region Parameter properties
+    public IScopeTreeLookupParameter<DoubleValue> QualityParameter {
+      get { return (IScopeTreeLookupParameter<DoubleValue>)Parameters["Quality"]; }
+    }
+    public ILookupParameter<DoubleValue> BestQualityParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["BestQuality"]; }
+    }
+    public IScopeTreeLookupParameter<RealVector> PointParameter {
+      get { return (IScopeTreeLookupParameter<RealVector>)Parameters["Point"]; }
+    }
+    public ILookupParameter<RealVector> BestPointParameter {
+      get { return (ILookupParameter<RealVector>)Parameters["BestPoint"]; }
+    }
+    public IValueLookupParameter<BoolValue> MaximizationParameter {
+      get { return (IValueLookupParameter<BoolValue>)Parameters["Maximization"]; }
+    }
+    #endregion
+
+    #region Parameter values
+    public ItemArray<DoubleValue> Quality {
+      get { return QualityParameter.ActualValue; }
+    }
+    public double BestQuality {
+      get { return BestQualityParameter.ActualValue.Value; }
+      set { BestQualityParameter.ActualValue = new DoubleValue(value); }
+    }
+    public ItemArray<RealVector> Point {
+      get { return PointParameter.ActualValue; }
+    }
+    public RealVector BestPoint {
+      get { return BestPointParameter.ActualValue; }
+      set { BestPointParameter.ActualValue = value; }
+    }
+    public bool Maximization {
+      get { return MaximizationParameter.ActualValue.Value; }
+    }
+    #endregion
+
+    #region Construction & Cloning
+
+    [StorableConstructor]
+    protected BestPointInitializer(bool deserializing) : base(deserializing) { }
+    protected BestPointInitializer(BestPointInitializer original, Cloner cloner)
+      : base(original, cloner) {
+    }
+
+    public BestPointInitializer()
+      : base() {
+      Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("Quality", "Particle's quality"));
+      Parameters.Add(new LookupParameter<DoubleValue>("BestQuality", "Global best particle quality"));
+      Parameters.Add(new ScopeTreeLookupParameter<RealVector>("Point", "Particle's position"));
+      Parameters.Add(new LookupParameter<RealVector>("BestPoint", "Globa best particle position"));
+      Parameters.Add(new ValueLookupParameter<BoolValue>("Maximization", "True if the problem is a maximization problem, otherwise false."));
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new BestPointInitializer(this, cloner);
+    }
+
+    #endregion
+
+    public override IOperation Apply() {
+      BestQuality = Maximization ? Quality.Max(v => v.Value) : Quality.Min(v => v.Value);
+      int bestIndex = Quality.FindIndex(v => v.Value == BestQuality);
+      BestPoint = (RealVector)Point[bestIndex].Clone();
+      return base.Apply();
+    }
+
+    public override bool CanChangeName {
+      get { return false; }
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/HeuristicLab.Algorithms.ParticleSwarmOptimization-3.3.csproj
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/HeuristicLab.Algorithms.ParticleSwarmOptimization-3.3.csproj	(revision 5426)
+++ /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/HeuristicLab.Algorithms.ParticleSwarmOptimization-3.3.csproj	(revision 5426)
@@ -0,0 +1,232 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>9.0.30729</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{2C429157-9C34-4DD3-9D5F-B444B751E39A}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>HeuristicLab.Algorithms.ParticleSwarmOptimization</RootNamespace>
+    <AssemblyName>HeuristicLab.Algorithms.ParticleSwarmOptimization-3.3</AssemblyName>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <SignAssembly>true</SignAssembly>
+    <AssemblyOriginatorKeyFile>HeuristicLab.snk</AssemblyOriginatorKeyFile>
+    <FileUpgradeFlags>
+    </FileUpgradeFlags>
+    <OldToolsVersion>3.5</OldToolsVersion>
+    <UpgradeBackupLocation />
+    <PublishUrl>publish\</PublishUrl>
+    <Install>true</Install>
+    <InstallFrom>Disk</InstallFrom>
+    <UpdateEnabled>false</UpdateEnabled>
+    <UpdateMode>Foreground</UpdateMode>
+    <UpdateInterval>7</UpdateInterval>
+    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+    <UpdatePeriodically>false</UpdatePeriodically>
+    <UpdateRequired>false</UpdateRequired>
+    <MapFileExtensions>true</MapFileExtensions>
+    <ApplicationRevision>0</ApplicationRevision>
+    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+    <IsWebBootstrapper>false</IsWebBootstrapper>
+    <UseApplicationTrust>false</UseApplicationTrust>
+    <BootstrapperEnabled>true</BootstrapperEnabled>
+    <TargetFrameworkProfile />
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\x86\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+    <OutputPath>bin\x86\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\x64\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+    <OutputPath>bin\x64\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Xml.Linq">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data.DataSetExtensions">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="BestPointInitializer.cs" />
+    <Compile Include="IDiscreteDoubleMatrixModifier.cs" />
+    <Compile Include="IGlobalParticleUpdater.cs" />
+    <Compile Include="ILocalParticleUpdater.cs" />
+    <Compile Include="MultiPSOTopologyUpdater.cs" />
+    <Compile Include="VelocityBoundsModifier.cs" />
+    <Compile Include="RandomTopologyInitializer.cs" />
+    <Compile Include="VonNeumannTopologyInitializer.cs" />
+    <Compile Include="RingTopologyInitializer.cs" />
+    <Compile Include="ITopologyUpdater.cs" />
+    <Compile Include="NeighborUpdater.cs" />
+    <Compile Include="TopologyInitializer.cs" />
+    <Compile Include="ITopologyInitializer.cs" />
+    <Compile Include="NeighborhoodParticleUpdater.cs" />
+    <Compile Include="IParticleUpdater.cs" />
+    <Compile Include="TotallyConnectedParticleUpdater.cs" />
+    <Compile Include="HeuristicLabAlgorithmsParticleSwarmOptimizationPlugin.cs" />
+    <Compile Include="ParticleSwarmOptimization.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="ParticleUpdater.cs" />
+    <Compile Include="SwarmUpdater.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="HeuristicLab.snk" />
+    <None Include="HeuristicLabAlgorithmsParticleSwarmOptimizationPlugin.cs.frame" />
+    <None Include="Properties\AssemblyInfo.frame" />
+  </ItemGroup>
+  <ItemGroup>
+    <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
+      <Install>false</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.5 SP1</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
+      <Visible>False</Visible>
+      <ProductName>Windows Installer 3.1</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\HeuristicLab.Analysis\3.3\HeuristicLab.Analysis-3.3.csproj">
+      <Project>{887425B4-4348-49ED-A457-B7D2C26DDBF9}</Project>
+      <Name>HeuristicLab.Analysis-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Collections\3.3\HeuristicLab.Collections-3.3.csproj">
+      <Project>{958B43BC-CC5C-4FA2-8628-2B3B01D890B6}</Project>
+      <Name>HeuristicLab.Collections-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj">
+      <Project>{A9AD58B9-3EF9-4CC1-97E5-8D909039FF5C}</Project>
+      <Name>HeuristicLab.Common-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Core\3.3\HeuristicLab.Core-3.3.csproj">
+      <Project>{C36BD924-A541-4A00-AFA8-41701378DDC5}</Project>
+      <Name>HeuristicLab.Core-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Data\3.3\HeuristicLab.Data-3.3.csproj">
+      <Project>{BBAB9DF5-5EF3-4BA8-ADE9-B36E82114937}</Project>
+      <Name>HeuristicLab.Data-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Encodings.IntegerVectorEncoding\3.3\HeuristicLab.Encodings.IntegerVectorEncoding-3.3.csproj">
+      <Project>{DDFB14DD-2A85-493C-A52D-E69729BBAEB0}</Project>
+      <Name>HeuristicLab.Encodings.IntegerVectorEncoding-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Encodings.RealVectorEncoding\3.3\HeuristicLab.Encodings.RealVectorEncoding-3.3.csproj">
+      <Project>{BB6D334A-4BB6-4674-9883-31A6EBB32CAB}</Project>
+      <Name>HeuristicLab.Encodings.RealVectorEncoding-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Operators\3.3\HeuristicLab.Operators-3.3.csproj">
+      <Project>{23DA7FF4-D5B8-41B6-AA96-F0561D24F3EE}</Project>
+      <Name>HeuristicLab.Operators-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Optimization.Operators\3.3\HeuristicLab.Optimization.Operators-3.3.csproj">
+      <Project>{25087811-F74C-4128-BC86-8324271DA13E}</Project>
+      <Name>HeuristicLab.Optimization.Operators-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Optimization\3.3\HeuristicLab.Optimization-3.3.csproj">
+      <Project>{14AB8D24-25BC-400C-A846-4627AA945192}</Project>
+      <Name>HeuristicLab.Optimization-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Parameters\3.3\HeuristicLab.Parameters-3.3.csproj">
+      <Project>{56F9106A-079F-4C61-92F6-86A84C2D84B7}</Project>
+      <Name>HeuristicLab.Parameters-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Persistence\3.3\HeuristicLab.Persistence-3.3.csproj">
+      <Project>{102BC7D3-0EF9-439C-8F6D-96FF0FDB8E1B}</Project>
+      <Name>HeuristicLab.Persistence-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\3.3\HeuristicLab.PluginInfrastructure-3.3.csproj">
+      <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>
+      <Name>HeuristicLab.PluginInfrastructure-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Random\3.3\HeuristicLab.Random-3.3.csproj">
+      <Project>{F4539FB6-4708-40C9-BE64-0A1390AEA197}</Project>
+      <Name>HeuristicLab.Random-3.3</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+  <PropertyGroup>
+    <PreBuildEvent>set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
+set ProjectDir=$(ProjectDir)
+set SolutionDir=$(SolutionDir)
+set Outdir=$(Outdir)
+
+call PreBuildEvent.cmd
+SubWCRev "%25ProjectDir%25\" "%25ProjectDir%25\HeuristicLabAlgorithmsParticleSwarmOptimizationPlugin.cs.frame" "%25ProjectDir%25\HeuristicLabAlgorithmsParticleSwarmOptimizationPlugin.cs"
+SubWCRev "%25ProjectDir%25\" "%25ProjectDir%25\Properties\AssemblyInfo.frame" "%25ProjectDir%25\Properties\AssemblyInfo.cs"</PreBuildEvent>
+  </PropertyGroup>
+  <PropertyGroup>
+    <PostBuildEvent>
+    </PostBuildEvent>
+  </PropertyGroup>
+</Project>
Index: /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/HeuristicLab.Algorithms.ParticleSwarmOptimization-3.3.sln
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/HeuristicLab.Algorithms.ParticleSwarmOptimization-3.3.sln	(revision 5426)
+++ /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/HeuristicLab.Algorithms.ParticleSwarmOptimization-3.3.sln	(revision 5426)
@@ -0,0 +1,32 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Algorithms.ParticleSwarmOptimization-3.3", "HeuristicLab.Algorithms.ParticleSwarmOptimization-3.3.csproj", "{2C429157-9C34-4DD3-9D5F-B444B751E39A}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Debug|x64 = Debug|x64
+		Debug|x86 = Debug|x86
+		Release|Any CPU = Release|Any CPU
+		Release|x64 = Release|x64
+		Release|x86 = Release|x86
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{2C429157-9C34-4DD3-9D5F-B444B751E39A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{2C429157-9C34-4DD3-9D5F-B444B751E39A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{2C429157-9C34-4DD3-9D5F-B444B751E39A}.Debug|x64.ActiveCfg = Debug|x64
+		{2C429157-9C34-4DD3-9D5F-B444B751E39A}.Debug|x64.Build.0 = Debug|x64
+		{2C429157-9C34-4DD3-9D5F-B444B751E39A}.Debug|x86.ActiveCfg = Debug|x86
+		{2C429157-9C34-4DD3-9D5F-B444B751E39A}.Debug|x86.Build.0 = Debug|x86
+		{2C429157-9C34-4DD3-9D5F-B444B751E39A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{2C429157-9C34-4DD3-9D5F-B444B751E39A}.Release|Any CPU.Build.0 = Release|Any CPU
+		{2C429157-9C34-4DD3-9D5F-B444B751E39A}.Release|x64.ActiveCfg = Release|x64
+		{2C429157-9C34-4DD3-9D5F-B444B751E39A}.Release|x64.Build.0 = Release|x64
+		{2C429157-9C34-4DD3-9D5F-B444B751E39A}.Release|x86.ActiveCfg = Release|x86
+		{2C429157-9C34-4DD3-9D5F-B444B751E39A}.Release|x86.Build.0 = Release|x86
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
Index: /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/HeuristicLabAlgorithmsParticleSwarmOptimizationPlugin.cs.frame
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/HeuristicLabAlgorithmsParticleSwarmOptimizationPlugin.cs.frame	(revision 5426)
+++ /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/HeuristicLabAlgorithmsParticleSwarmOptimizationPlugin.cs.frame	(revision 5426)
@@ -0,0 +1,45 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.Algorithms.ParticleSwarmOptimization {
+  /// <summary>
+  /// Plugin class for HeuristicLab.Algorithms.ParticleSwarmOptimization plugin.
+  /// </summary>
+  [Plugin("HeuristicLab.Algorithms.ParticleSwarmOptimization", "3.3.0.$WCREV$")]
+  [PluginFile("HeuristicLab.Algorithms.ParticleSwarmOptimization-3.3.dll", PluginFileType.Assembly)]
+  [PluginDependency("HeuristicLab.Analysis", "3.3")]
+  [PluginDependency("HeuristicLab.Collections", "3.3")]
+  [PluginDependency("HeuristicLab.Common", "3.3")]
+  [PluginDependency("HeuristicLab.Core", "3.3")]
+  [PluginDependency("HeuristicLab.Data", "3.3")]
+  [PluginDependency("HeuristicLab.Encodings.RealVectorEncoding", "3.3")]
+  [PluginDependency("HeuristicLab.Encodings.IntegerVectorEncoding", "3.3")]
+  [PluginDependency("HeuristicLab.Operators", "3.3")]
+  [PluginDependency("HeuristicLab.Optimization", "3.3")]
+  [PluginDependency("HeuristicLab.Optimization.Operators", "3.3")]
+  [PluginDependency("HeuristicLab.Parameters", "3.3")]
+  [PluginDependency("HeuristicLab.Persistence", "3.3")]
+  [PluginDependency("HeuristicLab.Random", "3.3")]
+  public class HeuristicLabAlgorithmsParticleSwarmOptimizationPlugin : PluginBase {
+  }
+}
Index: /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/IDiscreteDoubleMatrixModifier.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/IDiscreteDoubleMatrixModifier.cs	(revision 5426)
+++ /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/IDiscreteDoubleMatrixModifier.cs	(revision 5426)
@@ -0,0 +1,22 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+
+namespace HeuristicLab.Algorithms.ParticleSwarmOptimization {
+
+  public interface IDiscreteDoubleMatrixModifier : IItem {
+    ILookupParameter<DoubleMatrix> ValueParameter { get; }
+    IValueLookupParameter<DoubleValue> ScaleParameter { get; }
+    ConstrainedValueParameter<IDiscreteDoubleValueModifier> ScalingOperatorParameter { get; }
+    IValueLookupParameter<DoubleValue> StartValueParameter { get; }
+    IValueLookupParameter<DoubleValue> EndValueParameter { get; }
+    ILookupParameter<IntValue> IndexParameter { get; }
+    IValueLookupParameter<IntValue> StartIndexParameter { get; }
+    IValueLookupParameter<IntValue> EndIndexParameter { get; }
+  }
+}
Index: /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/IGlobalParticleUpdater.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/IGlobalParticleUpdater.cs	(revision 5426)
+++ /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/IGlobalParticleUpdater.cs	(revision 5426)
@@ -0,0 +1,9 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace HeuristicLab.Algorithms.ParticleSwarmOptimization {
+  public interface IGlobalParticleUpdater : IParticleUpdater {
+  }
+}
Index: /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ILocalParticleUpdater.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ILocalParticleUpdater.cs	(revision 5426)
+++ /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ILocalParticleUpdater.cs	(revision 5426)
@@ -0,0 +1,9 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace HeuristicLab.Algorithms.ParticleSwarmOptimization {
+  public interface ILocalParticleUpdater : IParticleUpdater {
+  }
+}
Index: /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/IParticleUpdater.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/IParticleUpdater.cs	(revision 5426)
+++ /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/IParticleUpdater.cs	(revision 5426)
@@ -0,0 +1,46 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.RealVectorEncoding;
+using HeuristicLab.Parameters;
+
+namespace HeuristicLab.Algorithms.ParticleSwarmOptimization {
+
+  public interface IParticleUpdater : IOperator {
+
+    ILookupParameter<RealVector> VelocityParameter { get; }
+    ILookupParameter<DoubleMatrix> VelocityBoundsParameter { get; }
+
+    ILookupParameter<RealVector> PointParameter { get; }
+    ILookupParameter<DoubleMatrix> BoundsParameter { get; }
+
+    ILookupParameter<RealVector> PersonalBestPointParameter { get; }
+    ILookupParameter<RealVector> BestNeighborPointParameter { get; }
+    ILookupParameter<RealVector> BestPointParameter { get; }
+
+    ILookupParameter<DoubleValue> OmegaParameter { get; }
+    ILookupParameter<DoubleValue> Phi_PParameter { get; }
+    ILookupParameter<DoubleValue> Phi_GParameter { get; }
+  }
+
+}
Index: /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/IRealVectorEncoder.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/IRealVectorEncoder.cs	(revision 5426)
+++ /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/IRealVectorEncoder.cs	(revision 5426)
@@ -0,0 +1,30 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+
+namespace HeuristicLab.Encodings.RealVectorEncoding {
+  public interface IRealVectorEncoder : IRealVectorOperator {
+    ILookupParameter<RealVector> RealVectorParameter { get; }
+  }
+}
Index: /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ITopologyInitializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ITopologyInitializer.cs	(revision 5426)
+++ /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ITopologyInitializer.cs	(revision 5426)
@@ -0,0 +1,33 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.IntegerVectorEncoding;
+using HeuristicLab.Parameters;
+namespace HeuristicLab.Algorithms.ParticleSwarmOptimization {
+
+  public interface ITopologyInitializer : IOperator {
+    IScopeTreeLookupParameter<IntegerVector> NeighborsParameter { get; }
+    ILookupParameter<IntValue> SwarmSizeParameter { get; }
+  }
+
+}
Index: /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ITopologyUpdater.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ITopologyUpdater.cs	(revision 5426)
+++ /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ITopologyUpdater.cs	(revision 5426)
@@ -0,0 +1,31 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.IntegerVectorEncoding;
+using HeuristicLab.Parameters;
+namespace HeuristicLab.Algorithms.ParticleSwarmOptimization {
+
+  public interface ITopologyUpdater : IItem {
+    IScopeTreeLookupParameter<IntegerVector> NeighborsParameter { get; }
+  }
+
+}
Index: /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/MultiPSOTopologyUpdater.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/MultiPSOTopologyUpdater.cs	(revision 5426)
+++ /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/MultiPSOTopologyUpdater.cs	(revision 5426)
@@ -0,0 +1,127 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Operators;
+using HeuristicLab.Common;
+using HeuristicLab.Parameters;
+using HeuristicLab.Encodings.IntegerVectorEncoding;
+using HeuristicLab.Data;
+
+namespace HeuristicLab.Algorithms.ParticleSwarmOptimization {
+  [Item("Multi PSO Topology Initializer/Updater", "Splits swarm into swarmsize / (nrOfConnections + 1) non-overlapping sub-swarms. Swarms are re-grouped every regroupingPeriod iteration. The operator is implemented as described in Liang, J.J. and Suganthan, P.N 2005. Dynamic multi-swarm particle swarm optimizer. IEEE Swarm Intelligence Symposium, pp. 124-129")]
+  [StorableClass]
+  public class MultiPSOTopologyUpdater : SingleSuccessorOperator, ITopologyUpdater, ITopologyInitializer {
+    #region Parameters
+    public ILookupParameter<IRandom> RandomParameter {
+      get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
+    }
+    public IValueLookupParameter<IntValue> NrOfConnectionsParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters["NrOfConnections"]; }
+    }
+    public ILookupParameter<IntValue> SwarmSizeParameter {
+      get { return (ILookupParameter<IntValue>)Parameters["SwarmSize"]; }
+    }
+    public IScopeTreeLookupParameter<IntegerVector> NeighborsParameter {
+      get { return (IScopeTreeLookupParameter<IntegerVector>)Parameters["Neighbors"]; }
+    }
+    public ILookupParameter<IntValue> CurrentIterationParameter {
+      get { return (ILookupParameter<IntValue>)Parameters["CurrentIteration"]; }
+    }
+    public IValueLookupParameter<IntValue> RegroupingPeriodParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters["RegroupingPeriod"]; }
+    }
+    #endregion
+
+    #region Parameter Values
+    public IRandom Random {
+      get { return RandomParameter.ActualValue; }
+    }
+    public int NrOfConnections {
+      get { return NrOfConnectionsParameter.ActualValue.Value; }
+    }
+    public int SwarmSize {
+      get { return SwarmSizeParameter.ActualValue.Value; }
+    }
+    public ItemArray<IntegerVector> Neighbors {
+      get { return NeighborsParameter.ActualValue; }
+      set { NeighborsParameter.ActualValue = value; }
+    }
+    public int CurrentIteration {
+      get { return CurrentIterationParameter.ActualValue.Value; }
+    }
+    public int RegroupingPeriod {
+      get { return RegroupingPeriodParameter.ActualValue.Value; }
+    }
+    #endregion
+
+    public MultiPSOTopologyUpdater()
+      : base() {
+      Parameters.Add(new LookupParameter<IRandom>("Random", "A random number generator."));
+      Parameters.Add(new ValueLookupParameter<IntValue>("NrOfConnections", "Nr of connected neighbors.", new IntValue(3)));
+      Parameters.Add(new LookupParameter<IntValue>("SwarmSize", "Number of particles in the swarm."));
+      Parameters.Add(new ScopeTreeLookupParameter<IntegerVector>("Neighbors", "The list of neighbors for each particle."));
+      Parameters.Add(new LookupParameter<IntValue>("CurrentIteration", "The current iteration of the algorithm."));
+      Parameters.Add(new ValueLookupParameter<IntValue>("RegroupingPeriod", "Update interval (=iterations) for regrouping of neighborhoods.", new IntValue(5)));
+    }
+
+    // Splits the swarm into non-overlapping sub swarms
+    public override IOperation Apply() {
+      if (CurrentIteration % RegroupingPeriod == 0) {
+        ItemArray<IntegerVector> neighbors = new ItemArray<IntegerVector>(SwarmSize);
+        Dictionary<int, List<int>> neighborsPerParticle = new Dictionary<int, List<int>>();
+        for (int i = 0; i < SwarmSize; i++) {
+          neighborsPerParticle.Add(i, new List<int>());
+        }
+
+        // partition swarm into groups
+        Dictionary<int, List<int>> groups = new Dictionary<int, List<int>>();
+        int groupId = 0;
+        var numbers = Enumerable.Range(0, SwarmSize).ToList();
+        for (int i = 0; i < SwarmSize; i++) {
+          int nextParticle = numbers[Random.Next(0, numbers.Count)];
+          if (!groups.ContainsKey(groupId)) {
+            groups.Add(groupId, new List<int>()); 
+          }
+          groups[groupId].Add(nextParticle);
+          if (groups[groupId].Count - 1 == NrOfConnections) {
+            groupId++;
+          }
+          numbers.Remove(nextParticle); 
+        }
+
+        // add neighbors to each particle
+        foreach (List<int> group in groups.Values) {
+          foreach (int sib1 in group) {
+            foreach (int sib2 in group) {
+              if (sib1 != sib2 && !neighborsPerParticle[sib1].Contains(sib2)) {
+                neighborsPerParticle[sib1].Add(sib2);
+              }
+            }
+          }
+        }
+
+        for (int particle = 0; particle < neighborsPerParticle.Count; particle++) {
+          neighbors[particle] = new IntegerVector(neighborsPerParticle[particle].ToArray());
+        }
+        Neighbors = neighbors;
+      }
+      return base.Apply();
+    }
+
+    [StorableConstructor]
+    protected MultiPSOTopologyUpdater(bool deserializing) : base(deserializing) { }
+
+    #region Cloning
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new MultiPSOTopologyUpdater(this, cloner);
+    }
+
+    protected MultiPSOTopologyUpdater(MultiPSOTopologyUpdater original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    #endregion
+  }
+}
Index: /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/NeighborUpdater.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/NeighborUpdater.cs	(revision 5426)
+++ /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/NeighborUpdater.cs	(revision 5426)
@@ -0,0 +1,108 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.IntegerVectorEncoding;
+using HeuristicLab.Encodings.RealVectorEncoding;
+using HeuristicLab.Operators;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Algorithms.ParticleSwarmOptimization {
+
+  [Item("Neighbor Updater", "Determines the best quality and point among the defined list of neigbors for every particle and its individual neighborhood.")]
+  [StorableClass]
+  public class NeighborUpdater : SingleSuccessorOperator {
+
+    #region Parameters
+    public IScopeTreeLookupParameter<RealVector> PointsParameter {
+      get { return (IScopeTreeLookupParameter<RealVector>)Parameters["Point"]; }
+    }
+    public IScopeTreeLookupParameter<IntegerVector> NeighborsParameter {
+      get { return (IScopeTreeLookupParameter<IntegerVector>)Parameters["Neighbors"]; }
+    }
+    public IScopeTreeLookupParameter<RealVector> BestNeighborPointParameter {
+      get { return (IScopeTreeLookupParameter<RealVector>)Parameters["BestNeighborPoint"]; }
+    }
+    public IScopeTreeLookupParameter<DoubleValue> QualityParameter {
+      get { return (IScopeTreeLookupParameter<DoubleValue>)Parameters["Quality"]; }
+    }
+    public ILookupParameter<BoolValue> MaximizationParameter {
+      get { return (ILookupParameter<BoolValue>)Parameters["Maximization"]; }
+    }
+    #endregion
+
+    #region Parameter Values
+    public ItemArray<RealVector> Points {
+      get { return PointsParameter.ActualValue; }
+    }
+    public ItemArray<IntegerVector> Neighbors {
+      get { return NeighborsParameter.ActualValue; }
+    }
+    public ItemArray<RealVector> BestNeighborPoints {
+      get { return BestNeighborPointParameter.ActualValue; }
+      set { BestNeighborPointParameter.ActualValue = value; }
+    }
+    public ItemArray<DoubleValue> Qualities {
+      get { return QualityParameter.ActualValue; }
+    }
+    public bool Maximization {
+      get { return MaximizationParameter.ActualValue.Value; }
+    }
+    #endregion
+
+    #region Construction & Cloning
+    public NeighborUpdater() {
+      Parameters.Add(new ScopeTreeLookupParameter<RealVector>("Point", "The position of the particle."));
+      Parameters.Add(new ScopeTreeLookupParameter<IntegerVector>("Neighbors", "The list of neighbors for each particle."));
+      Parameters.Add(new ScopeTreeLookupParameter<RealVector>("BestNeighborPoint", "The position of the best neighboring particle."));
+      Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("Quality", "The list of qualities of all particles."));
+      Parameters.Add(new LookupParameter<BoolValue>("Maximization", "Whether the problem is a maximization problem."));
+    }
+    [StorableConstructor]
+    protected NeighborUpdater(bool deserializing) : base(deserializing) { }
+    protected NeighborUpdater(NeighborUpdater original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new NeighborUpdater(this, cloner);
+    }
+    #endregion
+
+    public override IOperation Apply() {
+      if (Neighbors != null & Neighbors.Length > 0) {
+        if (BestNeighborPoints == null || BestNeighborPoints.Length != Neighbors.Length)
+          BestNeighborPoints = new ItemArray<RealVector>(Neighbors.Length);
+        for (int n = 0; n<Neighbors.Length; n++) {
+          var pairs = Qualities.Zip(Points, (q, p) => new { Quality = q, Point = p })
+            .Where((p, i) => i == n || Neighbors[n].Contains(i));
+          BestNeighborPoints[n] = Maximization ? 
+          pairs.OrderByDescending(p => p.Quality.Value).First().Point :
+          pairs.OrderBy(p => p.Quality.Value).First().Point;
+        }
+        BestNeighborPointParameter.ActualValue = BestNeighborPoints;
+      }
+      return base.Apply();
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/NeighborhoodParticleUpdater.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/NeighborhoodParticleUpdater.cs	(revision 5426)
+++ /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/NeighborhoodParticleUpdater.cs	(revision 5426)
@@ -0,0 +1,71 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.RealVectorEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Algorithms.ParticleSwarmOptimization {
+
+  [Item("Neighborhood Particle Updater", "Updates the particle's position using (among other things) the best neighbor's position. Point = Point + Velocity*Omega + (PersonalBestPoint-Point)*Phi_P*r_p + (BestNeighborPoint-Point)*Phi_G*r_g")]
+  [StorableClass]
+  public class NeighborhoodParticleUpdater : ParticleUpdater, ILocalParticleUpdater {
+
+    #region Construction & Cloning
+
+    [StorableConstructor]
+    protected NeighborhoodParticleUpdater(bool deserializing) : base(deserializing) { }
+    protected NeighborhoodParticleUpdater(ParticleUpdater original, Cloner cloner) : base(original, cloner) { }
+    public NeighborhoodParticleUpdater() : base() { }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new NeighborhoodParticleUpdater(this, cloner);
+    }
+
+    #endregion
+
+    public override IOperation Apply() {
+      RealVector velocity = new RealVector(Velocity.Length);
+      RealVector position = new RealVector(Point.Length);
+      double r_p = Random.NextDouble();
+      double r_g = Random.NextDouble();
+      double omega = Omega.Value;
+      double phi_p = Phi_P.Value;
+      double phi_g = Phi_G.Value;
+      for (int i = 0; i < velocity.Length; i++) {
+        velocity[i] =
+          Velocity[i] * omega +
+          (PersonalBestPoint[i] - Point[i]) * phi_p * r_p +
+          (BestNeighborPoint[i] - Point[i]) * phi_g * r_g;
+      }
+      BoundsChecker.Apply(velocity, VelocityBounds);
+      for (int i = 0; i < velocity.Length; i++) {
+        position[i] = Point[i] + velocity[i];
+      }
+      BoundsChecker.Apply(position, Bounds);
+      Point = position;
+      Velocity = velocity;
+
+      return base.Apply();
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ParticleSwarmOptimization.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ParticleSwarmOptimization.cs	(revision 5426)
+++ /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ParticleSwarmOptimization.cs	(revision 5426)
@@ -0,0 +1,451 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Linq;
+using HeuristicLab.Analysis;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.RealVectorEncoding;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Optimization.Operators;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.PluginInfrastructure;
+using HeuristicLab.Random;
+using System.Collections.Generic;
+
+namespace HeuristicLab.Algorithms.ParticleSwarmOptimization {
+
+  [Item("Particle Swarm Optimization", "A particle swarm optimization algorithm based on the description in Pedersen, M.E.H. (2010). PhD thesis. University of Southampton.")]
+  [Creatable("Algorithms")]
+  [StorableClass]
+  public class ParticleSwarmOptimization : EngineAlgorithm, IStorableContent {
+
+    #region Problem Properties
+    public override Type ProblemType {
+      get { return typeof(ISingleObjectiveProblem); }
+    }
+    public new ISingleObjectiveProblem Problem {
+      get { return (ISingleObjectiveProblem)base.Problem; }
+      set { base.Problem = value; }
+    }
+    public MultiAnalyzer Analyzer {
+      get { return AnalyzerParameter.Value; }
+      set { AnalyzerParameter.Value = value; }
+    }
+    public IDiscreteDoubleValueModifier OmegaUpdater {
+      get { return OmegaUpdaterParameter.Value; }
+      set { OmegaUpdaterParameter.Value = value; }
+    }
+    public IDiscreteDoubleMatrixModifier VelocityBoundsUpdater {
+      get { return VelocityBoundsUpdaterParameter.Value; }
+      set { VelocityBoundsUpdaterParameter.Value = value; }
+    }
+    #endregion
+
+    #region Parameter Properties
+    public IValueParameter<IntValue> SeedParameter {
+      get { return (IValueParameter<IntValue>)Parameters["Seed"]; }
+    }
+    public IValueParameter<BoolValue> SetSeedRandomlyParameter {
+      get { return (IValueParameter<BoolValue>)Parameters["SetSeedRandomly"]; }
+    }
+    public IValueParameter<IntValue> SwarmSizeParameter {
+      get { return (IValueParameter<IntValue>)Parameters["SwarmSize"]; }
+    }
+    public IValueParameter<IntValue> MaxIterationsParameter {
+      get { return (IValueParameter<IntValue>)Parameters["MaxIterations"]; }
+    }
+    public IValueParameter<DoubleValue> OmegaParameter {
+      get { return (IValueParameter<DoubleValue>)Parameters["Omega"]; }
+    }
+    public IValueParameter<DoubleValue> Phi_PParameter {
+      get { return (IValueParameter<DoubleValue>)Parameters["Phi_P"]; }
+    }
+    public IValueParameter<DoubleValue> Phi_GParameter {
+      get { return (IValueParameter<DoubleValue>)Parameters["Phi_G"]; }
+    }
+    public IValueParameter<MultiAnalyzer> AnalyzerParameter {
+      get { return (IValueParameter<MultiAnalyzer>)Parameters["Analyzer"]; }
+    }
+    public IValueLookupParameter<DoubleMatrix> VelocityBoundsParameter {
+      get { return (IValueLookupParameter<DoubleMatrix>)Parameters["VelocityBounds"]; }
+    }
+    public ConstrainedValueParameter<IParticleUpdater> ParticleUpdaterParameter {
+      get { return (ConstrainedValueParameter<IParticleUpdater>)Parameters["ParticleUpdater"]; }
+    }
+    public OptionalConstrainedValueParameter<ITopologyInitializer> TopologyInitializerParameter {
+      get { return (OptionalConstrainedValueParameter<ITopologyInitializer>)Parameters["TopologyInitializer"]; }
+    }
+    public OptionalConstrainedValueParameter<ITopologyUpdater> TopologyUpdaterParameter {
+      get { return (OptionalConstrainedValueParameter<ITopologyUpdater>)Parameters["TopologyUpdater"]; }
+    }
+    public OptionalConstrainedValueParameter<IDiscreteDoubleMatrixModifier> VelocityBoundsUpdaterParameter {
+      get { return (OptionalConstrainedValueParameter<IDiscreteDoubleMatrixModifier>)Parameters["VelocityBoundsUpdater"]; }
+    }
+    public OptionalConstrainedValueParameter<IDiscreteDoubleValueModifier> OmegaUpdaterParameter {
+      get { return (OptionalConstrainedValueParameter<IDiscreteDoubleValueModifier>)Parameters["OmegaUpdater"]; }
+    }
+    #endregion
+
+    #region Properties
+
+    public string Filename { get; set; }
+
+    [Storable]
+    private BestAverageWorstQualityAnalyzer qualityAnalyzer;
+
+    public ITopologyInitializer TopologyInitializer {
+      get { return TopologyInitializerParameter.Value; }
+      set { TopologyInitializerParameter.Value = value; }
+    }
+
+    public ITopologyUpdater TopologyUpdater {
+      get { return TopologyUpdaterParameter.Value; }
+      set { TopologyUpdaterParameter.Value = value; }
+    }
+
+    public IParticleUpdater ParticleUpdater {
+      get { return ParticleUpdaterParameter.Value; }
+      set { ParticleUpdaterParameter.Value = value; }
+    }
+
+    #endregion
+
+    [StorableConstructor]
+    protected ParticleSwarmOptimization(bool deserializing)
+      : base(deserializing) {
+    }
+    protected ParticleSwarmOptimization(ParticleSwarmOptimization original, Cloner cloner)
+      : base(original, cloner) {
+      qualityAnalyzer = cloner.Clone(original.qualityAnalyzer);
+      Initialize();
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      Initialize();
+    }
+
+    public ParticleSwarmOptimization()
+      : base() {
+      Parameters.Add(new ValueParameter<IntValue>("Seed", "The random seed used to initialize the new pseudo random number generator.", new IntValue(0)));
+      Parameters.Add(new ValueParameter<BoolValue>("SetSeedRandomly", "True if the random seed should be set to a random value, otherwise false.", new BoolValue(true)));
+      Parameters.Add(new ValueParameter<IntValue>("SwarmSize", "Size of the particle swarm.", new IntValue(10)));
+      Parameters.Add(new ValueParameter<IntValue>("MaxIterations", "Maximal number of iterations.", new IntValue(1000)));
+      Parameters.Add(new ValueParameter<MultiAnalyzer>("Analyzer", "The operator used to analyze each generation.", new MultiAnalyzer()));
+      Parameters.Add(new ValueParameter<DoubleValue>("Omega", "Weight for particle's velocity vector.", new DoubleValue(-0.2)));
+      Parameters.Add(new ValueParameter<DoubleValue>("Phi_P", "Weight for particle's personal best position.", new DoubleValue(-0.01)));
+      Parameters.Add(new ValueParameter<DoubleValue>("Phi_G", "Weight for global best position.", new DoubleValue(3.7)));
+      Parameters.Add(new ValueLookupParameter<DoubleMatrix>("VelocityBounds", "Maximum Velocity in every dimension", new DoubleMatrix(new double[,] { { -1, 1 } })));
+      Parameters.Add(new ConstrainedValueParameter<IParticleUpdater>("ParticleUpdater", "Operator that calculates new position and velocity of a particle"));
+      Parameters.Add(new OptionalConstrainedValueParameter<ITopologyInitializer>("TopologyInitializer", "Creates neighborhood description vectors"));
+      Parameters.Add(new OptionalConstrainedValueParameter<ITopologyUpdater>("TopologyUpdater", "Updates the neighborhood description vectors"));
+      Parameters.Add(new OptionalConstrainedValueParameter<IDiscreteDoubleValueModifier>("OmegaUpdater", "Updates the omega parameter"));
+      Parameters.Add(new OptionalConstrainedValueParameter<IDiscreteDoubleMatrixModifier>("VelocityBoundsUpdater", "Adjusts the velocity bounds."));
+      ParticleUpdaterParameter.ActualValue = ParticleUpdaterParameter.ValidValues.SingleOrDefault(v => v.GetType() == typeof(TotallyConnectedParticleUpdater));
+
+      RandomCreator randomCreator = new RandomCreator();
+      VariableCreator variableCreator = new VariableCreator();
+      SolutionsCreator solutionsCreator = new SolutionsCreator();
+      CombinedOperator particleCreator = new CombinedOperator();
+      Placeholder evaluatorPlaceholder = new Placeholder();
+      Assigner bestPersonalQualityAssigner = new Assigner();
+      BestPointInitializer bestPositionInitializer = new BestPointInitializer();
+      Placeholder topologyInitializerPlaceholder = new Placeholder();
+      NeighborUpdater neighborUpdater = new NeighborUpdater();
+      Placeholder analyzerPlaceholder = new Placeholder();
+      UniformSubScopesProcessor uniformSubScopeProcessor = new UniformSubScopesProcessor();
+      Placeholder particleUpdaterPlaceholder = new Placeholder();
+      Placeholder topologyUpdaterPlaceholder = new Placeholder();
+      UniformSubScopesProcessor uniformSubscopesProcessor2 = new UniformSubScopesProcessor();
+      UniformSubScopesProcessor evaluationProcessor = new UniformSubScopesProcessor();
+      NeighborUpdater neighborUpdater2 = new NeighborUpdater();
+      Placeholder evaluatorPlaceholder2 = new Placeholder();
+      SwarmUpdater swarmUpdater = new SwarmUpdater();
+      Placeholder analyzerPlaceholder2 = new Placeholder();
+      IntCounter currentIterationCounter = new IntCounter();
+      Comparator currentIterationComparator = new Comparator();
+      ConditionalBranch conditionalBranch = new ConditionalBranch();
+      Placeholder velocityBoundsUpdaterPlaceholder = new Placeholder();
+      Placeholder omegaUpdaterPlaceholder = new Placeholder();
+
+      OperatorGraph.InitialOperator = randomCreator;
+
+      randomCreator.SetSeedRandomlyParameter.Value = null;
+      randomCreator.SeedParameter.Value = null;
+      randomCreator.Successor = variableCreator;
+
+      variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("CurrentIteration", new IntValue(0)));
+      variableCreator.Successor = solutionsCreator;
+
+      solutionsCreator.NumberOfSolutionsParameter.ActualName = "SwarmSize";
+      solutionsCreator.EvaluatorParameter.Value = evaluatorPlaceholder;
+      solutionsCreator.SolutionCreatorParameter.Value = particleCreator;
+      solutionsCreator.Successor = bestPositionInitializer;
+
+      InitializeParticleCreator(particleCreator);
+
+      evaluatorPlaceholder.Name = "(Evaluator)";
+      evaluatorPlaceholder.OperatorParameter.ActualName = "Evaluator";
+      evaluatorPlaceholder.Successor = bestPersonalQualityAssigner;
+
+      bestPersonalQualityAssigner.LeftSideParameter.ActualName = "PersonalBestQuality";
+      bestPersonalQualityAssigner.RightSideParameter.ActualName = "Quality";
+
+      bestPositionInitializer.Successor = topologyInitializerPlaceholder;
+
+      topologyInitializerPlaceholder.Name = "(TopologyInitializer)";
+      topologyInitializerPlaceholder.OperatorParameter.ActualName = "TopologyInitializer";
+      topologyInitializerPlaceholder.Successor = neighborUpdater;
+
+      neighborUpdater.Successor = analyzerPlaceholder;
+
+      analyzerPlaceholder.Name = "(Analyzer)";
+      analyzerPlaceholder.OperatorParameter.ActualName = "Analyzer";
+      analyzerPlaceholder.Successor = uniformSubScopeProcessor;
+
+      uniformSubScopeProcessor.Operator = particleUpdaterPlaceholder;
+      uniformSubScopeProcessor.Successor = evaluationProcessor;
+
+      particleUpdaterPlaceholder.Name = "(ParticleUpdater)";
+      particleUpdaterPlaceholder.OperatorParameter.ActualName = "ParticleUpdater";
+
+      evaluationProcessor.Parallel = new BoolValue(true);
+      evaluationProcessor.Operator = evaluatorPlaceholder2;
+      evaluationProcessor.Successor = topologyUpdaterPlaceholder;
+
+      evaluatorPlaceholder2.Name = "(Evaluator)";
+      evaluatorPlaceholder2.OperatorParameter.ActualName = "Evaluator";
+
+      topologyUpdaterPlaceholder.Name = "(TopologyUpdater)";
+      topologyUpdaterPlaceholder.OperatorParameter.ActualName = "TopologyUpdater";
+      topologyUpdaterPlaceholder.Successor = neighborUpdater2;
+
+      neighborUpdater2.Successor = uniformSubscopesProcessor2;
+
+      uniformSubscopesProcessor2.Operator = swarmUpdater;
+      uniformSubscopesProcessor2.Successor = analyzerPlaceholder2;
+
+      analyzerPlaceholder2.Name = "(Analyzer)";
+      analyzerPlaceholder2.OperatorParameter.ActualName = "Analyzer";
+      analyzerPlaceholder2.Successor = currentIterationCounter;
+
+      currentIterationCounter.Name = "CurrentIteration++";
+      currentIterationCounter.ValueParameter.ActualName = "CurrentIteration";
+      currentIterationCounter.Successor = omegaUpdaterPlaceholder;
+
+      omegaUpdaterPlaceholder.Name = "(Omega Updater)";
+      omegaUpdaterPlaceholder.OperatorParameter.ActualName = "OmegaUpdater";
+      omegaUpdaterPlaceholder.Successor = velocityBoundsUpdaterPlaceholder;
+
+      velocityBoundsUpdaterPlaceholder.Name = "(Velocity Bounds Updater)";
+      velocityBoundsUpdaterPlaceholder.OperatorParameter.ActualName = "VelocityBoundsUpdater";
+      velocityBoundsUpdaterPlaceholder.Successor = currentIterationComparator;
+
+      currentIterationComparator.LeftSideParameter.ActualName = "CurrentIteration";
+      currentIterationComparator.Comparison = new Comparison(ComparisonType.Less);
+      currentIterationComparator.RightSideParameter.ActualName = "MaxIterations";
+      currentIterationComparator.ResultParameter.ActualName = "ContinueIteration";
+      currentIterationComparator.Successor = conditionalBranch;
+
+      conditionalBranch.Name = "ContinueIteration?";
+      conditionalBranch.ConditionParameter.ActualName = "ContinueIteration";
+      conditionalBranch.TrueBranch = uniformSubScopeProcessor;
+
+      InitializeAnalyzers();
+      InitVelocityBoundsUpdater();
+      UpdateAnalyzers();
+      UpdateOmegaUpdater();
+      InitOmegaUpdater();
+      UpdateTopologyInitializer();
+      Initialize();
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new ParticleSwarmOptimization(this, cloner);
+    }
+
+    public override void Prepare() {
+      if (Problem != null) {
+        base.Prepare();
+        if (OmegaUpdater != null && OmegaUpdater.StartValueParameter.Value != null) {
+          this.OmegaParameter.ActualValue = new DoubleValue(OmegaUpdaterParameter.Value.StartValueParameter.Value.Value);
+        }
+        if (VelocityBoundsUpdater != null && VelocityBoundsUpdater.StartValueParameter.Value != null && VelocityBoundsParameter.Value != null) {
+          DoubleMatrix matrix = VelocityBoundsParameter.Value;
+          for (int i = 0; i < matrix.Rows; i++) {
+            matrix[i, 0] = -VelocityBoundsUpdater.StartValueParameter.Value.Value;
+            matrix[i, 1] = VelocityBoundsUpdater.StartValueParameter.Value.Value;
+          }
+        }
+      }
+    }
+
+    #region Events
+    protected override void OnProblemChanged() {
+      UpdateAnalyzers();
+      ParameterizeAnalyzers();
+      base.OnProblemChanged();
+    }
+
+    void TopologyInitializerParameter_ValueChanged(object sender, EventArgs e) {
+      this.UpdateTopologyParameters();
+    }
+
+    void VelocityBoundsUpdaterParameter_ValueChanged(object sender, EventArgs e) {
+      if (VelocityBoundsParameter.Value != null) {
+        foreach (IDiscreteDoubleMatrixModifier matrixOp in VelocityBoundsUpdaterParameter.Value.ScalingOperatorParameter.ValidValues) {
+          matrixOp.ValueParameter.ActualName = VelocityBoundsUpdater.ScaleParameter.Name;
+          matrixOp.StartValueParameter.Value = new DoubleValue(VelocityBoundsUpdater.ScaleParameter.ActualValue.Value);
+        }
+      }
+    }
+    #endregion
+
+    #region Helpers
+    private void Initialize() {
+      TopologyInitializerParameter.ValueChanged += new EventHandler(TopologyInitializerParameter_ValueChanged);
+    }
+
+    private static void InitializeParticleCreator(CombinedOperator particleCreator) {
+      Placeholder positionCreator = new Placeholder();
+      Assigner personalBestPositionAssigner = new Assigner();
+      UniformRandomRealVectorCreator velocityCreator = new UniformRandomRealVectorCreator();
+
+      particleCreator.Name = "Particle Creator";
+      particleCreator.OperatorGraph.InitialOperator = positionCreator;
+
+      positionCreator.Name = "(SolutionCreator)";
+      positionCreator.OperatorParameter.ActualName = "SolutionCreator";
+      positionCreator.Successor = personalBestPositionAssigner;
+
+      personalBestPositionAssigner.LeftSideParameter.ActualName = "PersonalBestPoint";
+      personalBestPositionAssigner.RightSideParameter.ActualName = "Point";
+      personalBestPositionAssigner.Successor = velocityCreator;
+
+      velocityCreator.LengthParameter.ActualName = "ProblemSize";
+      velocityCreator.BoundsParameter.ActualName = "VelocityBounds";
+      velocityCreator.RealVectorParameter.ActualName = "Velocity";
+    }
+
+    private void InitializeAnalyzers() {
+      qualityAnalyzer = new BestAverageWorstQualityAnalyzer();
+      ParameterizeAnalyzers();
+    }
+
+    private void ParameterizeAnalyzers() {
+      if (Problem != null) {
+        qualityAnalyzer.MaximizationParameter.ActualName = Problem.MaximizationParameter.Name;
+        qualityAnalyzer.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName;
+        qualityAnalyzer.BestKnownQualityParameter.ActualName = Problem.BestKnownQualityParameter.Name;
+      }
+    }
+
+    private void UpdateAnalyzers() {
+      Analyzer.Operators.Clear();
+      if (Problem != null) {
+        foreach (IAnalyzer analyzer in Problem.Operators.OfType<IAnalyzer>())
+          Analyzer.Operators.Add(analyzer);
+      }
+      Analyzer.Operators.Add(qualityAnalyzer);
+    }
+
+    private void InitVelocityBoundsUpdater() {
+      foreach (IDiscreteDoubleMatrixModifier matrixOp in ApplicationManager.Manager.GetInstances<IDiscreteDoubleMatrixModifier>()) {
+        VelocityBoundsUpdaterParameter.ValidValues.Add(matrixOp);
+        matrixOp.ValueParameter.ActualName = VelocityBoundsParameter.Name;
+        matrixOp.EndIndexParameter.ActualName = MaxIterationsParameter.Name;
+        matrixOp.StartIndexParameter.Value = new IntValue(0);
+        matrixOp.IndexParameter.ActualName = "CurrentIteration";
+        matrixOp.EndValueParameter.Value = new DoubleValue(0);
+      }
+      VelocityBoundsUpdaterParameter.ValueChanged += new EventHandler(VelocityBoundsUpdaterParameter_ValueChanged);
+    }
+
+    private void InitOmegaUpdater() {
+      foreach (IDiscreteDoubleValueModifier updater in OmegaUpdaterParameter.ValidValues) {
+        updater.EndIndexParameter.ActualName = MaxIterationsParameter.Name;
+        updater.StartIndexParameter.Value = new IntValue(0);
+        updater.IndexParameter.ActualName = "CurrentIteration";
+        updater.ValueParameter.ActualName = OmegaParameter.Name;
+        updater.StartValueParameter.Value = new DoubleValue(1);
+        updater.EndValueParameter.Value = new DoubleValue(0);
+      }
+    }
+
+    private void UpdateOmegaUpdater() {
+      IDiscreteDoubleValueModifier oldOmegaUpdater = OmegaUpdater;
+      OmegaUpdaterParameter.ValidValues.Clear();
+      foreach (IDiscreteDoubleValueModifier updater in ApplicationManager.Manager.GetInstances<IDiscreteDoubleValueModifier>().OrderBy(x => x.Name)) {
+        OmegaUpdaterParameter.ValidValues.Add(updater);
+      }
+      if (oldOmegaUpdater != null) {
+        IDiscreteDoubleValueModifier updater = OmegaUpdaterParameter.ValidValues.FirstOrDefault(x => x.GetType() == oldOmegaUpdater.GetType());
+        if (updater != null) OmegaUpdaterParameter.Value = updater;
+      }
+    }
+
+    private void UpdateTopologyInitializer() {
+      ITopologyInitializer oldTopologyInitializer = TopologyInitializer;
+      TopologyInitializerParameter.ValidValues.Clear();
+      foreach (ITopologyInitializer topologyInitializer in ApplicationManager.Manager.GetInstances<ITopologyInitializer>().OrderBy(x => x.Name)) {
+        TopologyInitializerParameter.ValidValues.Add(topologyInitializer);
+      }
+      if (oldTopologyInitializer != null && TopologyInitializerParameter.ValidValues.Any(x => x.GetType() == oldTopologyInitializer.GetType()))
+        TopologyInitializer = TopologyInitializerParameter.ValidValues.FirstOrDefault(x => x.GetType() == oldTopologyInitializer.GetType());
+      UpdateTopologyParameters();
+    }
+
+    private void UpdateTopologyParameters() {
+      ITopologyUpdater oldTopologyUpdater = TopologyUpdater;
+      IParticleUpdater oldParticleUpdater = ParticleUpdater;
+      ClearTopologyParameters();
+      if (TopologyInitializer != null) {
+        foreach (ITopologyUpdater topologyUpdater in ApplicationManager.Manager.GetInstances<ITopologyUpdater>())
+          TopologyUpdaterParameter.ValidValues.Add(topologyUpdater);
+        foreach (IParticleUpdater particleUpdater in ApplicationManager.Manager.GetInstances<ILocalParticleUpdater>())
+          ParticleUpdaterParameter.ValidValues.Add(particleUpdater);
+      } else {
+        foreach (IParticleUpdater particleUpdater in ApplicationManager.Manager.GetInstances<IGlobalParticleUpdater>())
+          ParticleUpdaterParameter.ValidValues.Add(particleUpdater);
+      }
+      if (oldTopologyUpdater != null) {
+        ITopologyUpdater newTopologyUpdater = TopologyUpdaterParameter.ValidValues.FirstOrDefault(x => x.GetType() == oldParticleUpdater.GetType());
+        if (newTopologyUpdater != null) TopologyUpdater = newTopologyUpdater;
+      }
+      if (oldParticleUpdater != null) {
+        IParticleUpdater newParticleUpdater = ParticleUpdaterParameter.ValidValues.FirstOrDefault(x => x.GetType() == oldParticleUpdater.GetType());
+        if (newParticleUpdater != null) ParticleUpdater = newParticleUpdater;
+      }
+    }
+
+    private void ClearTopologyParameters() {
+      TopologyUpdaterParameter.ValidValues.Clear();
+      ParticleUpdaterParameter.ValidValues.Clear();
+    }
+    #endregion
+
+  }
+}
Index: /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ParticleSwarmOptimizationMainLoop.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ParticleSwarmOptimizationMainLoop.cs	(revision 5426)
+++ /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ParticleSwarmOptimizationMainLoop.cs	(revision 5426)
@@ -0,0 +1,164 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Optimization.Operators;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Algorithms.ParticleSwarmOptimization {
+  /// <summary>
+  /// An operator which represents the main loop of a PSO.
+  /// </summary> 
+  [Item("ParticleSwarmOptimizationMainLoop", "An operator which represents the main loop of a PSO.")]
+  [StorableClass]
+  public class ParticleSwarmOptimizationMainLoop : AlgorithmOperator {
+    #region Parameter properties
+    public ValueLookupParameter<VariableCollection> ResultsParameter {
+      get { return (ValueLookupParameter<VariableCollection>)Parameters["Results"]; }
+    }
+    public ValueLookupParameter<IRealVectorEncoder> EncoderParameter {
+      get { return (ValueLookupParameter<IRealVectorEncoder>)Parameters["Encoder"]; }
+    }
+    public ValueLookupParameter<IOperator> DecoderParameter {
+      get { return (ValueLookupParameter<IOperator>)Parameters["Decoder"]; }
+    }
+    public ValueLookupParameter<BoolValue> MaximizationParameter {
+      get { return (ValueLookupParameter<BoolValue>)Parameters["Maximization"]; }
+    }
+    public ScopeTreeLookupParameter<DoubleValue> QualityParameter {
+      get { return (ScopeTreeLookupParameter<DoubleValue>)Parameters["Quality"]; }
+    }
+    public ValueLookupParameter<IntValue> MaximumGenerationsParameter {
+      get { return (ValueLookupParameter<IntValue>)Parameters["MaximumGenerations"]; }
+    }
+    public ValueLookupParameter<IOperator> EvaluatorParameter {
+      get { return (ValueLookupParameter<IOperator>)Parameters["Evaluator"]; }
+    }
+    public ValueLookupParameter<IOperator> AnalyzerParameter {
+      get { return (ValueLookupParameter<IOperator>)Parameters["Analyzer"]; }
+    }
+    #endregion
+
+    [Storable]
+    private ParticleUpdater velocityUpdater;
+
+    [StorableConstructor]
+    private ParticleSwarmOptimizationMainLoop(bool deserializing) : base() { }
+    public ParticleSwarmOptimizationMainLoop()
+      : base() {
+      Initialize();
+    }
+
+    private void Initialize() {
+      #region Create parameters
+      Parameters.Add(new ValueLookupParameter<VariableCollection>("Results", "The variable collection where results should be stored."));
+      Parameters.Add(new ValueLookupParameter<IRealVectorEncoder>("Encoder", "The encoding operator that maps a solution to a position vector."));
+      Parameters.Add(new ValueLookupParameter<IOperator>("Decoder", "The decoding operator that maps a position vector to a solution."));
+      Parameters.Add(new ValueLookupParameter<BoolValue>("Maximization", "True if the problem is a maximization problem, otherwise false."));
+      Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("Quality", "The value which represents the quality of a solution."));
+      Parameters.Add(new ValueLookupParameter<IntValue>("MaximumGenerations", "The maximum number of generations which should be processed."));
+      Parameters.Add(new ValueLookupParameter<IOperator>("Evaluator", "The operator used to evaluate solutions."));
+      Parameters.Add(new ValueLookupParameter<IOperator>("Analyzer", "The operator used to analyze each generation."));
+      #endregion
+
+      EncoderParameter.ActualNameChanged += new EventHandler(EncoderParameter_ActualNameChanged);
+
+      #region Create operators
+      VariableCreator variableCreator = new VariableCreator();
+      ResultsCollector resultsCollector1 = new ResultsCollector();
+      IntCounter intCounter = new IntCounter();
+      ConditionalBranch conditionalBranch = new ConditionalBranch();
+      velocityUpdater = new ParticleUpdater();
+      UniformSubScopesProcessor uniformSubScopesProcessor = new UniformSubScopesProcessor();
+      UniformSubScopesProcessor uniformSubScopesProcessor2 = new UniformSubScopesProcessor();
+      Placeholder encPlaceholder = new Placeholder();
+      Placeholder decPlaceholder = new Placeholder();
+      Placeholder evaluator = new Placeholder();
+      Comparator comparator = new Comparator();
+      SwarmUpdater swarmUpdater = new SwarmUpdater();
+      Placeholder analyzer1 = new Placeholder();
+
+      analyzer1.Name = "Analyzer (placeholder)";
+      analyzer1.OperatorParameter.ActualName = AnalyzerParameter.Name;
+
+      variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("Generations", new IntValue(0))); // Initial generation already built
+
+      resultsCollector1.CollectedValues.Add(new LookupParameter<IntValue>("Generations"));
+      resultsCollector1.ResultsParameter.ActualName = "Results";
+
+      intCounter.Increment = new IntValue(1);
+      intCounter.ValueParameter.ActualName = "Generations";
+
+      comparator.Comparison = new Comparison(ComparisonType.GreaterOrEqual);
+      comparator.LeftSideParameter.ActualName = "Generations";
+      comparator.ResultParameter.ActualName = "Terminate";
+      comparator.RightSideParameter.ActualName = MaximumGenerationsParameter.Name;
+
+      conditionalBranch.ConditionParameter.ActualName = "Terminate";
+
+      velocityUpdater.BestGlobalParameter.ActualName = "CurrentBestPosition";
+      velocityUpdater.BestLocalParameter.ActualName = "BestPosition";
+      velocityUpdater.CurrentPositionParameter.ActualName = "Position";
+      velocityUpdater.VelocityParameter.ActualName = "Velocity";
+      //
+      // ToDo: Add correctly 
+
+      encPlaceholder.OperatorParameter.ActualName = EncoderParameter.ActualName;
+      decPlaceholder.OperatorParameter.ActualName = DecoderParameter.ActualName;
+
+      evaluator.Name = "Evaluator (placeholder)";
+      evaluator.OperatorParameter.ActualName = EvaluatorParameter.Name;
+
+      swarmUpdater.CurrentPositionParameter.ActualName = "Position";
+      swarmUpdater.CurrentQualityParameter.ActualName = "Quality";
+      swarmUpdater.BestGlobalParameter.ActualName = "CurrentBestPosition";
+      swarmUpdater.BestLocalParameter.ActualName = "BestPosition";
+      swarmUpdater.LocalBestQualityParameter.ActualName = "BestQuality";
+      swarmUpdater.GlobalBestQualityParameter.ActualName = "CurrentBestBestQuality";
+      #endregion
+
+      #region Create operator graph
+      OperatorGraph.InitialOperator = variableCreator;
+      variableCreator.Successor = comparator;
+      comparator.Successor = conditionalBranch;
+      conditionalBranch.FalseBranch = uniformSubScopesProcessor;
+      uniformSubScopesProcessor.Operator = velocityUpdater;
+      uniformSubScopesProcessor.Successor = intCounter;
+      velocityUpdater.Successor = decPlaceholder;
+      decPlaceholder.Successor = evaluator;
+      evaluator.Successor = swarmUpdater;
+      swarmUpdater.Successor = null;
+      intCounter.Successor = resultsCollector1;
+      resultsCollector1.Successor = analyzer1;
+      analyzer1.Successor = comparator;
+      #endregion
+    }
+
+    private void EncoderParameter_ActualNameChanged(object sender, EventArgs e) {
+      velocityUpdater.BoundsParameter.ActualName = EncoderParameter.ActualValue.BoundsParameter.ActualName;
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ParticleUpdater.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ParticleUpdater.cs	(revision 5426)
+++ /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ParticleUpdater.cs	(revision 5426)
@@ -0,0 +1,139 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.RealVectorEncoding;
+using HeuristicLab.Operators;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Algorithms.ParticleSwarmOptimization {
+
+  [StorableClass]
+  public abstract class ParticleUpdater : SingleSuccessorOperator, IParticleUpdater {
+
+    #region Parameter properties
+    public ILookupParameter<IRandom> RandomParameter {
+      get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
+    }
+    public ILookupParameter<RealVector> PointParameter {
+      get { return (ILookupParameter<RealVector>)Parameters["Point"]; }
+    }
+    public ILookupParameter<RealVector> VelocityParameter {
+      get { return (ILookupParameter<RealVector>)Parameters["Velocity"]; }
+    }
+    public ILookupParameter<RealVector> PersonalBestPointParameter {
+      get { return (ILookupParameter<RealVector>)Parameters["PersonalBestPoint"]; }
+    }
+    public ILookupParameter<RealVector> BestNeighborPointParameter {
+      get { return (ILookupParameter<RealVector>)Parameters["BestNeighborPoint"]; }
+    }
+    public ILookupParameter<RealVector> BestPointParameter {
+      get { return (ILookupParameter<RealVector>)Parameters["BestPoint"]; }
+    }
+    public ILookupParameter<DoubleMatrix> BoundsParameter {
+      get { return (ILookupParameter<DoubleMatrix>)Parameters["Bounds"]; }
+    }
+    public ILookupParameter<DoubleMatrix> VelocityBoundsParameter {
+      get { return (ILookupParameter<DoubleMatrix>)Parameters["VelocityBounds"]; }
+    }
+    public ILookupParameter<DoubleValue> OmegaParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["Omega"]; }
+    }
+    public ILookupParameter<DoubleValue> Phi_PParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["Phi_P"]; }
+    }
+    public ILookupParameter<DoubleValue> Phi_GParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["Phi_G"]; }
+    }
+    #endregion
+
+    #region Parameter Values
+    public IRandom Random {
+      get { return RandomParameter.ActualValue; }
+    }
+    public RealVector Point {
+      get { return PointParameter.ActualValue; }
+      set { PointParameter.ActualValue = value; }
+    }
+    public RealVector Velocity {
+      get { return VelocityParameter.ActualValue; }
+      set { VelocityParameter.ActualValue = value; }
+    }
+    public RealVector PersonalBestPoint {
+      get { return PersonalBestPointParameter.ActualValue; }
+    }
+    public RealVector BestPoint {
+      get { return BestPointParameter.ActualValue; }
+    }
+    public RealVector BestNeighborPoint {
+      get { return BestNeighborPointParameter.ActualValue; }
+    }
+    public DoubleMatrix Bounds {
+      get { return BoundsParameter.ActualValue; }
+    }
+    public DoubleMatrix VelocityBounds {
+      get { return VelocityBoundsParameter.ActualValue; }
+    }
+
+    public DoubleValue Omega {
+      get { return OmegaParameter.ActualValue; }
+    }
+    public DoubleValue Phi_P {
+      get { return Phi_PParameter.ActualValue; }
+    }
+    public DoubleValue Phi_G {
+      get { return Phi_GParameter.ActualValue; }
+    }
+    #endregion
+
+    public override bool CanChangeName {
+      get { return false; }
+    }
+
+    #region Construction & Cloning
+
+    [StorableConstructor]
+    protected ParticleUpdater(bool deserializing) : base(deserializing) { }
+    protected ParticleUpdater(ParticleUpdater original, Cloner cloner)
+      : base(original, cloner) {
+    }
+
+    public ParticleUpdater()
+      : base() {
+      Parameters.Add(new LookupParameter<IRandom>("Random", "Random number generator."));
+      Parameters.Add(new LookupParameter<RealVector>("Point", "Particle's current position"));
+      Parameters.Add(new LookupParameter<RealVector>("Velocity", "Particle's current velocity."));
+      Parameters.Add(new LookupParameter<RealVector>("PersonalBestPoint", "Particle's personal best position"));
+      Parameters.Add(new LookupParameter<RealVector>("BestPoint", "Global best position"));
+      Parameters.Add(new LookupParameter<RealVector>("BestNeighborPoint", "Best neighboring position"));
+      Parameters.Add(new LookupParameter<DoubleMatrix>("Bounds", "The lower and upper bounds for each dimension of the position vector for the current problem."));
+      Parameters.Add(new LookupParameter<DoubleMatrix>("VelocityBounds", "Upper and lower bounds for the particle's velocity vector."));
+      Parameters.Add(new LookupParameter<DoubleValue>("Omega", "The weight for the particle's velocity vector."));
+      Parameters.Add(new LookupParameter<DoubleValue>("Phi_P", "The weight for the particle's personal best position."));
+      Parameters.Add(new LookupParameter<DoubleValue>("Phi_G", "The weight for the global best position."));
+    }
+
+    #endregion
+  }
+}
Index: /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/PermutationToRealVectorEncoder.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/PermutationToRealVectorEncoder.cs	(revision 5426)
+++ /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/PermutationToRealVectorEncoder.cs	(revision 5426)
@@ -0,0 +1,80 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Encodings.RealVectorEncoding;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+
+namespace HeuristicLab.Algorithms.ParticleSwarmOptimization {
+  public class PermutationToRealVectorEncoder : SingleSuccessorOperator, IRealVectorEncoder {
+
+    public IParameter RealVectorParameter {
+      get { return (IParameter)Parameters["RealVector"]; }
+    }
+
+    public ILookupParameter<Permutation> PermutationParameter {
+      get { return (ILookupParameter<Permutation>)Parameters["Permutation"]; }
+    }
+
+    public ILookupParameter<IntValue> LengthParameter {
+      get { return (ILookupParameter<IntValue>)Parameters["Length"]; }
+    }
+
+    public IValueLookupParameter<DoubleMatrix> BoundsParameter {
+      get { return (IValueLookupParameter<DoubleMatrix>)Parameters["Bounds"]; }
+    }
+
+    public DoubleMatrix Bounds {
+      get { return (DoubleMatrix)BoundsParameter.ActualValue; }
+      set { BoundsParameter.ActualValue = value; }
+    }
+
+    public PermutationToRealVectorEncoder()
+      : base() {
+      Parameters.Add(new LookupParameter<Permutation>("Permutation", "The permutation to encode."));
+      Parameters.Add(new LookupParameter<RealVector>("RealVector", "The resulting real vector."));
+      Parameters.Add(new LookupParameter<IntValue>("Length", "Vector length."));
+      Parameters.Add(new ValueLookupParameter<DoubleMatrix>("Bounds", "The lower and upper bounds in each dimension."));
+    }
+
+    public override IOperation Apply() {
+      Permutation permutation = PermutationParameter.ActualValue;
+
+      RealVector realVector = new RealVector(permutation.Length);
+      double max = permutation.Length;
+      for (int i = 0; i < permutation.Length; i++) {
+        realVector[permutation[i]] = max;
+        max = max - 1;
+      }
+      RealVectorParameter.ActualValue = realVector;
+      LengthParameter.ActualValue = new IntValue(realVector.Length);
+      return base.Apply();
+    }
+
+    public override bool CanChangeName {
+      get { return false; }
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/Properties/AssemblyInfo.frame
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/Properties/AssemblyInfo.frame	(revision 5426)
+++ /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/Properties/AssemblyInfo.frame	(revision 5426)
@@ -0,0 +1,55 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("HeuristicLab.Algorithms.ParticleSwarmOptimization")]
+[assembly: AssemblyDescription("HeuristicLab ParticleSwarmOptimization (PSO)")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("HeuristicLab")]
+[assembly: AssemblyCopyright("(c) 2002-2010 HEAL")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("81f6afd4-4c1f-4867-8c11-726e242dd7cb")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers 
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("3.3.0.0")]
+[assembly: AssemblyFileVersion("3.3.0.$WCREV$")]
Index: /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/RandomTopologyInitializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/RandomTopologyInitializer.cs	(revision 5426)
+++ /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/RandomTopologyInitializer.cs	(revision 5426)
@@ -0,0 +1,87 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.IntegerVectorEncoding;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Algorithms.ParticleSwarmOptimization {
+
+  [Item("Random Topology Initializer", "Randomly connectes every particle with k other particles.")]
+  [StorableClass]
+  public class RandomTopologyInitializer : TopologyInitializer {
+
+    #region Parameters
+    public ILookupParameter<IRandom> RandomParameter {
+      get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
+    }
+    public IValueLookupParameter<IntValue> NrOfConnectionsParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters["NrOfConnections"]; }
+    }
+    #endregion
+
+    #region Parameter Values
+    public IRandom Random {
+      get { return RandomParameter.ActualValue; }
+    }
+    public int NrOfConnections {
+      get { return NrOfConnectionsParameter.ActualValue.Value; }
+    }
+    #endregion
+
+    #region Construction & Cloning
+    public RandomTopologyInitializer() {
+      Parameters.Add(new LookupParameter<IRandom>("Random", "A random number generation."));
+      Parameters.Add(new ValueLookupParameter<IntValue>("NrOfConnections", "Nr of connected neighbors.", new IntValue(3)));
+    }
+    [StorableConstructor]
+    protected RandomTopologyInitializer(bool deserializing) : base(deserializing) { }
+    protected RandomTopologyInitializer(RandomTopologyInitializer original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new RandomTopologyInitializer(this, cloner);
+    }
+    #endregion
+
+    public override IOperation Apply() {
+      ItemArray<IntegerVector> neighbors = new ItemArray<IntegerVector>(SwarmSize);
+      for (int i = 0; i<SwarmSize; i++) {
+        var numbers = Enumerable.Range(0, SwarmSize).ToList();
+        numbers.RemoveAt(i);
+        var selectedNumbers = new List<int>(NrOfConnections);
+        for (int j = 0; j<NrOfConnections && numbers.Count > 0; j++) {
+          int index = Random.Next(numbers.Count);
+          selectedNumbers.Add(numbers[index]);
+          numbers.RemoveAt(index);
+        }
+        neighbors[i] = new IntegerVector(selectedNumbers.ToArray());
+      }
+      Neighbors = neighbors;
+      return base.Apply();
+    }
+
+  }
+}
Index: /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/RingTopologyInitializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/RingTopologyInitializer.cs	(revision 5426)
+++ /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/RingTopologyInitializer.cs	(revision 5426)
@@ -0,0 +1,54 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.IntegerVectorEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Algorithms.ParticleSwarmOptimization {
+
+  [Item("Ring Topology Initializer", "Connected every particle with its preceeding and its following particle.")]
+  [StorableClass]
+  public class RingTopologyInitializer : TopologyInitializer {
+
+    #region Construction & Cloning
+    public RingTopologyInitializer() { }
+    [StorableConstructor]
+    protected RingTopologyInitializer(bool deserializing) : base(deserializing) { }
+    protected RingTopologyInitializer(RingTopologyInitializer original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new RingTopologyInitializer(this, cloner);
+    }
+    #endregion
+
+    public override IOperation Apply() {
+      ItemArray<IntegerVector> neighbors = new ItemArray<IntegerVector>(SwarmSize);
+      for (int i = 0; i<SwarmSize; i++) {
+        neighbors[i] = new IntegerVector(new[] { (SwarmSize + i-1) % SwarmSize, (i+1) % SwarmSize });
+      }
+      Neighbors = neighbors;
+      return base.Apply();
+    }
+
+  }
+}
Index: /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/SwarmUpdater.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/SwarmUpdater.cs	(revision 5426)
+++ /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/SwarmUpdater.cs	(revision 5426)
@@ -0,0 +1,132 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.RealVectorEncoding;
+using HeuristicLab.Operators;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Algorithms.ParticleSwarmOptimization {
+
+  [Item("Swarm Updater", "Updates personal best point and quality as well as global best point and quality.")]
+  [StorableClass]
+  public class SwarmUpdater : SingleSuccessorOperator {
+
+    #region Parameter properties
+    public ILookupParameter<DoubleValue> QualityParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["Quality"]; }
+    }
+    public ILookupParameter<DoubleValue> PersonalBestQualityParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["PersonalBestQuality"]; }
+    }
+    public ILookupParameter<DoubleValue> BestQualityParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["BestQuality"]; }
+    }
+    public ILookupParameter<RealVector> PointParameter {
+      get { return (ILookupParameter<RealVector>)Parameters["Point"]; }
+    }
+    public ILookupParameter<RealVector> PersonalBestPointParameter {
+      get { return (ILookupParameter<RealVector>)Parameters["PersonalBestPoint"]; }
+    }
+    public ILookupParameter<RealVector> BestPointParameter {
+      get { return (ILookupParameter<RealVector>)Parameters["BestPoint"]; }
+    }
+    public IValueLookupParameter<BoolValue> MaximizationParameter {
+      get { return (IValueLookupParameter<BoolValue>)Parameters["Maximization"]; }
+    }
+    #endregion
+
+    #region Parameter values
+    public double Quality {
+      get { return QualityParameter.ActualValue.Value; }
+    }
+    public double PersonalBestQuality {
+      get { return PersonalBestQualityParameter.ActualValue.Value; }
+      set { PersonalBestQualityParameter.ActualValue = new DoubleValue(value); }
+    }
+    public double BestQuality {
+      get { return BestQualityParameter.ActualValue.Value; }
+      set { BestQualityParameter.ActualValue = new DoubleValue(value); }
+    }
+    public RealVector Point {
+      get { return PointParameter.ActualValue; }
+    }
+    public RealVector PersonalBestPoint {
+      get { return PersonalBestPointParameter.ActualValue; }
+      set { PersonalBestPointParameter.ActualValue = value; }
+    }
+    public RealVector BestPoint {
+      get { return BestPointParameter.ActualValue; }
+      set { BestPointParameter.ActualValue = value; }
+    }
+    public bool Maximization {
+      get { return MaximizationParameter.ActualValue.Value; }
+    }
+    #endregion
+
+    #region Construction & Cloning
+
+    [StorableConstructor]
+    protected SwarmUpdater(bool deserializing) : base(deserializing) { }
+    protected SwarmUpdater(SwarmUpdater original, Cloner cloner)
+      : base(original, cloner) {
+    }
+
+    public SwarmUpdater()
+      : base() {
+      Parameters.Add(new LookupParameter<DoubleValue>("Quality", "Particle's quality"));
+      Parameters.Add(new LookupParameter<DoubleValue>("PersonalBestQuality", "Particle's personal best quality"));
+      Parameters.Add(new LookupParameter<DoubleValue>("BestQuality", "Global best particle quality"));
+      Parameters.Add(new LookupParameter<RealVector>("Point", "Particle's position"));
+      Parameters.Add(new LookupParameter<RealVector>("PersonalBestPoint", "Particle's personal best position"));
+      Parameters.Add(new LookupParameter<RealVector>("BestPoint", "Globa best particle position"));
+      Parameters.Add(new ValueLookupParameter<BoolValue>("Maximization", "True if the problem is a maximization problem, otherwise false."));
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SwarmUpdater(this, cloner);
+    }
+
+    #endregion
+
+    public override IOperation Apply() {
+
+      if (Maximization && Quality > PersonalBestQuality ||
+         !Maximization && Quality < PersonalBestQuality) {
+        PersonalBestQuality = Quality;
+        PersonalBestPoint = Point;
+        if (Maximization && PersonalBestQuality > BestQuality ||
+           !Maximization && PersonalBestQuality < BestQuality) {
+          BestQuality = PersonalBestQuality;
+          BestPoint = PersonalBestPoint;
+        }
+      }
+      return base.Apply();
+    }
+
+    public override bool CanChangeName {
+      get { return false; }
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/TopologyInitializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/TopologyInitializer.cs	(revision 5426)
+++ /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/TopologyInitializer.cs	(revision 5426)
@@ -0,0 +1,68 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.IntegerVectorEncoding;
+using HeuristicLab.Operators;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Algorithms.ParticleSwarmOptimization {
+
+  [StorableClass]
+  public abstract class TopologyInitializer : SingleSuccessorOperator, ITopologyInitializer {
+
+    #region Parameters
+    public IScopeTreeLookupParameter<IntegerVector> NeighborsParameter {
+      get { return (IScopeTreeLookupParameter<IntegerVector>)Parameters["Neighbors"]; }
+    }
+    public ILookupParameter<IntValue> SwarmSizeParameter {
+      get { return (ILookupParameter<IntValue>)Parameters["SwarmSize"]; }
+    }
+
+    #endregion
+
+    #region Parameter Values
+    public ItemArray<IntegerVector> Neighbors {
+      get { return NeighborsParameter.ActualValue; }
+      set { NeighborsParameter.ActualValue = value; }
+    }
+    public int SwarmSize {
+      get { return SwarmSizeParameter.ActualValue.Value; }
+    }
+    #endregion
+
+    #region Construction & Cloning
+    protected TopologyInitializer() {
+      Parameters.Add(new ScopeTreeLookupParameter<IntegerVector>("Neighbors", "The list of neighbors for each particle."));
+      Parameters.Add(new LookupParameter<IntValue>("SwarmSize", "Number of particles in the swarm."));
+    }
+    [StorableConstructor]
+    protected TopologyInitializer(bool deserializing) : base(deserializing) { }
+    protected TopologyInitializer(TopologyInitializer original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    #endregion
+
+  }
+
+}
Index: /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/TotallyConnectedParticleUpdater.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/TotallyConnectedParticleUpdater.cs	(revision 5426)
+++ /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/TotallyConnectedParticleUpdater.cs	(revision 5426)
@@ -0,0 +1,72 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.RealVectorEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Algorithms.ParticleSwarmOptimization {
+
+  [Item("Totally Connected Particle Updater", "Updates the particle's position using (among other things) the global best position. Use together with the empty topology initialzer. Point = Point + Velocity*Omega + (PersonalBestPoint-Point)*Phi_P*r_p + (BestPoint-Point)*Phi_G*r_g")]
+  [StorableClass]
+  public class TotallyConnectedParticleUpdater : ParticleUpdater, IGlobalParticleUpdater {
+
+    #region Construction & Cloning
+
+    [StorableConstructor]
+    protected TotallyConnectedParticleUpdater(bool deserializing) : base(deserializing) { }
+    protected TotallyConnectedParticleUpdater(ParticleUpdater original, Cloner cloner) : base(original, cloner) { }
+    public TotallyConnectedParticleUpdater() : base() { }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new TotallyConnectedParticleUpdater(this, cloner);
+    }
+
+    #endregion
+
+    public override IOperation Apply() {
+      base.Apply();
+      RealVector velocity = new RealVector(Velocity.Length);
+      RealVector position = new RealVector(Point.Length);
+      double r_p = Random.NextDouble();
+      double r_g = Random.NextDouble();
+      double omega = Omega.Value;
+      double phi_p = Phi_P.Value;
+      double phi_g = Phi_G.Value;
+      for (int i = 0; i < velocity.Length; i++) {
+        velocity[i] =
+          Velocity[i] * omega +
+          (PersonalBestPoint[i] - Point[i]) * phi_p * r_p +
+          (BestPoint[i] - Point[i]) * phi_g * r_g;
+      }
+      BoundsChecker.Apply(velocity, VelocityBounds);
+      for (int i = 0; i < velocity.Length; i++) {
+        position[i] = Point[i] + velocity[i];
+      }
+      BoundsChecker.Apply(position, Bounds);
+      Point = position;
+      Velocity = velocity;
+
+      return base.Apply();
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/VelocityBoundsModifier.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/VelocityBoundsModifier.cs	(revision 5426)
+++ /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/VelocityBoundsModifier.cs	(revision 5426)
@@ -0,0 +1,140 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Operators;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.Algorithms.ParticleSwarmOptimization {
+
+  [StorableClass]
+  public class VelocityBoundsModifier : SingleSuccessorOperator, IDiscreteDoubleMatrixModifier {
+
+    #region Parameters
+    public ILookupParameter<DoubleMatrix> ValueParameter {
+      get { return (ILookupParameter<DoubleMatrix>)Parameters["Matrix"]; }
+    }
+    public IValueLookupParameter<DoubleValue> ScaleParameter {
+      get { return (IValueLookupParameter<DoubleValue>)Parameters["Scale"]; }
+    }
+    public ConstrainedValueParameter<IDiscreteDoubleValueModifier> ScalingOperatorParameter {
+      get { return (ConstrainedValueParameter<IDiscreteDoubleValueModifier>)Parameters["ScalingOperator"]; }
+    }
+    public IValueLookupParameter<DoubleValue> StartValueParameter {
+      get { return (IValueLookupParameter<DoubleValue>)Parameters["StartValue"]; }
+    }
+    public IValueLookupParameter<DoubleValue> EndValueParameter {
+      get { return (IValueLookupParameter<DoubleValue>)Parameters["EndValue"]; }
+    }
+    public ILookupParameter<IntValue> IndexParameter {
+      get { return (ILookupParameter<IntValue>)Parameters["Index"]; }
+    }
+    public IValueLookupParameter<IntValue> StartIndexParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters["StartIndex"]; }
+    }
+    public IValueLookupParameter<IntValue> EndIndexParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters["EndIndex"]; }
+    }
+    #endregion
+
+    #region Construction & Cloning
+
+    [StorableConstructor]
+    protected VelocityBoundsModifier(bool deserializing) : base(deserializing) { }
+    protected VelocityBoundsModifier(VelocityBoundsModifier original, Cloner cloner) : base(original, cloner) {
+      Initialize();
+    }
+    public VelocityBoundsModifier() {
+      Parameters.Add(new LookupParameter<DoubleMatrix>("Matrix", "The double matrix to modify."));
+      Parameters.Add(new ValueLookupParameter<DoubleValue>("Scale", "Scale parameter."));
+      Parameters.Add(new ConstrainedValueParameter<IDiscreteDoubleValueModifier>("ScalingOperator", "Modifies the value"));
+      Parameters.Add(new ValueLookupParameter<DoubleValue>("StartValue", "The start value of 'Value'.", new DoubleValue(1)));
+      Parameters.Add(new ValueLookupParameter<DoubleValue>("EndValue", "The end value of 'Value'."));
+      Parameters.Add(new LookupParameter<IntValue>("Index", "The current index."));
+      Parameters.Add(new ValueLookupParameter<IntValue>("StartIndex", "The start index at which to start modifying 'Value'."));
+      Parameters.Add(new ValueLookupParameter<IntValue>("EndIndex", "The end index by which 'Value' should have reached 'EndValue'."));
+      Initialize();
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new VelocityBoundsModifier(this, cloner);
+    }
+
+    private void Initialize() {
+      foreach (IDiscreteDoubleValueModifier op in ApplicationManager.Manager.GetInstances<IDiscreteDoubleValueModifier>()) {
+        ScalingOperatorParameter.ValidValues.Add(op);
+        op.ValueParameter.ActualName = ScaleParameter.ActualName;
+      }
+      ScaleParameter.ActualNameChanged += new EventHandler(ScaleParameter_ActualNameChanged);
+      StartValueParameter.ActualNameChanged += new EventHandler(StartValueParameter_ActualNameChanged);
+      EndValueParameter.ActualNameChanged += new EventHandler(EndValueParameter_ActualNameChanged);
+      IndexParameter.ActualNameChanged += new EventHandler(IndexParameter_ActualNameChanged);
+      EndIndexParameter.ActualNameChanged += new EventHandler(EndIndexParameter_ActualNameChanged);
+      StartIndexParameter.ActualNameChanged += new EventHandler(StartIndexParameter_ActualNameChanged);
+    }
+    #endregion
+
+    #region Events
+    private void ScaleParameter_ActualNameChanged(object sender, EventArgs e) {
+      foreach (IDiscreteDoubleValueModifier modifier in ScalingOperatorParameter.ValidValues) {
+        modifier.ValueParameter.ActualName = ScaleParameter.ActualName;
+      }
+    }
+
+    private void StartValueParameter_ActualNameChanged(object sender, EventArgs e) {
+      foreach (IDiscreteDoubleValueModifier modifier in ScalingOperatorParameter.ValidValues) {
+        modifier.StartValueParameter.ActualName = StartValueParameter.ActualName;
+      }
+    }
+
+    private void EndValueParameter_ActualNameChanged(object sender, EventArgs e) {
+      foreach (IDiscreteDoubleValueModifier modifier in ScalingOperatorParameter.ValidValues) {
+        modifier.EndValueParameter.ActualName = EndValueParameter.ActualName;
+      }
+    }
+
+    private void IndexParameter_ActualNameChanged(object sender, EventArgs e) {
+      foreach (IDiscreteDoubleValueModifier modifier in ScalingOperatorParameter.ValidValues) {
+        modifier.IndexParameter.ActualName = IndexParameter.ActualName;
+      }
+    }
+
+    private void StartIndexParameter_ActualNameChanged(object sender, EventArgs e) {
+      foreach (IDiscreteDoubleValueModifier modifier in ScalingOperatorParameter.ValidValues) {
+        modifier.StartIndexParameter.ActualName = StartIndexParameter.ActualName;
+      }
+    }
+
+    private void EndIndexParameter_ActualNameChanged(object sender, EventArgs e) {
+      foreach (IDiscreteDoubleValueModifier modifier in ScalingOperatorParameter.ValidValues) {
+        modifier.EndIndexParameter.ActualName = EndIndexParameter.ActualName;
+      }
+    }
+    #endregion
+
+    public override IOperation Apply() {
+      OperationCollection next = new OperationCollection();
+      DoubleMatrix matrix = ValueParameter.ActualValue;
+      if (this.ScaleParameter.ActualValue == null && this.StartValueParameter.ActualValue != null) {
+        this.ScaleParameter.ActualValue = new DoubleValue(StartValueParameter.ActualValue.Value);
+      }
+      for (int i = 0; i < matrix.Rows; i++) {
+        for (int j = 0; j < matrix.Columns; j++) {
+          if (matrix[i, j] >= 0) {
+            matrix[i, j] = ScaleParameter.ActualValue.Value;
+          } else {
+            matrix[i, j] = (-1) * ScaleParameter.ActualValue.Value;
+          }
+        }
+      }
+      next.Add(ExecutionContext.CreateChildOperation(this.ScalingOperatorParameter.Value));
+      next.Add(base.Apply());
+      return next;
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/VonNeumannTopologyInitializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/VonNeumannTopologyInitializer.cs	(revision 5426)
+++ /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/VonNeumannTopologyInitializer.cs	(revision 5426)
@@ -0,0 +1,59 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.IntegerVectorEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Algorithms.ParticleSwarmOptimization {
+
+  [Item("Von Neumann Topology Initializer", "Every particle is connected with the two following and the two previous particles wrapping around at the beginning and the end of the population.")]
+  [StorableClass]
+  public class VonNeumannTopologyInitializer : TopologyInitializer {
+
+    #region Construction & Cloning
+    public VonNeumannTopologyInitializer() { }
+    [StorableConstructor]
+    protected VonNeumannTopologyInitializer(bool deserializing) : base(deserializing) { }
+    protected VonNeumannTopologyInitializer(VonNeumannTopologyInitializer original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new VonNeumannTopologyInitializer(this, cloner);
+    }
+    #endregion
+
+    public override IOperation Apply() {
+      ItemArray<IntegerVector> neighbors = new ItemArray<IntegerVector>(SwarmSize);
+      for (int i = 0; i<SwarmSize; i++) {
+        neighbors[i] = new IntegerVector(new[] {
+          (SwarmSize + i-2) % SwarmSize,
+          (SwarmSize + i-1) % SwarmSize,
+          (i+1) % SwarmSize,
+          (i+2) % SwarmSize
+        });
+      }
+      Neighbors = neighbors;
+      return base.Apply();
+    }
+
+  }
+}
Index: /trunk/sources/HeuristicLab/3.3/Files.txt
===================================================================
--- /trunk/sources/HeuristicLab/3.3/Files.txt	(revision 5425)
+++ /trunk/sources/HeuristicLab/3.3/Files.txt	(revision 5426)
@@ -11,4 +11,5 @@
 HeuristicLab.Algorithms.NSGA2\3.3:HeuristicLab.Algorithms.NSGA2-3.3.dll
 HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm\3.3:HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm-3.3.dll
+HeuristicLab.Algorithms.ParticleSwarmOptimization\3.3:HeuristicLab.Algorithms.ParticleSwarmOptimization-3.3.dll
 HeuristicLab.Algorithms.SimulatedAnnealing\3.3:HeuristicLab.Algorithms.SimulatedAnnealing-3.3.dll
 HeuristicLab.Algorithms.TabuSearch\3.3:HeuristicLab.Algorithms.TabuSearch-3.3.dll
Index: /trunk/sources/HeuristicLab/3.3/Tests/Builder.testsettings
===================================================================
--- /trunk/sources/HeuristicLab/3.3/Tests/Builder.testsettings	(revision 5425)
+++ /trunk/sources/HeuristicLab/3.3/Tests/Builder.testsettings	(revision 5426)
@@ -93,4 +93,5 @@
     <DeploymentItem filename="HeuristicLab\3.3\Tests\bin\Release\HeuristicLab.Problems.DataAnalysis.Classification.Views-3.3.dll" />
     <DeploymentItem filename="HeuristicLab\3.3\Tests\bin\Release\HeuristicLab.Optimization.Operators-3.3.dll" />
+    <DeploymentItem filename="HeuristicLab\3.3\Tests\bin\Release\HeuristicLab.Algorithms.ParticleSwarmOptimization-3.3.dll" />
   </Deployment>
   <Execution>
Index: /trunk/sources/HeuristicLab/3.3/Tests/HeuristicLab-3.3.Tests.csproj
===================================================================
--- /trunk/sources/HeuristicLab/3.3/Tests/HeuristicLab-3.3.Tests.csproj	(revision 5425)
+++ /trunk/sources/HeuristicLab/3.3/Tests/HeuristicLab-3.3.Tests.csproj	(revision 5426)
@@ -159,4 +159,8 @@
       <Name>HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm-3.3</Name>
     </ProjectReference>
+    <ProjectReference Include="..\..\..\HeuristicLab.Algorithms.ParticleSwarmOptimization\3.3\HeuristicLab.Algorithms.ParticleSwarmOptimization-3.3.csproj">
+      <Project>{2C429157-9C34-4DD3-9D5F-B444B751E39A}</Project>
+      <Name>HeuristicLab.Algorithms.ParticleSwarmOptimization-3.3</Name>
+    </ProjectReference>
     <ProjectReference Include="..\..\..\HeuristicLab.Algorithms.SimulatedAnnealing\3.3\HeuristicLab.Algorithms.SimulatedAnnealing-3.3.csproj">
       <Project>{96E5ED5B-187D-4012-9CDA-D85CDAD38342}</Project>
