Index: branches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/HeuristicLab.Algorithms.ParticleSwarmOptimization-3.3.csproj
===================================================================
--- branches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/HeuristicLab.Algorithms.ParticleSwarmOptimization-3.3.csproj	(revision 4397)
+++ branches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/HeuristicLab.Algorithms.ParticleSwarmOptimization-3.3.csproj	(revision 4397)
@@ -0,0 +1,212 @@
+﻿<?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>v3.5</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>
+  </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="HeuristicLabAlgorithmsParticleSwarmOptimizationPlugin.cs" />
+    <Compile Include="ParticleSwarmOptimization.cs" />
+    <Compile Include="ParticleSwarmOptimizationMainLoop.cs" />
+    <Compile Include="PermutationToRealVectorEncoder.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>
+    <Reference Include="HeuristicLab.Analysis-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=x86">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>C:\Program Files\HeuristicLab 3.3\HeuristicLab.Analysis-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Collections-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=x86">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>C:\Program Files\HeuristicLab 3.3\HeuristicLab.Collections-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Common-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=x86">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>C:\Program Files\HeuristicLab 3.3\HeuristicLab.Common-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Core-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=x86">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>C:\Program Files\HeuristicLab 3.3\HeuristicLab.Core-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Data-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=x86">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>C:\Program Files\HeuristicLab 3.3\HeuristicLab.Data-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Encodings.PermutationEncoding-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=x86">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>C:\Program Files\HeuristicLab 3.3\HeuristicLab.Encodings.PermutationEncoding-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Encodings.RealVectorEncoding-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=x86">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>C:\Program Files\HeuristicLab 3.3\HeuristicLab.Encodings.RealVectorEncoding-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Operators-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=x86">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>C:\Program Files\HeuristicLab 3.3\HeuristicLab.Operators-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Optimization-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=x86">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>C:\Program Files\HeuristicLab 3.3\HeuristicLab.Optimization-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Optimization.Operators-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=x86">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>C:\Program Files\HeuristicLab 3.3\HeuristicLab.Optimization.Operators-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Parameters-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=x86">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>C:\Program Files\HeuristicLab 3.3\HeuristicLab.Parameters-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Persistence-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=x86">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>C:\Program Files\HeuristicLab 3.3\HeuristicLab.Persistence-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.PluginInfrastructure-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=x86">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>C:\Program Files\HeuristicLab 3.3\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Random-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=x86">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>C:\Program Files\HeuristicLab 3.3\HeuristicLab.Random-3.3.dll</HintPath>
+    </Reference>
+  </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>
+  <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"</PreBuildEvent>
+  </PropertyGroup>
+</Project>
Index: branches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/HeuristicLabAlgorithmsParticleSwarmOptimizationPlugin.cs.frame
===================================================================
--- branches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/HeuristicLabAlgorithmsParticleSwarmOptimizationPlugin.cs.frame	(revision 4397)
+++ branches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/HeuristicLabAlgorithmsParticleSwarmOptimizationPlugin.cs.frame	(revision 4397)
@@ -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.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")]
+  [PluginDependency("HeuristicLab.Selection", "3.3")]
+  public class HeuristicLabAlgorithmsParticleSwarmOptimizationPlugin : PluginBase {
+  }
+}
Index: branches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/IRealVectorEncoder.cs
===================================================================
--- branches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/IRealVectorEncoder.cs	(revision 4397)
+++ branches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/IRealVectorEncoder.cs	(revision 4397)
@@ -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: branches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ParticleSwarmOptimization.cs
===================================================================
--- branches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ParticleSwarmOptimization.cs	(revision 4397)
+++ branches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ParticleSwarmOptimization.cs	(revision 4397)
@@ -0,0 +1,272 @@
+﻿#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.Collections.Generic;
+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.Random;
+
+namespace HeuristicLab.Algorithms.ParticleSwarmOptimization {
+  [Item("Particle Swarm Optimization", "A particle swarm optimization algorithm.")]
+  [Creatable("Algorithms")]
+  [StorableClass]
+  public sealed class ParticleSwarmOptimization : EngineAlgorithm {
+    #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 IRealVectorEncoder Encoder {
+      get { return EncoderParameter.Value; }
+      set { EncoderParameter.Value = value; }
+    }
+    public MultiAnalyzer Analyzer {
+      get { return AnalyzerParameter.Value; }
+      set { AnalyzerParameter.Value = value; }
+    }
+    #endregion
+
+    #region Parameter Properties
+    private ValueParameter<IntValue> SeedParameter {
+      get { return (ValueParameter<IntValue>)Parameters["Seed"]; }
+    }
+    private ValueParameter<BoolValue> SetSeedRandomlyParameter {
+      get { return (ValueParameter<BoolValue>)Parameters["SetSeedRandomly"]; }
+    }
+    private ValueParameter<IntValue> SwarmSizeParameter {
+      get { return (ValueParameter<IntValue>)Parameters["SwarmSize"]; }
+    }
+    private ValueParameter<IntValue> MaxIterationsParameter {
+      get { return (ValueParameter<IntValue>)Parameters["MaxIterations"]; }
+    }
+    private OptionalConstrainedValueParameter<IRealVectorEncoder> EncoderParameter {
+      get { return (OptionalConstrainedValueParameter<IRealVectorEncoder>)Parameters["Encoder"]; }
+    }
+    private ValueParameter<MultiAnalyzer> AnalyzerParameter {
+      get { return (ValueParameter<MultiAnalyzer>)Parameters["Analyzer"]; }
+    }
+    #endregion
+
+    #region Properties
+    [Storable]
+    private ParticleSwarmOptimizationMainLoop mainLoop; // Check this !
+    private ParticleSwarmOptimizationMainLoop MainLoop {
+      get { return mainLoop; }
+    }
+    [Storable]
+    private Assigner bestLocalQualityInitalizer; // Check this !
+    private Assigner BestLocalQualityInitalizer {
+      get { return bestLocalQualityInitalizer; }
+    }
+    [Storable]
+    private BestAverageWorstQualityAnalyzer qualityAnalyzer;
+    #endregion
+
+    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 ConstrainedValueParameter<IRealVectorEncoder>("Encoder", "The operator used to encode solutions as position vector."));
+      Parameters.Add(new ValueParameter<MultiAnalyzer>("Analyzer", "The operator used to analyze each generation.", new MultiAnalyzer()));
+      RandomCreator randomCreator = new RandomCreator();
+      SolutionsCreator solutionsCreator = new SolutionsCreator();
+      UniformSubScopesProcessor uniformSubScopesProcessor = new UniformSubScopesProcessor();
+      UniformSubScopesProcessor uniformSubScopesProcessor2 = new UniformSubScopesProcessor();
+      VariableCreator variableCreator = new VariableCreator();
+      VariableCreator localVariableCreator = new VariableCreator();
+      Placeholder encoder = new Placeholder();
+      UniformRandomRealVectorCreator velocityVectorCreator = new UniformRandomRealVectorCreator();
+      bestLocalQualityInitalizer = new Assigner();
+      Assigner bestLocalPositionInitalizer = new Assigner();
+      Assigner bestGlobalPositionInitalizer = new Assigner();
+      mainLoop = new ParticleSwarmOptimizationMainLoop();
+      BestAverageWorstQualityCalculator bawCalculator = new BestAverageWorstQualityCalculator();
+      Comparator comparator = new Comparator();
+      ConditionalBranch branch = new ConditionalBranch();
+
+      variableCreator.CollectedValues.Add(new ValueParameter<RealVector>("CurrentBestPosition", new RealVector()));
+      variableCreator.CollectedValues.Add(new ValueParameter<DoubleMatrix>("ZeroBounds", new DoubleMatrix(new double[,] { { 0, 0 } })));
+      variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("Length", new IntValue(2)));
+
+      localVariableCreator.CollectedValues.Add(new ValueParameter<DoubleValue>("BestQuality", new DoubleValue(0)));
+      localVariableCreator.CollectedValues.Add(new ValueParameter<RealVector>("BestPosition", new RealVector()));
+
+      randomCreator.RandomParameter.ActualName = "Random";
+      randomCreator.SeedParameter.ActualName = SeedParameter.Name;
+      randomCreator.SeedParameter.Value = null;
+      randomCreator.SetSeedRandomlyParameter.ActualName = SetSeedRandomlyParameter.Name;
+      randomCreator.SetSeedRandomlyParameter.Value = null;
+
+      solutionsCreator.NumberOfSolutionsParameter.ActualName = SwarmSizeParameter.Name;
+
+      encoder.OperatorParameter.ActualName = "Encoder";
+
+      velocityVectorCreator.BoundsParameter.ActualName = "ZeroBounds";
+      velocityVectorCreator.RealVectorParameter.ActualName = "Velocity";
+
+      bestLocalQualityInitalizer.LeftSideParameter.ActualName = "BestQuality"; // cloned value
+      bestLocalQualityInitalizer.RightSideParameter.ActualName = "Quality"; // FIXME!!! Should be mapped
+
+      bestLocalPositionInitalizer.LeftSideParameter.ActualName = "BestPosition";
+      bestLocalPositionInitalizer.RightSideParameter.ActualName = "Position"; // FixMe
+
+      bestGlobalPositionInitalizer.LeftSideParameter.ActualName = "CurrentBestPosition";
+      bestGlobalPositionInitalizer.RightSideParameter.ActualName = "BestPosition";
+
+      bawCalculator.AverageQualityParameter.ActualName = "CurrentAverageBestQuality";
+      bawCalculator.BestQualityParameter.ActualName = "CurrentBestBestQuality";
+      bawCalculator.MaximizationParameter.ActualName = "Maximization"; // FIXME
+      bawCalculator.QualityParameter.ActualName = "Quality";
+      bawCalculator.WorstQualityParameter.ActualName = "CurrentWorstBestQuality";
+
+      comparator.Comparison = new Comparison(ComparisonType.Equal);
+      comparator.LeftSideParameter.ActualName = "Quality";
+      comparator.ResultParameter.ActualName = "NewGlobalBest";
+      comparator.RightSideParameter.ActualName = "CurrentBestBestQuality";
+
+      branch.ConditionParameter.ActualName = "NewGlobalBest";
+      branch.TrueBranch = bestGlobalPositionInitalizer; // copy position vector
+
+      mainLoop.MaximumGenerationsParameter.ActualName = MaxIterationsParameter.Name;
+      mainLoop.ResultsParameter.ActualName = "Results";
+      mainLoop.AnalyzerParameter.ActualName = AnalyzerParameter.Name;
+
+      OperatorGraph.InitialOperator = randomCreator;
+      randomCreator.Successor = solutionsCreator;
+      solutionsCreator.Successor = variableCreator;
+      variableCreator.Successor = uniformSubScopesProcessor;
+      uniformSubScopesProcessor.Operator = encoder;
+      encoder.Successor = velocityVectorCreator;
+      velocityVectorCreator.Successor = localVariableCreator;
+      localVariableCreator.Successor = bestLocalQualityInitalizer;
+      bestLocalQualityInitalizer.Successor = bestLocalPositionInitalizer;
+      uniformSubScopesProcessor.Successor = bawCalculator; // mainLoop;
+      bawCalculator.Successor = uniformSubScopesProcessor2;
+      uniformSubScopesProcessor2.Operator = comparator;
+      comparator.Successor = branch;
+      uniformSubScopesProcessor2.Successor = mainLoop;
+      InitializeAnalyzers();
+      UpdateAnalyzers();
+      Initialize();
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void Initialize() {
+      EncoderParameter.ValueChanged += new EventHandler(EncoderParameter_ValueChanged);
+      if (Problem != null) {
+        bestLocalQualityInitalizer.RightSideParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName;
+      }
+    }
+
+    [StorableConstructor]
+    private ParticleSwarmOptimization(bool deserializing) : base(deserializing) { }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      ParticleSwarmOptimization clone = (ParticleSwarmOptimization)base.Clone(cloner);
+      clone.Initialize();
+      return clone;
+    }
+
+    public override void Prepare() {
+      if (Problem != null) base.Prepare();
+    }
+
+    #region Events
+    protected override void OnProblemChanged() {
+      UpdateEncoders();
+      UpdateAnalyzers();
+      ParameterizeAnalyzers();
+      bestLocalQualityInitalizer.RightSideParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName;
+      Problem.Evaluator.QualityParameter.ActualNameChanged += new EventHandler(Evaluator_QualityParameter_ActualNameChanged);
+      MainLoop.EvaluatorParameter.ActualName = Problem.EvaluatorParameter.Name;
+      base.OnProblemChanged();
+    }
+
+    private void EncoderParameter_ValueChanged(object sender, EventArgs e) {
+      //MainLoop.EncoderParameter.ActualValue = (IRealVectorEncoder) EncoderParameter.ActualValue;
+      //((UniformSubScopesProcessor)((VariableCreator)((SolutionsCreator)((RandomCreator)OperatorGraph.InitialOperator).Successor).Successor).Successor).Operator = EncoderParameter.Value;
+      //((SingleSuccessorOperator)EncoderParameter.Value).Successor = ((SingleSuccessorOperator)old).Successor;
+    }
+    #endregion
+
+    #region Helpers
+    private void Evaluator_QualityParameter_ActualNameChanged(object sender, EventArgs e) {
+      // 
+      //
+    }
+
+    private void UpdateEncoders() {
+      IRealVectorEncoder oldEncoder = EncoderParameter.Value;
+      EncoderParameter.ValidValues.Clear();
+      List<IRealVectorEncoder> encoders = Problem.Operators.OfType<IRealVectorEncoder>().OrderBy(x => x.Name).ToList<IRealVectorEncoder>();
+      if (encoders.Count > 0) {  // ToDo: Add wiring; else: use Position Vector directly --> name matching
+        foreach (IRealVectorEncoder encoder in Problem.Operators.OfType<IRealVectorEncoder>().OrderBy(x => x.Name)) {
+          EncoderParameter.ValidValues.Add(encoder);
+          ((ILookupParameter)encoder.RealVectorParameter).ActualName = "Position";
+        }
+        if (oldEncoder != null) {
+          IRealVectorEncoder encoder = EncoderParameter.ValidValues.FirstOrDefault(x => x.GetType() == oldEncoder.GetType());
+          if (encoder != null) EncoderParameter.Value = encoder;
+        }
+      }
+    }
+
+    private void InitializeAnalyzers() {
+      qualityAnalyzer = new BestAverageWorstQualityAnalyzer();
+      ParameterizeAnalyzers();
+    }
+
+    private void ParameterizeAnalyzers() {
+      qualityAnalyzer.ResultsParameter.ActualName = "Results";
+      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);
+    }
+
+    #endregion
+  }
+}
Index: branches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ParticleSwarmOptimizationMainLoop.cs
===================================================================
--- branches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ParticleSwarmOptimizationMainLoop.cs	(revision 4397)
+++ branches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ParticleSwarmOptimizationMainLoop.cs	(revision 4397)
@@ -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: branches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ParticleUpdater.cs
===================================================================
--- branches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ParticleUpdater.cs	(revision 4397)
+++ branches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ParticleUpdater.cs	(revision 4397)
@@ -0,0 +1,90 @@
+﻿#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.Operators;
+using HeuristicLab.Parameters;
+
+namespace HeuristicLab.Algorithms.ParticleSwarmOptimization {
+  public class ParticleUpdater : SingleSuccessorOperator { // ParticleUpdater
+    #region Parameter properties
+
+    public ILookupParameter<RealVector> VelocityParameter {
+      get { return (ILookupParameter<RealVector>)Parameters["Velocity"]; }
+    }
+
+    public IParameter RandomParameter {
+      get { return (IParameter)Parameters["Random"]; }
+    }
+
+    public ILookupParameter<RealVector> CurrentPositionParameter {
+      get { return (ILookupParameter<RealVector>)Parameters["CurrentPosition"]; }
+    }
+
+    public ILookupParameter<RealVector> BestLocalParameter {
+      get { return (ILookupParameter<RealVector>)Parameters["BestLocal"]; }
+    }
+
+    public ILookupParameter<RealVector> BestGlobalParameter {
+      get { return (ILookupParameter<RealVector>)Parameters["BestGlobal"]; }
+    }
+
+    public ILookupParameter<DoubleMatrix> BoundsParameter {
+      get { return (ILookupParameter<DoubleMatrix>)Parameters["Bounds"]; }
+    }
+    #endregion
+
+    public ParticleUpdater()
+      : base() {
+      Parameters.Add(new LookupParameter<IRandom>("Random", "Random number generator (to generate alpha an beta)."));
+      Parameters.Add(new LookupParameter<RealVector>("Velocity", "The velocity vector to update."));
+      Parameters.Add(new LookupParameter<RealVector>("CurrentPosition", "Current position"));
+      Parameters.Add(new LookupParameter<RealVector>("BestLocal", "Best local position"));
+      Parameters.Add(new LookupParameter<RealVector>("BestGlobal", "Best global position"));
+      Parameters.Add(new LookupParameter<DoubleMatrix>("Bounds", "The lower and upper bounds for each dimension of the position vector."));
+    }
+
+    public override IOperation Apply() {
+      double alpha = ((IRandom)RandomParameter.ActualValue).NextDouble();
+      double beta = ((IRandom)RandomParameter.ActualValue).NextDouble();
+      RealVector velocity = (RealVector)VelocityParameter.ActualValue;
+      for (int i = 0; i < velocity.Length; i++) {
+        velocity[i] = velocity[i] + alpha * (BestLocalParameter.ActualValue[i] - CurrentPositionParameter.ActualValue[i]) + beta * (BestGlobalParameter.ActualValue[i] - CurrentPositionParameter.ActualValue[i]);
+      }
+      VelocityParameter.ActualValue = velocity;
+      for (int i = 0; i < CurrentPositionParameter.ActualValue.Length; i++) {
+        CurrentPositionParameter.ActualValue[i] = CurrentPositionParameter.ActualValue[i] + VelocityParameter.ActualValue[i];
+        if (CurrentPositionParameter.ActualValue[i] < BoundsParameter.ActualValue[0, 0]) {
+          CurrentPositionParameter.ActualValue[i] = BoundsParameter.ActualValue[0, 0];
+        } else if (CurrentPositionParameter.ActualValue[i] > BoundsParameter.ActualValue[0, 1]) {
+          CurrentPositionParameter.ActualValue[i] = BoundsParameter.ActualValue[0, 1];
+        }
+      }
+      return base.Apply();
+    }
+
+    public override bool CanChangeName {
+      get { return false; }
+    }
+  }
+}
Index: branches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/PermutationToRealVectorEncoder.cs
===================================================================
--- branches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/PermutationToRealVectorEncoder.cs	(revision 4397)
+++ branches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/PermutationToRealVectorEncoder.cs	(revision 4397)
@@ -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: branches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/Properties/AssemblyInfo.frame
===================================================================
--- branches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/Properties/AssemblyInfo.frame	(revision 4397)
+++ branches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/Properties/AssemblyInfo.frame	(revision 4397)
@@ -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: branches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/SwarmUpdater.cs
===================================================================
--- branches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/SwarmUpdater.cs	(revision 4397)
+++ branches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/SwarmUpdater.cs	(revision 4397)
@@ -0,0 +1,99 @@
+﻿#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.Operators;
+using HeuristicLab.Parameters;
+
+namespace HeuristicLab.Algorithms.ParticleSwarmOptimization {
+  public class SwarmUpdater : SingleSuccessorOperator {
+    #region Parameter properties
+
+    public ILookupParameter<DoubleValue> CurrentQualityParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["CurrentQuality"]; }
+    }
+
+    public ILookupParameter<DoubleValue> LocalBestQualityParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["LocalBestQuality"]; }
+    }
+
+    public ILookupParameter<DoubleValue> GlobalBestQualityParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["GlobalBestQuality"]; }
+    }
+
+    public ILookupParameter<RealVector> CurrentPositionParameter {
+      get { return (ILookupParameter<RealVector>)Parameters["CurrentPosition"]; }
+    }
+
+    public ILookupParameter<RealVector> BestLocalParameter {
+      get { return (ILookupParameter<RealVector>)Parameters["BestLocal"]; }
+    }
+
+    public ILookupParameter<RealVector> BestGlobalParameter {
+      get { return (ILookupParameter<RealVector>)Parameters["BestGlobal"]; }
+    }
+
+    public ValueLookupParameter<BoolValue> MaximizationParameter {
+      get { return (ValueLookupParameter<BoolValue>)Parameters["Maximization"]; }
+    }
+    #endregion
+
+    public SwarmUpdater()
+      : base() {
+      Parameters.Add(new LookupParameter<RealVector>("CurrentPosition", "Current position"));
+      Parameters.Add(new LookupParameter<RealVector>("BestLocal", "Best local position"));
+      Parameters.Add(new LookupParameter<RealVector>("BestGlobal", "Best global position"));
+      Parameters.Add(new LookupParameter<DoubleValue>("LocalBestQuality", "Best local quality"));
+      Parameters.Add(new LookupParameter<DoubleValue>("GlobalBestQuality", "Best global quality"));
+      Parameters.Add(new LookupParameter<DoubleValue>("CurrentQuality", "Current quality"));
+      Parameters.Add(new ValueLookupParameter<BoolValue>("Maximization", "True if the problem is a maximization problem, otherwise false."));
+    }
+
+    public override IOperation Apply() {
+      if (MaximizationParameter.ActualValue.Value) {
+        if (CurrentQualityParameter.ActualValue.Value > LocalBestQualityParameter.ActualValue.Value) {
+          LocalBestQualityParameter.ActualValue.Value = CurrentQualityParameter.ActualValue.Value;
+          BestLocalParameter.ActualValue = (RealVector)CurrentPositionParameter.ActualValue.Clone();
+        }
+        if (CurrentQualityParameter.ActualValue.Value > GlobalBestQualityParameter.ActualValue.Value) {
+          GlobalBestQualityParameter.ActualValue.Value = CurrentQualityParameter.ActualValue.Value;
+          BestGlobalParameter.ActualValue = (RealVector)CurrentPositionParameter.ActualValue.Clone();
+        }
+      } else {
+        if (CurrentQualityParameter.ActualValue.Value < LocalBestQualityParameter.ActualValue.Value) {
+          LocalBestQualityParameter.ActualValue.Value = CurrentQualityParameter.ActualValue.Value;
+          BestLocalParameter.ActualValue = (RealVector)CurrentPositionParameter.ActualValue.Clone();
+        }
+        if (CurrentQualityParameter.ActualValue.Value < GlobalBestQualityParameter.ActualValue.Value) {
+          GlobalBestQualityParameter.ActualValue.Value = CurrentQualityParameter.ActualValue.Value;
+          BestGlobalParameter.ActualValue = (RealVector)CurrentPositionParameter.ActualValue.Clone();
+        }
+      }
+      return base.Apply();
+    }
+
+    public override bool CanChangeName {
+      get { return false; }
+    }
+  }
+}
