Index: /trunk/sources/HeuristicLab 3.3/Files.txt
===================================================================
--- /trunk/sources/HeuristicLab 3.3/Files.txt	(revision 3093)
+++ /trunk/sources/HeuristicLab 3.3/Files.txt	(revision 3094)
@@ -8,4 +8,5 @@
 HeuristicLab.Algorithms.TS\3.3:HeuristicLab.Algorithms.TS-3.3.dll
 HeuristicLab.Algorithms.LS\3.3:HeuristicLab.Algorithms.LS-3.3.dll
+HeuristicLab.Algorithms.SimulatedAnnealing\3.3:HeuristicLab.Algorithms.SimulatedAnnealing-3.3.dll
 HeuristicLab.Analysis\3.3:HeuristicLab.Analysis-3.3.dll
 HeuristicLab.Analysis.Views\3.3:HeuristicLab.Analysis.Views-3.3.dll
Index: /trunk/sources/HeuristicLab.Algorithms.SimulatedAnnealing/3.3/SimulatedAnnealingMainLoop.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.SimulatedAnnealing/3.3/SimulatedAnnealingMainLoop.cs	(revision 3093)
+++ /trunk/sources/HeuristicLab.Algorithms.SimulatedAnnealing/3.3/SimulatedAnnealingMainLoop.cs	(revision 3094)
@@ -95,6 +95,6 @@
       Parameters.Add(new LookupParameter<DoubleValue>("Quality", "The value which represents the quality of a solution."));
       Parameters.Add(new LookupParameter<DoubleValue>("MoveQuality", "The value which represents the quality of a move."));
-      Parameters.Add(new LookupParameter<DoubleValue>("StartTemperature", "The initial temperature."));
-      Parameters.Add(new LookupParameter<DoubleValue>("EndTemperature", "The end temperature."));
+      Parameters.Add(new ValueLookupParameter<DoubleValue>("StartTemperature", "The initial temperature."));
+      Parameters.Add(new ValueLookupParameter<DoubleValue>("EndTemperature", "The end temperature."));
       Parameters.Add(new ValueLookupParameter<IntValue>("MaximumIterations", "The maximum number of iterations which should be processed."));
       Parameters.Add(new ValueLookupParameter<VariableCollection>("Results", "The variable collection where results should be stored."));
@@ -109,7 +109,96 @@
 
       #region Create operators
+      VariableCreator variableCreator = new VariableCreator();
+      BestQualityMemorizer initializeBestQuality = new BestQualityMemorizer();
+      SequentialSubScopesProcessor sssp = new SequentialSubScopesProcessor();
+      ResultsCollector resultsCollector = new ResultsCollector();
+      BestQualityMemorizer bestQualityMemorizer = new BestQualityMemorizer();
+      Placeholder annealingOperator = new Placeholder();
+      UniformSequentialSubScopesProcessor mainProcessor = new UniformSequentialSubScopesProcessor();
+      Placeholder moveGenerator = new Placeholder();
+      SequentialSubScopesProcessor moveEvaluationProcessor = new SequentialSubScopesProcessor();
+      Placeholder moveEvaluator = new Placeholder();
+      ProbabilisticQualityComparator qualityComparator = new ProbabilisticQualityComparator();
+      ConditionalBranch improvesQualityBranch = new ConditionalBranch();
+      Placeholder moveMaker = new Placeholder();
+      SubScopesRemover subScopesRemover = new SubScopesRemover();
+      DataTableValuesCollector valuesCollector = new DataTableValuesCollector();
+      IntCounter iterationsCounter = new IntCounter();
+      Comparator iterationsComparator = new Comparator();
+      ConditionalBranch iterationsTermination = new ConditionalBranch();
+      EmptyOperator finished = new EmptyOperator();
+
+      variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("Iterations", new IntValue(0)));
+      variableCreator.CollectedValues.Add(new ValueParameter<DataTable>("Qualities", new DataTable("Qualities")));
+      variableCreator.CollectedValues.Add(new ValueParameter<DoubleValue>("Temperature", new DoubleValue(double.MaxValue)));
+
+      resultsCollector.CollectedValues.Add(new LookupParameter<IntValue>("Iterations"));
+      resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Quality"));
+      resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Best Quality") { ActualName = "BestQuality" });
+      resultsCollector.CollectedValues.Add(new LookupParameter<DataTable>("Qualities"));
+      resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Temperature"));
+
+      annealingOperator.Name = "Annealing operator (placeholder)";
+      annealingOperator.OperatorParameter.ActualName = "AnnealingOperator";
+
+      moveGenerator.Name = "Move generator (placeholder)";
+      moveGenerator.OperatorParameter.ActualName = "MoveGenerator";
+
+      moveEvaluator.Name = "Move evaluator (placeholder)";
+      moveEvaluator.OperatorParameter.ActualName = "MoveEvaluator";
+
+      qualityComparator.LeftSideParameter.ActualName = "MoveQuality";
+      qualityComparator.RightSideParameter.ActualName = "Quality";
+      qualityComparator.ResultParameter.ActualName = "IsBetter";
+      qualityComparator.DampeningParameter.ActualName = "Temperature";
+
+      improvesQualityBranch.ConditionParameter.ActualName = "IsBetter";
+
+      moveMaker.Name = "Move maker (placeholder)";
+      moveMaker.OperatorParameter.ActualName = "MoveMaker";
+
+      subScopesRemover.RemoveAllSubScopes = true;
+
+      valuesCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Quality"));
+      valuesCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("BestQuality"));
+      valuesCollector.DataTableParameter.ActualName = "Qualities";
+
+      iterationsCounter.Name = "Increment Iterations";
+      iterationsCounter.Increment = new IntValue(1);
+      iterationsCounter.ValueParameter.ActualName = "Iterations";
+
+      iterationsComparator.Name = "Iterations >= MaximumIterations";
+      iterationsComparator.LeftSideParameter.ActualName = "Iterations";
+      iterationsComparator.RightSideParameter.ActualName = "MaximumIterations";
+      iterationsComparator.ResultParameter.ActualName = "IterationsCondition";
+      iterationsComparator.Comparison.Value = ComparisonType.GreaterOrEqual;
+
+      iterationsTermination.Name = "Iterations termination condition";
+      iterationsTermination.ConditionParameter.ActualName = "IterationsCondition";
+
+      finished.Name = "Finished";
       #endregion
 
       #region Create operator graph
+      OperatorGraph.InitialOperator = variableCreator;
+      variableCreator.Successor = initializeBestQuality;
+      initializeBestQuality.Successor = sssp;
+      sssp.Operators.Add(resultsCollector);
+      sssp.Successor = bestQualityMemorizer;
+      bestQualityMemorizer.Successor = annealingOperator;
+      annealingOperator.Successor = mainProcessor;
+      mainProcessor.Operator = moveGenerator;
+      mainProcessor.Successor = valuesCollector;
+      moveGenerator.Successor = moveEvaluationProcessor;
+      moveEvaluationProcessor.Operators.Add(moveEvaluator);
+      moveEvaluationProcessor.Successor = subScopesRemover;
+      moveEvaluator.Successor = qualityComparator;
+      qualityComparator.Successor = improvesQualityBranch;
+      improvesQualityBranch.TrueBranch = moveMaker;
+      valuesCollector.Successor = iterationsCounter;
+      iterationsCounter.Successor = iterationsComparator;
+      iterationsComparator.Successor = iterationsTermination;
+      iterationsTermination.TrueBranch = finished;
+      iterationsTermination.FalseBranch = bestQualityMemorizer;
       #endregion
     }
Index: /trunk/sources/HeuristicLab.Optimization.Operators/3.3/ExponentialDiscreteDoubleValueModifier.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization.Operators/3.3/ExponentialDiscreteDoubleValueModifier.cs	(revision 3093)
+++ /trunk/sources/HeuristicLab.Optimization.Operators/3.3/ExponentialDiscreteDoubleValueModifier.cs	(revision 3094)
@@ -31,5 +31,17 @@
   [StorableClass]
   public class ExponentialDiscreteDoubleValueModifier : DiscreteDoubleValueModifier {
+    /// <summary>
+    /// Calculates a new value based on exponential decay or growth.
+    /// </summary>
+    /// <exception cref="ArgumentException">Thrown when endValue or startValue or both are 0.</exception>
+    /// <param name="value">The last value.</param>
+    /// <param name="startValue">The start value.</param>
+    /// <param name="endValue">The end value.</param>
+    /// <param name="index">The current index.</param>
+    /// <param name="startIndex">The start index.</param>
+    /// <param name="endIndex">The end index.</param>
+    /// <returns>The new value.</returns>
     protected override double Modify(double value, double startValue, double endValue, int index, int startIndex, int endIndex) {
+      if (endValue <= 0 || startValue <= 0) throw new ArgumentException("ExponentialDiscreteDoubleValueModifier: startValue and endValue must be greater than 0.");
       double b = Math.Pow(endValue / startValue, 1.0 / (endIndex - startIndex));
       return startValue * Math.Pow(b, index - startIndex);
Index: /trunk/sources/HeuristicLab.Optimization.Operators/3.3/HeuristicLab.Optimization.Operators-3.3.csproj
===================================================================
--- /trunk/sources/HeuristicLab.Optimization.Operators/3.3/HeuristicLab.Optimization.Operators-3.3.csproj	(revision 3093)
+++ /trunk/sources/HeuristicLab.Optimization.Operators/3.3/HeuristicLab.Optimization.Operators-3.3.csproj	(revision 3094)
@@ -81,4 +81,5 @@
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="ProbabilisticQualityComparator.cs" />
     <Compile Include="SquareRootDiscreteDoubleValueModifier.cs" />
     <Compile Include="DiscreteDoubleValueModifier.cs" />
Index: /trunk/sources/HeuristicLab.Optimization.Operators/3.3/ProbabilisticQualityComparator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization.Operators/3.3/ProbabilisticQualityComparator.cs	(revision 3094)
+++ /trunk/sources/HeuristicLab.Optimization.Operators/3.3/ProbabilisticQualityComparator.cs	(revision 3094)
@@ -0,0 +1,60 @@
+﻿#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.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Optimization.Operators {
+  /// <summary>
+  /// Compares two qualities and creates a boolean flag that indicates if the left side is better than the right side or if the difference in quality is acceptable given a certain probability.
+  /// </summary>
+  /// <remarks>
+  /// The probabilty is that of simulated annealing: A randomly drawn (uniformly) real value in
+  /// the interval [0;1) has to be smaller than e^(-diff/T) where diff is the absolute quality difference
+  /// and T is the temperature (here called dampening).
+  /// </remarks>
+  [Item("ProbabilisticQualityComparator", "Compares two qualities and creates a boolean flag that indicates if the left side is better than the right side or if the difference in quality is acceptable given a certain probability.")]
+  [StorableClass]
+  public class ProbabilisticQualityComparator : QualityComparator, IStochasticOperator {
+    public ILookupParameter<DoubleValue> DampeningParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["Dampening"]; }
+    }
+    public ILookupParameter<IRandom> RandomParameter {
+      get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
+    } 
+
+    public ProbabilisticQualityComparator()
+      : base() {
+      Parameters.Add(new LookupParameter<DoubleValue>("Dampening", "The dampening factor that influences the probability."));
+      Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator."));
+    }
+
+    protected override bool Compare(bool maximization, double left, double right) {
+      if (base.Compare(maximization, left, right)) return true;
+      double t = DampeningParameter.ActualValue.Value;
+      double probability = Math.Exp(-Math.Abs(left - right) / t);
+      return RandomParameter.ActualValue.NextDouble() < probability;
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Optimization.Operators/3.3/QualityComparator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization.Operators/3.3/QualityComparator.cs	(revision 3093)
+++ /trunk/sources/HeuristicLab.Optimization.Operators/3.3/QualityComparator.cs	(revision 3094)
@@ -56,6 +56,5 @@
       DoubleValue right = RightSideParameter.ActualValue;
       BoolValue maximization = MaximizationParameter.ActualValue;
-      bool better = maximization.Value && left.Value > right.Value
-        || !maximization.Value && left.Value < right.Value;
+      bool better = Compare(maximization.Value, left.Value, right.Value);
       if (ResultParameter.ActualValue == null)
         ResultParameter.ActualValue = new BoolValue(better);
@@ -63,4 +62,8 @@
       return base.Apply();
     }
+
+    protected virtual bool Compare(bool maximization, double left, double right) {
+      return maximization && left > right || !maximization && left < right;
+    }
   }
 }
