Index: /branches/CFSAP/HeuristicLab.Problems.Instances.CFSAP/3.3/BozejkoCFSAPInstanceProvider.cs
===================================================================
--- /branches/CFSAP/HeuristicLab.Problems.Instances.CFSAP/3.3/BozejkoCFSAPInstanceProvider.cs	(revision 15492)
+++ /branches/CFSAP/HeuristicLab.Problems.Instances.CFSAP/3.3/BozejkoCFSAPInstanceProvider.cs	(revision 15493)
@@ -62,4 +62,5 @@
       };
     }
+
     public override CFSAPData ImportData(string path) {
       var instance = LoadInstance(new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.ReadWrite));
Index: /branches/CFSAP/HeuristicLab.Problems.Scheduling.CFSAP/3.3/CFSAP.cs
===================================================================
--- /branches/CFSAP/HeuristicLab.Problems.Scheduling.CFSAP/3.3/CFSAP.cs	(revision 15492)
+++ /branches/CFSAP/HeuristicLab.Problems.Scheduling.CFSAP/3.3/CFSAP.cs	(revision 15493)
@@ -108,7 +108,9 @@
       var order = individual.Permutation("sequence");
       var assignment = individual.BinaryVector("assignment");
-      int T = EvaluateAssignement(order, assignment.Select(x => x ? 1 : 0).ToArray(),
-        ProcessingTimesParameter.Value, SetupTimesParameter.Value);
-      return T;
+      return Evaluate(order, assignment);
+    }
+
+    public int Evaluate(Permutation order, BinaryVector assignment) {
+      return EvaluateAssignement(order, assignment, ProcessingTimes, SetupTimes);
     }
 
@@ -130,4 +132,36 @@
           int operation = order[i];
           if (assignment[operation] == machine) {
+            if (first == -1)
+              first = operation;
+            else
+              T += setupTimes[machine][last, operation];
+            last = operation;
+          }
+        }
+        if (last != -1 && first != -1)
+          T += setupTimes[machine][last, first];
+      }
+
+      return T;
+    }
+
+    //Function to evaluate individual with the specified assignment
+    public static int EvaluateAssignement(Permutation order, BinaryVector assignment, IntMatrix processingTimes, ItemList<IntMatrix> setupTimes) {
+      if (processingTimes.Rows != 2) throw new ArgumentException("Method can only be used when there are two machines.", "assignment");
+      var N = order.Length;
+      int T = 0;
+
+      for (int i = 0; i < N; i++) {
+        int operation = order[i];
+        int machine = assignment[operation] ? 1 : 0;
+        T += processingTimes[machine, operation];
+      }
+
+      for (int machine = 0; machine < 2; machine++) {
+        int first = -1;
+        int last = -1;
+        for (int i = 0; i < N; i++) {
+          int operation = order[i];
+          if ((assignment[operation] ? 1 : 0) == machine) {
             if (first == -1)
               first = operation;
Index: /branches/CFSAP/HeuristicLab.Problems.Scheduling.CFSAP/3.3/GeneticAlgorithm.cs
===================================================================
--- /branches/CFSAP/HeuristicLab.Problems.Scheduling.CFSAP/3.3/GeneticAlgorithm.cs	(revision 15493)
+++ /branches/CFSAP/HeuristicLab.Problems.Scheduling.CFSAP/3.3/GeneticAlgorithm.cs	(revision 15493)
@@ -0,0 +1,308 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2017 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.Threading;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.BinaryVectorEncoding;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Random;
+
+namespace HeuristicLab.Problems.Scheduling.CFSAP {
+  [Item("Genetic Algorithm (CFSAP)", "")]
+  [StorableClass]
+  public class GeneticAlgorithm : BasicAlgorithm {
+    public override bool SupportsPause { get { return true; } }
+
+    public override Type ProblemType {
+      get { return typeof(CFSAP); }
+    }
+
+    public new CFSAP Problem {
+      get { return (CFSAP)base.Problem; }
+      set { base.Problem = value; }
+    }
+
+    [Storable]
+    private IFixedValueParameter<IntValue> populationSizeParameter;
+    public IFixedValueParameter<IntValue> PopulationSizeParameter {
+      get { return populationSizeParameter; }
+    }
+    [Storable]
+    private IFixedValueParameter<IntValue> elitesParameter;
+    public IFixedValueParameter<IntValue> ElitesParameter {
+      get { return elitesParameter; }
+    }
+    [Storable]
+    private IFixedValueParameter<PercentValue> mutationProbabilityParameter;
+    public IFixedValueParameter<PercentValue> MutationProbabilityParameter {
+      get { return mutationProbabilityParameter; }
+    }
+    [Storable]
+    private IFixedValueParameter<IntValue> maximumGenerationsParameter;
+    public IFixedValueParameter<IntValue> MaximumGenerationsParameter {
+      get { return maximumGenerationsParameter; }
+    }
+    [Storable]
+    private IFixedValueParameter<IntValue> maximumEvaluatedSolutionsParameter;
+    public IFixedValueParameter<IntValue> MaximumEvaluatedSolutionsParameter {
+      get { return maximumEvaluatedSolutionsParameter; }
+    }
+    [Storable]
+    private IFixedValueParameter<BoolValue> pauseAfterGenerationParameter;
+    public IFixedValueParameter<BoolValue> PauseAfterGenerationParameter {
+      get { return pauseAfterGenerationParameter; }
+    }
+
+    public int PopulationSize {
+      get { return populationSizeParameter.Value.Value; }
+      set { populationSizeParameter.Value.Value = value; }
+    }
+    public int Elites {
+      get { return elitesParameter.Value.Value; }
+      set { elitesParameter.Value.Value = value; }
+    }
+    public double MutationProbability {
+      get { return mutationProbabilityParameter.Value.Value; }
+      set { mutationProbabilityParameter.Value.Value = value; }
+    }
+    public int MaximumGenerations {
+      get { return maximumGenerationsParameter.Value.Value; }
+      set { maximumGenerationsParameter.Value.Value = value; }
+    }
+    public int MaximumEvaluatedSolutions {
+      get { return maximumEvaluatedSolutionsParameter.Value.Value; }
+      set { maximumEvaluatedSolutionsParameter.Value.Value = value; }
+    }
+    public bool PauseAfterGeneration {
+      get { return pauseAfterGenerationParameter.Value.Value; }
+      set { pauseAfterGenerationParameter.Value.Value = value; }
+    }
+
+    [StorableConstructor]
+    protected GeneticAlgorithm(bool deserializing) : base(deserializing) { }
+    protected GeneticAlgorithm(GeneticAlgorithm original, Cloner cloner)
+      : base(original, cloner) {
+      populationSizeParameter = cloner.Clone(original.populationSizeParameter);
+      elitesParameter = cloner.Clone(original.elitesParameter);
+      mutationProbabilityParameter = cloner.Clone(original.mutationProbabilityParameter);
+      maximumGenerationsParameter = cloner.Clone(original.maximumGenerationsParameter);
+      maximumEvaluatedSolutionsParameter = cloner.Clone(original.maximumEvaluatedSolutionsParameter);
+      pauseAfterGenerationParameter = cloner.Clone(original.pauseAfterGenerationParameter);
+      generation = original.generation;
+      evaluatedSolutions = original.evaluatedSolutions;
+      bestQuality = original.bestQuality;
+      if (original.population != null)
+        population = original.population.Select(cloner.Clone).ToArray();
+      if (original.nextGeneration != null)
+        nextGeneration = original.nextGeneration.Select(cloner.Clone).ToArray();
+      if (original.optimalSequences != null)
+        optimalSequences = new HashSet<Permutation>(original.optimalSequences, new PermutationEqualityComparer());
+    }
+    public GeneticAlgorithm() {
+      Parameters.Add(populationSizeParameter = new FixedValueParameter<IntValue>("PopulationSize", "The size of the population, each individual of the population is a solution with a permutation and a binary vector.", new IntValue(100)));
+      Parameters.Add(elitesParameter = new FixedValueParameter<IntValue>("Elites", "The number of best individuals from the previous population that will continue to the next generation.", new IntValue(1)));
+      Parameters.Add(mutationProbabilityParameter = new FixedValueParameter<PercentValue>("MutationProbability", "The probability that an individual should be mutated after it has been created through crossover.", new PercentValue(0.05)));
+      Parameters.Add(maximumGenerationsParameter = new FixedValueParameter<IntValue>("MaximumGenerations", "The number of generations that the algorithm may run for.", new IntValue(1000000)));
+      Parameters.Add(maximumEvaluatedSolutionsParameter = new FixedValueParameter<IntValue>("MaximumEvaluatedSolutions", "The number of evaluated solutions before the algorithm terminates.", new IntValue(100000000)));
+      Parameters.Add(pauseAfterGenerationParameter = new FixedValueParameter<BoolValue>("PauseAfterGeneration", "Whether the algorithm should pause after each generation.", new BoolValue(true)));
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new GeneticAlgorithm(this, cloner);
+    }
+
+    protected override void OnProblemChanged() {
+      base.OnProblemChanged();
+    }
+    
+    [Storable]
+    private IRandom random;
+    [Storable]
+    private int generation;
+    [Storable]
+    private int evaluatedSolutions;
+    [Storable]
+    private double bestQuality;
+    [Storable]
+    private EncodedSolution[] population;
+    [Storable]
+    private EncodedSolution[] nextGeneration;
+    [Storable]
+    private HashSet<Permutation> optimalSequences;
+
+    protected override void Initialize(CancellationToken cancellationToken) {
+      base.Initialize(cancellationToken);
+      random = new MersenneTwister();
+      optimalSequences = new HashSet<Permutation>(new PermutationEqualityComparer());
+      generation = 0;
+      evaluatedSolutions = 0;
+      population = new EncodedSolution[PopulationSize];
+      nextGeneration = new EncodedSolution[PopulationSize - Elites];
+      bestQuality = double.MaxValue;
+      for (var p = 0; p < PopulationSize; p++) {
+        population[p] = new EncodedSolution() {
+          Sequence = new Permutation(PermutationTypes.RelativeDirected, Problem.ProcessingTimes.Columns, random),
+          Assignment = new BinaryVector(Problem.ProcessingTimes.Columns, random)
+        };
+        population[p].Quality = Problem.Evaluate(population[p].Sequence, population[p].Assignment);
+        evaluatedSolutions++;
+        if (population[p].Quality < bestQuality) bestQuality = population[p].Quality;
+      }
+      Array.Sort(population);
+      Results.Add(new Result("BestQuality", new DoubleValue(bestQuality)));
+      Results.Add(new Result("EvaluatedSolutions", new IntValue(evaluatedSolutions)));
+      Results.Add(new Result("Generation", new IntValue(generation)));
+      if (PauseAfterGeneration) Pause();
+    }
+
+    protected override void Run(CancellationToken cancellationToken) {
+      if (cancellationToken.IsCancellationRequested) return;
+
+      while (generation < MaximumGenerations) {
+        if (evaluatedSolutions > MaximumEvaluatedSolutions) return;
+        for (var p = 0; p < PopulationSize - Elites; p++) {
+          var parent1 = TournamentSelect((int)Math.Round(Math.Max(PopulationSize / 71.0, 2)));
+          var parent2 = TournamentSelect((int)Math.Round(Math.Max(PopulationSize / 71.0, 2)));
+          nextGeneration[p] = new EncodedSolution() {
+            Sequence = CrossSequence(parent1.Sequence, parent2.Sequence),
+            Assignment = CrossAssignment(parent1.Assignment, parent2.Assignment)
+          };
+          var mutProb = random.NextDouble();
+          if (mutProb < MutationProbability) {
+            MutateSequence(nextGeneration[p].Sequence);
+            MutateAssignment(nextGeneration[p].Assignment);
+          }
+          nextGeneration[p].Quality = Problem.Evaluate(nextGeneration[p].Sequence, nextGeneration[p].Assignment);
+          evaluatedSolutions++;
+
+          if (nextGeneration[p].Quality <= bestQuality) {
+            if (!optimalSequences.Contains(nextGeneration[p].Sequence)) {
+              int cycleTime;
+              var assignment = OptimalAssignment.MakeAssignment(nextGeneration[p].Sequence, Problem.ProcessingTimes, Problem.SetupTimes, out cycleTime);
+              evaluatedSolutions++;
+              nextGeneration[p].Assignment = new BinaryVector(assignment.Select(x => x == 1).ToArray());
+              nextGeneration[p].Quality = cycleTime;
+              optimalSequences.Add(nextGeneration[p].Sequence);
+            }
+            if (nextGeneration[p].Quality < bestQuality) {
+              bestQuality = nextGeneration[p].Quality;
+              ((DoubleValue)Results["BestQuality"].Value).Value = bestQuality;
+            }
+          }
+        }
+
+        for (var p = Elites; p < PopulationSize; p++) {
+          population[p] = nextGeneration[p - Elites];
+        }
+        Array.Sort(population);
+
+        generation++;
+
+        ((IntValue)Results["EvaluatedSolutions"].Value).Value = evaluatedSolutions;
+        ((IntValue)Results["Generation"].Value).Value = generation;
+
+        if (PauseAfterGeneration || cancellationToken.IsCancellationRequested) {
+          if (!cancellationToken.IsCancellationRequested) Pause();
+          break;
+        }
+      }
+    }
+
+    private EncodedSolution TournamentSelect(int groupSize) {
+      var selected = population[random.Next(population.Length)];
+      for (var i = 1; i < groupSize; i++) {
+        var competitor = population[random.Next(population.Length)];
+        if (selected.Quality > competitor.Quality) {
+          selected = competitor;
+        }
+      }
+      return selected;
+    }
+
+    private Permutation CrossSequence(Permutation sequence1, Permutation sequence2) {
+      var cx = random.Next(3);
+      switch (cx) {
+        case 0: return OrderCrossover.Apply(random, sequence1, sequence2);
+        case 1: return OrderCrossover2.Apply(random, sequence1, sequence2);
+        case 2: return MaximalPreservativeCrossover.Apply(random, sequence1, sequence2);
+        default: throw new InvalidOperationException("Crossover not defined.");
+      }
+    }
+
+    private void MutateSequence(Permutation sequence) {
+      var cx = random.Next(7);
+      switch (cx) {
+        case 0: InversionManipulator.Apply(random, sequence); break;
+        case 1: InsertionManipulator.Apply(random, sequence); break;
+        case 2: Swap2Manipulator.Apply(random, sequence); break;
+        case 3: Swap3Manipulator.Apply(random, sequence); break;
+        case 4: TranslocationManipulator.Apply(random, sequence); break;
+        case 5: TranslocationInversionManipulator.Apply(random, sequence); break;
+        case 6: ScrambleManipulator.Apply(random, sequence); break;
+        default: throw new InvalidOperationException("Crossover not defined.");
+      }
+    }
+
+    private BinaryVector CrossAssignment(BinaryVector assign1, BinaryVector assign2) {
+      var cx = random.Next(3);
+      switch (cx) {
+        case 0: return UniformCrossover.Apply(random, assign1, assign2);
+        case 1: return NPointCrossover.Apply(random, assign1, assign2, new IntValue(1));
+        case 2: return NPointCrossover.Apply(random, assign1, assign2, new IntValue(2));
+        default: throw new InvalidOperationException("Crossover not defined.");
+      }
+    }
+
+    private void MutateAssignment(BinaryVector assignment) {
+      SomePositionsBitflipManipulator.Apply(random, assignment, new DoubleValue(0.2));
+    }
+
+    private class EncodedSolution : IDeepCloneable, IComparable<EncodedSolution> {
+      public Permutation Sequence { get; set; }
+      public BinaryVector Assignment { get; set; }
+      public double Quality { get; set; }
+
+      public IDeepCloneable Clone(Cloner cloner) {
+        return new EncodedSolution() {
+          Sequence = cloner.Clone(this.Sequence),
+          Assignment = cloner.Clone(this.Assignment),
+          Quality = this.Quality
+        };
+      }
+
+      public object Clone() {
+        return Clone(new Cloner());
+      }
+
+      public int CompareTo(EncodedSolution other) {
+        return Quality.CompareTo(other.Quality);
+      }
+    }
+  }
+}
Index: /branches/CFSAP/HeuristicLab.Problems.Scheduling.CFSAP/3.3/HeuristicLab.Problems.Scheduling.CFSAP-3.3.csproj
===================================================================
--- /branches/CFSAP/HeuristicLab.Problems.Scheduling.CFSAP/3.3/HeuristicLab.Problems.Scheduling.CFSAP-3.3.csproj	(revision 15492)
+++ /branches/CFSAP/HeuristicLab.Problems.Scheduling.CFSAP/3.3/HeuristicLab.Problems.Scheduling.CFSAP-3.3.csproj	(revision 15493)
@@ -103,4 +103,9 @@
       <Private>False</Private>
     </Reference>
+    <Reference Include="HeuristicLab.Random-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Random-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
     <Reference Include="SimSharp-3.0.9, Version=3.0.9.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
@@ -121,7 +126,9 @@
     <Compile Include="CFSAP.cs" />
     <Compile Include="CFSAPSequenceOnly.cs" />
+    <Compile Include="GeneticAlgorithm.cs" />
     <Compile Include="ICFSAP.cs" />
     <Compile Include="MultiNestCFSAP.cs" />
     <Compile Include="MultiNestCFSAPSolvingStrategy.cs" />
+    <Compile Include="OptimalAssignment.cs" />
     <Compile Include="Plugin.cs" />
     <None Include="Properties\AssemblyInfo.cs.frame" />
Index: /branches/CFSAP/HeuristicLab.Problems.Scheduling.CFSAP/3.3/OptimalAssignment.cs
===================================================================
--- /branches/CFSAP/HeuristicLab.Problems.Scheduling.CFSAP/3.3/OptimalAssignment.cs	(revision 15493)
+++ /branches/CFSAP/HeuristicLab.Problems.Scheduling.CFSAP/3.3/OptimalAssignment.cs	(revision 15493)
@@ -0,0 +1,137 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2017 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Linq;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.PermutationEncoding;
+
+namespace HeuristicLab.Problems.Scheduling.CFSAP {
+  public static class OptimalAssignment {
+
+    public static int[] MakeAssignment(Permutation order, IntMatrix processingTimes, ItemList<IntMatrix> setupTimes, out int T) {
+      var N = order.Length;
+
+      int[,,] weights = new int[2, 2 * N, 2 * N];
+      int[,] graph = new int[2, N];
+      int[,] prevPath = new int[2, N + 1];                     //Only for optimal assignment evaluation
+      int[] optimalAssignment = new int[N];                //Only for optimal assignment evaluation
+
+      //Calculate weights in the graph
+      for (int S = 0; S < N; S++) { //Starting point of the arc
+        for (int sM = 0; sM < 2; sM++) {    //Starting point machine
+          int eM = sM == 0 ? 1 : 0;
+          weights[sM, S, S + 1] = 0;
+
+          for (int E = S + 2; E < S + N; E++)
+            weights[sM, S, E] =
+              weights[sM, S, E - 1] +
+              processingTimes[eM, order[(E - 1) % N]] +
+              setupTimes[eM][order[(E - 1) % N], order[E % N]];
+
+          for (int E = S + 1; E < S + N; E++)
+            weights[sM, S, E] += (
+              processingTimes[sM, order[S % N]] +
+              setupTimes[sM][order[S % N], order[(E + 1) % N]]
+            );
+        }
+      }
+
+      //Determine the shortest path in the graph
+      T = int.MaxValue / 2;
+      for (int S = 0; S < N - 1; S++)      //Start node in graph			    O(N)
+        for (int SM = 0; SM < 2; SM++) {   //Start node machine in graph	O(1)
+          graph[SM, S] = 0;
+          graph[SM == 0 ? 1 : 0, S] = int.MaxValue / 2;
+          prevPath[SM, 0] = -1;
+          for (int E = S + 1; E < N; E++)      //Currently calculated node			    O(N)
+            for (int EM = 0; EM < 2; EM++) {   //Currently calculated node machine	O(1)
+              graph[EM, E] = int.MaxValue / 2;
+              for (int EC = S; EC < E; EC++) { //Nodes connected to node E		      O(N)
+                int newWeight = graph[EM == 0 ? 1 : 0, EC] + weights[EM == 0 ? 1 : 0, EC, E];
+                if (newWeight < graph[EM, E]) {
+                  graph[EM, E] = newWeight;
+                  prevPath[EM, E] = EC;
+                }
+              }
+            }
+
+          int EP = S + N; //End point.
+          int newT = int.MaxValue / 2;
+          for (int EC = S + 1; EC < N; EC++) { //Nodes connected to EP O(N)
+            int newWeight = graph[SM == 0 ? 1 : 0, EC] + weights[SM == 0 ? 1 : 0, EC, EP];
+            if (newWeight < newT) {
+              newT = newWeight;
+              prevPath[SM, S] = EC;
+            }
+          }
+
+          if (newT < T) {
+            T = newT;
+            optimalAssignment = MakeAssignement(S, SM, prevPath, order);
+          }
+        }
+
+      //Omitted solutions
+      for (int machine = 0; machine < 2; machine++) {
+        int[] assignment = Enumerable.Repeat(machine, N).ToArray();
+        int newT = CFSAP.EvaluateAssignement(order, assignment, processingTimes, setupTimes);
+        if (newT < T) { //New best solution has been found
+          T = newT;
+          optimalAssignment = assignment;
+        }
+      }
+
+      return optimalAssignment;
+    }
+
+    private static int[] MakeAssignement(int start, int startMach, int[,] prevPath, Permutation order) {
+      var N = order.Length;
+      int[] assignment = Enumerable.Repeat(-1, N).ToArray();
+      var inverseOrder = new int[N];
+
+      for (int i = 0; i < N; i++)
+        inverseOrder[order[i]] = i;
+
+      int end = start + N;
+
+      int currMach = startMach;
+      int currNode = start;
+      while (true) {
+        assignment[inverseOrder[currNode]] = currMach;
+        currNode = prevPath[currMach, currNode];
+        currMach = currMach == 0 ? 1 : 0;
+        if (currNode == start)
+          break;
+      }
+
+      currMach = startMach;
+      for (int i = 0; i < N; i++) {
+        if (assignment[inverseOrder[i]] != -1)
+          currMach = currMach == 0 ? 1 : 0;
+        else
+          assignment[inverseOrder[i]] = currMach;
+      }
+
+      return assignment;
+    }
+  }
+}
Index: /branches/CFSAP/HeuristicLab.Problems.Scheduling.CFSAP/3.3/Plugin.cs.frame
===================================================================
--- /branches/CFSAP/HeuristicLab.Problems.Scheduling.CFSAP/3.3/Plugin.cs.frame	(revision 15492)
+++ /branches/CFSAP/HeuristicLab.Problems.Scheduling.CFSAP/3.3/Plugin.cs.frame	(revision 15493)
@@ -38,4 +38,5 @@
   [PluginDependency("HeuristicLab.Persistence", "3.3")]
   [PluginDependency("HeuristicLab.Problems.Instances", "3.3")]
+  [PluginDependency("HeuristicLab.Random", "3.3")]
   public class HeuristicLabProblemsSchedulingCFSAPPlugin : PluginBase  {
   }
