Index: /branches/SimulationCore/HeuristicLab 3.3.sln
===================================================================
--- /branches/SimulationCore/HeuristicLab 3.3.sln	(revision 6622)
+++ /branches/SimulationCore/HeuristicLab 3.3.sln	(revision 6623)
@@ -89,4 +89,5 @@
 		{678E2145-8152-4E19-9646-07D439D00301} = {678E2145-8152-4E19-9646-07D439D00301}
 		{49F28045-7B5F-411B-8D59-16C846FA26E0} = {49F28045-7B5F-411B-8D59-16C846FA26E0}
+		{71537847-8B2D-4016-B6BF-DF0931024AC8} = {71537847-8B2D-4016-B6BF-DF0931024AC8}
 		{BB994448-2B21-4564-BB2E-38D8FFF8CF18} = {BB994448-2B21-4564-BB2E-38D8FFF8CF18}
 		{0C39A349-1979-419A-89BD-E4E2F26BD287} = {0C39A349-1979-419A-89BD-E4E2F26BD287}
@@ -413,4 +414,6 @@
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.SimulationCore.Views-3.3", "HeuristicLab.SimulationCore.Views\3.3\HeuristicLab.SimulationCore.Views-3.3.csproj", "{CD2BCD63-40FA-48FF-9AF6-3B386C91A926}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.SimulationCore.Samples-3.3", "HeuristicLab.SimulationCore.Samples\3.3\HeuristicLab.SimulationCore.Samples-3.3.csproj", "{71537847-8B2D-4016-B6BF-DF0931024AC8}"
 EndProject
 Global
@@ -1903,4 +1906,16 @@
 		{CD2BCD63-40FA-48FF-9AF6-3B386C91A926}.Release|x86.ActiveCfg = Release|x86
 		{CD2BCD63-40FA-48FF-9AF6-3B386C91A926}.Release|x86.Build.0 = Release|x86
+		{71537847-8B2D-4016-B6BF-DF0931024AC8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{71537847-8B2D-4016-B6BF-DF0931024AC8}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{71537847-8B2D-4016-B6BF-DF0931024AC8}.Debug|x64.ActiveCfg = Debug|x64
+		{71537847-8B2D-4016-B6BF-DF0931024AC8}.Debug|x64.Build.0 = Debug|x64
+		{71537847-8B2D-4016-B6BF-DF0931024AC8}.Debug|x86.ActiveCfg = Debug|x86
+		{71537847-8B2D-4016-B6BF-DF0931024AC8}.Debug|x86.Build.0 = Debug|x86
+		{71537847-8B2D-4016-B6BF-DF0931024AC8}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{71537847-8B2D-4016-B6BF-DF0931024AC8}.Release|Any CPU.Build.0 = Release|Any CPU
+		{71537847-8B2D-4016-B6BF-DF0931024AC8}.Release|x64.ActiveCfg = Release|x64
+		{71537847-8B2D-4016-B6BF-DF0931024AC8}.Release|x64.Build.0 = Release|x64
+		{71537847-8B2D-4016-B6BF-DF0931024AC8}.Release|x86.ActiveCfg = Release|x86
+		{71537847-8B2D-4016-B6BF-DF0931024AC8}.Release|x86.Build.0 = Release|x86
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
Index: /branches/SimulationCore/HeuristicLab.SimulationCore.Samples/3.3/GameOfLifeAgent.cs
===================================================================
--- /branches/SimulationCore/HeuristicLab.SimulationCore.Samples/3.3/GameOfLifeAgent.cs	(revision 6623)
+++ /branches/SimulationCore/HeuristicLab.SimulationCore.Samples/3.3/GameOfLifeAgent.cs	(revision 6623)
@@ -0,0 +1,95 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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 System.Text;
+using HeuristicLab.SimulationCore.AgentBased;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Common;
+
+namespace HeuristicLab.SimulationCore.Samples {
+  [Item("GameOfLifeAgent", "A game of life agent.")]
+  [StorableClass]
+  public class GameOfLifeAgent: Item, IAgent {
+    [Storable]
+    private bool alive;
+    public bool Alive {
+      get {
+        return alive;
+      }
+      set {
+        alive = value;
+      }
+    }
+
+    [Storable]
+    private bool _alive;
+
+    [Storable]
+    private GameOfLifeSimulation simulation;
+    public GameOfLifeSimulation Simulation {
+      get {
+        return simulation;
+      }
+    }
+
+    public GameOfLifeAgent(GameOfLifeSimulation simulation) : base() {
+      this.simulation = simulation;
+      alive = _alive = false;
+    }
+    [StorableConstructor]
+    private GameOfLifeAgent(bool deserializing) : base(deserializing) { }
+    private GameOfLifeAgent(GameOfLifeAgent original, Cloner cloner)
+      : base(original, cloner) {
+      alive = original.alive;
+      _alive = original._alive;
+      simulation = original.simulation;
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new GameOfLifeAgent(this, cloner);
+    }
+
+    #region IAgent Members
+    public void InitStep() {
+    }
+
+    public void PerformStep() {
+      int aliveCount = 0;
+      foreach (GameOfLifeAgent neighbor in simulation.GetNeighbors(this)) {
+        if (neighbor.Alive)
+          aliveCount++;
+      }
+
+      if (!alive && aliveCount == 3)
+        _alive = true;
+      else if (alive && (aliveCount < 2 || aliveCount > 3))
+        _alive = false;
+    }
+
+    public void FinalizeStep() {
+      alive = _alive;
+    }
+    #endregion
+  }
+}
Index: /branches/SimulationCore/HeuristicLab.SimulationCore.Samples/3.3/GameOfLifeScenario.cs
===================================================================
--- /branches/SimulationCore/HeuristicLab.SimulationCore.Samples/3.3/GameOfLifeScenario.cs	(revision 6623)
+++ /branches/SimulationCore/HeuristicLab.SimulationCore.Samples/3.3/GameOfLifeScenario.cs	(revision 6623)
@@ -0,0 +1,61 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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 System.Text;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Common;
+using HeuristicLab.Data;
+using HeuristicLab.Parameters;
+
+namespace HeuristicLab.SimulationCore.Samples {
+  [Item("GameOfLifeScenario", "A game of life scenario.")]
+  [StorableClass]
+  public sealed class GameOfLifeScenario: Scenario {
+    public ValueParameter<IntValue> WidthParameter {
+      get { return (ValueParameter<IntValue>)Parameters["Width"]; }
+    }
+    public ValueParameter<IntValue> HeightParameter {
+      get { return (ValueParameter<IntValue>)Parameters["Height"]; }
+    }
+    public ValueParameter<PercentValue> AliveRateParameter {
+      get { return (ValueParameter<PercentValue>)Parameters["AliveRate"]; }
+    }
+
+    public GameOfLifeScenario()
+      : base() {
+      Parameters.Add(new ValueParameter<IntValue>("Width", "The width value.", new IntValue(10)));
+      Parameters.Add(new ValueParameter<IntValue>("Height", "The height value.", new IntValue(10)));
+      Parameters.Add(new ValueParameter<PercentValue>("AliveRate", "The rate of the initialyy alive cells.", new PercentValue(0.5)));
+    }
+    [StorableConstructor]
+    private GameOfLifeScenario(bool deserializing) : base(deserializing) { }
+    private GameOfLifeScenario(GameOfLifeScenario original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new GameOfLifeScenario(this, cloner);
+    }
+  }
+}
Index: /branches/SimulationCore/HeuristicLab.SimulationCore.Samples/3.3/GameOfLifeSimulation.cs
===================================================================
--- /branches/SimulationCore/HeuristicLab.SimulationCore.Samples/3.3/GameOfLifeSimulation.cs	(revision 6623)
+++ /branches/SimulationCore/HeuristicLab.SimulationCore.Samples/3.3/GameOfLifeSimulation.cs	(revision 6623)
@@ -0,0 +1,220 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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 System.Text;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Parameters;
+using HeuristicLab.Data;
+using HeuristicLab.Optimization;
+using System.Threading;
+using HeuristicLab.SimulationCore.AgentBased;
+using HeuristicLab.Analysis;
+
+namespace HeuristicLab.SimulationCore.Samples {
+  [Item("GameOfLifeSimulation", "A game of life simulation.")]
+  [Creatable("Simulations")]
+  [StorableClass]
+  public sealed class GameOfLifeSimulation: AgentBasedSimulation {
+    public override Type ProblemType {
+      get { return typeof(GameOfLifeScenario); }
+    }
+
+    private GameOfLifeScenario Scenario {
+      get {
+        return Problem as GameOfLifeScenario;
+      }
+    }
+    
+    public ValueParameter<IntValue> IterationsParameter {
+      get { return (ValueParameter<IntValue>)Parameters["Iterations"]; }
+    }
+    
+    public GameOfLifeSimulation() : base() {
+      Parameters.Add(new ValueParameter<IntValue>("Iterations", "The number of iterations.", new IntValue(100)));
+
+      Initialize();
+    }
+    [StorableConstructor]
+    private GameOfLifeSimulation(bool deserializing) : base(deserializing) { }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      Initialize();
+    }
+    private GameOfLifeSimulation(GameOfLifeSimulation original, Cloner cloner)
+      : base(original, cloner) {
+      Initialize();
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new GameOfLifeSimulation(this, cloner);
+    }
+
+    private GameOfLifeAgent GetAgent(int x, int y) {     
+      int width = Scenario.WidthParameter.Value.Value;
+      int height = Scenario.HeightParameter.Value.Value;
+
+      if (x >= width || y >= height)
+        throw new Exception("invalid index");
+
+      int index = x + y * width;  
+
+      return Agents[index] as GameOfLifeAgent;
+    }
+
+    private void Initialize() {
+      if (Scenario != null) {
+        Scenario.WidthParameter.ValueChanged += new EventHandler(WidthParameter_ValueChanged);
+        if(Scenario.WidthParameter.Value != null)
+          Scenario.WidthParameter.Value.ValueChanged += new EventHandler(Width_ValueChanged);
+        Scenario.HeightParameter.ValueChanged += new EventHandler(HeightParameter_ValueChanged);
+        if (Scenario.HeightParameter.Value != null)
+          Scenario.HeightParameter.Value.ValueChanged += new EventHandler(Height_ValueChanged);
+      }
+    }
+
+    void Width_ValueChanged(object sender, EventArgs e) {
+      CreateAgents();
+    }
+
+    void Height_ValueChanged(object sender, EventArgs e) {
+      CreateAgents();
+    }
+
+    void HeightParameter_ValueChanged(object sender, EventArgs e) {
+      CreateAgents();
+    }
+
+    void WidthParameter_ValueChanged(object sender, EventArgs e) {
+      CreateAgents();
+    }
+
+    public IEnumerable<GameOfLifeAgent> GetNeighbors(GameOfLifeAgent agent) {
+      int width = Scenario.WidthParameter.Value.Value;
+      int height = Scenario.HeightParameter.Value.Value;
+      int index = Agents.IndexOf(agent);
+      
+      List<GameOfLifeAgent> result = new List<GameOfLifeAgent>();
+
+      int y = index / width;
+      int x = index - (y * width);
+
+      for (int x1 = x - 1; x1 <= x + 1; x1++) {
+        for (int y1 = y - 1; y1 <= y + 1; y1++) {
+          if (x1 >= 0 && y1 >= 0 && x1 < width && y1 < height &&
+            (x1 != x || y1 != y)) {
+            GameOfLifeAgent neighbor = GetAgent(x1, y1);
+            result.Add(neighbor);
+          }
+        }
+      }
+
+      return result;
+    }
+
+    private void CreateAgents() {
+      Agents.Clear();
+      int width = Scenario.WidthParameter.Value.Value;
+      int height = Scenario.HeightParameter.Value.Value;
+
+      for (int i = 0; i < width * height; i++) {
+        Agents.Add(new GameOfLifeAgent(this));
+      }
+
+      InitAgents();
+    }
+
+    protected override void OnProblemChanged() {
+      base.OnProblemChanged();
+
+      Initialize();
+
+      CreateAgents();
+    }
+
+    private void InitAgents() {
+      double rate = Scenario.AliveRateParameter.Value.Value;
+      int width = Scenario.WidthParameter.Value.Value;
+      int height = Scenario.HeightParameter.Value.Value;
+
+      Random rand = new Random();
+
+      for (int i = 0; i < width * height; i++) {
+        GameOfLifeAgent agent = Agents[i] as GameOfLifeAgent;
+        agent.Alive = rand.NextDouble() < rate;
+      }
+    }
+
+    protected override void OnPrepared() {
+      base.OnPrepared();
+
+      InitAgents();
+    }
+
+    private void UpdateResults() {
+      int width = Scenario.WidthParameter.Value.Value;
+      int height = Scenario.HeightParameter.Value.Value;
+
+      HeatMap cells = new HeatMap(width, height);
+
+      for (int i = 0; i < width * height; i++) {
+        int y = i / width;
+        int x = i - (y * width);
+
+        if (GetAgent(x, y).Alive)
+          cells[x, y] = 1;
+        else
+          cells[x, y] = 0;
+      }
+
+      Results["Cells"].Value = cells;
+      
+      IntValue currentIterations = (Results["CurrentIterations"].Value as IntValue);
+      currentIterations.Value++;
+    }
+
+    protected override void Run(CancellationToken cancellationToken) {
+      int iterations = IterationsParameter.Value.Value;
+      int width = Scenario.WidthParameter.Value.Value;
+      int height = Scenario.HeightParameter.Value.Value;
+
+      int start = 0;
+      if (Results.ContainsKey("CurrentIterations")) {
+        start = (Results["CurrentIterations"].Value as IntValue).Value;
+      } else {
+        Results.Add(new Result("CurrentIterations", new IntValue(0)));
+        Results.Add(new Result("Cells", new HeatMap(width, height)));
+      }      
+
+      for (int i = start; i < iterations; i++) {
+        cancellationToken.ThrowIfCancellationRequested();
+        
+        base.Step();
+        UpdateResults();        
+
+        Thread.Sleep(250);
+      }
+    }
+  }
+}
Index: /branches/SimulationCore/HeuristicLab.SimulationCore.Samples/3.3/HeuristicLab.SimulationCore.Samples-3.3.csproj
===================================================================
--- /branches/SimulationCore/HeuristicLab.SimulationCore.Samples/3.3/HeuristicLab.SimulationCore.Samples-3.3.csproj	(revision 6623)
+++ /branches/SimulationCore/HeuristicLab.SimulationCore.Samples/3.3/HeuristicLab.SimulationCore.Samples-3.3.csproj	(revision 6623)
@@ -0,0 +1,207 @@
+﻿<?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>8.0.30703</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{71537847-8B2D-4016-B6BF-DF0931024AC8}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>HeuristicLab.SimulationCore.Samples</RootNamespace>
+    <AssemblyName>HeuristicLab.SimulationCore.Samples-3.3</AssemblyName>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <TargetFrameworkProfile>
+    </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>
+  </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>
+    <SignAssembly>true</SignAssembly>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>HeuristicLab.snk</AssemblyOriginatorKeyFile>
+  </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>
+    <CodeAnalysisLogFile>bin\Debug\HeuristicLab.SimulationCore.Samples-3.3.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
+    <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
+    <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRuleSetDirectories>;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
+    <CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
+    <CodeAnalysisRuleDirectories>;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
+    <CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
+    <OutputPath>bin\x64\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <CodeAnalysisLogFile>bin\Release\HeuristicLab.SimulationCore.Samples-3.3.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
+    <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
+    <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRuleSetDirectories>;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
+    <CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
+    <CodeAnalysisRuleDirectories>;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
+    <CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
+  </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>
+    <CodeAnalysisLogFile>bin\Debug\HeuristicLab.SimulationCore.Samples-3.3.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
+    <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
+    <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRuleSetDirectories>;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
+    <CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
+    <CodeAnalysisRuleDirectories>;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
+    <CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
+    <OutputPath>bin\x86\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <CodeAnalysisLogFile>bin\Release\HeuristicLab.SimulationCore.Samples-3.3.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
+    <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
+    <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRuleSetDirectories>;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
+    <CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
+    <CodeAnalysisRuleDirectories>;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
+    <CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="GameOfLifeAgent.cs" />
+    <Compile Include="GameOfLifeScenario.cs" />
+    <Compile Include="GameOfLifeSimulation.cs" />
+    <Compile Include="HeuristicLabSimulationCoreSamplesPlugin.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="SimpleScenario.cs" />
+    <Compile Include="SimpleSimulation.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="HeuristicLab.snk" />
+    <None Include="HeuristicLabSimulationCoreSamplesPlugin.cs.frame" />
+    <None Include="Properties\AssemblyInfo.frame" />
+  </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.Resources\3.3\HeuristicLab.Common.Resources-3.3.csproj">
+      <Project>{0E27A536-1C4A-4624-A65E-DC4F4F23E3E1}</Project>
+      <Name>HeuristicLab.Common.Resources-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.MainForm.WindowsForms\3.3\HeuristicLab.MainForm.WindowsForms-3.3.csproj">
+      <Project>{AB687BBE-1BFE-476B-906D-44237135431D}</Project>
+      <Name>HeuristicLab.MainForm.WindowsForms-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.MainForm\3.3\HeuristicLab.MainForm-3.3.csproj">
+      <Project>{3BD61258-31DA-4B09-89C0-4F71FEF5F05A}</Project>
+      <Name>HeuristicLab.MainForm-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.SimulationCore\3.3\HeuristicLab.SimulationCore-3.3.csproj">
+      <Project>{7B1579F2-6EFC-4C48-B41C-C3292639FF5B}</Project>
+      <Name>HeuristicLab.SimulationCore-3.3</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <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\HeuristicLabSimulationCoreSamplesPlugin.cs.frame" "%25ProjectDir%25\HeuristicLabSimulationCoreSamplesPlugin.cs"</PreBuildEvent>
+  </PropertyGroup>
+  <PropertyGroup>
+    <PostBuildEvent>set ProjectName=$(ProjectName)
+set Source=$(TargetPath)
+set Configuration=$(ConfigurationName)
+set Platform=$(PlatformName)
+set SolutionDir=$(SolutionDir)
+
+if exist "$(SolutionDir)CustomPostBuild.cmd" call "$(SolutionDir)CustomPostBuild.cmd"</PostBuildEvent>
+  </PropertyGroup>
+  <!-- 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>
+  -->
+</Project>
Index: /branches/SimulationCore/HeuristicLab.SimulationCore.Samples/3.3/HeuristicLabSimulationCoreSamplesPlugin.cs.frame
===================================================================
--- /branches/SimulationCore/HeuristicLab.SimulationCore.Samples/3.3/HeuristicLabSimulationCoreSamplesPlugin.cs.frame	(revision 6623)
+++ /branches/SimulationCore/HeuristicLab.SimulationCore.Samples/3.3/HeuristicLabSimulationCoreSamplesPlugin.cs.frame	(revision 6623)
@@ -0,0 +1,47 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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.Text;
+using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.SimulationCore.Samples {
+  /// <summary>
+  /// Plugin class for HeuristicLab.SimulationCore.Samples plugin.
+  /// </summary>
+  [Plugin("HeuristicLab.SimulationCore.Samples", "3.3.4.$WCREV$")]
+  [PluginFile("HeuristicLab.SimulationCore.Samples-3.3.dll", PluginFileType.Assembly)]
+  [PluginDependency("HeuristicLab.Collections", "3.3")]
+  [PluginDependency("HeuristicLab.Common", "3.3")]
+  [PluginDependency("HeuristicLab.Common.Resources", "3.3")]
+  [PluginDependency("HeuristicLab.Core", "3.3")]
+  [PluginDependency("HeuristicLab.MainForm", "3.3")]
+  [PluginDependency("HeuristicLab.MainForm.WindowsForms", "3.3")]
+  [PluginDependency("HeuristicLab.Persistence", "3.3")]
+  [PluginDependency("HeuristicLab.Optimization", "3.3")]
+  [PluginDependency("HeuristicLab.Data", "3.3")]
+  [PluginDependency("HeuristicLab.Parameters", "3.3")]
+  [PluginDependency("HeuristicLab.Analysis", "3.3")]
+  [PluginDependency("HeuristicLab.SimulationCore", "3.3")]
+  public class HeuristicLabSimulationCoreSamplesPlugin : PluginBase {
+  }
+}
Index: /branches/SimulationCore/HeuristicLab.SimulationCore.Samples/3.3/Properties/AssemblyInfo.frame
===================================================================
--- /branches/SimulationCore/HeuristicLab.SimulationCore.Samples/3.3/Properties/AssemblyInfo.frame	(revision 6623)
+++ /branches/SimulationCore/HeuristicLab.SimulationCore.Samples/3.3/Properties/AssemblyInfo.frame	(revision 6623)
@@ -0,0 +1,56 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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.CompilerServices;
+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.SimulationCore.Samples")]
+[assembly: AssemblyDescription("HeuristicLab simulation core Samples")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("HeuristicLab")]
+[assembly: AssemblyCopyright("(c) 2002-2011 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("589D64C8-59D2-44D2-9548-182AB353CE7C")]
+
+// 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.4.$WCREV$")]
Index: /branches/SimulationCore/HeuristicLab.SimulationCore.Samples/3.3/SimpleScenario.cs
===================================================================
--- /branches/SimulationCore/HeuristicLab.SimulationCore.Samples/3.3/SimpleScenario.cs	(revision 6623)
+++ /branches/SimulationCore/HeuristicLab.SimulationCore.Samples/3.3/SimpleScenario.cs	(revision 6623)
@@ -0,0 +1,52 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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 System.Text;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Common;
+using HeuristicLab.Data;
+using HeuristicLab.Parameters;
+
+namespace HeuristicLab.SimulationCore.Samples {
+  [Item("SimpleScenario", "A simple scenario.")]
+  [StorableClass]
+  public sealed class SimpleScenario: Scenario {
+    public ValueParameter<IntValue> InitialValueParameter {
+      get { return (ValueParameter<IntValue>)Parameters["InitialValue"]; }
+    }
+    
+    public SimpleScenario() : base() {
+      Parameters.Add(new ValueParameter<IntValue>("InitialValue", "The initial counter value.", new IntValue(10)));
+    }
+    [StorableConstructor]
+    private SimpleScenario(bool deserializing) : base(deserializing) { }
+    private SimpleScenario(SimpleScenario original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SimpleScenario(this, cloner);
+    }
+  }
+}
Index: /branches/SimulationCore/HeuristicLab.SimulationCore.Samples/3.3/SimpleSimulation.cs
===================================================================
--- /branches/SimulationCore/HeuristicLab.SimulationCore.Samples/3.3/SimpleSimulation.cs	(revision 6623)
+++ /branches/SimulationCore/HeuristicLab.SimulationCore.Samples/3.3/SimpleSimulation.cs	(revision 6623)
@@ -0,0 +1,76 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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 System.Text;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Parameters;
+using HeuristicLab.Data;
+using HeuristicLab.Optimization;
+using System.Threading;
+
+namespace HeuristicLab.SimulationCore.Samples {
+  [Item("SimpleSimulation", "A simple simulation.")]
+  [Creatable("Simulations")]
+  [StorableClass]
+  public sealed class SimpleSimulation: Simulation {
+    public override Type ProblemType {
+      get { return typeof(SimpleScenario); }
+    }
+
+    private SimpleScenario Scenario {
+      get {
+        return Problem as SimpleScenario;
+      }
+    }
+    
+    public ValueParameter<IntValue> IterationsParameter {
+      get { return (ValueParameter<IntValue>)Parameters["Iterations"]; }
+    }
+    
+    public SimpleSimulation() : base() {
+      Parameters.Add(new ValueParameter<IntValue>("Iterations", "The number of iterations.", new IntValue(100)));
+    }
+    [StorableConstructor]
+    private SimpleSimulation(bool deserializing) : base(deserializing) { }
+    private SimpleSimulation(SimpleSimulation original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SimpleSimulation(this, cloner);
+    }
+
+    protected override void Run(CancellationToken cancellationToken) {
+      IntValue counter = new IntValue(Scenario.InitialValueParameter.Value.Value);
+      Results.Add(new Result("Count", counter));
+
+      int iterations = IterationsParameter.Value.Value;
+      for (int i = 0; i < iterations; i++) {
+        counter.Value++;
+        System.Threading.Thread.Sleep(250);
+      }
+    }
+  }
+}
Index: /branches/SimulationCore/HeuristicLab.SimulationCore/3.3/AgentBased/AgentBasedSimulation.cs
===================================================================
--- /branches/SimulationCore/HeuristicLab.SimulationCore/3.3/AgentBased/AgentBasedSimulation.cs	(revision 6623)
+++ /branches/SimulationCore/HeuristicLab.SimulationCore/3.3/AgentBased/AgentBasedSimulation.cs	(revision 6623)
@@ -0,0 +1,67 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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 System.Text;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Common;
+
+namespace HeuristicLab.SimulationCore.AgentBased {
+  [Item("AgentBasedSimulation", "A base class for agent based simulations.")]
+  [StorableClass]
+  public abstract class AgentBasedSimulation: Simulation {
+    [Storable]
+    private ItemList<IAgent> agents;
+    protected ItemList<IAgent> Agents {
+      get {
+        return agents;
+      }
+    }
+    
+    [StorableConstructor]
+    protected AgentBasedSimulation(bool deserializing) : base(deserializing) { }
+    protected AgentBasedSimulation()
+      : base() {
+        agents = new ItemList<IAgent>();  
+    }
+    protected AgentBasedSimulation(AgentBasedSimulation original, Cloner cloner)
+      : base(original, cloner) {
+        agents = cloner.Clone(original.agents) as ItemList<IAgent>;
+    }
+
+    protected void Step() {
+      foreach (IAgent agent in agents) {
+        agent.InitStep();
+      }
+
+      foreach (IAgent agent in agents) {
+        agent.PerformStep();
+      }
+
+      foreach (IAgent agent in agents) {
+        agent.FinalizeStep();
+      }
+    }
+  }
+}
Index: /branches/SimulationCore/HeuristicLab.SimulationCore/3.3/AgentBased/IAgent.cs
===================================================================
--- /branches/SimulationCore/HeuristicLab.SimulationCore/3.3/AgentBased/IAgent.cs	(revision 6623)
+++ /branches/SimulationCore/HeuristicLab.SimulationCore/3.3/AgentBased/IAgent.cs	(revision 6623)
@@ -0,0 +1,34 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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 System.Text;
+using HeuristicLab.Core;
+
+namespace HeuristicLab.SimulationCore.AgentBased {
+  public interface IAgent: IItem {
+    void InitStep();
+    void PerformStep();
+    void FinalizeStep();
+  }
+}
Index: /branches/SimulationCore/HeuristicLab.SimulationCore/3.3/HeuristicLab.SimulationCore-3.3.csproj
===================================================================
--- /branches/SimulationCore/HeuristicLab.SimulationCore/3.3/HeuristicLab.SimulationCore-3.3.csproj	(revision 6622)
+++ /branches/SimulationCore/HeuristicLab.SimulationCore/3.3/HeuristicLab.SimulationCore-3.3.csproj	(revision 6623)
@@ -106,4 +106,5 @@
     <Reference Include="System" />
     <Reference Include="System.Core" />
+    <Reference Include="System.Drawing" />
     <Reference Include="System.Xml.Linq" />
     <Reference Include="System.Data.DataSetExtensions" />
@@ -112,6 +113,12 @@
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="AgentBased\AgentBasedSimulation.cs" />
+    <Compile Include="AgentBased\IAgent.cs" />
     <Compile Include="HeuristicLabSimulationCorePlugin.cs" />
+    <Compile Include="IScenario.cs" />
+    <Compile Include="ISimulation.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="Scenario.cs" />
+    <Compile Include="Simulation.cs" />
   </ItemGroup>
   <ItemGroup>
@@ -125,4 +132,8 @@
       <Name>HeuristicLab.Collections-3.3</Name>
     </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Common.Resources\3.3\HeuristicLab.Common.Resources-3.3.csproj">
+      <Project>{0E27A536-1C4A-4624-A65E-DC4F4F23E3E1}</Project>
+      <Name>HeuristicLab.Common.Resources-3.3</Name>
+    </ProjectReference>
     <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj">
       <Project>{A9AD58B9-3EF9-4CC1-97E5-8D909039FF5C}</Project>
@@ -132,4 +143,8 @@
       <Project>{C36BD924-A541-4A00-AFA8-41701378DDC5}</Project>
       <Name>HeuristicLab.Core-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.Persistence\3.3\HeuristicLab.Persistence-3.3.csproj">
@@ -142,4 +157,5 @@
     </ProjectReference>
   </ItemGroup>
+  <ItemGroup />
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <PropertyGroup>
Index: /branches/SimulationCore/HeuristicLab.SimulationCore/3.3/HeuristicLabSimulationCorePlugin.cs.frame
===================================================================
--- /branches/SimulationCore/HeuristicLab.SimulationCore/3.3/HeuristicLabSimulationCorePlugin.cs.frame	(revision 6622)
+++ /branches/SimulationCore/HeuristicLab.SimulationCore/3.3/HeuristicLabSimulationCorePlugin.cs.frame	(revision 6623)
@@ -33,4 +33,5 @@
   [PluginDependency("HeuristicLab.Collections", "3.3")]
   [PluginDependency("HeuristicLab.Common", "3.3")]
+  [PluginDependency("HeuristicLab.Common.Resources", "3.3")]
   [PluginDependency("HeuristicLab.Core", "3.3")]
   [PluginDependency("HeuristicLab.Persistence", "3.3")]
Index: /branches/SimulationCore/HeuristicLab.SimulationCore/3.3/IScenario.cs
===================================================================
--- /branches/SimulationCore/HeuristicLab.SimulationCore/3.3/IScenario.cs	(revision 6623)
+++ /branches/SimulationCore/HeuristicLab.SimulationCore/3.3/IScenario.cs	(revision 6623)
@@ -0,0 +1,32 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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 System.Text;
+using HeuristicLab.Core;
+using HeuristicLab.Optimization;
+
+namespace HeuristicLab.SimulationCore {
+  public interface IScenario : IProblem {
+  }
+}
Index: /branches/SimulationCore/HeuristicLab.SimulationCore/3.3/ISimulation.cs
===================================================================
--- /branches/SimulationCore/HeuristicLab.SimulationCore/3.3/ISimulation.cs	(revision 6623)
+++ /branches/SimulationCore/HeuristicLab.SimulationCore/3.3/ISimulation.cs	(revision 6623)
@@ -0,0 +1,32 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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 System.Text;
+using HeuristicLab.Core;
+using HeuristicLab.Optimization;
+
+namespace HeuristicLab.SimulationCore {
+  public interface ISimulation: IAlgorithm {
+  }
+}
Index: /branches/SimulationCore/HeuristicLab.SimulationCore/3.3/Scenario.cs
===================================================================
--- /branches/SimulationCore/HeuristicLab.SimulationCore/3.3/Scenario.cs	(revision 6623)
+++ /branches/SimulationCore/HeuristicLab.SimulationCore/3.3/Scenario.cs	(revision 6623)
@@ -0,0 +1,51 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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 System.Text;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Common;
+
+namespace HeuristicLab.SimulationCore {
+  [Item("Scenario", "Represents the base class for a simulation scenario.")]
+  [StorableClass]
+  public abstract class Scenario : ParameterizedNamedItem, IScenario  {
+    [StorableConstructor]
+    protected Scenario(bool deserializing) : base(deserializing) { }
+    protected Scenario(Scenario original, Cloner cloner)
+      : base(original, cloner) {
+    }
+
+    protected Scenario() : base() {}
+
+    #region IProblem Members
+    public IEnumerable<IOperator> Operators {
+      get { return null; }
+    }
+    
+    public event EventHandler OperatorsChanged;
+    public event EventHandler Reset;
+    #endregion
+  }
+}
Index: /branches/SimulationCore/HeuristicLab.SimulationCore/3.3/Simulation.cs
===================================================================
--- /branches/SimulationCore/HeuristicLab.SimulationCore/3.3/Simulation.cs	(revision 6623)
+++ /branches/SimulationCore/HeuristicLab.SimulationCore/3.3/Simulation.cs	(revision 6623)
@@ -0,0 +1,164 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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 System.Text;
+using HeuristicLab.Core;
+using System.Drawing;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Common;
+using HeuristicLab.Collections;
+using HeuristicLab.Optimization;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace HeuristicLab.SimulationCore {
+  [Item("Simulation", "A base class for simulations.")]
+  [StorableClass]
+  public abstract class Simulation: Algorithm, ISimulation, IStorableContent {
+    public string Filename { get; set; }
+        
+    public override Type ProblemType {
+      get { return typeof(IScenario); }
+    }
+
+    [Storable]
+    private ResultCollection results;
+    public override ResultCollection Results {
+      get {
+        return results;
+      }
+    }
+
+    #region Variables for communication between threads
+    private CancellationTokenSource cancellationTokenSource;
+    private bool stopPending;
+    private DateTime lastUpdateTime;
+    #endregion
+
+    [StorableConstructor]
+    protected Simulation(bool deserializing) : base(deserializing) { }
+    protected Simulation()
+      : base() {
+        results = new ResultCollection();
+    }
+    protected Simulation(Simulation original, Cloner cloner)
+      : base(original, cloner) {
+        results = cloner.Clone(original.results) as ResultCollection;
+    }
+
+    public sealed override void Prepare() {
+      base.Prepare();
+      results.Clear();
+      OnPrepared();
+    }
+    protected override void OnPrepared() {
+      base.OnPrepared();
+    }
+
+    public override void Start() {
+      base.Start();
+      cancellationTokenSource = new CancellationTokenSource();
+      stopPending = false;
+      Task task = Task.Factory.StartNew(Run, cancellationTokenSource.Token, cancellationTokenSource.Token);
+      task.ContinueWith(t => {
+        try {
+          t.Wait();
+        }
+        catch (AggregateException ex) {
+          try {
+            ex.Flatten().Handle(x => x is OperationCanceledException);
+          }
+          catch (AggregateException remaining) {
+            if (remaining.InnerExceptions.Count == 1) OnExceptionOccurred(remaining.InnerExceptions[0]);
+            else OnExceptionOccurred(remaining);
+          }
+        }
+        cancellationTokenSource.Dispose();
+        cancellationTokenSource = null;
+        if (stopPending) OnStopped();
+        else OnPaused();
+      });
+    }
+    protected override void OnStarted() {
+      base.OnStarted();
+    }
+
+    public override void Pause() {
+      base.Pause();
+      cancellationTokenSource.Cancel();
+    }
+    protected override void OnPaused() {
+      base.OnPaused();
+    }
+
+    public override void Stop() {
+      base.Stop();
+      if (ExecutionState == ExecutionState.Paused) {
+        OnStopped();
+      } else {
+        stopPending = true;
+        cancellationTokenSource.Cancel();
+      }
+    }
+    protected override void OnStopped() {
+      base.OnStopped();
+    }
+
+    protected override void OnExceptionOccurred(Exception exception) {
+      base.OnExceptionOccurred(exception);
+    }
+
+    private void Run(object state) {
+      CancellationToken cancellationToken = (CancellationToken)state;
+
+      OnStarted();
+      lastUpdateTime = DateTime.Now;
+      System.Timers.Timer timer = new System.Timers.Timer(250);
+      timer.AutoReset = true;
+      timer.Elapsed += new System.Timers.ElapsedEventHandler(timer_Elapsed);
+      timer.Start();
+      try {
+        Run(cancellationToken);
+      }
+      finally {
+        timer.Elapsed -= new System.Timers.ElapsedEventHandler(timer_Elapsed);
+        timer.Stop();
+        ExecutionTime += DateTime.Now - lastUpdateTime;
+      }
+      Stop();
+
+      cancellationToken.ThrowIfCancellationRequested();
+    }
+    protected abstract void Run(CancellationToken cancellationToken);
+
+    private void timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e) {
+      System.Timers.Timer timer = (System.Timers.Timer)sender;
+      timer.Enabled = false;
+      DateTime now = DateTime.Now;
+      ExecutionTime += now - lastUpdateTime;
+      lastUpdateTime = now;
+      timer.Enabled = true;
+    }
+  }
+}
Index: /branches/SimulationCore/HeuristicLab/3.3/Files.txt
===================================================================
--- /branches/SimulationCore/HeuristicLab/3.3/Files.txt	(revision 6622)
+++ /branches/SimulationCore/HeuristicLab/3.3/Files.txt	(revision 6623)
@@ -96,4 +96,5 @@
 HeuristicLab.SimulationCore\3.3:HeuristicLab.SimulationCore-3.3.dll
 HeuristicLab.SimulationCore.Views\3.3:HeuristicLab.SimulationCore.Views-3.3.dll
+HeuristicLab.SimulationCore.Samples\3.3:HeuristicLab.SimulationCore.Samples-3.3.dll
 
 ;External Libraries
