Index: branches/OptimizationNetworks/HeuristicLab.Networks.IntegratedOptimization.LocationRouting/3.3/HeuristicLab.Networks.IntegratedOptimization.LocationRouting-3.3.csproj
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Networks.IntegratedOptimization.LocationRouting/3.3/HeuristicLab.Networks.IntegratedOptimization.LocationRouting-3.3.csproj	(revision 14688)
+++ branches/OptimizationNetworks/HeuristicLab.Networks.IntegratedOptimization.LocationRouting/3.3/HeuristicLab.Networks.IntegratedOptimization.LocationRouting-3.3.csproj	(revision 14895)
@@ -183,7 +183,11 @@
     <Compile Include="LrpNetwork2.cs" />
     <Compile Include="LrpNetwork3.cs" />
+    <Compile Include="LrpNetwork4.cs" />
+    <Compile Include="LrpNetwork5.cs" />
     <Compile Include="LrpOrchestratorNode.cs" />
     <Compile Include="LrpOrchestratorNode2.cs" />
     <Compile Include="LrpOrchestratorNode3.cs" />
+    <Compile Include="LrpOrchestratorNode4.cs" />
+    <Compile Include="LrpOrchestratorNode5.cs" />
     <Compile Include="LrpUtils.cs" />
     <Compile Include="LrpNetwork1.cs" />
Index: branches/OptimizationNetworks/HeuristicLab.Networks.IntegratedOptimization.LocationRouting/3.3/LrpNetwork4.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Networks.IntegratedOptimization.LocationRouting/3.3/LrpNetwork4.cs	(revision 14895)
+++ branches/OptimizationNetworks/HeuristicLab.Networks.IntegratedOptimization.LocationRouting/3.3/LrpNetwork4.cs	(revision 14895)
@@ -0,0 +1,85 @@
+﻿#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.Linq;
+using HeuristicLab.Algorithms.CMAEvolutionStrategy;
+using HeuristicLab.Algorithms.GeneticAlgorithm;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.RealVectorEncoding;
+using HeuristicLab.Optimization;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Problems.FacilityLocation;
+using HeuristicLab.Problems.FacilityLocation.CplexSolver;
+using HeuristicLab.Problems.VehicleRouting;
+using HeuristicLab.Problems.VehicleRouting.Encodings.General;
+using HeuristicLab.Selection;
+
+namespace HeuristicLab.Networks.IntegratedOptimization.LocationRouting {
+  [Item("LrpNetwork4", "Version 4 of a TTP optimization network.")]
+  [Creatable("Optimization Networks")]
+  [StorableClass]
+  public sealed class LrpNetwork4 : LrpNetwork, IOptimizer {
+    [StorableConstructor]
+    private LrpNetwork4(bool deserializing) : base(deserializing) { }
+    private LrpNetwork4(LrpNetwork4 original, Cloner cloner) : base(original, cloner) { }
+    public LrpNetwork4() : this("LrpNetwork4") { }
+    public LrpNetwork4(string name) : base(name) {
+      Orchestrator = new LrpOrchestratorNode4(OrchestratorNodeName);
+      MetaSolver = new OrchestratedAlgorithmNode(MetaSolverNodeName);
+      FlpSolver = new OrchestratedAlgorithmNode(FlpSolverNodeName);
+      VrpSolver = new OrchestratedAlgorithmNode(VrpSolverNodeName);
+
+      var cmaes = new CMAEvolutionStrategy();
+      var vp = new MinimizationVariegationProblem<RealVectorEncoding>();
+      cmaes.Problem = vp;
+      var cmaAnalyzer = cmaes.Analyzer.Operators.OfType<CMAAnalyzer>().Single();
+      cmaes.Analyzer.Operators.SetItemCheckedState(cmaAnalyzer, true);
+      cmaes.MaximumGenerations = 80;
+      MetaSolver.Algorithm = cmaes;
+      Orchestrator.MetaSolverOrchestrationPort.ConnectedPort = MetaSolver.OrchestrationPort;
+
+      var cplexSolver = new FLPCplexSolver();
+      cplexSolver.Problem = new FacilityLocationProblem();
+      cplexSolver.MaximumRuntimeParameter.Value.Value = TimeSpan.FromSeconds(3.0);
+      FlpSolver.Algorithm = cplexSolver;
+      Orchestrator.FlpSolverOrchestrationPort.ConnectedPort = FlpSolver.OrchestrationPort;
+
+      var ga = new GeneticAlgorithm();
+      ga.Problem = new VehicleRoutingProblem();
+      ga.PopulationSize.Value = 100;
+      var crossover = ga.CrossoverParameter.ValidValues.OfType<MultiVRPSolutionCrossover>().Single(x => x.Name == "MultiVRPSolutionCrossover");
+      ga.CrossoverParameter.Value = crossover;
+      ga.MaximumGenerations.Value = 100;
+      var mutator = ga.MutatorParameter.ValidValues.OfType<MultiVRPSolutionManipulator>().Single(x => x.Name == "MultiVRPSolutionManipulator");
+      ga.MutatorParameter.Value = mutator;
+      var selector = ga.SelectorParameter.ValidValues.OfType<TournamentSelector>().Single();
+      ga.SelectorParameter.Value = selector;
+      VrpSolver.Algorithm = ga;
+      Orchestrator.VrpSolverOrchestrationPort.ConnectedPort = VrpSolver.OrchestrationPort;
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new LrpNetwork4(this, cloner);
+    }
+  }
+}
Index: branches/OptimizationNetworks/HeuristicLab.Networks.IntegratedOptimization.LocationRouting/3.3/LrpNetwork5.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Networks.IntegratedOptimization.LocationRouting/3.3/LrpNetwork5.cs	(revision 14895)
+++ branches/OptimizationNetworks/HeuristicLab.Networks.IntegratedOptimization.LocationRouting/3.3/LrpNetwork5.cs	(revision 14895)
@@ -0,0 +1,88 @@
+﻿#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.Linq;
+using HeuristicLab.Algorithms.GeneticAlgorithm;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.BinaryVectorEncoding;
+using HeuristicLab.Optimization;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Problems.FacilityLocation;
+using HeuristicLab.Problems.FacilityLocation.CplexSolver;
+using HeuristicLab.Problems.VehicleRouting;
+using HeuristicLab.Problems.VehicleRouting.Encodings.General;
+using HeuristicLab.Selection;
+
+namespace HeuristicLab.Networks.IntegratedOptimization.LocationRouting {
+  [Item("LrpNetwork5", "Version 5 of a TTP optimization network.")]
+  [Creatable("Optimization Networks")]
+  [StorableClass]
+  public sealed class LrpNetwork5 : LrpNetwork, IOptimizer {
+    [StorableConstructor]
+    private LrpNetwork5(bool deserializing) : base(deserializing) { }
+    private LrpNetwork5(LrpNetwork5 original, Cloner cloner) : base(original, cloner) { }
+    public LrpNetwork5() : this("LrpNetwork5") { }
+    public LrpNetwork5(string name) : base(name) {
+      Orchestrator = new LrpOrchestratorNode5(OrchestratorNodeName);
+      MetaSolver = new OrchestratedAlgorithmNode(MetaSolverNodeName);
+      FlpSolver = new OrchestratedAlgorithmNode(FlpSolverNodeName);
+      VrpSolver = new OrchestratedAlgorithmNode(VrpSolverNodeName);
+
+      var metaSolver = new GeneticAlgorithm();
+      metaSolver.Problem = new MinimizationVariegationProblem<BinaryVectorEncoding>();
+      metaSolver.PopulationSize.Value = 20;
+      var c1 = metaSolver.CrossoverParameter.ValidValues.OfType<MultiBinaryVectorCrossover>().Single();
+      metaSolver.CrossoverParameter.Value = c1;
+      metaSolver.MaximumGenerations.Value = 80;
+      var m1 = metaSolver.MutatorParameter.ValidValues.OfType<SinglePositionBitflipManipulator>().Single();
+      metaSolver.MutatorParameter.Value = m1;
+      var s1 = metaSolver.SelectorParameter.ValidValues.OfType<TournamentSelector>().Single();
+      metaSolver.SelectorParameter.Value = s1;
+      MetaSolver.Algorithm = metaSolver;
+      Orchestrator.MetaSolverOrchestrationPort.ConnectedPort = MetaSolver.OrchestrationPort;
+
+      var flpSolver = new FLPCplexSolver();
+      flpSolver.Problem = new FacilityLocationProblem();
+      flpSolver.MaximumRuntimeParameter.Value.Value = TimeSpan.FromSeconds(3.0);
+      FlpSolver.Algorithm = flpSolver;
+      Orchestrator.FlpSolverOrchestrationPort.ConnectedPort = FlpSolver.OrchestrationPort;
+
+      var vrpSolver = new GeneticAlgorithm();
+      vrpSolver.Problem = new VehicleRoutingProblem();
+      vrpSolver.PopulationSize.Value = 100;
+      var c2 = vrpSolver.CrossoverParameter.ValidValues.OfType<MultiVRPSolutionCrossover>().Single(x => x.Name == "MultiVRPSolutionCrossover");
+      vrpSolver.CrossoverParameter.Value = c2;
+      vrpSolver.MaximumGenerations.Value = 100;
+      var m2 = vrpSolver.MutatorParameter.ValidValues.OfType<MultiVRPSolutionManipulator>().Single(x => x.Name == "MultiVRPSolutionManipulator");
+      vrpSolver.MutatorParameter.Value = m2;
+      var s2 = vrpSolver.SelectorParameter.ValidValues.OfType<TournamentSelector>().Single();
+      vrpSolver.SelectorParameter.Value = s2;
+      VrpSolver.Algorithm = vrpSolver;
+      Orchestrator.VrpSolverOrchestrationPort.ConnectedPort = VrpSolver.OrchestrationPort;
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new LrpNetwork5(this, cloner);
+    }
+  }
+}
Index: branches/OptimizationNetworks/HeuristicLab.Networks.IntegratedOptimization.LocationRouting/3.3/LrpOrchestratorNode4.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Networks.IntegratedOptimization.LocationRouting/3.3/LrpOrchestratorNode4.cs	(revision 14895)
+++ branches/OptimizationNetworks/HeuristicLab.Networks.IntegratedOptimization.LocationRouting/3.3/LrpOrchestratorNode4.cs	(revision 14895)
@@ -0,0 +1,138 @@
+﻿#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.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Core.Networks;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.IntegerVectorEncoding;
+using HeuristicLab.Encodings.RealVectorEncoding;
+using HeuristicLab.Optimization;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Problems.FacilityLocation;
+using HeuristicLab.Problems.VehicleRouting;
+using HeuristicLab.Problems.VehicleRouting.ProblemInstances;
+
+namespace HeuristicLab.Networks.IntegratedOptimization.LocationRouting {
+  [Item("LrpOrchestratorNode4", "Orchestrator for LRP optimization network version 4.")]
+  [StorableClass]
+  public sealed class LrpOrchestratorNode4 : LrpOrchestratorNode {
+    [StorableConstructor]
+    private LrpOrchestratorNode4(bool deserializing) : base(deserializing) { }
+    private LrpOrchestratorNode4(LrpOrchestratorNode4 original, Cloner cloner) : base(original, cloner) { }
+    public LrpOrchestratorNode4() : this("LrpOrchestratorNode4") { }
+    public LrpOrchestratorNode4(string name) : base(name) {
+      MetaSolverOrchestrationPort = CreateOrchestrationPort<MinimizationVariegationProblem<RealVectorEncoding>>(MetaSolverName + OrchestrationPortNameSuffix);
+      MetaSolverEvaluationPort = CreateEvaluationPort<RealVector>(MetaSolverName + EvaluationPortNameSuffix, "RealVector", "Quality");
+      FlpSolverOrchestrationPort = CreateOrchestrationPort<FacilityLocationProblem>(FlpSolverName + OrchestrationPortNameSuffix);
+      VrpSolverOrchestrationPort = CreateOrchestrationPort<VehicleRoutingProblem>(VrpSolverName + OrchestrationPortNameSuffix);
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new LrpOrchestratorNode4(this, cloner);
+    }
+
+    public override void Prepare(bool clearRuns = false) {
+      base.Prepare(clearRuns);
+
+      var metaMsg = MetaSolverOrchestrationPort.PrepareMessage();
+      var msgFlags = OrchestrationMessage.Prepare | OrchestrationMessage.SetEvalHook;
+      if (clearRuns) msgFlags |= OrchestrationMessage.ClearRuns;
+      metaMsg["OrchestrationMessage"] = new EnumValue<OrchestrationMessage>(msgFlags);
+      var problem = new MinimizationVariegationProblem<RealVectorEncoding>();
+      problem.Encoding.Length = nrOfDepots;
+      problem.Encoding.Bounds = new DoubleMatrix(new[,] { { -1.0, 1.0 } });
+      metaMsg["Problem"] = problem;
+      MetaSolverOrchestrationPort.SendMessage(metaMsg);
+    }
+
+    #region MetaSolver Message Handling
+    protected override void MetaSolverEvaluationPortMessage(IMessage message) {
+      var factors = (RealVector)message["RealVector"];
+
+      var flp = (FacilityLocationProblem)FlpParameter.Value.Clone();
+      var dc = (double[])depotCosts.Clone();
+      for (int i = 0; i < nrOfDepots; i++)
+        dc[i] = dc[i] * factors[i];
+      flp.OpeningCostsParameter.Value = new DoubleArray(dc);
+
+      var flpMsg = FlpSolverOrchestrationPort.PrepareMessage();
+      flpMsg["OrchestrationMessage"] = new EnumValue<OrchestrationMessage>(OrchestrationMessage.Prepare | OrchestrationMessage.ClearRuns | OrchestrationMessage.Start);
+      flpMsg["Problem"] = flp;
+      FlpSolverOrchestrationPort.SendMessage(flpMsg);
+      cts.Token.ThrowIfCancellationRequested();
+
+      var flpResults = (ResultCollection)flpMsg["Results"];
+      var bestFlpSolution = (IntegerVector)flpResults["Best Solution"].Value;
+      var flpSolution = FlpParameter.Value.GetSolution(bestFlpSolution);
+
+      var depots = bestFlpSolution.Select((x, i) => Tuple.Create(x, i)).GroupBy(x => x.Item1, x => x.Item2);
+      var vrpSolutions = new ResultCollection(depots.Count());
+      foreach (var depot in depots.OrderBy(x => x.Key)) {
+        var depotIdx = depot.Key;
+        var customers = depot.ToArray();
+
+        var vrp = (VehicleRoutingProblem)VrpParameter.Value.Clone();
+        var vrpInstance = (CVRPProblemInstance)vrp.ProblemInstance;
+        var coordinates = LrpUtils.GetVrpCoordinates(depotCoordinates, customerCoordinates, new[] { depotIdx }, customers);
+        var distances = LrpUtils.GetVrpDistances(coordinates, distanceType);
+        vrpInstance.Coordinates = new DoubleMatrix(coordinates);
+        vrpInstance.DistanceMatrix = new DoubleMatrix(distances);
+        vrpInstance.Demand = new DoubleArray(new[] { 0.0 }.Concat(customers.Select(x => customerDemands[x])).ToArray());
+        vrpInstance.Vehicles.Value = customers.Length;
+
+        var vrpMsg = VrpSolverOrchestrationPort.PrepareMessage();
+        vrpMsg["OrchestrationMessage"] = new EnumValue<OrchestrationMessage>(OrchestrationMessage.Prepare | OrchestrationMessage.ClearRuns | OrchestrationMessage.Start);
+        vrpMsg["Problem"] = vrp;
+        VrpSolverOrchestrationPort.SendMessage(vrpMsg);
+        cts.Token.ThrowIfCancellationRequested();
+
+        var vrpResults = (ResultCollection)vrpMsg["Results"];
+        IResult bestVrpSolutionResult;
+        if (!vrpResults.TryGetValue("Best valid VRP Solution", out bestVrpSolutionResult)
+         && !vrpResults.TryGetValue("Best VRP Solution", out bestVrpSolutionResult)) {
+          // no best solution found ... throw?
+        }
+        var bestVrpSolution = (VRPSolution)bestVrpSolutionResult.Value.Clone();
+        vrpSolutions.Add(new Result("Depot " + depot.Key, bestVrpSolution));
+      }
+
+      #region Analyze
+      double objectiveValue = LrpUtils.Evaluate(flpSolution, vrpSolutions.Select(x => (VRPSolution)x.Value).ToArray());
+      ((DoubleValue)message["Quality"]).Value = objectiveValue;
+
+      IResult bestQuality;
+      if (!Results.TryGetValue("Best LRP Quality", out bestQuality)) {
+        Results.Add(new Result("Best LRP Quality", new DoubleValue(objectiveValue)));
+        Results.Add(new Result("Best FLP Solution", flpSolution));
+        Results.Add(new Result("Best VRP Solutions", vrpSolutions));
+      } else if (objectiveValue < ((DoubleValue)bestQuality.Value).Value) {
+        ((DoubleValue)bestQuality.Value).Value = objectiveValue;
+        Results["Best FLP Solution"].Value = flpSolution;
+        Results["Best VRP Solutions"].Value = vrpSolutions;
+      }
+      #endregion
+    }
+    #endregion
+  }
+}
Index: branches/OptimizationNetworks/HeuristicLab.Networks.IntegratedOptimization.LocationRouting/3.3/LrpOrchestratorNode5.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Networks.IntegratedOptimization.LocationRouting/3.3/LrpOrchestratorNode5.cs	(revision 14895)
+++ branches/OptimizationNetworks/HeuristicLab.Networks.IntegratedOptimization.LocationRouting/3.3/LrpOrchestratorNode5.cs	(revision 14895)
@@ -0,0 +1,172 @@
+﻿#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.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Core.Networks;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.BinaryVectorEncoding;
+using HeuristicLab.Encodings.IntegerVectorEncoding;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Problems.FacilityLocation;
+using HeuristicLab.Problems.VehicleRouting;
+using HeuristicLab.Problems.VehicleRouting.ProblemInstances;
+
+namespace HeuristicLab.Networks.IntegratedOptimization.LocationRouting {
+  [Item("LrpOrchestratorNode5", "Orchestrator for LRP optimization network version 5.")]
+  [StorableClass]
+  public sealed class LrpOrchestratorNode5 : LrpOrchestratorNode {
+    [StorableConstructor]
+    private LrpOrchestratorNode5(bool deserializing) : base(deserializing) { }
+    private LrpOrchestratorNode5(LrpOrchestratorNode5 original, Cloner cloner) : base(original, cloner) { }
+    public LrpOrchestratorNode5() : this("LrpOrchestratorNode5") { }
+    public LrpOrchestratorNode5(string name) : base(name) {
+      MetaSolverOrchestrationPort = CreateOrchestrationPort<MinimizationVariegationProblem<BinaryVectorEncoding>>(MetaSolverName + OrchestrationPortNameSuffix);
+      MetaSolverEvaluationPort = CreateEvaluationPort<BinaryVector>(MetaSolverName + EvaluationPortNameSuffix, "BinaryVector", "Quality");
+      FlpSolverOrchestrationPort = CreateOrchestrationPort<FacilityLocationProblem>(FlpSolverName + OrchestrationPortNameSuffix);
+      VrpSolverOrchestrationPort = CreateOrchestrationPort<VehicleRoutingProblem>(VrpSolverName + OrchestrationPortNameSuffix);
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new LrpOrchestratorNode5(this, cloner);
+    }
+
+    protected override void MetaSolverOrchestrationPort_ConnectedPortChanged(object sender, EventArgs e) {
+      if (MetaSolverOrchestrationPort.ConnectedPort == null) return;
+
+      var node = MetaSolverOrchestrationPort.ConnectedPort.Parent as OrchestratedAlgorithmNode;
+      if (node == null) return;
+
+      var hook = new HookOperator { Name = "Meta Eval Hook" };
+      hook.Parameters.Add(new LookupParameter<BinaryVector>("BinaryVector") { Hidden = true });
+      hook.Parameters.Add(new LookupParameter<DoubleValue>("Quality") { Hidden = true });
+      node.EvalHook = hook;
+
+      node.OrchestrationPort.CloneParametersFromPort(MetaSolverOrchestrationPort);
+      node.EvaluationPort.CloneParametersFromPort(MetaSolverEvaluationPort);
+      node.EvaluationPort.ConnectedPort = MetaSolverEvaluationPort;
+    }
+
+    public override void Prepare(bool clearRuns = false) {
+      base.Prepare(clearRuns);
+
+      var metaMsg = MetaSolverOrchestrationPort.PrepareMessage();
+      var msgFlags = OrchestrationMessage.Prepare | OrchestrationMessage.SetEvalHook;
+      if (clearRuns) msgFlags |= OrchestrationMessage.ClearRuns;
+      metaMsg["OrchestrationMessage"] = new EnumValue<OrchestrationMessage>(msgFlags);
+      var problem = new MinimizationVariegationProblem<BinaryVectorEncoding>();
+      problem.Encoding.Length = nrOfDepots;
+      metaMsg["Problem"] = problem;
+      MetaSolverOrchestrationPort.SendMessage(metaMsg);
+    }
+
+    #region MetaSolver Message Handling
+    protected override void MetaSolverEvaluationPortMessage(IMessage message) {
+      var selection = (BinaryVector)message["BinaryVector"];
+      var inverse = selection.Select((x, i) => Tuple.Create(x, i)).Where(x => x.Item1).Select(x => x.Item2).ToArray();
+      if (!inverse.Any()) {
+        ((DoubleValue)message["Quality"]).Value = double.MaxValue;
+        return;
+      }
+
+      var flp = (FacilityLocationProblem)FlpParameter.Value.Clone();
+      double[,] newDepotCoordinates = new double[inverse.Length, 2];
+      double[] newDepotCosts = new double[inverse.Length];
+      double[] newDepotCapacities = new double[inverse.Length];
+
+      int newIdx = 0;
+      for (int oldIdx = 0; oldIdx < selection.Length; oldIdx++) {
+        if (!selection[oldIdx]) continue;
+        newDepotCoordinates[newIdx, 0] = depotCoordinates[oldIdx, 0];
+        newDepotCoordinates[newIdx, 1] = depotCoordinates[oldIdx, 1];
+        newDepotCosts[newIdx] = depotCosts[oldIdx];
+        newDepotCapacities[newIdx] = depotCapacities[oldIdx];
+        ++newIdx;
+      }
+      flp.OpeningCostsParameter.Value = new DoubleArray(newDepotCosts);
+      flp.DepotCapacitiesParameter.Value = new DoubleArray(newDepotCapacities);
+      flp.DeliveryCostsParameter.Value = new DoubleMatrix(LrpUtils.GetFlpDeliveryCosts(newDepotCoordinates, customerCoordinates, distanceType));
+
+      var flpMsg = FlpSolverOrchestrationPort.PrepareMessage();
+      flpMsg["OrchestrationMessage"] = new EnumValue<OrchestrationMessage>(OrchestrationMessage.Prepare | OrchestrationMessage.ClearRuns | OrchestrationMessage.Start);
+      flpMsg["Problem"] = flp;
+      FlpSolverOrchestrationPort.SendMessage(flpMsg);
+      cts.Token.ThrowIfCancellationRequested();
+
+      var flpResults = (ResultCollection)flpMsg["Results"];
+      var bestFlpSolution = (IntegerVector)flpResults["Best Solution"].Value;
+      var flpSolution = FlpParameter.Value.GetSolution(bestFlpSolution);
+
+      var depots = bestFlpSolution.Select((x, i) => Tuple.Create(inverse[x], i)).GroupBy(x => x.Item1, x => x.Item2);
+      var vrpSolutions = new ResultCollection(depots.Count());
+      foreach (var depot in depots.OrderBy(x => x.Key)) {
+        var depotIdx = depot.Key;
+        var customers = depot.ToArray();
+
+        var vrp = (VehicleRoutingProblem)VrpParameter.Value.Clone();
+        var vrpInstance = (CVRPProblemInstance)vrp.ProblemInstance;
+        var coordinates = LrpUtils.GetVrpCoordinates(depotCoordinates, customerCoordinates, new[] { depotIdx }, customers);
+        var distances = LrpUtils.GetVrpDistances(coordinates, distanceType);
+        vrpInstance.Coordinates = new DoubleMatrix(coordinates);
+        vrpInstance.DistanceMatrix = new DoubleMatrix(distances);
+        vrpInstance.Demand = new DoubleArray(new[] { 0.0 }.Concat(customers.Select(x => customerDemands[x])).ToArray());
+        vrpInstance.Vehicles.Value = customers.Length;
+
+        var vrpMsg = VrpSolverOrchestrationPort.PrepareMessage();
+        vrpMsg["OrchestrationMessage"] = new EnumValue<OrchestrationMessage>(OrchestrationMessage.Prepare | OrchestrationMessage.ClearRuns | OrchestrationMessage.Start);
+        vrpMsg["Problem"] = vrp;
+        VrpSolverOrchestrationPort.SendMessage(vrpMsg);
+        cts.Token.ThrowIfCancellationRequested();
+
+        var vrpResults = (ResultCollection)vrpMsg["Results"];
+        IResult bestVrpSolutionResult;
+        if (!vrpResults.TryGetValue("Best valid VRP Solution", out bestVrpSolutionResult)
+         && !vrpResults.TryGetValue("Best VRP Solution", out bestVrpSolutionResult)) {
+          // no best solution found ... throw?
+        }
+        var bestVrpSolution = (VRPSolution)bestVrpSolutionResult.Value.Clone();
+        vrpSolutions.Add(new Result("Depot " + depot.Key, bestVrpSolution));
+      }
+
+      #region Analyze
+      double objectiveValue = LrpUtils.Evaluate(flpSolution, vrpSolutions.Select(x => (VRPSolution)x.Value).ToArray());
+      ((DoubleValue)message["Quality"]).Value = objectiveValue;
+
+      IResult bestQuality;
+      if (!Results.TryGetValue("Best LRP Quality", out bestQuality)) {
+        Results.Add(new Result("Best LRP Quality", new DoubleValue(objectiveValue)));
+        Results.Add(new Result("Best FLP Solution", flpSolution));
+        Results.Add(new Result("Best VRP Solutions", vrpSolutions));
+      } else if (objectiveValue < ((DoubleValue)bestQuality.Value).Value) {
+        ((DoubleValue)bestQuality.Value).Value = objectiveValue;
+        Results["Best FLP Solution"].Value = flpSolution;
+        Results["Best VRP Solutions"].Value = vrpSolutions;
+      }
+      #endregion
+    }
+    #endregion
+  }
+}
Index: branches/OptimizationNetworks/HeuristicLab.Networks.IntegratedOptimization.LocationRouting/3.3/LrpUtils.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Networks.IntegratedOptimization.LocationRouting/3.3/LrpUtils.cs	(revision 14688)
+++ branches/OptimizationNetworks/HeuristicLab.Networks.IntegratedOptimization.LocationRouting/3.3/LrpUtils.cs	(revision 14895)
@@ -167,5 +167,8 @@
 
     public static double Evaluate(FacilityLocationSolution flpSolution, VRPSolution[] vrpSolutions) {
-      return flpSolution.TotalOpeningCostsParameter.Value.Value + vrpSolutions.Sum(x => x.Quality.Value);
+      if (flpSolution.TotalOverbookedCapacityParameter.Value.Value > 0.0)
+        return flpSolution.FitnessValueParameter.Value.Value + vrpSolutions.Sum(x => x.Quality.Value);
+      else
+        return flpSolution.TotalOpeningCostsParameter.Value.Value + vrpSolutions.Sum(x => x.Quality.Value);
     }
   }
Index: branches/OptimizationNetworks/HeuristicLab.Problems.FacilityLocation.CplexSolver/3.3/FLP_1.mod
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Problems.FacilityLocation.CplexSolver/3.3/FLP_1.mod	(revision 14688)
+++ branches/OptimizationNetworks/HeuristicLab.Problems.FacilityLocation.CplexSolver/3.3/FLP_1.mod	(revision 14895)
@@ -14,4 +14,9 @@
 dvar boolean y[0..(I-1)];				//Eröffnung Depot i
 dvar boolean z[0..(I-1)][0..(J-1)];		//Depot i beliefert Kunde j
+
+execute
+ {
+ 	cplex.threads=1;
+ }
 
 minimize
Index: branches/OptimizationNetworks/HeuristicLab.Problems.FacilityLocation.CplexSolver/3.3/FLP_2.mod
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Problems.FacilityLocation.CplexSolver/3.3/FLP_2.mod	(revision 14688)
+++ branches/OptimizationNetworks/HeuristicLab.Problems.FacilityLocation.CplexSolver/3.3/FLP_2.mod	(revision 14895)
@@ -15,4 +15,9 @@
 dvar boolean z[0..(I-1)][0..(J-1)];		//Depot i beliefert Kunde j
 
+execute
+ {
+ 	cplex.threads=1;
+ }
+ 
 minimize
 ( sum ( i in 0..(I-1) ) ( f[i] * y[i] ) );
Index: branches/OptimizationNetworks/HeuristicLab.Problems.FacilityLocation.CplexSolver/3.3/HeuristicLab.Problems.FacilityLocation.CplexSolver-3.3.csproj
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Problems.FacilityLocation.CplexSolver/3.3/HeuristicLab.Problems.FacilityLocation.CplexSolver-3.3.csproj	(revision 14688)
+++ branches/OptimizationNetworks/HeuristicLab.Problems.FacilityLocation.CplexSolver/3.3/HeuristicLab.Problems.FacilityLocation.CplexSolver-3.3.csproj	(revision 14895)
@@ -93,7 +93,7 @@
       <Private>False</Private>
     </Reference>
-    <Reference Include="oplall, Version=12.6.1.0, Culture=neutral, PublicKeyToken=7906592bc7cc7340, processorArchitecture=MSIL">
+    <Reference Include="oplall, Version=12.7.0.0, Culture=neutral, PublicKeyToken=7906592bc7cc7340, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
-      <HintPath>C:\Program Files\IBM\ILOG\CPLEX_Studio1261\opl\lib\oplall.dll</HintPath>
+      <HintPath>C:\Program Files\IBM\ILOG\CPLEX_Studio127\opl\lib\oplall.dll</HintPath>
     </Reference>
     <Reference Include="System" />
