Index: /trunk/sources/HeuristicLab 3.3.sln
===================================================================
--- /trunk/sources/HeuristicLab 3.3.sln	(revision 3347)
+++ /trunk/sources/HeuristicLab 3.3.sln	(revision 3348)
@@ -241,4 +241,6 @@
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Algorithms.MultipopulationAlgorithm-3.3", "HeuristicLab.Algorithms.MultipopulationAlgorithm\3.3\HeuristicLab.Algorithms.MultipopulationAlgorithm-3.3.csproj", "{7CBAA733-47EA-4675-BB5E-827A0D5DC5DD}"
+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
@@ -413,5 +415,4 @@
 		{81609E8A-9757-4865-8B89-0B6603F769E8}.Debug|x64.Build.0 = Debug|x64
 		{81609E8A-9757-4865-8B89-0B6603F769E8}.Debug|x86.ActiveCfg = Debug|x86
-		{81609E8A-9757-4865-8B89-0B6603F769E8}.Debug|x86.Build.0 = Debug|x86
 		{81609E8A-9757-4865-8B89-0B6603F769E8}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{81609E8A-9757-4865-8B89-0B6603F769E8}.Release|Any CPU.Build.0 = Release|Any CPU
@@ -431,5 +432,4 @@
 		{C2E99CCE-9FB0-456F-9BA0-57900E4AA799}.Debug|x64.Build.0 = Debug|x64
 		{C2E99CCE-9FB0-456F-9BA0-57900E4AA799}.Debug|x86.ActiveCfg = Debug|x86
-		{C2E99CCE-9FB0-456F-9BA0-57900E4AA799}.Debug|x86.Build.0 = Debug|x86
 		{C2E99CCE-9FB0-456F-9BA0-57900E4AA799}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{C2E99CCE-9FB0-456F-9BA0-57900E4AA799}.Release|Any CPU.Build.0 = Release|Any CPU
@@ -1346,4 +1346,20 @@
 		{7CBAA733-47EA-4675-BB5E-827A0D5DC5DD}.Services|x64.ActiveCfg = Release|Any CPU
 		{7CBAA733-47EA-4675-BB5E-827A0D5DC5DD}.Services|x86.ActiveCfg = Release|Any CPU
+		{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
+		{2C429157-9C34-4DD3-9D5F-B444B751E39A}.Services|Any CPU.ActiveCfg = Release|x64
+		{2C429157-9C34-4DD3-9D5F-B444B751E39A}.Services|x64.ActiveCfg = Release|x64
+		{2C429157-9C34-4DD3-9D5F-B444B751E39A}.Services|x64.Build.0 = Release|x64
+		{2C429157-9C34-4DD3-9D5F-B444B751E39A}.Services|x86.ActiveCfg = Release|x64
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
Index: /trunk/sources/HeuristicLab 3.3/Files.txt
===================================================================
--- /trunk/sources/HeuristicLab 3.3/Files.txt	(revision 3347)
+++ /trunk/sources/HeuristicLab 3.3/Files.txt	(revision 3348)
@@ -9,4 +9,5 @@
 HeuristicLab.Algorithms.LocalSearch\3.3:HeuristicLab.Algorithms.LocalSearch-3.3.dll
 HeuristicLab.Algorithms.MultipopulationAlgorithm\3.3:HeuristicLab.Algorithms.MultipopulationAlgorithm-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.Algorithms.ParticleSwarmOptimization/3.3/HeuristicLab.Algorithms.ParticleSwarmOptimization-3.3.csproj
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/HeuristicLab.Algorithms.ParticleSwarmOptimization-3.3.csproj	(revision 3348)
+++ /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/HeuristicLab.Algorithms.ParticleSwarmOptimization-3.3.csproj	(revision 3348)
@@ -0,0 +1,161 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="3.5" 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>
+  </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>
+  </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>
+  </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>
+  </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>
+  </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>
+  </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>
+  </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="IRealVectorEncoder.cs" />
+    <Compile Include="ParticleSwarmOptimization.cs" />
+    <Compile Include="ParticleSwarmOptimizationMainLoop.cs" />
+    <Compile Include="PermutationToRealVectorEncoder.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="HeuristicLab.snk" />
+    <None Include="HeuristicLabAlgorithmsParticleSwarmOptimizationPlugin.cs.frame" />
+    <None Include="Properties\AssemblyInfo.frame" />
+  </ItemGroup>
+  <ItemGroup>
+    <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.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.PermutationEncoding\3.3\HeuristicLab.Encodings.PermutationEncoding-3.3.csproj">
+      <Project>{DBECB8B0-B166-4133-BAF1-ED67C3FD7FCA}</Project>
+      <Name>HeuristicLab.Encodings.PermutationEncoding-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\HeuristicLab.PluginInfrastructure.csproj">
+      <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>
+      <Name>HeuristicLab.PluginInfrastructure</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"</PreBuildEvent>
+  </PropertyGroup>
+</Project>
Index: /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/HeuristicLabAlgorithmsParticleSwarmOptimizationPlugin.cs.frame
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/HeuristicLabAlgorithmsParticleSwarmOptimizationPlugin.cs.frame	(revision 3348)
+++ /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/HeuristicLabAlgorithmsParticleSwarmOptimizationPlugin.cs.frame	(revision 3348)
@@ -0,0 +1,44 @@
+#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.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: /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/IRealVectorEncoder.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/IRealVectorEncoder.cs	(revision 3348)
+++ /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/IRealVectorEncoder.cs	(revision 3348)
@@ -0,0 +1,29 @@
+﻿#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;
+
+namespace HeuristicLab.Encodings.RealVectorEncoding {
+  public interface IRealVectorEncoder : IRealVectorOperator {
+    ILookupParameter<RealVector> RealVectorParameter { get; }
+  }
+}
Index: /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ParticleSwarmOptimization.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ParticleSwarmOptimization.cs	(revision 3348)
+++ /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ParticleSwarmOptimization.cs	(revision 3348)
@@ -0,0 +1,154 @@
+﻿#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.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.RealVectorEncoding;
+using HeuristicLab.Optimization;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization.Operators;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.PluginInfrastructure;
+
+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; }
+    }
+    #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"]; }
+    }
+    #endregion
+
+    #region Properties
+    [StorableAttribute]
+    private ParticleSwarmOptimizationMainLoop mainLoop; // Check this !
+    private ParticleSwarmOptimizationMainLoop MainLoop {
+      get { return mainLoop; }
+    }
+    #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(1)));
+      Parameters.Add(new ValueParameter<IntValue>("MaxIterations", "Maximal number of iterations.", new IntValue(1000)));
+      Parameters.Add(new OptionalConstrainedValueParameter<IRealVectorEncoder>("Encoder", "The operator used to encode solutions as position vector."));
+      //Parameters.Add(new ConstrainedValueParameter<IManipulator>("Mutator", "The operator used to mutate solutions."));
+
+      RandomCreator randomCreator = new RandomCreator();
+      SolutionsCreator solutionsCreator = new SolutionsCreator();
+      //solutionsCreator.SolutionCreatorParameter.ActualName = Problem.SolutionCreator.Name;
+      mainLoop = new ParticleSwarmOptimizationMainLoop();
+      OperatorGraph.InitialOperator = randomCreator;
+
+      randomCreator.RandomParameter.ActualName = "Random";
+      randomCreator.SeedParameter.ActualName = SeedParameter.Name;
+      randomCreator.SeedParameter.Value = null;
+      randomCreator.SetSeedRandomlyParameter.ActualName = SetSeedRandomlyParameter.Name;
+      randomCreator.SetSeedRandomlyParameter.Value = null;
+      randomCreator.Successor = solutionsCreator;
+
+      solutionsCreator.NumberOfSolutionsParameter.ActualName = SwarmSizeParameter.Name;
+      solutionsCreator.Successor = mainLoop;
+
+      mainLoop.EncoderParameter.ActualName = EncoderParameter.Name;
+
+      Initialize();
+    }
+
+    private void Initialize() {
+      
+    }
+
+    [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() {
+      //ParameterizeStochasticOperator(Problem.SolutionCreator);
+      //ParameterizeStochasticOperator(Problem.Evaluator);
+      //ParameterizeStochasticOperator(Problem.Visualizer);
+      //foreach (IOperator op in Problem.Operators) ParameterizeStochasticOperator(op);
+      //ParameterizeSolutionsCreator();
+      //ParameterizeMainLoop();
+      UpdateEncoders();
+      //UpdateMutators();
+      //Problem.Evaluator.QualityParameter.ActualNameChanged += new EventHandler(Evaluator_QualityParameter_ActualNameChanged);
+      base.OnProblemChanged();
+    }
+    #endregion
+
+    #region Helpers
+
+    private void UpdateEncoders() {
+      IRealVectorEncoder oldEncoder = EncoderParameter.Value;
+      EncoderParameter.ValidValues.Clear();
+      foreach (IRealVectorEncoder encoder in Problem.Operators.OfType<IRealVectorEncoder>().OrderBy(x => x.Name)) {
+        EncoderParameter.ValidValues.Add(encoder);
+        //encoder.RealVectorParameter.ActualName
+      }
+      if (oldEncoder != null) {
+        IRealVectorEncoder encoder = EncoderParameter.ValidValues.FirstOrDefault(x => x.GetType() == oldEncoder.GetType());
+        if (encoder != null) EncoderParameter.Value = encoder;
+      }
+    }
+    #endregion
+  }
+}
Index: /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ParticleSwarmOptimizationMainLoop.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ParticleSwarmOptimizationMainLoop.cs	(revision 3348)
+++ /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ParticleSwarmOptimizationMainLoop.cs	(revision 3348)
@@ -0,0 +1,58 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Operators;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Parameters;
+using HeuristicLab.Data;
+
+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<IOperator> EncoderParameter {
+      get { return (ValueLookupParameter<IOperator>)Parameters["Encoder"]; }
+    }
+    #endregion
+
+    [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<IOperator>("Encoder", "The encoding operator that maps a solution to a position vector."));
+      #endregion
+
+      #region Create operators
+      VariableCreator variableCreator = new VariableCreator();
+      //variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("Generations", new IntValue(0)));
+      UniformSubScopesProcessor uniformSubScopesProcessor = new UniformSubScopesProcessor();
+      Placeholder encoder = new Placeholder();
+
+      encoder.Name = "Encoder (placeholder)";
+      encoder.OperatorParameter.ActualName = EncoderParameter.Name;
+      #endregion
+
+      #region Create operator graph
+      OperatorGraph.InitialOperator = variableCreator;
+      variableCreator.Successor = uniformSubScopesProcessor;
+      uniformSubScopesProcessor.Operator = encoder;
+      uniformSubScopesProcessor.Successor = null;
+      #endregion
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/PermutationToRealVectorEncoder.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/PermutationToRealVectorEncoder.cs	(revision 3348)
+++ /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/PermutationToRealVectorEncoder.cs	(revision 3348)
@@ -0,0 +1,46 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Operators;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Parameters;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Encodings.RealVectorEncoding;
+using HeuristicLab.Collections;
+
+namespace HeuristicLab.Algorithms.ParticleSwarmOptimization {
+  public class PermutationToRealVectorEncoder : SingleSuccessorOperator, IRealVectorEncoder, IPermutationManipulator {
+
+    public ILookupParameter<RealVector> RealVectorParameter {
+      get { return (ILookupParameter<RealVector>)Parameters["RealVector"]; }
+    }
+
+    public ILookupParameter<Permutation> PermutationParameter {
+      get { return (ILookupParameter<Permutation>)Parameters["Permutation"]; }
+    }
+
+    public PermutationToRealVectorEncoder() : base() {
+      Parameters.Add(new LookupParameter<Permutation>("Permutation", "The permutation to encode."));
+      Parameters.Add(new LookupParameter<RealVector>("RealVector", "The resulting real vector."));
+    }
+
+    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; 
+      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 3348)
+++ /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/Properties/AssemblyInfo.frame	(revision 3348)
@@ -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$")]
