Index: /branches/OaaS/HeuristicLab 3.3 Hive.Slave.sln
===================================================================
--- /branches/OaaS/HeuristicLab 3.3 Hive.Slave.sln	(revision 9165)
+++ /branches/OaaS/HeuristicLab 3.3 Hive.Slave.sln	(revision 9166)
@@ -95,5 +95,4 @@
 		{7C4B1DE4-FC9A-4448-BCF8-3CB3FA3CB8FA}.Release|x86.Build.0 = Release|x86
 		{57E37188-4523-4F8D-8CEF-AE0AA27BB754}.Debug|Any CPU.ActiveCfg = Debug
-		{57E37188-4523-4F8D-8CEF-AE0AA27BB754}.Debug|Any CPU.Build.0 = Debug
 		{57E37188-4523-4F8D-8CEF-AE0AA27BB754}.Debug|x64.ActiveCfg = Debug
 		{57E37188-4523-4F8D-8CEF-AE0AA27BB754}.Debug|x64.Build.0 = Debug
@@ -119,5 +118,4 @@
 		{BA8001DE-E83C-4B1F-8B2E-2695C4222491}.Release|x86.Build.0 = Release|x86
 		{C16CA1A6-7AE8-4B87-A6A6-9C290E8B9646}.Debug|Any CPU.ActiveCfg = Debug
-		{C16CA1A6-7AE8-4B87-A6A6-9C290E8B9646}.Debug|Any CPU.Build.0 = Debug
 		{C16CA1A6-7AE8-4B87-A6A6-9C290E8B9646}.Debug|x64.ActiveCfg = Debug
 		{C16CA1A6-7AE8-4B87-A6A6-9C290E8B9646}.Debug|x64.Build.0 = Debug
Index: /branches/OaaS/HeuristicLab 3.3 Services.sln
===================================================================
--- /branches/OaaS/HeuristicLab 3.3 Services.sln	(revision 9165)
+++ /branches/OaaS/HeuristicLab 3.3 Services.sln	(revision 9166)
@@ -39,5 +39,5 @@
 		Release.AspNetCompiler.FixedNames = "false"
 		Release.AspNetCompiler.Debug = "False"
-		VWDPort = "48545"
+		VWDPort = "25129"
 		VWDVirtualPath = "/Hive-3.3"
 		DefaultWebSiteLanguage = "Visual C#"
@@ -191,5 +191,4 @@
 		{F685556B-F6EB-4143-8E7E-662D00FDD299}.Release|x86.Build.0 = Release|x86
 		{034C2EE4-E303-4E45-98AB-F0074EC83B81}.Debug|Any CPU.ActiveCfg = Debug
-		{034C2EE4-E303-4E45-98AB-F0074EC83B81}.Debug|Any CPU.Build.0 = Debug
 		{034C2EE4-E303-4E45-98AB-F0074EC83B81}.Debug|Mixed Platforms.ActiveCfg = Debug
 		{034C2EE4-E303-4E45-98AB-F0074EC83B81}.Debug|Mixed Platforms.Build.0 = Debug
@@ -335,4 +334,5 @@
 		{E0095F29-604B-4EE8-9EE8-8187DA3B24F1}.Release|x86.ActiveCfg = Release|Any CPU
 		{D6DD768C-707C-415A-B9F8-C1F7668F8560}.Debug|Any CPU.ActiveCfg = Debug|x86
+		{D6DD768C-707C-415A-B9F8-C1F7668F8560}.Debug|Any CPU.Build.0 = Debug|x86
 		{D6DD768C-707C-415A-B9F8-C1F7668F8560}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
 		{D6DD768C-707C-415A-B9F8-C1F7668F8560}.Debug|Mixed Platforms.Build.0 = Debug|x86
Index: /branches/OaaS/HeuristicLab.Services.Optimization.Controller/Azure/DAL.cs
===================================================================
--- /branches/OaaS/HeuristicLab.Services.Optimization.Controller/Azure/DAL.cs	(revision 9165)
+++ /branches/OaaS/HeuristicLab.Services.Optimization.Controller/Azure/DAL.cs	(revision 9166)
@@ -6,4 +6,6 @@
 using Microsoft.WindowsAzure;
 using Microsoft.WindowsAzure.StorageClient;
+using Microsoft.WindowsAzure.ServiceRuntime;
+using System.Diagnostics;
 
 namespace HeuristicLab.Services.Optimization.ControllerService.Azure {
@@ -98,5 +100,11 @@
       get {
         if (storageAccount == null) {
-          storageAccount = CloudStorageAccount.Parse(CloudConfigurationManager.GetSetting(AzureConstants.CLOUD_SETTINGS_KEY));
+          try {
+            storageAccount = CloudStorageAccount.Parse(CloudConfigurationManager.GetSetting(AzureConstants.CLOUD_SETTINGS_KEY));
+          }
+          catch (Exception ex) {
+            Trace.WriteLine(ex.Message);
+            storageAccount = CloudStorageAccount.Parse("DefaultEndpointsProtocol=https;AccountName=optimizationstorage1;AccountKey=n7Leom8ZFWkof/VQ2a4aRSvwOlX+Gwr3uojQF9CFJw1osmGCV0WwaNC8s7nkZ+qteLduAgW2l75WFpbXrkvG4Q==");
+          }
         }
         return storageAccount; 
Index: /branches/OaaS/HeuristicLab.Services.Optimization.Controller/General/Configuration.cs
===================================================================
--- /branches/OaaS/HeuristicLab.Services.Optimization.Controller/General/Configuration.cs	(revision 9166)
+++ /branches/OaaS/HeuristicLab.Services.Optimization.Controller/General/Configuration.cs	(revision 9166)
@@ -0,0 +1,22 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Microsoft.WindowsAzure.ServiceRuntime;
+using System.Configuration;
+
+namespace HeuristicLab.Services.Optimization.ControllerService.General {
+  public static class Configuration {
+    private static string GetSetting(string setting) {
+      if (RoleEnvironment.IsAvailable) {
+        return RoleEnvironment.GetConfigurationSettingValue(setting);
+      }
+      else {
+        return ConfigurationManager.AppSettings[setting];
+      }
+    }
+
+    public static string HiveEndpointName { get { return GetSetting("HiveEndpointName"); } }
+    public static string ControllerEndpointName { get { return GetSetting("ControllerEndpointName"); } }
+  }
+}
Index: /branches/OaaS/HeuristicLab.Services.Optimization.Controller/HL/HLMapper.cs
===================================================================
--- /branches/OaaS/HeuristicLab.Services.Optimization.Controller/HL/HLMapper.cs	(revision 9165)
+++ /branches/OaaS/HeuristicLab.Services.Optimization.Controller/HL/HLMapper.cs	(revision 9166)
@@ -11,5 +11,5 @@
 namespace HeuristicLab.Services.Optimization.ControllerService {
   public interface IScenarioMapper {
-    void MapScenario(OptimizationScenario scenario, IAlgorithm algorithm);
+    void MapScenario(OptimizationScenario scenario, out IAlgorithm algorithm);
   }
 
@@ -18,4 +18,9 @@
       var dv = parameter.Value as DecimalValue;
       return new DoubleValue(dv.Value);      
+    }
+
+    public static T Create<T>(Parameter typeParameter) {
+      var type = Type.GetType((typeParameter.Value as TypeValue).Value);      
+      return (T)Activator.CreateInstance(type, null);
     }
 
Index: /branches/OaaS/HeuristicLab.Services.Optimization.Controller/HL/HiveMapper.cs
===================================================================
--- /branches/OaaS/HeuristicLab.Services.Optimization.Controller/HL/HiveMapper.cs	(revision 9165)
+++ /branches/OaaS/HeuristicLab.Services.Optimization.Controller/HL/HiveMapper.cs	(revision 9166)
@@ -7,5 +7,5 @@
 namespace HeuristicLab.Services.Optimization.ControllerService.Model {
   public static class HiveMapper {    
-    public static double FindDoubleValue(this InputParameters ip, string what) {     
+    public static double FindDoubleValue(this ProblemParameters ip, string what) {     
       foreach (var param in ip.Items) {
         if (param.Value.Name == what) {
Index: /branches/OaaS/HeuristicLab.Services.Optimization.Controller/HL/HiveScenarioManager.cs
===================================================================
--- /branches/OaaS/HeuristicLab.Services.Optimization.Controller/HL/HiveScenarioManager.cs	(revision 9165)
+++ /branches/OaaS/HeuristicLab.Services.Optimization.Controller/HL/HiveScenarioManager.cs	(revision 9166)
@@ -20,4 +20,5 @@
 using HeuristicLab.Services.Optimization.ControllerService.Azure;
 using System.Data;
+using HeuristicLab.Services.Optimization.ControllerService.General;
 
 namespace HeuristicLab.Services.Optimization.ControllerService {
@@ -43,5 +44,5 @@
     private static object lockable;
     private Dictionary<string, IScenarioMapper> mappers = new Dictionary<string, IScenarioMapper>();
-    private IDataAccessLayer dal = new AzureDataAccessLayer();
+    private IDataAccessLayer dal = DataAccessLayerProvider.GetLayer();
 
     public static readonly string SCENARIO_TABLE = "Scenario";
@@ -51,15 +52,23 @@
     }
 
-    public void DispatchScenario(Model.User user, Model.OptimizationScenario scenario) {
-      Experiment experiment = new Experiment();
-      var problem = new TravelingSalesmanProblem();
-      var algo = new GeneticAlgorithm();
-      algo.Problem = problem;      
+    public void DispatchScenario(Model.User user, Model.OptimizationScenario scenario, JobExecutionDetails details) {
+      // Experiment experiment = new Experiment();
+      // var problem = new TravelingSalesmanProblem();
+      // var algo = new GeneticAlgorithm();
+      // algo.Problem = problem;      
       
       IScenarioMapper mapper = GetMapper(scenario);
-      mapper.MapScenario(scenario, algo);  
-
-      //experiment.Optimizers.Add(algo);
-      SendExperimentToHive(user, algo);
+      IAlgorithm algo;
+      mapper.MapScenario(scenario, out algo);
+      if (details.Repititions > 1) {
+        BatchRun br = new BatchRun();
+        //br.Name = details.JobTitle;
+        br.Optimizer = algo;        
+        br.Repetitions = details.Repititions;
+        SendExperimentToHive(user, br, details);
+      }
+      else {       
+        SendExperimentToHive(user, algo, details);
+      }
     }
 
@@ -73,5 +82,5 @@
     }
 
-    private IScenarioMapper CompileMapper(string scenarioMapper) {
+    public static IScenarioMapper CompileMapper(string scenarioMapper) {
        // http://stackoverflow.com/questions/3188882/compile-and-run-dynamic-code-without-generating-exe
       using (var csCodeProvider = new Microsoft.CSharp.CSharpCodeProvider()) {
@@ -105,13 +114,14 @@
 
     private IScenarioMapper GetMapper(Model.OptimizationScenario scenario) {
-      if (!mappers.ContainsKey(scenario.Name)) {
+      var id = scenario.Id;
+      if (!mappers.ContainsKey(id)) {
         lock (lockable) {
-          if (mappers.ContainsKey(scenario.Name))
-            return mappers[scenario.Name];
+          if (mappers.ContainsKey(id))
+            return mappers[id];
           
-          var mapperString = GetMapperFromBlobStore(scenario.Name);
+          var mapperString = GetMapperFromBlobStore(id);
           var mapper = CompileMapper(mapperString);
 
-          mappers[scenario.Name] = mapper;
+          mappers[id] = mapper;
           return mapper;
         } // lock        
@@ -120,19 +130,26 @@
      }  
 
-    private void MapExperiment(Model.OptimizationScenario scenario, IAlgorithm algorithm) {      
+    private void MapExperiment(Model.OptimizationScenario scenario, out IAlgorithm algorithm) {      
       IScenarioMapper mapper = GetMapper(scenario);
-      mapper.MapScenario(scenario, algorithm);     
-    }
-
-    private void SendExperimentToHive(Model.User user, IAlgorithm exp) {
+      mapper.MapScenario(scenario, out algorithm);     
+    }
+
+    private void ConfigureHive(Model.User user) {
+      HiveServiceLocator.Instance.Username = user.Username;
+      HiveServiceLocator.Instance.Password = user.Password;
+      HiveServiceLocator.Instance.EndpointConfigurationName = Configuration.HiveEndpointName;      
+    }
+
+    private void SendExperimentToHive(Model.User user, IOptimizer exp, JobExecutionDetails details) {      
       var job = new RefreshableJob();
       job.IsAllowedPrivileged = true;      
-      job.Job.Name = "Web Scheduled Traveling Salesman Job";
-      job.Job.ResourceNames = "TESTGROUP";
-      job.RefreshAutomatically = false;
+      job.Job.Name = details.JobTitle;
+      job.Job.ResourceNames = details.Group;      
+      job.RefreshAutomatically = false;     
+      if (exp.ExecutionState != ExecutionState.Prepared) {
+        exp.Prepare();
+      }      
       job.HiveTasks.Add(new OptimizerHiveTask(exp));
-      HiveServiceLocator.Instance.Username = user.Username;
-      HiveServiceLocator.Instance.Password = user.Password;
-      HiveServiceLocator.Instance.EndpointConfigurationName = "WSHttpBinding_IHiveService";
+      ConfigureHive(user);
       
       HiveClient.StartJob((ex) => { 
@@ -145,10 +162,8 @@
 
     public IList<Model.Job> GetJobs(User user) {
-      HiveServiceLocator.Instance.Username = user.Username;
-      HiveServiceLocator.Instance.Password = user.Password;
-      HiveServiceLocator.Instance.EndpointConfigurationName = "WSHttpBinding_IHiveService";
+      ConfigureHive(user);
       var jobsLoaded = HiveServiceLocator.Instance.CallHiveService<IEnumerable<HeuristicLab.Clients.Hive.Job>>(s => s.GetJobs());
       IList<Model.Job> jobs = new List<Model.Job>();
-      
+
       foreach (var job in jobsLoaded) {
         jobs.Add(ConvertJob(user, job));
@@ -163,28 +178,8 @@
       if (job.CalculatingCount > 0)
         state = JobState.Calculating;
-      else if (job.JobCount == job.FinishedCount)
+      else if (job.JobCount > 0 && job.JobCount == job.FinishedCount)
         state = JobState.Finished;
       else
         state = JobState.Waiting;
-      /*var jobTasks = HiveServiceLocator.Instance.CallHiveService<IEnumerable<HeuristicLab.Clients.Hive.LightweightTask>>(s => s.GetLightweightJobTasks(job.Id));
-      
-      foreach (var task in jobTasks) {        
-        switch (task.State) {
-          case TaskState.Aborted:
-            state = JobState.Aborted;
-            break;
-          case TaskState.Failed:
-            state = JobState.Failed;
-            break;
-        }
-      }
-      if (!state.HasValue) {
-        if (job.CalculatingCount > 0)
-          state = JobState.Calculating;
-        else if (waitingJobs > 0)
-          state = JobState.Waiting;
-        else
-          state = JobState.Finished;        
-      }*/
       return new Model.Job() { Id = job.Id.ToString(), Name = job.Name, Resource = job.ResourceNames, State = state.Value, DateCreated = job.DateCreated };
     }
@@ -192,7 +187,5 @@
 
     public Model.Job GetJob(User user, string id) {
-      HiveServiceLocator.Instance.Username = user.Username;
-      HiveServiceLocator.Instance.Password = user.Password;
-      HiveServiceLocator.Instance.EndpointConfigurationName = "WSHttpBinding_IHiveService";
+      ConfigureHive(user);
       var guid = Guid.Parse(id);
       return ConvertJob(user, HiveServiceLocator.Instance.CallHiveService<HeuristicLab.Clients.Hive.Job>(s => s.GetJob(guid)));
@@ -201,7 +194,5 @@
 
     public void DeleteJob(User user, string id) {
-      HiveServiceLocator.Instance.Username = user.Username;
-      HiveServiceLocator.Instance.Password = user.Password;
-      HiveServiceLocator.Instance.EndpointConfigurationName = "WSHttpBinding_IHiveService";
+      ConfigureHive(user);
       var guid = Guid.Parse(id);
       HiveServiceLocator.Instance.CallHiveService(s => s.DeleteJob(guid));      
@@ -209,7 +200,5 @@
 
     public IList<Model.Run> GetJobResults(User user, string id) {
-      HiveServiceLocator.Instance.Username = user.Username;
-      HiveServiceLocator.Instance.Password = user.Password;
-      HiveServiceLocator.Instance.EndpointConfigurationName = "WSHttpBinding_IHiveService";
+      ConfigureHive(user);
       var guid = Guid.Parse(id);
       var jobTasks = HiveServiceLocator.Instance.CallHiveService<IEnumerable<HeuristicLab.Clients.Hive.LightweightTask>>(s => s.GetLightweightJobTasks(guid));
Index: anches/OaaS/HeuristicLab.Services.Optimization.Controller/HL/HiveScenarioManagerOld.cs
===================================================================
--- /branches/OaaS/HeuristicLab.Services.Optimization.Controller/HL/HiveScenarioManagerOld.cs	(revision 9165)
+++ 	(revision )
@@ -1,311 +1,0 @@
-﻿using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Services.Optimization.ControllerService.Interfaces;
-using HeuristicLab.Optimization;
-using HeuristicLab.Algorithms.GeneticAlgorithm;
-using HeuristicLab.Problems.TravelingSalesman;
-using HeuristicLab;
-using System.Reflection;
-using HeuristicLab.Services.Optimization.ControllerService.Model;
-using HeuristicLab.Core;
-using System.Collections;
-using HeuristicLab.Clients.Hive;
-using System.Threading;
-using HeuristicLab.Data;
-
-namespace HeuristicLab.Services.Optimization.ControllerService {
-  public class HiveScenarioManagerOld : IScenarioManager {
-    public object MapControllerDataType(object model, Parameter param) {
-      switch (param.Type) {
-        case ParameterType.Boolean:
-          return (param.Value as Model.BoolValue).Value;
-        case ParameterType.Integer:
-          return Convert.ToInt32((param.Value as Model.DecimalValue).Value);          
-        case ParameterType.Percent:        
-        case ParameterType.Decimal:
-          return (param.Value as Model.DecimalValue).Value;
-        case ParameterType.DecimalMatrix:
-          return Utility.ToMultiD(((param.Value as Model.DecimalMatrix).Value));
-        case ParameterType.DecimalVector:
-          return (param.Value as Model.DecimalVector).Value;
-        case ParameterType.Type:
-          //TODO handle type correctly!
-          var typeValue = param.Value as Model.TypeValue;
-          
-          IProblem problem = model as IProblem;
-          IAlgorithm algoModel = model as IAlgorithm;
-          if (problem == null && algoModel != null) {
-            problem = algoModel.Problem;
-          }
-
-          if (problem != null) {
-            var toselect = problem.Operators.OfType<IOperator>().FirstOrDefault(x => x.Name == typeValue.Value);            
-            if (toselect != null) {
-              return toselect;
-            }
-          }
-          
-          string parameterPropertyName = typeValue.Name.EndsWith("Parameter") ? typeValue.Name : typeValue.Name + "Parameter";
-          var parameterProperty = model.GetType().GetProperty(parameterPropertyName);
-          if (parameterProperty != null) {
-            var parameterPropertyValue = parameterProperty.GetGetMethod().Invoke(model, null);
-            var vvProp = parameterPropertyValue.GetType().GetProperty("ValidValues");
-            if (vvProp != null) {
-              //http://stackoverflow.com/questions/245607/how-is-generic-covariance-contra-variance-implemented-in-c-sharp-4-0 because of covariance declared in IEnumerable
-              var options = vvProp.GetGetMethod().Invoke(parameterPropertyValue, null) as IEnumerable<IItem>;
-              if (options != null) {
-                var result = options.FirstOrDefault(x => x.ItemName == typeValue.Value);
-                if (result != null)
-                  return result;
-              }
-            }
-          }
-
-          Type type = null;
-          foreach (var asm in AppDomain.CurrentDomain.GetAssemblies()) {
-            type = asm.GetType(typeValue.Value);
-            if (type != null)
-              break;
-          }
-          
-          return Activator.CreateInstance(type);
-      }
-      return null;
-    }
-
-    public object CreateHLObjectForType(object obj, Type type, Parameter prop) {
-      var value = MapControllerDataType(obj, prop);
-      if (prop.Type == ParameterType.Type)
-        return value;
-
-      if (type == typeof(HeuristicLab.Encodings.PermutationEncoding.Permutation)) {
-        double[] input = value as double[];
-        int[] arr = new int[input.Length];
-        for (int i = 0; i < input.Length; i++) {
-          arr[i] = Convert.ToInt32(input[i]);
-        }
-        var valueObj = new HeuristicLab.Encodings.PermutationEncoding.Permutation(Encodings.PermutationEncoding.PermutationTypes.RelativeUndirected, arr);
-        return valueObj;
-      }
-      var propertyGetter = obj.GetType().GetProperty(prop.Value.Name).GetGetMethod();        
-      return Activator.CreateInstance(propertyGetter.ReturnType, value);
-    }
-
-    private void MapProperty(object model, Parameter prop) {
-      var propertyGetter = model.GetType().GetProperty(prop.Value.Name).GetGetMethod();
-      var propertySetter = model.GetType().GetProperty(prop.Value.Name).GetSetMethod();
-      var value = propertyGetter.Invoke(model, null);
-      var valueProperty = value != null ? value.GetType().GetProperty("Value") : null;
-      if (propertySetter != null) {
-        var instance = CreateHLObjectForType(model, propertyGetter.ReturnType, prop);
-        propertySetter.Invoke(model, new object[] { instance });
-      }
-      else if (valueProperty != null) {        
-        valueProperty.GetSetMethod().Invoke(value, new object[] { MapControllerDataType(model, prop) });
-      }
-      else {
-        Console.WriteLine("Failed to handle property!");
-      }
-    }
-
-    public void DispatchScenario(Model.User user, Model.OptimizationScenario scenario) {
-      Experiment experiment = new Experiment();
-      var problem = new TravelingSalesmanProblem();
-      foreach (var prop in scenario.InputParameters.Items) {
-        MapProperty(problem, prop);
-      }
-
-      var algo = new GeneticAlgorithm();
-      algo.Problem = problem;      
-      foreach (var prop in scenario.AlgorithmParameters.Items) {
-        MapProperty(algo, prop);
-      }
-
-      experiment.Optimizers.Add(algo);
-      SendExperimentToHive(user, experiment);
-    }
-
-    private void SendExperimentToHive(Model.User user, Experiment exp) {
-      var job = new RefreshableJob();
-      job.IsAllowedPrivileged = true;      
-      job.Job.Name = "Web Scheduled Traveling Salesman Job";
-      job.Job.ResourceNames = "TESTGROUP";
-      job.RefreshAutomatically = false;
-      job.HiveTasks.Add(new OptimizerHiveTask(exp));
-      HiveServiceLocator.Instance.Username = user.Username;
-      HiveServiceLocator.Instance.Password = user.Password;
-      HiveServiceLocator.Instance.EndpointConfigurationName = "WSHttpBinding_IHiveService";
-      
-      HiveClient.StartJob((ex) => { 
-        Console.WriteLine(ex.StackTrace); 
-      }, job, new CancellationToken());
-
-      job.StopResultPolling();
-    }
-
-
-    public IList<Model.Job> GetJobs(User user) {
-      HiveServiceLocator.Instance.Username = user.Username;
-      HiveServiceLocator.Instance.Password = user.Password;
-      HiveServiceLocator.Instance.EndpointConfigurationName = "WSHttpBinding_IHiveService";
-      var jobsLoaded = HiveServiceLocator.Instance.CallHiveService<IEnumerable<HeuristicLab.Clients.Hive.Job>>(s => s.GetJobs());
-      IList<Model.Job> jobs = new List<Model.Job>();
-      
-      foreach (var job in jobsLoaded) {
-        jobs.Add(ConvertJob(user, job));
-      }
-      return jobs;
-    }
-
-    private Model.Job ConvertJob(User user, HeuristicLab.Clients.Hive.Job job) 
-    {
-      var waitingJobs = job.JobCount - job.CalculatingCount - job.FinishedCount;
-      Model.JobState? state = null;
-      var jobTasks = HiveServiceLocator.Instance.CallHiveService<IEnumerable<HeuristicLab.Clients.Hive.LightweightTask>>(s => s.GetLightweightJobTasks(job.Id));
-      
-      foreach (var task in jobTasks) {        
-        switch (task.State) {
-          case TaskState.Aborted:
-            state = JobState.Aborted;
-            break;
-          case TaskState.Failed:
-            state = JobState.Failed;
-            break;
-        }
-      }
-      if (!state.HasValue) {
-        if (job.CalculatingCount > 0)
-          state = JobState.Calculating;
-        else if (waitingJobs > 0)
-          state = JobState.Waiting;
-        else
-          state = JobState.Finished;
-      }
-      return new Model.Job() { Id = job.Id.ToString(), Name = job.Name, Resource = job.ResourceNames, State = state.Value };
-    }
-
-
-    public Model.Job GetJob(User user, string id) {
-      HiveServiceLocator.Instance.Username = user.Username;
-      HiveServiceLocator.Instance.Password = user.Password;
-      HiveServiceLocator.Instance.EndpointConfigurationName = "WSHttpBinding_IHiveService";
-      var guid = Guid.Parse(id);
-      return ConvertJob(user, HiveServiceLocator.Instance.CallHiveService<HeuristicLab.Clients.Hive.Job>(s => s.GetJob(guid)));
-    }
-
-
-    public void DeleteJob(User user, string id) {
-      HiveServiceLocator.Instance.Username = user.Username;
-      HiveServiceLocator.Instance.Password = user.Password;
-      HiveServiceLocator.Instance.EndpointConfigurationName = "WSHttpBinding_IHiveService";
-      var guid = Guid.Parse(id);
-      HiveServiceLocator.Instance.CallHiveService(s => s.DeleteJob(guid));      
-    }
-
-    public IList<Model.Run> GetJobResults(User user, string id) {
-      HiveServiceLocator.Instance.Username = user.Username;
-      HiveServiceLocator.Instance.Password = user.Password;
-      HiveServiceLocator.Instance.EndpointConfigurationName = "WSHttpBinding_IHiveService";
-      var guid = Guid.Parse(id);
-      var jobTasks = HiveServiceLocator.Instance.CallHiveService<IEnumerable<HeuristicLab.Clients.Hive.LightweightTask>>(s => s.GetLightweightJobTasks(guid));
-
-      IList<Guid> taskIds = new List<Guid>();
-      foreach (var task in jobTasks) {
-        taskIds.Add(task.Id);
-      }
-      TaskDownloader downloader = new TaskDownloader(taskIds);
-      downloader.StartAsync();
-      while (!downloader.IsFinished) {        
-        Thread.Sleep(500);
-
-        if (downloader.IsFaulted) {
-          throw downloader.Exception;
-        }
-      }
-      IDictionary<Guid, HiveTask> hiveTasks = downloader.Results;
-      IList<Model.Run> runs = new List<Model.Run>();
-      foreach (var keyTask in hiveTasks.Keys) {
-        var oht = hiveTasks[keyTask] as OptimizerHiveTask;
-        if (oht != null) {
-          foreach (var run in oht.ItemTask.Item.Runs) {
-            Model.Run taskRun = new Model.Run();
-            taskRun.Id = taskRun.Name = run.Name;
-            IList<Parameter> resultValues = new List<Model.Parameter>();
-            foreach (var key in run.Results.Keys) {
-              var value = run.Results[key];              
-              Parameter result = MapHiveDataType(key, value);
-              resultValues.Add(result);
-            }
-            taskRun.Results = resultValues;
-            runs.Add(taskRun);
-          }
-        }
-      }
-      return runs;
-    }
-    private Parameter MapHiveDataType(string name, IItem item) {
-      Parameter result = new Parameter();
-      result.Type = ParameterType.String;
-      if (item is IStringConvertibleValue) {
-        var value = (item as IStringConvertibleValue).GetValue();
-        result.Value = new HeuristicLab.Services.Optimization.ControllerService.Model.StringValue() { Name = name, Value = value };
-      }
-      else if (item is IStringConvertibleValueTuple) {
-        var value1 = (item as IStringConvertibleValueTuple).Item1.GetValue();
-        var value2 = (item as IStringConvertibleValueTuple).Item2.GetValue();
-        result.Value = new HeuristicLab.Services.Optimization.ControllerService.Model.StringValue() { Name = name, Value = "{" + value1 + ", " + value2 + "}" };
-      }
-      else if (item is IStringConvertibleArray) {
-        StringBuilder sb = new StringBuilder();
-        var array = item as IStringConvertibleArray;
-        if (array.Length == 0) {
-          sb.Append("[ ]");
-        } else {
-          sb.Append("[");
-          for (int i=0; i < array.Length - 1; i++) {
-            sb.Append(array.GetValue(i)).Append(", ");          
-          }
-          sb.Append(array.GetValue(array.Length - 1));
-          sb.Append(" ]");
-        }
-        var value = sb.ToString();
-        result.Value = new HeuristicLab.Services.Optimization.ControllerService.Model.StringValue() { Name = name, Value = value };
-      }
-      else if (item is IStringConvertibleMatrix) {
-        StringBuilder sb = new StringBuilder();
-        var matrix = item as IStringConvertibleMatrix;
-        if (matrix.Rows == 0 || matrix.Columns == 0) {
-          sb.Append("[ ]");
-        }
-        else {
-          sb.Append("[ ");
-          for (int r = 0; r < matrix.Rows; r++) {
-            sb.Append("( ");
-            for (int c = 0; c < matrix.Columns - 1; c++) {
-              sb.Append(matrix.GetValue(r, c)).Append(", ");
-            }
-            sb.Append(matrix.GetValue(r, matrix.Columns - 1)).Append(r < matrix.Rows - 1 ? " ), " : " )");
-          }
-          sb.Append(" ]");
-        }
-        var value = sb.ToString();
-        result.Value = new HeuristicLab.Services.Optimization.ControllerService.Model.StringValue() { Name = name, Value = value };
-      }
-      else {
-        result.Value = new HeuristicLab.Services.Optimization.ControllerService.Model.StringValue() { Name = name, Value = "Cannot be displayed as string" };
-      }
-      return result;
-    }
-
-
-    public bool AddScenario(User user, string scenarioName, string scenarioXml, string scenarioMapper) {
-      throw new NotImplementedException();
-    }
-
-    public bool DeleteScenario(User user, string scenarioName) {
-      throw new NotImplementedException();
-    }
-  }
-}
Index: /branches/OaaS/HeuristicLab.Services.Optimization.Controller/HL/ScenarioParser.cs
===================================================================
--- /branches/OaaS/HeuristicLab.Services.Optimization.Controller/HL/ScenarioParser.cs	(revision 9165)
+++ /branches/OaaS/HeuristicLab.Services.Optimization.Controller/HL/ScenarioParser.cs	(revision 9166)
@@ -9,4 +9,5 @@
 using HeuristicLab.Services.Optimization.ControllerService.Azure;
 using HeuristicLab.Services.Optimization.ControllerService.Interfaces;
+using System.Diagnostics;
 
 namespace HeuristicLab.Services.Optimization.ControllerService {
@@ -15,5 +16,5 @@
     private static object lockable = new object();
 
-    private IDataAccessLayer dal = new AzureDataAccessLayer();
+    private IDataAccessLayer dal = DataAccessLayerProvider.GetLayer();
 
     public IList<Model.OptimizationScenario> Scenarios {
@@ -32,5 +33,5 @@
     public Model.OptimizationScenario GetByName(string name) {
       foreach (var scen in Scenarios) {
-        if (scen.Name == name) {
+        if (scen.Id == name) {
           return scen;
         }
@@ -115,4 +116,72 @@
     } */
 
+    private Model.Problem ParseProblem(XmlReader reader) {
+      var problem = new Model.Problem();
+      while (reader.Read()) {
+        if (reader.NodeType == XmlNodeType.EndElement)
+          break;
+        if (reader.Name == "parameters")
+          problem.Parameters.Items = ParseParameters(reader);
+      }
+      return problem;
+    }
+
+    private void ParseAlgorithms(out IList<Model.Algorithm> algos, XmlReader reader) {
+      algos = new List<Model.Algorithm>();
+      var depth = reader.Depth;
+      do {
+        if (reader.Name == "algorithm" && reader.Depth == depth) {
+          var innerAlg = new Model.Algorithm();
+          algos.Add(innerAlg);
+          
+          innerAlg.Mapper = reader.GetAttribute("mapper");
+          reader.Read();
+          for (;;) {
+            if (reader.Name == "algorithm" && reader.NodeType == XmlNodeType.EndElement)
+              break;
+
+            if (reader.Name == "parameters" && reader.NodeType == XmlNodeType.Element) {
+              innerAlg.Parameters.Items = ParseParameters(reader);
+              continue;
+            }
+            else if (reader.Name == "problem" && reader.NodeType == XmlNodeType.Element) {
+              innerAlg.Problem = ParseProblem(reader);
+              continue;
+            }
+            else if (reader.Name == "algorithm" && reader.NodeType == XmlNodeType.Element) {
+              IList<Model.Algorithm> childAlgos;
+              ParseAlgorithms(out childAlgos, reader);
+              innerAlg.ChildAlgorithms = childAlgos;
+              //TODO: Test with child algorithms
+              continue;
+            }
+            reader.Read();
+          }
+        }
+      } while (reader.Read() && reader.Depth >= depth);
+    }
+
+    private Model.OptimizationScenario ParseScenarioElement(XmlReader reader) {
+      var scenario = new Model.OptimizationScenario();
+      var depth = reader.Depth;
+      while (reader.Depth >= depth) {
+        if (reader.Name == "scenario" && reader.NodeType == XmlNodeType.EndElement)
+          break;
+
+        if (reader.Name == "name") {
+          scenario.Id = reader.ReadElementContentAsString();
+          continue;
+        }
+        else if (reader.Name == "algorithm") {
+          IList<Model.Algorithm> algos;
+          ParseAlgorithms(out algos, reader);
+          scenario.Algorithm = algos;
+          continue;
+        }
+        reader.Read();
+      }
+      return scenario;
+    }
+
     private Model.OptimizationScenario ParseScenario(StringReader str) {
       // Set the validation settings.      
@@ -120,29 +189,12 @@
       var settings = GetSettings();
       settings.ValidationEventHandler += (sender, args) => {
-        Console.WriteLine(args.Message);
+        Trace.WriteLine(args.Message);
         isErrorPresent = true;
       };
-      Model.OptimizationScenario scenario = null;
+      Model.OptimizationScenario scenario = null;      
       using (var reader = XmlReader.Create(str, settings)) {        
-        while (!isErrorPresent && !reader.EOF) {
+        while (!reader.EOF) {
           if (reader.Name == "scenario" && reader.NodeType == XmlNodeType.Element) {
-            scenario = new Model.OptimizationScenario();
-            scenario.ProblemType = reader.GetAttribute("mapper");
-            scenario.ProblemType = reader.GetAttribute("algorithmType");
-            scenario.ProblemType = reader.GetAttribute("problemType");
-          }
-          else if (reader.Name == "name") {
-            scenario.Name = reader.ReadElementContentAsString();
-            continue;
-          }
-          else if (reader.Name == "problemParameters") {
-            IList<Model.Parameter> problemParameters = ParseParameters(reader);
-            foreach (var param in problemParameters)
-              scenario.InputParameters.Items.Add(param);
-          }
-          else if (reader.Name == "algorithmParameters") {
-            IList<Model.Parameter> algoParameters = ParseParameters(reader);
-            foreach (var param in algoParameters)
-              scenario.AlgorithmParameters.Items.Add(param);
+            scenario = ParseScenarioElement(reader);            
           }
           reader.Read();
@@ -185,8 +237,8 @@
       IList<Model.Parameter> parameters = new List<Model.Parameter>();
       while (reader.Read()) {
-        if (reader.Name.EndsWith("Parameters"))
+        if (reader.Name == "parameters" && reader.NodeType == XmlNodeType.EndElement)
           break;
         // parse parameter
-        if (reader.Depth == 2 && reader.Name == "param" && reader.NodeType == XmlNodeType.Element) {
+        if (reader.Name == "param" && reader.NodeType == XmlNodeType.Element) {
           var param = new Model.Parameter();
           var typeAtt = reader.GetAttribute("type");
Index: /branches/OaaS/HeuristicLab.Services.Optimization.Controller/HeuristicLab.Services.Optimization.ControllerService.csproj
===================================================================
--- /branches/OaaS/HeuristicLab.Services.Optimization.Controller/HeuristicLab.Services.Optimization.ControllerService.csproj	(revision 9165)
+++ /branches/OaaS/HeuristicLab.Services.Optimization.Controller/HeuristicLab.Services.Optimization.ControllerService.csproj	(revision 9166)
@@ -36,4 +36,10 @@
       <HintPath>..\bin\ALGLIB-3.5.0.dll</HintPath>
     </Reference>
+    <Reference Include="HeuristicLab.ALGLIB-3.5.0">
+      <HintPath>..\bin\HeuristicLab.ALGLIB-3.5.0.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Algorithms.Benchmarks-3.3">
+      <HintPath>..\bin\HeuristicLab.Algorithms.Benchmarks-3.3.dll</HintPath>
+    </Reference>
     <Reference Include="HeuristicLab.Algorithms.GeneticAlgorithm-3.3">
       <HintPath>..\bin\HeuristicLab.Algorithms.GeneticAlgorithm-3.3.dll</HintPath>
@@ -92,4 +98,7 @@
       <HintPath>..\bin\HeuristicLab.Operators-3.3.dll</HintPath>
     </Reference>
+    <Reference Include="HeuristicLab.Operators.Views.GraphVisualization-3.3">
+      <HintPath>..\bin\HeuristicLab.Operators.Views.GraphVisualization-3.3.dll</HintPath>
+    </Reference>
     <Reference Include="HeuristicLab.Optimization-3.3">
       <HintPath>..\HeuristicLab.Optimization\3.3\obj\Debug\HeuristicLab.Optimization-3.3.dll</HintPath>
@@ -129,4 +138,7 @@
       <SpecificVersion>False</SpecificVersion>
       <HintPath>..\bin\HeuristicLab.Selection-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.SequentialEngine-3.3">
+      <HintPath>..\bin\HeuristicLab.SequentialEngine-3.3.dll</HintPath>
     </Reference>
     <Reference Include="HeuristicLab.Tracing-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
@@ -153,5 +165,5 @@
   <ItemGroup>
     <Compile Include="Azure\DAL.cs" />
-    <Compile Include="HL\HiveScenarioManagerOld.cs" />
+    <Compile Include="General\Configuration.cs" />
     <Compile Include="HL\HiveMapper.cs" />
     <Compile Include="HL\HiveScenarioManager.cs" />
@@ -161,4 +173,6 @@
     <Compile Include="Interfaces\IScenarioManager.cs" />
     <Compile Include="Interfaces\Model\ControllerModel.cs" />
+    <Compile Include="Mockup\MockupDAL.cs" />
+    <Compile Include="Mockup\MockupScenarioManager.cs" />
     <Compile Include="PlaceholderControllerService.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
@@ -172,4 +186,5 @@
     <None Include="packages.config" />
   </ItemGroup>
+  <ItemGroup />
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <PropertyGroup>
Index: /branches/OaaS/HeuristicLab.Services.Optimization.Controller/Interfaces/DAL.cs
===================================================================
--- /branches/OaaS/HeuristicLab.Services.Optimization.Controller/Interfaces/DAL.cs	(revision 9165)
+++ /branches/OaaS/HeuristicLab.Services.Optimization.Controller/Interfaces/DAL.cs	(revision 9166)
@@ -27,4 +27,13 @@
     IBlobDao CreateBlobDao();
   }
+
+  public static class DataAccessLayerProvider {    
+    private static IDataAccessLayer layer = new Azure.AzureDataAccessLayer();
+    //private static IDataAccessLayer layer = new Mockup.MockupDataAccessLayer();
+
+    public static IDataAccessLayer GetLayer() { 
+      return layer; 
+    }
+  }
 }
 
Index: /branches/OaaS/HeuristicLab.Services.Optimization.Controller/Interfaces/IControllerService.cs
===================================================================
--- /branches/OaaS/HeuristicLab.Services.Optimization.Controller/Interfaces/IControllerService.cs	(revision 9165)
+++ /branches/OaaS/HeuristicLab.Services.Optimization.Controller/Interfaces/IControllerService.cs	(revision 9166)
@@ -20,5 +20,5 @@
 
     [OperationContract]
-    void ScheduleOptimizationScenario(User user, OptimizationScenario scenario);
+    void ScheduleOptimizationScenario(User user, OptimizationScenario scenario, JobExecutionDetails details);
 
     [OperationContract]
Index: /branches/OaaS/HeuristicLab.Services.Optimization.Controller/Interfaces/IScenarioManager.cs
===================================================================
--- /branches/OaaS/HeuristicLab.Services.Optimization.Controller/Interfaces/IScenarioManager.cs	(revision 9165)
+++ /branches/OaaS/HeuristicLab.Services.Optimization.Controller/Interfaces/IScenarioManager.cs	(revision 9166)
@@ -7,5 +7,5 @@
 namespace HeuristicLab.Services.Optimization.ControllerService.Interfaces {
   public interface IScenarioManager {
-    void DispatchScenario(User user, OptimizationScenario scenario);
+    void DispatchScenario(User user, OptimizationScenario scenario, JobExecutionDetails details);
     IList<Job> GetJobs(User user);
     Job GetJob(User user, string id);
Index: /branches/OaaS/HeuristicLab.Services.Optimization.Controller/Interfaces/Model/ControllerModel.cs
===================================================================
--- /branches/OaaS/HeuristicLab.Services.Optimization.Controller/Interfaces/Model/ControllerModel.cs	(revision 9165)
+++ /branches/OaaS/HeuristicLab.Services.Optimization.Controller/Interfaces/Model/ControllerModel.cs	(revision 9166)
@@ -45,4 +45,40 @@
     public string[] RowNames { get; set; }
 
+    public void CopyRow(int index) {
+      var newData = new double[Value.Length + 1][];
+      var copyRow = new double[Value[index].Length];
+      for (var i = 0; i < copyRow.Length; i++) {
+        copyRow[i] = Value[index][i];
+      }
+      for (var i = 0; i < newData.Length; i++) {
+        if (i < index) {
+          newData[i] = Value[i];
+        }
+        else if (i == index) {
+          newData[i] = copyRow;
+        }
+        else if (i > index) {
+          newData[i] = Value[i - 1];
+        }
+      }
+      Value = newData;
+    }
+
+    public void DeleteRow(int index) {
+      if (Value.Length == 1)
+        return;
+
+      var newData = new double[Value.Length - 1][];
+      for (var i = 0; i < Value.Length; i++) {
+        if (i < index) {
+          newData[i] = Value[i];
+        }
+        else if (i > index) {
+          newData[i - 1] = Value[i];
+        }
+      }
+      Value = newData;
+    }
+
     public override bool TrySetFromString(string input) {
       var splitted = input.Split(':');
@@ -61,5 +97,5 @@
         return false;
       // very, very buggy
-      if (i >= Value.Length || j >= Value[0].Length ) {
+      /*if (i >= Value.Length || j >= Value[0].Length ) {
         double[][] valueArr = new double[i >= Value.GetLength(0) ? i : Value.GetLength(0)][];        
         for (int k = 0; k < Value.Length; k++) {
@@ -70,5 +106,5 @@
         }
         Value = valueArr;
-      }
+      }*/
 
       Value[i][j] = value;
@@ -186,5 +222,5 @@
 
   [DataContract]
-  public class InputParameters {
+  public class ProblemParameters {
     private IList<Parameter> items = new List<Parameter>();
 
@@ -226,76 +262,108 @@
 
   [DataContract]
+  public class Problem {
+    public Problem() { Parameters = new ProblemParameters(); }
+
+    [DataMember]
+    public ProblemParameters Parameters { get; set; }
+
+    [DataMember]
+    public string Class { get; set; }
+  }
+
+  [DataContract]
+  public class Algorithm {
+    public Algorithm() { Parameters = new AlgorithmParameters(); }
+
+    [DataMember]
+    public AlgorithmParameters Parameters { get; set; }
+
+    [DataMember]
+    public Problem Problem{ get; set; }
+
+    [DataMember]
+    public IList<Algorithm> ChildAlgorithms { get; set; }
+
+    [DataMember]
+    public string Class { get; set; }
+
+    [DataMember]
+    public string Mapper { get; set; }
+  }
+
+  [DataContract]
   public class OptimizationScenario {
     [DataMember]
+    public string Id { get; set; }
+   
+    [DataMember]
+    public IList<Algorithm> Algorithm { get; set; }
+
+    public Algorithm FirstAlgorithm { get { return Algorithm.FirstOrDefault(); } }  
+  }
+
+  [DataContract]
+  public class Experiment {
+    [DataMember]
+    public IList<OptimizationScenario> Scenarios { get; set; }
+
+    public Experiment() {
+      Scenarios = new List<OptimizationScenario>();
+    }
+  }
+
+  [DataContract]
+  public enum JobState {
+    [EnumMember]
+    Waiting,
+    [EnumMember]
+    Calculating,
+    [EnumMember]
+    Aborted,
+    [EnumMember]
+    Failed,
+    [EnumMember]
+    Finished
+  }
+
+  [DataContract]
+  public class JobExecutionDetails {
+    [DataMember]
+    public int Repititions { get; set; }
+
+    [DataMember]
+    public string JobTitle { get; set; }
+
+    [DataMember]
+    public string Group { get; set; }
+  }
+
+  [DataContract]
+  public class Job {
+    [DataMember]
+    public string Id { get; set; }
+
+    [DataMember]
+    public JobState State { get; set; }
+
+    [DataMember]
     public string Name { get; set; }
 
     [DataMember]
-    public string ProblemType { get; set; }
-
-    [DataMember]
-    public string AlgorithmType { get; set; }
-
-    [DataMember]
-    public string MapperType { get; set; }
-
-    private InputParameters inputParams = new InputParameters();
-
-    [DataMember]
-    public InputParameters InputParameters {
-      get { return inputParams; }
-      set { inputParams = value; }
-    }
-
-
-    private AlgorithmParameters algorithmParameters = new AlgorithmParameters();
-
-    [DataMember]
-    public AlgorithmParameters AlgorithmParameters {
-      get { return algorithmParameters; }
-      set { algorithmParameters = value; }
-    }
-  }
-
-  [DataContract]
-  public enum JobState {
-    [EnumMember]
-    Waiting,
-    [EnumMember]
-    Calculating,
-    [EnumMember]
-    Aborted,
-    [EnumMember]
-    Failed,
-    [EnumMember]
-    Finished
-  }
-
-  [DataContract]
-  public class Job {
+    public string Resource { get; set; }
+
+    [DataMember]
+    public DateTime DateCreated { get; set; }
+  }
+
+  [DataContract]
+  public class Run {
     [DataMember]
     public string Id { get; set; }
 
     [DataMember]
-    public JobState State { get; set; }
-
-    [DataMember]
     public string Name { get; set; }
 
     [DataMember]
-    public string Resource { get; set; }
-
-    [DataMember]
-    public DateTime DateCreated { get; set; }
-  }
-
-  [DataContract]
-  public class Run {
-    [DataMember]
-    public string Id { get; set; }
-
-    [DataMember]
-    public string Name { get; set; }
-
-    [DataMember]
     public IList<Parameter> Results { get; set; }
   }
Index: /branches/OaaS/HeuristicLab.Services.Optimization.Controller/Mockup/MockupDAL.cs
===================================================================
--- /branches/OaaS/HeuristicLab.Services.Optimization.Controller/Mockup/MockupDAL.cs	(revision 9166)
+++ /branches/OaaS/HeuristicLab.Services.Optimization.Controller/Mockup/MockupDAL.cs	(revision 9166)
@@ -0,0 +1,256 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Services.Optimization.ControllerService.Interfaces;
+using Microsoft.WindowsAzure;
+using Microsoft.WindowsAzure.StorageClient;
+
+namespace HeuristicLab.Services.Optimization.ControllerService.Mockup {
+  public static class AzureConstants {
+    public static readonly string SCENARIO_TABLE = "Scenario";
+    public static readonly string SCENARIO_BLOB_CONTAINER = "scenario";
+    public static readonly string CLOUD_SETTINGS_KEY = "Cloudia.WindowsAzure.Storage";
+  }
+
+  public class ScenarioDao : IScenarioDao {
+    private static List<ScenarioEntity> scenarios;
+
+    static ScenarioDao() {
+      // TODO: Add tsp scenario to list
+      scenarios = new List<ScenarioEntity>() {
+        new ScenarioEntity("Benchmark Algorithm", "bmx", "bmm"),
+        new ScenarioEntity("Traveling Salesman Problem", "scenario1", "mapper1")
+      };      
+    }
+
+
+    public bool Add(ScenarioEntity entity) {
+      var dbEntity = scenarios.Find(e => e.Scenario == entity.Scenario);
+
+      if (dbEntity != null)
+        return false;
+
+      scenarios.Add(entity);
+      return true;
+    }
+
+    public bool DeleteByName(string scenarioName) {
+      return scenarios.RemoveAll(e => e.RowKey == scenarioName) == 1;
+    }
+
+    public ScenarioEntity FindByName(string scenarioName) {
+      return scenarios.Find(e => e.RowKey == scenarioName);      
+    }
+
+
+    public IEnumerable<ScenarioEntity> GetAllEntities() {
+      return new List<ScenarioEntity>(scenarios);
+    }
+  }
+
+  public class BlobDao : IBlobDao {
+    private static List<StringEntry> entries;
+
+    static BlobDao() {
+      entries = new List<StringEntry>() {
+        new StringEntry() {
+          Key="bmm",
+          Text=@"
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Data;
+using HeuristicLab.Services.Optimization.ControllerService.Model;
+using HeuristicLab.Optimization;
+using HeuristicLab.Services.Optimization.ControllerService;
+using HeuristicLab.Algorithms.Benchmarks;
+using HeuristicLab.Parameters;
+using HeuristicLab.PluginInfrastructure;
+
+
+namespace HeuristicLab.Mappers {
+  public class BenchmarkScenarioMapper : IScenarioMapper {
+    public void MapScenario(OptimizationScenario scenario, out IAlgorithm algorithm) {
+      var alg = scenario.FirstAlgorithm;
+      var bm = new BenchmarkAlgorithm();
+      var bmFullName = HLMapper.GetStringValue(alg.Parameters.FindByName(""Benchmark""));
+      bm.BenchmarkParameter.Value = bm.Benchmark = bm.BenchmarkParameter.ValidValues.First(b => b.GetType().FullName == bmFullName);      
+      ((ValueParameter<IntValue>)bm.Parameters[""ChunkSize""]).Value = HLMapper.ConvertToIntValue(alg.Parameters.FindByName(""ChunkSize""));
+      ((ValueParameter<DoubleValue>)bm.Parameters[""TimeLimit""]).Value = HLMapper.ConvertToDoubleValue(alg.Parameters.FindByName(""TimeLimit""));
+
+      algorithm = bm;
+    }
+  }
+}
+"
+        },
+        new StringEntry() {
+           Key="bmx",
+           Text=@"<?xml version='1.0'?>
+<scenario xmlns=""urn:scenario-schema"">
+  <name>Benchmark Algorithm</name>
+  <algorithm mapper=""HeuristicLab.Mappers.BenchmarkScenarioMapper"">
+    <parameters>
+		<param type=""Type"" name=""Benchmark"">
+		  <choice name=""HeuristicLab.Algorithms.Benchmarks.Dhrystone"" selected=""true"" />
+		  <choice name=""HeuristicLab.Algorithms.Benchmarks.Linpack"" />
+		  <choice name=""HeuristicLab.Algorithms.Benchmarks.Whetstone""/>
+		</param>    
+		<param type=""Decimal"" name=""ChunkSize"" value=""0""/>
+		<param type=""Decimal"" name=""TimeLimit"" value=""0""/> 
+	</parameters>
+  </algorithm>  
+</scenario>"
+        },
+        new StringEntry() { 
+          Key = "scenario1",
+          Text = @"<?xml version='1.0'?>
+<scenario xmlns=""urn:scenario-schema"">
+  <name>Traveling Salesman Problem</name>
+  <algorithm mapper=""HeuristicLab.Mappers.TSPScenarioMapper"">
+    <parameters>
+		<param type=""Type"" name=""CrossoverParameter"">
+		  <choice name=""OrderCrossover2""/>
+		  <choice name=""CosaCrossover"" selected=""true""/>
+		</param>    
+		<param type=""Integer"" name=""Elites"" value=""1""/>
+		<param type=""Integer"" name=""MaximumGenerations"" value=""1000""/>
+		<param type=""Percent"" name=""MutationProbability"" value=""5""/>
+		<param type=""Type"" name=""Mutator"">
+		  <choice name=""InversionManipulator"" selected=""true""/>
+		  <choice name=""ScrambleManipulator""/>
+		</param>
+		<param type=""Integer"" name=""PopulationSize"" value=""100""/>
+		<param type=""Integer"" name=""Seed"" value=""100""/>
+		<param type=""Type"" name=""Selector"">
+		  <choice name=""ProportionalSelector"" selected=""true""/>
+		  <choice name=""BestSelector""/>
+		</param>
+		<param type=""Boolean"" name=""SetSeedRandomly"" value=""true""/>
+    </parameters>
+	<problem>
+		<parameters>
+			<param type=""Decimal"" name=""BestKnownQuality"" value=""6110.0""/>
+			<param type=""DecimalVector"" name=""BestKnownSolution"">
+			  <value v1=""0""/>
+			  <value v1=""40""/>
+			  <value v1=""38""/>
+			  <value v1=""60""/>
+			</param>
+			<param type=""DecimalMatrix"" name=""Coordinates"">
+			  <value v1=""334.5909"" v2=""161.7809""/>
+			  <value v1=""503.5909"" v2=""172.7809""/>
+			  <value v1=""400.5909"" v2=""300.7809""/>
+			  <value v1=""700.5909"" v2=""700.7809""/>
+			</param>
+			<param type=""Type"" name=""EvaluatorParameter"">
+			  <choice name=""HeuristicLab.Problems.TravelingSalesman.TSPRoundedEuclideanPathEvaluator"" />
+			  <choice name=""HeuristicLab.Problems.TravelingSalesman.TSPGeoPathEvaluator"" selected=""true""/>
+			  <choice name=""HeuristicLab.Problems.TravelingSalesman.TSPEuclideanPathEvaluator""/>
+			</param>    
+			<param type=""Boolean"" name=""UseDistanceMatrix"" value=""true""/> 
+		</parameters>
+	</problem>
+  </algorithm>
+</scenario>"
+        },
+        new StringEntry() { 
+          Key = "mapper1",
+          Text = @"using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Data;
+using HeuristicLab.Services.Optimization.ControllerService.Model;
+using HeuristicLab.Optimization;
+using HeuristicLab.Services.Optimization.ControllerService;
+using HeuristicLab.Algorithms.GeneticAlgorithm;
+using HeuristicLab.Problems.TravelingSalesman;
+namespace HeuristicLab.Mappers {
+  public class TSPScenarioMapper : IScenarioMapper {
+    public void MapScenario(OptimizationScenario scenario, out IAlgorithm algorithm) {
+      Console.WriteLine(""Mapping scenario!"");
+      var ga = new GeneticAlgorithm();
+      var problem = new TravelingSalesmanProblem();
+      ga.Problem = problem;
+      algorithm = ga;
+
+      problem.BestKnownQuality = HLMapper.ConvertToDoubleValue(scenario.FirstAlgorithm.Problem.Parameters.FindByName(""BestKnownQuality""));
+      problem.BestKnownSolution = HLMapper.ConvertToPermutation(scenario.FirstAlgorithm.Problem.Parameters.FindByName(""BestKnownSolution""));
+      problem.Coordinates = HLMapper.ConvertToDoubleMatrix(scenario.FirstAlgorithm.Problem.Parameters.FindByName(""Coordinates""));
+      var evalParam = HLMapper.GetStringValue(scenario.FirstAlgorithm.Problem.Parameters.FindByName(""EvaluatorParameter""));
+      if (evalParam == ""HeuristicLab.Problems.TravelingSalesman.TSPRoundedEuclideanPathEvaluator"") {
+        problem.EvaluatorParameter.Value = new TSPRoundedEuclideanPathEvaluator();
+      }
+      else if (evalParam == ""HeuristicLab.Problems.TravelingSalesman.TSPGeoPathEvaluator"") {
+        problem.EvaluatorParameter.Value = new TSPGeoPathEvaluator();
+      }
+      else {
+        problem.EvaluatorParameter.Value = new TSPEuclideanPathEvaluator();
+      }
+      problem.UseDistanceMatrix = HLMapper.ConvertToBoolValue(scenario.FirstAlgorithm.Problem.Parameters.FindByName(""UseDistanceMatrix""));
+      Console.WriteLine(""Mapping algorithm..."");
+      ga.Mutator = HLMapper.FindInItemSet<HeuristicLab.Optimization.IManipulator>(ga.MutatorParameter.ValidValues, scenario.FirstAlgorithm.Parameters.FindByName(""Mutator""));
+      ga.CrossoverParameter.Value = HLMapper.FindOperator<HeuristicLab.Optimization.ICrossover>(problem, scenario.FirstAlgorithm.Parameters.FindByName(""CrossoverParameter""));
+      ga.Elites = HLMapper.ConvertToIntValue(scenario.FirstAlgorithm.Parameters.FindByName(""Elites""));
+      ga.MaximumGenerations = HLMapper.ConvertToIntValue(scenario.FirstAlgorithm.Parameters.FindByName(""MaximumGenerations""));
+      ga.MutationProbability = HLMapper.ConvertToPercentValue(scenario.FirstAlgorithm.Parameters.FindByName(""MutationProbability""));
+      ga.PopulationSize = HLMapper.ConvertToIntValue(scenario.FirstAlgorithm.Parameters.FindByName(""PopulationSize""));
+      ga.Seed = HLMapper.ConvertToIntValue(scenario.FirstAlgorithm.Parameters.FindByName(""Seed""));
+      ga.Selector = HLMapper.FindInItemSet<HeuristicLab.Optimization.ISelector>(ga.SelectorParameter.ValidValues, scenario.FirstAlgorithm.Parameters.FindByName(""Selector""));
+      ga.SetSeedRandomly = HLMapper.ConvertToBoolValue(scenario.FirstAlgorithm.Parameters.FindByName(""SetSeedRandomly""));
+    }
+  }
+}"
+        }
+      };
+    }
+
+    public bool Add(StringEntry entry) {
+      entries.RemoveAll(e => e.Key == entry.Key);
+      entries.Add(entry);      
+      return true;
+    }
+
+    public bool DeleteByKey(string entryKey) {
+      return entries.RemoveAll(e => e.Key == entryKey) == 1;      
+    }
+
+    public StringEntry FindByKey(string entryKey) {
+      return entries.Find(e => e.Key == entryKey);      
+    }
+  }
+
+  public class MockupDataAccessLayer : IDataAccessLayer {
+    private IScenarioDao scenarioDao;
+    private IBlobDao blobDao;
+
+    public IScenarioDao ScenarioDao {
+      get {
+        if (scenarioDao == null) {
+          scenarioDao = new ScenarioDao();
+        }
+        return scenarioDao;
+      }
+    }
+
+    public IBlobDao BlobDao {
+      get {
+        if (blobDao == null) {
+          blobDao = new BlobDao();
+        }
+        return blobDao;
+      }
+    }
+
+    public IScenarioDao CreateScenarioDao() {
+      return new ScenarioDao();
+    }
+
+    public IBlobDao CreateBlobDao() {
+      return new BlobDao();
+    }
+  }
+}
Index: /branches/OaaS/HeuristicLab.Services.Optimization.Controller/Mockup/MockupScenarioManager.cs
===================================================================
--- /branches/OaaS/HeuristicLab.Services.Optimization.Controller/Mockup/MockupScenarioManager.cs	(revision 9166)
+++ /branches/OaaS/HeuristicLab.Services.Optimization.Controller/Mockup/MockupScenarioManager.cs	(revision 9166)
@@ -0,0 +1,240 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Services.Optimization.ControllerService.Interfaces;
+using HeuristicLab.Optimization;
+using HeuristicLab.Algorithms.GeneticAlgorithm;
+using HeuristicLab.Problems.TravelingSalesman;
+using HeuristicLab;
+using System.Reflection;
+using HeuristicLab.Services.Optimization.ControllerService.Model;
+using HeuristicLab.Core;
+using System.Collections;
+using HeuristicLab.Clients.Hive;
+using System.Threading;
+using HeuristicLab.Data;
+using System.IO;
+using Microsoft.WindowsAzure;
+using Microsoft.WindowsAzure.StorageClient;
+using HeuristicLab.Services.Optimization.ControllerService.Azure;
+using System.Data;
+
+namespace HeuristicLab.Services.Optimization.ControllerService {
+  public class MockupScenarioManager : IScenarioManager {
+    private static List<Model.Job> jobs;
+    private static Dictionary<string, List<Model.Run>> jobResults;
+    private static IDataAccessLayer dal = DataAccessLayerProvider.GetLayer();
+    private Dictionary<string, IScenarioMapper> mappers = new Dictionary<string, IScenarioMapper>();
+    private static object lockable = new object();
+
+    static MockupScenarioManager() {
+      jobs = new List<Model.Job>() {
+        new Model.Job() { DateCreated = DateTime.Now, Id = "1", Name="Webscheduled TSP", Resource="TESTGROUP", State=JobState.Finished },
+        new Model.Job() { DateCreated = DateTime.Now, Id = "2", Name="Webscheduled TSP 2", Resource="TESTGROUP", State=JobState.Calculating }
+      };
+      jobResults = new Dictionary<string, List<Model.Run>>();
+      jobResults["1"] = new List<Model.Run>() {
+        new Model.Run() {
+          Id = "Webscheduled TSP Run 1",
+          Name = "Webscheduled TSP Run 1",
+          Results = new List<Parameter>() {
+            new Parameter() { 
+              Value = new HeuristicLab.Services.Optimization.ControllerService.Model.DecimalValue(){
+                Name = "AbsoluteDifferenceBestKnownToBest",
+                Value = 0
+              },
+              Type = ParameterType.Decimal
+            },
+            new Parameter() { 
+              Value = new HeuristicLab.Services.Optimization.ControllerService.Model.DecimalValue(){
+                Name = "BestKnownQuality",
+                Value = 1600
+              },              
+              Type = ParameterType.Decimal
+            },
+            new Parameter() { 
+              Value = new HeuristicLab.Services.Optimization.ControllerService.Model.DecimalValue(){
+                Name = "BestQuality",
+                Value = 1600
+              },              
+              Type = ParameterType.Decimal
+            },
+            new Parameter() { 
+              Value = new HeuristicLab.Services.Optimization.ControllerService.Model.DecimalValue(){
+                Name = "CurrentAverageQuality",
+                Value = 1600
+              },              
+              Type = ParameterType.Decimal
+            },
+            new Parameter() { 
+              Value = new HeuristicLab.Services.Optimization.ControllerService.Model.DecimalValue(){
+                Name = "CurrentBestQuality",
+                Value = 1600
+              },              
+              Type = ParameterType.Decimal
+            },
+            new Parameter() { 
+              Value = new HeuristicLab.Services.Optimization.ControllerService.Model.DecimalValue(){
+                Name = "CurrentWorstQuality",
+                Value = 1600
+              },              
+              Type = ParameterType.Decimal
+            },
+            new Parameter() { 
+              Value = new HeuristicLab.Services.Optimization.ControllerService.Model.DecimalValue(){
+                Name = "Evaluated Solutions",
+                Value = 99100
+              },              
+              Type = ParameterType.Decimal
+            },
+            new Parameter() { 
+              Value = new HeuristicLab.Services.Optimization.ControllerService.Model.DecimalValue(){
+                Name = "Generations",
+                Value = 1000
+              },              
+              Type = ParameterType.Decimal
+            },
+            new Parameter() { 
+              Value = new HeuristicLab.Services.Optimization.ControllerService.Model.DecimalValue(){
+                Name = "RelativeDifferenceBestKnownToBest",
+                Value = 0
+              },              
+              Type = ParameterType.Decimal
+            },
+            new Parameter() { 
+              Value = new HeuristicLab.Services.Optimization.ControllerService.Model.DecimalMatrix {
+                Name = "Qualities",
+                RowNames = new string[] { "CurrentBestQuality", "CurrentAverageQuality", "CurrentWorstQuality", "BestQuality", "BestKnownQuality" },
+                Value = new double[][] {
+                  // Best Quality
+                  new double[]{4000, 3900, 3950, 2500, 3000, 2700, 2300, 2200, 1700, 1850, 1600},
+                  // Average
+                  new double[]{6000, 5000, 5650, 3750, 4500, 4050, 3450, 3300, 2550, 2775, 2400},
+                  // Worst Quality
+                  new double[]{8000, 7200, 7350, 5000, 6000, 5400, 4600, 4400, 3400, 3700, 3200},
+                  // Best Quality
+                  new double[]{4000, 3900, 3950, 2500, 3000, 2700, 2300, 2200, 1700, 1850, 1600},
+                  // Best Known Quality
+                  new double[]{4000, 3900, 3950, 2500, 3000, 2700, 2300, 2200, 1700, 1850, 1600},
+                }
+              },              
+              Type = ParameterType.Decimal
+            }
+          }
+        }
+      };
+    }
+
+    public MockupScenarioManager() {
+      
+    }
+
+    public void DispatchScenario(Model.User user, Model.OptimizationScenario scenario, JobExecutionDetails details) {
+      // does nothign
+    }
+
+    public IList<Model.Job> GetJobs(User user) {
+      return jobs;
+    }
+
+    public Model.Job GetJob(User user, string id) {
+      return (from j in jobs where j.Id == id select j).FirstOrDefault();
+    }
+
+
+    public void DeleteJob(User user, string id) {
+      jobs.RemoveAll(j => j.Id == id);
+    }
+
+    public IList<Model.Run> GetJobResults(User user, string id) {      
+      return jobResults[id];
+    }
+
+    private static string AssemblyDirectory {
+      get {
+        string codeBase = Assembly.GetExecutingAssembly().CodeBase;
+        UriBuilder uri = new UriBuilder(codeBase);
+        string path = Uri.UnescapeDataString(uri.Path);
+        return Path.GetDirectoryName(path);
+      }
+     }
+
+    private IScenarioMapper CompileMapper(string scenarioMapper) {
+       // http://stackoverflow.com/questions/3188882/compile-and-run-dynamic-code-without-generating-exe
+      using (var csCodeProvider = new Microsoft.CSharp.CSharpCodeProvider()) {
+        var cp = new System.CodeDom.Compiler.CompilerParameters() {
+          GenerateInMemory = true
+        };
+
+        var referencedPaths = Directory.GetFiles(AssemblyDirectory, "*.dll");
+        foreach (var loadedAssembly in referencedPaths) {
+          cp.ReferencedAssemblies.Add(loadedAssembly);
+        }
+        cp.ReferencedAssemblies.Add("System.dll");
+        cp.ReferencedAssemblies.Add("System.Core.dll");
+        cp.ReferencedAssemblies.Add("System.Data.dll");
+        cp.ReferencedAssemblies.Add("System.Xml.dll");
+        cp.ReferencedAssemblies.Add("System.Xml.Linq.dll");
+
+        var res = csCodeProvider.CompileAssemblyFromSource(
+          cp,
+          scenarioMapper
+        );
+
+        foreach (var error in res.Errors) {
+          Console.WriteLine(error);
+        }
+        
+        var firstMapper = res.CompiledAssembly.GetTypes().Where(p => typeof(IScenarioMapper).IsAssignableFrom(p)).FirstOrDefault();        
+        return Activator.CreateInstance(firstMapper) as IScenarioMapper;
+      }
+    }
+
+    public bool AddScenario(User user, string scenarioName, string scenarioXml, string scenarioMapper) {     
+      // create scenario mapper
+      var mapper = CompileMapper(scenarioMapper);
+      if (mapper == null)
+        return false;
+      
+      // insert into table & blob store
+      var scenDao = dal.CreateScenarioDao();
+      var blobDao = dal.CreateBlobDao();
+      
+      Guid scenarioXmlGuid = Guid.NewGuid();
+      Guid scenarioMapperGuid = Guid.NewGuid();
+      string scenarioXmlId = scenarioName + "_" + scenarioXmlGuid.ToString();
+      string scenarioMapperId = scenarioName + "_" + scenarioMapperGuid.ToString();
+      if (!blobDao.Add(new StringEntry() { Key = scenarioXmlId, Text = scenarioXml }))
+        return false;
+      if (!blobDao.Add(new StringEntry() { Key = scenarioMapperId, Text = scenarioMapper }))
+        return false;
+      if (!scenDao.Add(new ScenarioEntity(scenarioName, scenarioXmlId, scenarioMapperId)))
+        return false;
+
+      // everything stored in the DB -> add mapper to dictionary
+      if (!mappers.ContainsKey(scenarioName)) {
+        lock (lockable) {
+          if (!mappers.ContainsKey(scenarioName))
+            mappers[scenarioName] = mapper;
+        }
+      }
+      return true;
+    }
+
+    public bool DeleteScenario(User user, string scenarioName) {
+      // delete from table & blob store
+      var scenarioDao = dal.CreateScenarioDao();
+      var blobDao = dal.CreateBlobDao();
+
+      var entity = scenarioDao.FindByName(scenarioName);
+      if (entity == null)
+        return false;
+
+      blobDao.DeleteByKey(entity.Mapper);
+      blobDao.DeleteByKey(entity.Scenario);
+      scenarioDao.DeleteByName(scenarioName);            
+      return true;
+    }
+  }
+}
Index: /branches/OaaS/HeuristicLab.Services.Optimization.Controller/PlaceholderControllerService.cs
===================================================================
--- /branches/OaaS/HeuristicLab.Services.Optimization.Controller/PlaceholderControllerService.cs	(revision 9165)
+++ /branches/OaaS/HeuristicLab.Services.Optimization.Controller/PlaceholderControllerService.cs	(revision 9166)
@@ -51,4 +51,5 @@
       this.scenarios = new List<Model.OptimizationScenario>() { tsp };*/      
       //hiveManager.DispatchScenario(tsp);
+      //hiveManager = new MockupScenarioManager();
       hiveManager = new HiveScenarioManager();
       scenarios = parser.Scenarios;
@@ -63,11 +64,11 @@
     public Model.OptimizationScenario GetOptimizationScenarioByName(string name) {
       var scen = (from e in scenarios
-                  where e.Name == name
+                  where e.Id == name
                   select e).FirstOrDefault();      
       return scen;
     }
 
-    public void ScheduleOptimizationScenario(Model.User user, Model.OptimizationScenario scenario) {
-      hiveManager.DispatchScenario(user, scenario);
+    public void ScheduleOptimizationScenario(Model.User user, Model.OptimizationScenario scenario, JobExecutionDetails details) {
+      hiveManager.DispatchScenario(user, scenario, details);
     }
 
@@ -97,5 +98,5 @@
         return false;
       }      
-      var added = hiveManager.AddScenario(user, scenario.Name, scenarioXml, scenarioMapper);
+      var added = hiveManager.AddScenario(user, scenario.Id, scenarioXml, scenarioMapper);
       if (added) 
         scenarios.Add(scenario);
@@ -114,5 +115,5 @@
     public IEnumerable<string> GetOptimizationScenarioNames() {
       return (from e in scenarios
-              select e.Name).AsEnumerable();      
+              select e.Id).AsEnumerable();      
     }
   }
Index: /branches/OaaS/HeuristicLab.Services.Optimization.ControllerService.Tests/HeuristicLab.Services.Optimization.ControllerService.Tests.csproj
===================================================================
--- /branches/OaaS/HeuristicLab.Services.Optimization.ControllerService.Tests/HeuristicLab.Services.Optimization.ControllerService.Tests.csproj	(revision 9165)
+++ /branches/OaaS/HeuristicLab.Services.Optimization.ControllerService.Tests/HeuristicLab.Services.Optimization.ControllerService.Tests.csproj	(revision 9166)
@@ -40,4 +40,8 @@
       <HintPath>..\bin\ALGLIB-3.5.0.dll</HintPath>
     </Reference>
+    <Reference Include="HeuristicLab.Algorithms.Benchmarks-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\bin\HeuristicLab.Algorithms.Benchmarks-3.3.dll</HintPath>
+    </Reference>
     <Reference Include="HeuristicLab.Algorithms.GeneticAlgorithm-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
Index: /branches/OaaS/HeuristicLab.Services.Optimization.ControllerService.Tests/Program.cs
===================================================================
--- /branches/OaaS/HeuristicLab.Services.Optimization.ControllerService.Tests/Program.cs	(revision 9165)
+++ /branches/OaaS/HeuristicLab.Services.Optimization.ControllerService.Tests/Program.cs	(revision 9166)
@@ -12,4 +12,5 @@
 using HeuristicLab.Persistence.Core;
 using HeuristicLab.Core;
+using HeuristicLab.Optimization;
 
 namespace HeuristicLab.Services.Optimization.ControllerService.Tests {
@@ -17,6 +18,6 @@
     static void Main(string[] args) {
       Console.WriteLine(AppDomain.CurrentDomain.BaseDirectory);    
-      //TestScenarioParser();
-      TestCodeDOM();
+      TestScenarioParser();
+      //TestCodeDOM();
       //TestPython();
       //TestOtis();
@@ -65,5 +66,5 @@
         cp.ReferencedAssemblies.Add("System.dll");
 
-        tsp.BestKnownQuality = HLMapper.ConvertToDoubleValue(scen.InputParameters.FindByName("BestKnownQuality"));
+        tsp.BestKnownQuality = HLMapper.ConvertToDoubleValue(scen.FirstAlgorithm.Problem.Parameters.FindByName("BestKnownQuality"));
         
         var res = csCodeProvider.CompileAssemblyFromSource(
@@ -120,5 +121,5 @@
         var type = res.CompiledAssembly.GetType("TSPScenarioMapper");
         var mapper = Activator.CreateInstance(type) as IScenarioMapper;
-        mapper.MapScenario(scen, algo);
+        //mapper.MapScenario(scen, algo);
       }      
     }
@@ -217,8 +218,44 @@
     static void TestScenarioParser() {
       ScenarioParser parser = new ScenarioParser();
-      var scen = parser.GetByName("Traveling Salesman Problem");
-      TravelingSalesmanProblem tsp = new TravelingSalesmanProblem();
-      // proceed with mapping between scen and tsp
+      //var scen = parser.GetByName("Traveling Salesman Problem");
+      var scen = parser.GetByName("Benchmark Algorithm");
+
+      var mapper = HiveScenarioManager.CompileMapper(
+@"
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Data;
+using HeuristicLab.Services.Optimization.ControllerService.Model;
+using HeuristicLab.Optimization;
+using HeuristicLab.Services.Optimization.ControllerService;
+using HeuristicLab.Algorithms.Benchmarks;
+using HeuristicLab.Parameters;
+using HeuristicLab.PluginInfrastructure;
+
+
+namespace HeuristicLab.Mappers {
+  public class BenchmarkScenarioMapper : IScenarioMapper {
+    public void MapScenario(OptimizationScenario scenario, out IAlgorithm algorithm) {
+      var alg = scenario.FirstAlgorithm;
+      var bm = new BenchmarkAlgorithm();
+      bm.Benchmark = (IBenchmark) Activator.CreateInstance((from t in ApplicationManager.Manager.GetTypes(typeof(IBenchmark))
+                        where t.Name == HLMapper.GetStringValue(alg.Parameters.FindByName(""Benchmark""))
+                       select t).FirstOrDefault());
+      ((ValueParameter<IntValue>)bm.Parameters[""ChunkSize""]).Value = HLMapper.ConvertToIntValue(alg.Parameters.FindByName(""ChunkSize""));
+      ((ValueParameter<DoubleValue>)bm.Parameters[""TimeLimit""]).Value = HLMapper.ConvertToDoubleValue(alg.Parameters.FindByName(""TimeLimit""));
+
+      algorithm = bm;
     }
   }
 }
+
+");
+      IAlgorithm algo;
+      //mapper = new BenchmarkScenarioMapper();
+      mapper.MapScenario(scen, out algo);
+      // proceed with mapping between scen and tsp
+    }
+  }
+}
Index: /branches/OaaS/HeuristicLab.Services.Optimization.ControllerService.Tests/mappings/scenario.xsd
===================================================================
--- /branches/OaaS/HeuristicLab.Services.Optimization.ControllerService.Tests/mappings/scenario.xsd	(revision 9165)
+++ /branches/OaaS/HeuristicLab.Services.Optimization.ControllerService.Tests/mappings/scenario.xsd	(revision 9166)
@@ -8,16 +8,28 @@
  <xsd:complexType name="scenarioType">
   <xsd:sequence maxOccurs="1">   
-   <xsd:element name="name" type="xsd:string"/>
-   <xsd:element name="problemParameters" type="paramsType"/>
-   <xsd:element name="algorithmParameters" type="paramsType"/>
-  </xsd:sequence>
-  <xsd:attribute name="problemType" use="required"/>
-  <xsd:attribute name="algorithmType" use="required"/>
-  <xsd:attribute name="mapper" use="required"/>
+   <xsd:element name="name" minOccurs="1" type="xsd:string"/>   
+   <xsd:element name="algorithm" minOccurs="1" maxOccurs="unbounded" type="algorithmType"/>   
+  </xsd:sequence>  
  </xsd:complexType>
+
+<xsd:complexType name="algorithmType">
+  <xsd:sequence maxOccurs="1">
+	<xsd:element name="parameters" type="paramsType"/>
+	<xsd:element name="problem" minOccurs="0" type="problemType"/>	
+	<xsd:element name="algorithm" minOccurs="0" maxOccurs="unbounded" type="algorithmType"/>		
+  </xsd:sequence>  
+  <xsd:attribute name="mapper" use="required"/>		
+</xsd:complexType>
+
+<xsd:complexType name="problemType">
+  <xsd:sequence maxOccurs="1">
+	<xsd:element name="parameters" type="paramsType"/>	
+  </xsd:sequence>  
+  <xsd:attribute name="class"/>	
+</xsd:complexType>
 
  <xsd:complexType name="paramsType">
   <xsd:sequence>
-   <xsd:element name="param" type="parameterType" minOccurs="1" maxOccurs="unbounded"/>      
+   <xsd:element name="param" type="parameterType" minOccurs="0" maxOccurs="unbounded"/>      
   </xsd:sequence>  
  </xsd:complexType>
Index: /branches/OaaS/HeuristicLab.Services.Optimization.ControllerService.Tests/mappings/tsp.xml
===================================================================
--- /branches/OaaS/HeuristicLab.Services.Optimization.ControllerService.Tests/mappings/tsp.xml	(revision 9165)
+++ /branches/OaaS/HeuristicLab.Services.Optimization.ControllerService.Tests/mappings/tsp.xml	(revision 9166)
@@ -1,45 +1,49 @@
 <?xml version='1.0'?>
-<scenario problemType="HeuristicLab.Problems.TravelingSalesman.TravelingSalesman"
-          algorithmType="HeuristicLab.Algorithms.GeneticAlgorithm"
-		  xmlns="urn:scenario-schema"
-          mapper="HeuristicLab.Controllers.HLMapper">
+<scenario xmlns="urn:scenario-schema">
   <name>Traveling Salesman Problem</name>
-  <problemParameters>
-    <param type="Decimal" name="BestKnownQuality" value="6110.0"/>
-    <param type="DecimalVector" name="BestKnownSolution">
-      <value v1="0"/>
-      <value v1="40"/>
-      <value v1="38"/>
-    </param>
-    <param type="DecimalMatrix" name="Coordinates">
-      <value v1="334.5909" v2="161.7809"/>
-      <value v1="503.5909" v2="172.7809"/>
-    </param>
-    <param type="Type" name="EvaluatorParameter">
-      <choice name="HeuristicLab.Problems.TravelingSalesman.TSPRoundedEuclideanPathEvaluator" />
-      <choice name="HeuristicLab.Problems.TravelingSalesman.TSPGeoPathEvaluator" selected="true"/>
-      <choice name="HeuristicLab.Problems.TravelingSalesman.TSPEuclideanPathEvaluator"/>
-    </param>    
-    <param type="Boolean" name="UseDistanceMatrix" value="true"/> 
-  </problemParameters>
-  <algorithmParameters>
-    <param type="Type" name="CrossoverParameter">
-      <choice name="OrderCrossover2"/>
-      <choice name="CosaCrossover" selected="true"/>
-    </param>    
-    <param type="Integer" name="Elites" value="1"/>
-    <param type="Integer" name="MaximumGenerations" value="1000"/>
-    <param type="Percent" name="MutationProbability" value="5"/>
-    <param type="Type" name="Mutator">
-      <choice name="InversionManipulator" selected="true"/>
-      <choice name="ScrambleManipulator"/>
-    </param>
-    <param type="Integer" name="PopulationSize" value="100"/>
-    <param type="Integer" name="Seed" value="100"/>
-    <param type="Type" name="Selector">
-      <choice name="ProportionalSelector" selected="true"/>
-      <choice name="BestSelector"/>
-    </param>
-    <param type="Boolean" name="SetSeedRandomly" value="true"/>
-  </algorithmParameters>
+  <algorithm mapper="HeuristicLab.Mappers.TSPScenarioMapper">
+    <parameters>
+		<param type="Type" name="CrossoverParameter">
+		  <choice name="OrderCrossover2"/>
+		  <choice name="CosaCrossover" selected="true"/>
+		</param>    
+		<param type="Integer" name="Elites" value="1"/>
+		<param type="Integer" name="MaximumGenerations" value="1000"/>
+		<param type="Percent" name="MutationProbability" value="5"/>
+		<param type="Type" name="Mutator">
+		  <choice name="InversionManipulator" selected="true"/>
+		  <choice name="ScrambleManipulator"/>
+		</param>
+		<param type="Integer" name="PopulationSize" value="100"/>
+		<param type="Integer" name="Seed" value="100"/>
+		<param type="Type" name="Selector">
+		  <choice name="ProportionalSelector" selected="true"/>
+		  <choice name="BestSelector"/>
+		</param>
+		<param type="Boolean" name="SetSeedRandomly" value="true"/>
+    </parameters>
+	<problem>
+		<parameters>
+			<param type="Decimal" name="BestKnownQuality" value="6110.0"/>
+			<param type="DecimalVector" name="BestKnownSolution">
+			  <value v1="0"/>
+			  <value v1="40"/>
+			  <value v1="38"/>
+			  <value v1="60"/>
+			</param>
+			<param type="DecimalMatrix" name="Coordinates">
+			  <value v1="334.5909" v2="161.7809"/>
+			  <value v1="503.5909" v2="172.7809"/>
+			  <value v1="400.5909" v2="300.7809"/>
+			  <value v1="700.5909" v2="700.7809"/>
+			</param>
+			<param type="Type" name="EvaluatorParameter">
+			  <choice name="HeuristicLab.Problems.TravelingSalesman.TSPRoundedEuclideanPathEvaluator" />
+			  <choice name="HeuristicLab.Problems.TravelingSalesman.TSPGeoPathEvaluator" selected="true"/>
+			  <choice name="HeuristicLab.Problems.TravelingSalesman.TSPEuclideanPathEvaluator"/>
+			</param>    
+			<param type="Boolean" name="UseDistanceMatrix" value="true"/> 
+		</parameters>
+	</problem>
+  </algorithm>
 </scenario>
Index: /branches/OaaS/HeuristicLab.Services.Optimization.Web/Content/Styling.js
===================================================================
--- /branches/OaaS/HeuristicLab.Services.Optimization.Web/Content/Styling.js	(revision 9165)
+++ /branches/OaaS/HeuristicLab.Services.Optimization.Web/Content/Styling.js	(revision 9166)
@@ -33,6 +33,153 @@
             show: true,
             placement: 'outsideGrid'
+        },
+        highlighter: {
+            show: true,
+            sizeAdjust: 7.5
         }
     });
+}
+
+function handleDatatableSelectionChanged(datatable, datarow) {
+    $.ajax({
+        url: '/chart/GetDatatableContent?datatable=' + datatable + '&datarow=' + datarow,
+
+        success: function (result) {
+            var plot = generatePlot('dataTableGraph', result)
+            plot.replot({ resetAxes: true });
+
+            var resizer = $("#dataTableGraph").closest('.resizable');
+            $(resizer).unbind('resizestop');
+            $(resizer).bind('resizestop', function (event, ui) {
+                var id = $(this).children('div').get(0).id;
+                $("#dataTableGraph").height($(this).height() * 0.96);
+                $("#dataTableGraph").width($(this).width() * 0.96);
+                plot.replot({ resetAxes: true });
+            });
+        },
+        error: function (jqXHR, textStatus, errorThrown) {
+            alert(textStatus);
+        }
+    });
+}
+
+function redrawAccordions() {
+    $(".collapsible").accordion("refresh");
+}
+
+function injectDatatableAnalyzer() {
+    var datatable = null;
+    var row = null;
+
+    // crawl datatables for current run results
+    if ($("#dataTable").length > 0) {
+        $.ajax({
+            url: '/chart/GetDatatables',
+
+            success: function (result) {
+                $("#dataTable").empty();
+                $.each(result.Datatables, function (index, tableName) {
+                    // http://stackoverflow.com/questions/1801499/how-to-change-options-of-select-with-jquery
+                    $("#dataTable").append($("<option></option>").attr("value", tableName).text(tableName));
+                });
+
+                // select first row
+                // http://stackoverflow.com/questions/1414276/how-to-make-first-option-of-select-selected-with-jquery
+                $("#dataTable").val($("#dataTable option:first").val());
+                // fire selection changed event
+                $("#dataTable").change();
+            },
+            error: function (jqXHR, textStatus, errorThrown) {
+                alert(textStatus);
+            }
+        });
+
+        $("#dataTable option:selected").each(function () {
+            datatable = $(this).text();
+        });
+
+        $("#dataTable").change(function () {
+            $("#dataTable option:selected").each(function () {
+                datatable = $(this).text();
+                $.ajax({
+                    url: '/chart/GetRowNames?datatable=' + datatable,
+
+                    success: function (result) {
+                        $("#dataRow").empty();
+                        $.each(result.RowNames, function (index, rowName) {
+                            // http://stackoverflow.com/questions/1801499/how-to-change-options-of-select-with-jquery
+                            $("#dataRow").append($("<option></option>").attr("value", rowName).text(rowName));
+                        });
+
+                        // select first row
+                        // http://stackoverflow.com/questions/1414276/how-to-make-first-option-of-select-selected-with-jquery
+                        $("#dataRow").val($("#dataRow option:first").val());
+                        // fire selection changed event
+                        //$("#dataRow").change();
+                    },
+                    error: function (jqXHR, textStatus, errorThrown) {
+                        alert(textStatus);
+                    }
+                });
+            });
+        });
+
+        $("#dataRow").change(function () {
+            $("#dataRow option:selected").each(function () {
+                row = $(this).text();
+                handleDatatableSelectionChanged(datatable, row);
+            });
+        });
+    }
+}
+
+function injectMatrixGraph() {
+    $(".matrix-graph").each(function (i) {
+        var tabable = $(this).closest(".tabable");
+        var id = this.id;
+        var resizerId = $(this).parent().get(0).id;
+        var indices = retrieveMatrix(id);
+        var graphCreated = false;
+
+        $(tabable).bind('tabsactivate', function (event, ui) {
+            if ($(ui.newPanel[0]).hasClass("resizable") && !graphCreated) {
+                graphCreated = true;
+                var id = $(ui.newPanel[0]).children("div")[0].id;
+                var resizerId = $("#" + id).parent().get(0).id;
+                var indices = retrieveMatrix(id);
+
+                $.ajax({
+                    url: '/Chart/GetMatrixContentForGraph?run=' + indices.runId + '&parameterOffset=' + indices.parameterOffset + "&showMarker=false",
+
+                    success: function (result) {
+                        var plot = generatePlot(id, result);
+                        tabable.bind('tabsshow', function (event, ui) {
+                            if (ui.index == 1 && plot._drawCount == 0) {
+                                plot.replot();
+                            }
+                            redrawAccordions();
+                        });
+                        var resizer = $("#" + id).closest('.resizable');
+                        $(resizer).bind('resizestop', function (event, ui) {
+                            var id = $(this).children('div').get(0).id;
+                            $("#" + id).height($(this).height() * 0.96);
+                            $("#" + id).width($(this).width() * 0.96);
+                            plot.replot({ resetAxes: true });
+                        });
+                    },
+                    error: function (jqXHR, textStatus, errorThrown) {
+                        alert(textStatus);
+                        alert(errorThrown);
+                    }
+                });
+            }
+        });
+    });
+}
+
+function injectTableModifiers() {
+    // TODO: Make row add / delete via javascript
+    var i = 10 + 20;
+    return i;
 }
 
@@ -108,6 +255,6 @@
 
     try {
-        $(".collapsible").accordion("resize",
-        {
+        $(".collapsible").accordion({
+            heightStyle: "content",
             collapsible: true,
             active: false
@@ -131,37 +278,10 @@
             $(this).resizable();
         });
-
-        $(".matrix-graph").each(function (i) {
-            var tabable = $(this).closest(".tabable");
-            var id = this.id;
-            var resizerId = $(this).parent().get(0).id;
-            var indices = retrieveMatrix(id);
-
-            $.ajax({
-                url: '/Chart/GetMatrixContentForGraph?run=' + indices.runId + '&parameterOffset=' + indices.parameterOffset + "&showMarker=false",
-
-                success: function (result) {
-                    var plot = generatePlot(id, result);
-                    tabable.bind('tabsshow', function (event, ui) {
-                        if (ui.index == 1 && plot._drawCount == 0) {
-                            plot.replot();
-                        }
-                    });
-                    var resizer = $("#"+id).closest('.resizable');
-                    $(resizer).bind('resizestop', function (event, ui) {
-                        var id = $(this).children('div').get(0).id;
-                        $("#"+id).height($(this).height() * 0.96);
-                        $("#" + id).width($(this).width() * 0.96);
-                        plot.replot({ resetAxes: true });
-                    });
-                },
-                error: function (jqXHR, textStatus, errorThrown) {
-                    alert(textStatus);
-                    alert(errorThrown);
-                }
-            });
-        });
-    } catch (e) {
-    }
+    } catch (e) {
+    }
+
+    injectMatrixGraph();
+    injectDatatableAnalyzer();
+    //injectTableModifiers();
 }
 );
Index: /branches/OaaS/HeuristicLab.Services.Optimization.Web/Content/jqplot/README.txt
===================================================================
--- /branches/OaaS/HeuristicLab.Services.Optimization.Web/Content/jqplot/README.txt	(revision 9166)
+++ /branches/OaaS/HeuristicLab.Services.Optimization.Web/Content/jqplot/README.txt	(revision 9166)
@@ -0,0 +1,77 @@
+Title: jqPlot Readme
+
+Pure JavaScript plotting plugin for jQuery.
+
+To learn how to use jqPlot, start with the Basic Unsage Instructions below.  Then read the
+usage.txt and jqPlotOptions.txt files included with the distribution.
+
+The jqPlot home page is at <http://www.jqplot.com/>.
+
+Downloads can be found at <http://bitbucket.org/cleonello/jqplot/downloads/>.
+
+The mailing list is at <http://groups.google.com/group/jqplot-users>.
+
+Examples and unit tests are at <http://www.jqplot.com/tests/>.
+
+Documentation is at <http://www.jqplot.com/docs/>.
+
+The project page and source code are at <http://www.bitbucket.org/cleonello/jqplot/>.
+
+Bugs, issues, feature requests: <http://www.bitbucket.org/cleonello/jqplot/issues/>.
+
+Basic Usage Instructions:
+
+jqPlot requires jQuery (1.4+ required for certain features). jQuery 1.4.4 is included in 
+the distribution.  To use jqPlot include jQuery, the jqPlot jQuery plugin, the jqPlot css file and 
+optionally the excanvas script to support IE version prior to IE 9 in your web page:
+
+> <!--[if lt IE 9]><script language="javascript" type="text/javascript" src="excanvas.js"></script><![endif]-->
+> <script language="javascript" type="text/javascript" src="jquery-1.4.4.min.js"></script>
+> <script language="javascript" type="text/javascript" src="jquery.jqplot.min.js"></script>
+> <link rel="stylesheet" type="text/css" href="jquery.jqplot.css" />
+
+For usage instructions, see <jqPlot Usage> in usage.txt.  For available options, see
+<jqPlot Options> in jqPlotOptions.txt.
+
+Building from source:
+
+If you've cloned the repository, you can build a distribution from source.
+You need to have ant <http://ant.apache.org> installed.  You can simply 
+type "ant" from the jqplot directory to build the default "all" target.  
+There are 6 pertinent targets: clean, dist, min, docs, compress and all.  Use:
+
+> ant -p
+
+to get a description of the various build targets. 
+
+Legal Notices:
+
+Copyright (c) 2009-2010 Chris Leonello
+jqPlot is currently available for use in all personal or commercial projects 
+under both the MIT and GPL version 2.0 licenses. This means that you can 
+choose the license that best suits your project and use it accordingly. 
+
+Although not required, the author would appreciate an email letting him 
+know of any substantial use of jqPlot.  You can reach the author at: 
+chris at jqplot  or see http://www.jqplot.com/info.php .
+
+If you are feeling kind and generous, consider supporting the project by
+making a donation at: http://www.jqplot.com/donate.php .
+
+jqPlot includes date instance methods and printf/sprintf functions by other authors:
+
+Date instance methods:
+
+    author Ken Snyder (ken d snyder at gmail dot com)
+    date 2008-09-10
+    version 2.0.2 (http://kendsnyder.com/sandbox/date/)     
+    license Creative Commons Attribution License 3.0 (http://creativecommons.org/licenses/by/3.0/)
+
+JavaScript printf/sprintf functions.
+
+    version 2007.04.27
+    author Ash Searle
+    http://hexmen.com/blog/2007/03/printf-sprintf/
+    http://hexmen.com/js/sprintf.js
+    The author (Ash Searle) has placed this code in the public domain:
+    "This code is unrestricted: you are free to use it however you like."
Index: /branches/OaaS/HeuristicLab.Services.Optimization.Web/Content/jqplot/copyright.txt
===================================================================
--- /branches/OaaS/HeuristicLab.Services.Optimization.Web/Content/jqplot/copyright.txt	(revision 9166)
+++ /branches/OaaS/HeuristicLab.Services.Optimization.Web/Content/jqplot/copyright.txt	(revision 9166)
@@ -0,0 +1,29 @@
+/**
+ * jqPlot
+ * Pure JavaScript plotting plugin using jQuery
+ *
+ * Version: @VERSION
+ *
+ * Copyright (c) 2009-2011 Chris Leonello
+ * jqPlot is currently available for use in all personal or commercial projects 
+ * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL 
+ * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can 
+ * choose the license that best suits your project and use it accordingly. 
+ *
+ * Although not required, the author would appreciate an email letting him 
+ * know of any substantial use of jqPlot.  You can reach the author at: 
+ * chris at jqplot dot com or see http://www.jqplot.com/info.php .
+ *
+ * If you are feeling kind and generous, consider supporting the project by
+ * making a donation at: http://www.jqplot.com/donate.php .
+ *
+ * sprintf functions contained in jqplot.sprintf.js by Ash Searle:
+ *
+ *     version 2007.04.27
+ *     author Ash Searle
+ *     http://hexmen.com/blog/2007/03/printf-sprintf/
+ *     http://hexmen.com/js/sprintf.js
+ *     The author (Ash Searle) has placed this code in the public domain:
+ *     "This code is unrestricted: you are free to use it however you like."
+ * 
+ */
Index: /branches/OaaS/HeuristicLab.Services.Optimization.Web/ControllerService.svc
===================================================================
--- /branches/OaaS/HeuristicLab.Services.Optimization.Web/ControllerService.svc	(revision 9165)
+++ /branches/OaaS/HeuristicLab.Services.Optimization.Web/ControllerService.svc	(revision 9166)
@@ -2,4 +2,4 @@
   Language="C#" 
   Debug="true" 
-  Service="HeuristicLab.Services.Optimization.ControllerService.PlaceholderControllerService" 
+  Service="HeuristicLab.Services.Optimization.ControllerService.PlaceholderControllerService"    
   %>
Index: /branches/OaaS/HeuristicLab.Services.Optimization.Web/Controllers/ChartController.cs
===================================================================
--- /branches/OaaS/HeuristicLab.Services.Optimization.Web/Controllers/ChartController.cs	(revision 9165)
+++ /branches/OaaS/HeuristicLab.Services.Optimization.Web/Controllers/ChartController.cs	(revision 9166)
@@ -157,4 +157,83 @@
           return Json("error", JsonRequestBehavior.AllowGet);
         }
+
+        [HttpGet]
+        public JsonResult GetDatatableContent(string datatable, string datarow) {
+          try {
+            var model = Session["jobDetails"] as JobDetailsModel;
+            var plotableData = new PlotableData();
+
+            for (var i=0; i < model.Runs.Count; i++) {              
+              foreach (var result in model.Runs[i].Results) {
+                if (result.Value.Name == datatable) {
+                  var matrix = result.Value as DecimalMatrix;
+                  var index = Array.IndexOf(matrix.RowNames, datarow);
+                  plotableData.Series.Add(
+                    new SeriesEntry() {
+                      Label = "" + (i + 1) + ". Run - " + datatable + " - " + datarow,
+                      Values = matrix.Value[index]
+                    }
+                  );
+                  break;
+                }
+              }
+            }
+
+            return Json(plotableData, JsonRequestBehavior.AllowGet);
+          }
+          catch (Exception e) {
+            Trace.TraceError(e.Message);
+          }
+          Response.StatusCode = 400;
+          Response.Status = "Session timed out";
+          return Json("error", JsonRequestBehavior.AllowGet);
+        }
+
+        [HttpGet]
+        public JsonResult GetDatatables() {
+          try {
+            var model = Session["jobDetails"] as JobDetailsModel;
+            var dts = new DatatableContainer();
+            var datatables = new List<string>();
+            foreach (var param in model.Runs[0].Results) {
+              if (param.Value is DecimalMatrix) {
+                datatables.Add(param.Value.Name); 
+              }
+            }
+
+            dts.Datatables = datatables.ToArray();
+
+            return Json(dts, JsonRequestBehavior.AllowGet);
+          }
+          catch (Exception e) {
+            Trace.TraceError(e.Message);
+          }
+          Response.StatusCode = 400;
+          Response.Status = "Session timed out or ";
+          return Json("error", JsonRequestBehavior.AllowGet);
+        }
+
+        [HttpGet]
+        public JsonResult GetRowNames(string datatable) {
+          var model = Session["jobDetails"] as JobDetailsModel;
+          try {
+            foreach (var param in model.Runs[0].Results) {
+              if (param.Value.Name == datatable) {
+                var matrix = param.Value as DecimalMatrix;
+                
+                var rowNames = new RowNameContainer() {
+                  RowNames = new List<string>(matrix.RowNames)
+                };
+                return Json(rowNames, JsonRequestBehavior.AllowGet);                
+              }
+            }            
+          }
+          catch(Exception ex) {
+            Trace.WriteLine(ex.Message);
+          }
+          Response.StatusCode = 400;
+          Response.Status = "Session timed out";
+          return Json("error", JsonRequestBehavior.AllowGet);
+        }
     }
 }
Index: /branches/OaaS/HeuristicLab.Services.Optimization.Web/Controllers/OptimizationController.cs
===================================================================
--- /branches/OaaS/HeuristicLab.Services.Optimization.Web/Controllers/OptimizationController.cs	(revision 9165)
+++ /branches/OaaS/HeuristicLab.Services.Optimization.Web/Controllers/OptimizationController.cs	(revision 9166)
@@ -10,4 +10,5 @@
 using System.Web.Security;
 using HeuristicLab.Services.Optimization.Web.Models;
+using HeuristicLab.Services.Optimization.ControllerService.General;
 
 namespace HeuristicLab.Services.Optimization.Web.Controllers
@@ -16,5 +17,5 @@
     public class OptimizationController : Controller
     {
-      public const string DEFAULT_CONTROLLER_ENDPOINT = "WSHttpBinding_IControllerService";
+      public static readonly string DEFAULT_CONTROLLER_ENDPOINT = Configuration.ControllerEndpointName;
 
       public delegate T ControllerServiceDelegate<T>(IControllerService service);
@@ -25,5 +26,5 @@
           Response.Redirect("/Account/Logon");
 
-        using (var cf = new ChannelFactory<IControllerService>(OptimizationController.DEFAULT_CONTROLLER_ENDPOINT)) {
+        using (var cf = new ChannelFactory<IControllerService>(DEFAULT_CONTROLLER_ENDPOINT)) {
           var credentialBehaviour = cf.Endpoint.Behaviors.Find<ClientCredentials>();
           credentialBehaviour.UserName.UserName = Membership.GetUser().UserName;
@@ -38,5 +39,5 @@
           Response.Redirect("/Account/Logon");
 
-        using (var cf = new ChannelFactory<IControllerService>(OptimizationController.DEFAULT_CONTROLLER_ENDPOINT)) {          
+        using (var cf = new ChannelFactory<IControllerService>(DEFAULT_CONTROLLER_ENDPOINT)) {          
           var credentialBehaviour = cf.Endpoint.Behaviors.Find<ClientCredentials>();
           credentialBehaviour.UserName.UserName = Membership.GetUser().UserName;
@@ -66,5 +67,11 @@
           });
           Session["scenario"] = optScenario;
-          return View(optScenario.InputParameters);
+          if (optScenario.FirstAlgorithm.Problem == null)
+            return RedirectToAction("AlgorithmParameters");
+          return View(optScenario.FirstAlgorithm.Problem.Parameters);
+        }
+
+        public ActionResult ProblemParameters2() {                    
+          return View("ProblemParameters", (Session["scenario"] as OptimizationScenario).FirstAlgorithm.Problem.Parameters);
         }
 
@@ -93,5 +100,5 @@
 
         [HttpPost]
-        public ActionResult ProblemParameters(InputParameters parameters) {
+        public ActionResult ProblemParameters(ProblemParameters parameters) {
           if (ModelState.IsValid) {
             return RedirectToAction("AlgorithmParameters", parameters);
@@ -101,5 +108,5 @@
 
         public ActionResult AlgorithmParameters() {
-          return View((Session["scenario"] as OptimizationScenario).AlgorithmParameters);
+          return View((Session["scenario"] as OptimizationScenario).FirstAlgorithm.Parameters);
         }
 
@@ -117,5 +124,5 @@
 
         [HttpPost]
-        public ActionResult ScheduleJob(OptimizationScenario scenario) {
+        public ActionResult ScheduleJob(ScheduleJobModel jobModel) {
           using (var cf = new ChannelFactory<IControllerService>(OptimizationController.DEFAULT_CONTROLLER_ENDPOINT)) {
             var credentialBehaviour = cf.Endpoint.Behaviors.Find<ClientCredentials>();
@@ -124,8 +131,36 @@
             var controllerProxy = cf.CreateChannel();
             User u = new User() { Username = Membership.GetUser().UserName, Password = Session["pw"] as string };
-            controllerProxy.ScheduleOptimizationScenario(u, Session["scenario"] as OptimizationScenario);
+            var scenario = Session["scenario"] as OptimizationScenario;
+            var details = new JobExecutionDetails() { Group = jobModel.Group, JobTitle = jobModel.Name, Repititions = jobModel.Repetitions };
+            controllerProxy.ScheduleOptimizationScenario(u, scenario, details);
           }
           return RedirectToAction("Index");
         }
+        // TODO: Add unique identifier for algorithm / input parameters
+        public ActionResult AddRow(int id, string paramName) {
+          var os = Session["scenario"] as OptimizationScenario;
+          var parameter = os.FirstAlgorithm.Problem.Parameters.FindByName(paramName);
+          bool inputParam = true;
+          if (parameter == null) {
+            parameter = os.FirstAlgorithm.Parameters.FindByName(paramName);
+            inputParam = false;
+          }
+          var dm = parameter.Value as DecimalMatrix;
+          dm.CopyRow(id);
+          return inputParam ? View("ProblemParameters", os.FirstAlgorithm.Problem.Parameters) : View("AlgorithmParameters", os.FirstAlgorithm.Parameters);
+        }
+
+        public ActionResult DeleteRow(int id, string paramName) {
+          var os = Session["scenario"] as OptimizationScenario;
+          var parameter = os.FirstAlgorithm.Problem.Parameters.FindByName(paramName);
+          bool inputParam = true;
+          if (parameter == null) {
+            parameter = os.FirstAlgorithm.Parameters.FindByName(paramName);
+            inputParam = false;
+          }
+          var dm = parameter.Value as DecimalMatrix;
+          dm.DeleteRow(id);
+          return inputParam ? View("ProblemParameters", os.FirstAlgorithm.Problem.Parameters) : View("AlgorithmParameters", os.FirstAlgorithm.Parameters);
+        }
     }
 }
Index: /branches/OaaS/HeuristicLab.Services.Optimization.Web/Global.asax.cs
===================================================================
--- /branches/OaaS/HeuristicLab.Services.Optimization.Web/Global.asax.cs	(revision 9165)
+++ /branches/OaaS/HeuristicLab.Services.Optimization.Web/Global.asax.cs	(revision 9166)
@@ -32,5 +32,5 @@
       RegisterGlobalFilters(GlobalFilters.Filters);
       RegisterRoutes(RouteTable.Routes);
-      ModelBinders.Binders.Add(typeof(Optimization.ControllerService.Model.InputParameters), new ProblemParametersModelBinder());
+      ModelBinders.Binders.Add(typeof(Optimization.ControllerService.Model.ProblemParameters), new ProblemParametersModelBinder());
       ModelBinders.Binders.Add(typeof(Optimization.ControllerService.Model.AlgorithmParameters), new AlgorithmParametersModelBinder());
     }
Index: /branches/OaaS/HeuristicLab.Services.Optimization.Web/HeuristicLab.Services.Optimization.Web.csproj
===================================================================
--- /branches/OaaS/HeuristicLab.Services.Optimization.Web/HeuristicLab.Services.Optimization.Web.csproj	(revision 9165)
+++ /branches/OaaS/HeuristicLab.Services.Optimization.Web/HeuristicLab.Services.Optimization.Web.csproj	(revision 9166)
@@ -105,4 +105,5 @@
       <DependentUpon>Global.asax</DependentUpon>
     </Compile>
+    <Compile Include="Mockup\MockupMembershipProvider.cs" />
     <Compile Include="Models\AccountModels.cs" />
     <Compile Include="Models\AdminModels.cs" />
@@ -329,5 +330,5 @@
   </ItemGroup>
   <ItemGroup>
-    <Content Include="Views\Shared\EditorTemplates\InputParameters.cshtml" />
+    <Content Include="Views\Shared\EditorTemplates\ProblemParameters.cshtml" />
   </ItemGroup>
   <ItemGroup>
@@ -368,5 +369,5 @@
   </ItemGroup>
   <ItemGroup>
-    <Content Include="Views\Shared\DisplayTemplates\InputParameters.cshtml" />
+    <Content Include="Views\Shared\DisplayTemplates\ProblemParameters.cshtml" />
   </ItemGroup>
   <ItemGroup>
@@ -386,4 +387,5 @@
     <Content Include="Views\Chart\GenerateChart.cshtml" />
     <Content Include="Views\Optimization\Copy of JobDetails.cshtml" />
+    <Content Include="Views\Shared\DisplayTemplates\StringValue.cshtml" />
   </ItemGroup>
   <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
Index: /branches/OaaS/HeuristicLab.Services.Optimization.Web/Mappings/benchmark.cs
===================================================================
--- /branches/OaaS/HeuristicLab.Services.Optimization.Web/Mappings/benchmark.cs	(revision 9166)
+++ /branches/OaaS/HeuristicLab.Services.Optimization.Web/Mappings/benchmark.cs	(revision 9166)
@@ -0,0 +1,27 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Data;
+using HeuristicLab.Services.Optimization.ControllerService.Model;
+using HeuristicLab.Optimization;
+using HeuristicLab.Services.Optimization.ControllerService;
+using HeuristicLab.Algorithms.Benchmarks;
+using HeuristicLab.Parameters;
+using HeuristicLab.PluginInfrastructure;
+
+
+namespace HeuristicLab.Mappers {
+  public class BenchmarkScenarioMapper : IScenarioMapper {
+    public void MapScenario(OptimizationScenario scenario, out IAlgorithm algorithm) {
+      var alg = scenario.FirstAlgorithm;
+      var bm = new BenchmarkAlgorithm();
+      var bmFullName = HLMapper.GetStringValue(alg.Parameters.FindByName("Benchmark"));
+      bm.BenchmarkParameter.Value = bm.Benchmark = bm.BenchmarkParameter.ValidValues.First(b => b.GetType().FullName == bmFullName);      
+      ((ValueParameter<IntValue>)bm.Parameters["ChunkSize"]).Value = HLMapper.ConvertToIntValue(alg.Parameters.FindByName("ChunkSize"));
+      ((ValueParameter<DoubleValue>)bm.Parameters["TimeLimit"]).Value = HLMapper.ConvertToDoubleValue(alg.Parameters.FindByName("TimeLimit"));
+
+      algorithm = bm;
+    }
+  }
+}
Index: /branches/OaaS/HeuristicLab.Services.Optimization.Web/Mappings/benchmark.xml
===================================================================
--- /branches/OaaS/HeuristicLab.Services.Optimization.Web/Mappings/benchmark.xml	(revision 9166)
+++ /branches/OaaS/HeuristicLab.Services.Optimization.Web/Mappings/benchmark.xml	(revision 9166)
@@ -0,0 +1,15 @@
+<?xml version='1.0'?>
+<scenario xmlns="urn:scenario-schema">
+  <name>Benchmark Algorithm</name>
+  <algorithm mapper="HeuristicLab.Mappers.BenchmarkScenarioMapper">
+    <parameters>
+		<param type="Type" name="Benchmark">
+		  <choice name="HeuristicLab.Algorithms.Benchmarks.Dhrystone" selected="true" />
+		  <choice name="HeuristicLab.Algorithms.Benchmarks.Linpack" />
+		  <choice name="HeuristicLab.Algorithms.Benchmarks.Whetstone"/>
+		</param>    
+		<param type="Decimal" name="ChunkSize" value="0"/>
+		<param type="Decimal" name="TimeLimit" value="0"/> 
+	</parameters>
+  </algorithm>  
+</scenario>
Index: /branches/OaaS/HeuristicLab.Services.Optimization.Web/Mappings/scenario.xsd
===================================================================
--- /branches/OaaS/HeuristicLab.Services.Optimization.Web/Mappings/scenario.xsd	(revision 9165)
+++ /branches/OaaS/HeuristicLab.Services.Optimization.Web/Mappings/scenario.xsd	(revision 9166)
@@ -8,16 +8,28 @@
  <xsd:complexType name="scenarioType">
   <xsd:sequence maxOccurs="1">   
-   <xsd:element name="name" type="xsd:string"/>
-   <xsd:element name="problemParameters" type="paramsType"/>
-   <xsd:element name="algorithmParameters" type="paramsType"/>
-  </xsd:sequence>
-  <xsd:attribute name="problemType" use="required"/>
-  <xsd:attribute name="algorithmType" use="required"/>
-  <xsd:attribute name="mapper" use="required"/>
+   <xsd:element name="name" minOccurs="1" type="xsd:string"/>   
+   <xsd:element name="algorithm" minOccurs="1" maxOccurs="unbounded" type="algorithmType"/>   
+  </xsd:sequence>  
  </xsd:complexType>
+
+<xsd:complexType name="algorithmType">
+  <xsd:sequence maxOccurs="1">
+	<xsd:element name="parameters" type="paramsType"/>
+	<xsd:element name="problem" minOccurs="0" type="problemType"/>	
+	<xsd:element name="algorithm" minOccurs="0" maxOccurs="unbounded" type="algorithmType"/>		
+  </xsd:sequence>  
+  <xsd:attribute name="mapper" use="required"/>		
+</xsd:complexType>
+
+<xsd:complexType name="problemType">
+  <xsd:sequence maxOccurs="1">
+	<xsd:element name="parameters" type="paramsType"/>	
+  </xsd:sequence>  
+  <xsd:attribute name="class"/>	
+</xsd:complexType>
 
  <xsd:complexType name="paramsType">
   <xsd:sequence>
-   <xsd:element name="param" type="parameterType" minOccurs="1" maxOccurs="unbounded"/>      
+   <xsd:element name="param" type="parameterType" minOccurs="0" maxOccurs="unbounded"/>      
   </xsd:sequence>  
  </xsd:complexType>
Index: /branches/OaaS/HeuristicLab.Services.Optimization.Web/Mappings/tsp.cs
===================================================================
--- /branches/OaaS/HeuristicLab.Services.Optimization.Web/Mappings/tsp.cs	(revision 9165)
+++ /branches/OaaS/HeuristicLab.Services.Optimization.Web/Mappings/tsp.cs	(revision 9166)
@@ -4,39 +4,43 @@
 using System.Text;
 using HeuristicLab.Data;
-using HeuristicLab.Services.Optimization.ControllerService.Model; 
+using HeuristicLab.Services.Optimization.ControllerService.Model;
 using HeuristicLab.Optimization;
 using HeuristicLab.Services.Optimization.ControllerService;
 using HeuristicLab.Algorithms.GeneticAlgorithm;
 using HeuristicLab.Problems.TravelingSalesman;
-public class TSPScenarioMapper : IScenarioMapper {
-  public void MapScenario(OptimizationScenario scenario, IAlgorithm algorithm) {
-    Console.WriteLine("Mapping scenario!");
-    var ga = algorithm as GeneticAlgorithm;
-    var problem = algorithm.Problem as TravelingSalesmanProblem;
-                  
-    problem.BestKnownQuality = HLMapper.ConvertToDoubleValue(scenario.InputParameters.FindByName("BestKnownQuality"));
-    problem.BestKnownSolution = HLMapper.ConvertToPermutation(scenario.InputParameters.FindByName("BestKnownSolution"));
-    problem.Coordinates = HLMapper.ConvertToDoubleMatrix(scenario.InputParameters.FindByName("Coordinates"));
-    var evalParam = HLMapper.GetStringValue(scenario.InputParameters.FindByName("EvaluatorParameter"));
-    if (evalParam == "HeuristicLab.Problems.TravelingSalesman.TSPRoundedEuclideanPathEvaluator") {
-      problem.EvaluatorParameter.Value = new TSPRoundedEuclideanPathEvaluator();
+namespace HeuristicLab.Mappers {
+  public class TSPScenarioMapper : IScenarioMapper {
+    public void MapScenario(OptimizationScenario scenario, out IAlgorithm algorithm) {
+      Console.WriteLine("Mapping scenario!");
+      var ga = new GeneticAlgorithm();
+      var problem = new TravelingSalesmanProblem();
+      ga.Problem = problem;
+      algorithm = ga;
+
+      problem.BestKnownQuality = HLMapper.ConvertToDoubleValue(scenario.FirstAlgorithm.Problem.Parameters.FindByName("BestKnownQuality"));
+      problem.BestKnownSolution = HLMapper.ConvertToPermutation(scenario.FirstAlgorithm.Problem.Parameters.FindByName("BestKnownSolution"));
+      problem.Coordinates = HLMapper.ConvertToDoubleMatrix(scenario.FirstAlgorithm.Problem.Parameters.FindByName("Coordinates"));
+      var evalParam = HLMapper.GetStringValue(scenario.FirstAlgorithm.Problem.Parameters.FindByName("EvaluatorParameter"));
+      if (evalParam == "HeuristicLab.Problems.TravelingSalesman.TSPRoundedEuclideanPathEvaluator") {
+        problem.EvaluatorParameter.Value = new TSPRoundedEuclideanPathEvaluator();
+      }
+      else if (evalParam == "HeuristicLab.Problems.TravelingSalesman.TSPGeoPathEvaluator") {
+        problem.EvaluatorParameter.Value = new TSPGeoPathEvaluator();
+      }
+      else {
+        problem.EvaluatorParameter.Value = new TSPEuclideanPathEvaluator();
+      }
+      problem.UseDistanceMatrix = HLMapper.ConvertToBoolValue(scenario.FirstAlgorithm.Problem.Parameters.FindByName("UseDistanceMatrix"));
+      Console.WriteLine("Mapping algorithm...");
+      ga.Mutator = HLMapper.FindInItemSet<HeuristicLab.Optimization.IManipulator>(ga.MutatorParameter.ValidValues, scenario.FirstAlgorithm.Parameters.FindByName("Mutator"));
+      ga.CrossoverParameter.Value = HLMapper.FindOperator<HeuristicLab.Optimization.ICrossover>(problem, scenario.FirstAlgorithm.Parameters.FindByName("CrossoverParameter"));
+      ga.Elites = HLMapper.ConvertToIntValue(scenario.FirstAlgorithm.Parameters.FindByName("Elites"));
+      ga.MaximumGenerations = HLMapper.ConvertToIntValue(scenario.FirstAlgorithm.Parameters.FindByName("MaximumGenerations"));
+      ga.MutationProbability = HLMapper.ConvertToPercentValue(scenario.FirstAlgorithm.Parameters.FindByName("MutationProbability"));
+      ga.PopulationSize = HLMapper.ConvertToIntValue(scenario.FirstAlgorithm.Parameters.FindByName("PopulationSize"));
+      ga.Seed = HLMapper.ConvertToIntValue(scenario.FirstAlgorithm.Parameters.FindByName("Seed"));
+      ga.Selector = HLMapper.FindInItemSet<HeuristicLab.Optimization.ISelector>(ga.SelectorParameter.ValidValues, scenario.FirstAlgorithm.Parameters.FindByName("Selector"));
+      ga.SetSeedRandomly = HLMapper.ConvertToBoolValue(scenario.FirstAlgorithm.Parameters.FindByName("SetSeedRandomly"));
     }
-    else if (evalParam == "HeuristicLab.Problems.TravelingSalesman.TSPGeoPathEvaluator") {
-      problem.EvaluatorParameter.Value = new TSPGeoPathEvaluator();
-    }
-    else {
-      problem.EvaluatorParameter.Value = new TSPEuclideanPathEvaluator();
-    }
-    problem.UseDistanceMatrix = HLMapper.ConvertToBoolValue(scenario.InputParameters.FindByName("UseDistanceMatrix"));
-    Console.WriteLine("Mapping algorithm...");
-    ga.Mutator = HLMapper.FindInItemSet<HeuristicLab.Optimization.IManipulator>(ga.MutatorParameter.ValidValues, scenario.AlgorithmParameters.FindByName("Mutator"));
-    ga.CrossoverParameter.Value = HLMapper.FindOperator<HeuristicLab.Optimization.ICrossover>(problem, scenario.AlgorithmParameters.FindByName("CrossoverParameter"));
-    ga.Elites = HLMapper.ConvertToIntValue(scenario.AlgorithmParameters.FindByName("Elites"));
-    ga.MaximumGenerations = HLMapper.ConvertToIntValue(scenario.AlgorithmParameters.FindByName("MaximumGenerations"));
-    ga.MutationProbability = HLMapper.ConvertToPercentValue(scenario.AlgorithmParameters.FindByName("MutationProbability"));                
-    ga.PopulationSize = HLMapper.ConvertToIntValue(scenario.AlgorithmParameters.FindByName("PopulationSize"));
-    ga.Seed = HLMapper.ConvertToIntValue(scenario.AlgorithmParameters.FindByName("Seed"));
-    ga.Selector = HLMapper.FindInItemSet<HeuristicLab.Optimization.ISelector>(ga.SelectorParameter.ValidValues, scenario.AlgorithmParameters.FindByName("Selector"));
-    ga.SetSeedRandomly = HLMapper.ConvertToBoolValue(scenario.AlgorithmParameters.FindByName("SetSeedRandomly"));
   }
 }
Index: /branches/OaaS/HeuristicLab.Services.Optimization.Web/Mappings/tsp.xml
===================================================================
--- /branches/OaaS/HeuristicLab.Services.Optimization.Web/Mappings/tsp.xml	(revision 9165)
+++ /branches/OaaS/HeuristicLab.Services.Optimization.Web/Mappings/tsp.xml	(revision 9166)
@@ -1,48 +1,49 @@
 <?xml version='1.0'?>
-<scenario problemType="HeuristicLab.Problems.TravelingSalesman.TravelingSalesman"
-          algorithmType="HeuristicLab.Algorithms.GeneticAlgorithm"
-		  xmlns="urn:scenario-schema"
-          mapper="HeuristicLab.Controllers.HLMapper">
+<scenario xmlns="urn:scenario-schema">
   <name>Traveling Salesman Problem</name>
-  <problemParameters>
-    <param type="Decimal" name="BestKnownQuality" value="6110.0"/>
-    <param type="DecimalVector" name="BestKnownSolution">
-      <value v1="0"/>
-      <value v1="40"/>
-      <value v1="38"/>
-      <value v1="60"/>
-    </param>
-    <param type="DecimalMatrix" name="Coordinates">
-      <value v1="334.5909" v2="161.7809"/>
-      <value v1="503.5909" v2="172.7809"/>
-      <value v1="400.5909" v2="300.7809"/>
-      <value v1="700.5909" v2="700.7809"/>
-    </param>
-    <param type="Type" name="EvaluatorParameter">
-      <choice name="HeuristicLab.Problems.TravelingSalesman.TSPRoundedEuclideanPathEvaluator" />
-      <choice name="HeuristicLab.Problems.TravelingSalesman.TSPGeoPathEvaluator" selected="true"/>
-      <choice name="HeuristicLab.Problems.TravelingSalesman.TSPEuclideanPathEvaluator"/>
-    </param>    
-    <param type="Boolean" name="UseDistanceMatrix" value="true"/> 
-  </problemParameters>
-  <algorithmParameters>
-    <param type="Type" name="CrossoverParameter">
-      <choice name="OrderCrossover2"/>
-      <choice name="CosaCrossover" selected="true"/>
-    </param>    
-    <param type="Integer" name="Elites" value="1"/>
-    <param type="Integer" name="MaximumGenerations" value="1000"/>
-    <param type="Percent" name="MutationProbability" value="5"/>
-    <param type="Type" name="Mutator">
-      <choice name="InversionManipulator" selected="true"/>
-      <choice name="ScrambleManipulator"/>
-    </param>
-    <param type="Integer" name="PopulationSize" value="100"/>
-    <param type="Integer" name="Seed" value="100"/>
-    <param type="Type" name="Selector">
-      <choice name="ProportionalSelector" selected="true"/>
-      <choice name="BestSelector"/>
-    </param>
-    <param type="Boolean" name="SetSeedRandomly" value="true"/>
-  </algorithmParameters>
+  <algorithm mapper="HeuristicLab.Mappers.TSPScenarioMapper">
+    <parameters>
+		<param type="Type" name="CrossoverParameter">
+		  <choice name="OrderCrossover2"/>
+		  <choice name="CosaCrossover" selected="true"/>
+		</param>    
+		<param type="Integer" name="Elites" value="1"/>
+		<param type="Integer" name="MaximumGenerations" value="1000"/>
+		<param type="Percent" name="MutationProbability" value="5"/>
+		<param type="Type" name="Mutator">
+		  <choice name="InversionManipulator" selected="true"/>
+		  <choice name="ScrambleManipulator"/>
+		</param>
+		<param type="Integer" name="PopulationSize" value="100"/>
+		<param type="Integer" name="Seed" value="100"/>
+		<param type="Type" name="Selector">
+		  <choice name="ProportionalSelector" selected="true"/>
+		  <choice name="BestSelector"/>
+		</param>
+		<param type="Boolean" name="SetSeedRandomly" value="true"/>
+    </parameters>
+	<problem>
+		<parameters>
+			<param type="Decimal" name="BestKnownQuality" value="6110.0"/>
+			<param type="DecimalVector" name="BestKnownSolution">
+			  <value v1="0"/>
+			  <value v1="40"/>
+			  <value v1="38"/>
+			  <value v1="60"/>
+			</param>
+			<param type="DecimalMatrix" name="Coordinates">
+			  <value v1="334.5909" v2="161.7809"/>
+			  <value v1="503.5909" v2="172.7809"/>
+			  <value v1="400.5909" v2="300.7809"/>
+			  <value v1="700.5909" v2="700.7809"/>
+			</param>
+			<param type="Type" name="EvaluatorParameter">
+			  <choice name="HeuristicLab.Problems.TravelingSalesman.TSPRoundedEuclideanPathEvaluator" />
+			  <choice name="HeuristicLab.Problems.TravelingSalesman.TSPGeoPathEvaluator" selected="true"/>
+			  <choice name="HeuristicLab.Problems.TravelingSalesman.TSPEuclideanPathEvaluator"/>
+			</param>    
+			<param type="Boolean" name="UseDistanceMatrix" value="true"/> 
+		</parameters>
+	</problem>
+  </algorithm>
 </scenario>
Index: /branches/OaaS/HeuristicLab.Services.Optimization.Web/Mockup/MockupMembershipProvider.cs
===================================================================
--- /branches/OaaS/HeuristicLab.Services.Optimization.Web/Mockup/MockupMembershipProvider.cs	(revision 9166)
+++ /branches/OaaS/HeuristicLab.Services.Optimization.Web/Mockup/MockupMembershipProvider.cs	(revision 9166)
@@ -0,0 +1,189 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Web.Security;
+
+namespace HeuristicLab.Services.Optimization.ControllerService.Mockup {
+  public class MockupRoleProvider : RoleProvider {
+    public override void AddUsersToRoles(string[] usernames, string[] roleNames) {      
+    }
+
+    public override void CreateRole(string roleName) {      
+    }
+
+    public override bool DeleteRole(string roleName, bool throwOnPopulatedRole) {
+      return true;
+    }
+
+    public override string[] FindUsersInRole(string roleName, string usernameToMatch) {
+      return new string[] { "fschoeppl" };
+    }
+
+    public override string[] GetAllRoles() {
+      return new string[] { "Web User" };
+    }
+
+    public override string[] GetRolesForUser(string username) {
+      return new string[] { "Web User" };
+    }
+
+    public override string[] GetUsersInRole(string roleName) {
+      return new string[] { "fschoeppl" };
+    }
+
+    public override bool IsUserInRole(string username, string roleName) {
+      return true;
+    }
+
+    public override void RemoveUsersFromRoles(string[] usernames, string[] roleNames) {      
+    }
+
+    public override bool RoleExists(string roleName) {
+      return roleName == "Web User";
+    }
+
+    public override string ApplicationName {
+      get; set;
+    }
+  }
+
+  public class MockupMembershipProvider : MembershipProvider {
+    private static MembershipUser testUser;
+
+    static MockupMembershipProvider() {
+      try {
+        testUser = new MembershipUser("MockupMembershipProvider", "fschoeppl", "1", "fschoeppl", "Birthday of your mother?", "No comment", true, false, DateTime.Now, DateTime.Now, DateTime.Now, DateTime.Now, DateTime.Now);
+      }
+      catch (Exception e) {
+        Console.WriteLine(e.Message);
+      }
+    }
+
+    public override bool ChangePassword(string username, string oldPassword, string newPassword) {
+      return true;
+    }
+
+    public override bool ChangePasswordQuestionAndAnswer(string username, string password, string newPasswordQuestion, string newPasswordAnswer) {
+      return true;
+    }
+
+    public override bool EnablePasswordReset {
+      get { return true; }
+    }
+
+    public override bool  EnablePasswordRetrieval
+    {
+	    get { return true; }
+    }
+
+    public override string ApplicationName {
+      get;
+      set;
+    }
+
+    public override MembershipUser CreateUser(string username, string password, string email, string passwordQuestion, string passwordAnswer, bool isApproved, object providerUserKey, out MembershipCreateStatus status) {
+      var user = new MembershipUser("MockupMembershipProvider", username, providerUserKey, email, passwordQuestion, passwordAnswer, true, false, DateTime.Now, DateTime.Now, DateTime.Now, DateTime.Now, DateTime.Now);
+      status = MembershipCreateStatus.Success;
+      return user;
+    }
+
+    public override bool DeleteUser(string username, bool deleteAllRelatedData) {
+      return true;
+    }
+
+    public override MembershipUserCollection FindUsersByEmail(string emailToMatch, int pageIndex, int pageSize, out int totalRecords) {
+      var col = new MembershipUserCollection();
+      totalRecords = 0;
+      if (emailToMatch == "fschoeppl") {
+        totalRecords = 1;
+        col.Add(testUser);
+      }
+      return col;
+    }
+
+    public override MembershipUserCollection FindUsersByName(string usernameToMatch, int pageIndex, int pageSize, out int totalRecords) {
+      return FindUsersByEmail(usernameToMatch, pageIndex, pageSize, out totalRecords);
+    }
+
+    public override MembershipUserCollection GetAllUsers(int pageIndex, int pageSize, out int totalRecords) {
+      return FindUsersByEmail("fschoeppl", pageIndex, pageSize, out totalRecords);
+    }
+
+    public override int GetNumberOfUsersOnline() {
+      return 1;
+    }
+
+    public override string GetPassword(string username, string answer) {
+      if (username == "fschoeppl")
+        return "fschoeppl";
+      return "";
+    }
+
+    public override MembershipUser GetUser(object providerUserKey, bool userIsOnline) {
+      if (testUser.ProviderUserKey == providerUserKey)
+        return testUser;
+      return null;
+    }
+
+    public override MembershipUser GetUser(string username, bool userIsOnline) {
+      if (testUser.UserName == username)
+        return testUser;
+      return null;
+    }
+
+    public override string GetUserNameByEmail(string email) {
+      if (testUser.Email == email)
+        return testUser.UserName;
+      return null;
+    }
+
+    public override int MaxInvalidPasswordAttempts {
+      get { return 100; }
+    }
+
+    public override int MinRequiredNonAlphanumericCharacters {
+      get { return 0; }
+    }
+
+    public override int MinRequiredPasswordLength {
+      get { return 1; }
+    }
+
+    public override int PasswordAttemptWindow {
+      get { return 5; }
+    }
+
+    public override MembershipPasswordFormat PasswordFormat {
+      get { return MembershipPasswordFormat.Clear; }
+    }
+
+    public override string PasswordStrengthRegularExpression {
+      get { return ""; }
+    }
+
+    public override bool RequiresQuestionAndAnswer {
+      get { return true; }
+    }
+
+    public override bool RequiresUniqueEmail {
+      get { return false; }
+    }
+
+    public override string ResetPassword(string username, string answer) {
+      return "fschoeppl";
+    }
+
+    public override bool UnlockUser(string userName) {
+      return true;
+    }
+
+    public override void UpdateUser(MembershipUser user) {
+    }
+
+    public override bool ValidateUser(string username, string password) {
+      return username == "fschoeppl" && password == "fschoeppl";
+    }
+
+  }
+}
Index: /branches/OaaS/HeuristicLab.Services.Optimization.Web/Models/ChartModels.cs
===================================================================
--- /branches/OaaS/HeuristicLab.Services.Optimization.Web/Models/ChartModels.cs	(revision 9165)
+++ /branches/OaaS/HeuristicLab.Services.Optimization.Web/Models/ChartModels.cs	(revision 9166)
@@ -18,3 +18,16 @@
     }    
   }
+
+  public class RowNameContainer {
+    private IList<string> rowNames = new List<string>();
+
+    public IList<string> RowNames {
+      get { return rowNames; }
+      set { rowNames = value; }
+    }
+  }
+
+  public class DatatableContainer {
+    public string[] Datatables { get; set; }
+  }
 }
Index: /branches/OaaS/HeuristicLab.Services.Optimization.Web/Models/OptimizationModels.cs
===================================================================
--- /branches/OaaS/HeuristicLab.Services.Optimization.Web/Models/OptimizationModels.cs	(revision 9165)
+++ /branches/OaaS/HeuristicLab.Services.Optimization.Web/Models/OptimizationModels.cs	(revision 9166)
@@ -7,4 +7,9 @@
 
 namespace HeuristicLab.Services.Optimization.Web.Models {
+  public class ScheduleJobModel {
+    public int Repetitions { get; set; }
+    public string Name { get; set; }
+    public string Group { get; set; }
+  }
 
   public class OptimizationModel {
@@ -41,10 +46,10 @@
           realValue += value.AttemptedValue;
         }
-        var param = (from par in scenario.InputParameters.Items where par.Value.Name == realKey select par).FirstOrDefault();
+        var param = (from par in scenario.FirstAlgorithm.Problem.Parameters.Items where par.Value.Name == realKey select par).FirstOrDefault();
         if (param != null && !param.Value.TrySetFromString(realValue)) {
           bindingContext.ModelState.AddModelError(bindingContext.ModelName, new Exception(string.Format("Unable to parse {0} into destination type {1}", value, param.Type)));
         }
       }
-      return scenario.InputParameters;
+      return scenario.FirstAlgorithm.Problem.Parameters;
     }
   }
@@ -55,10 +60,10 @@
       foreach (var key in controllerContext.RequestContext.HttpContext.Request.Form.AllKeys) {
         var value = bindingContext.ValueProvider.GetValue(key);
-        var param = (from par in scenario.AlgorithmParameters.Items where par.Value.Name == key select par).FirstOrDefault();
+        var param = (from par in scenario.FirstAlgorithm.Parameters.Items where par.Value.Name == key select par).FirstOrDefault();
         if (param != null && !param.Value.TrySetFromString(value.AttemptedValue)) {
           bindingContext.ModelState.AddModelError(bindingContext.ModelName, new Exception(string.Format("Unable to parse {0} into destination type {1}", value, param.Type)));
         }
       }
-      return scenario.AlgorithmParameters;
+      return scenario.FirstAlgorithm.Parameters;
     }
   }
Index: /branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Optimization/AlgorithmParameters.cshtml
===================================================================
--- /branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Optimization/AlgorithmParameters.cshtml	(revision 9165)
+++ /branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Optimization/AlgorithmParameters.cshtml	(revision 9166)
@@ -2,9 +2,9 @@
 
 @{
-    ViewBag.Title = "AlgorithmParameters";
+    ViewBag.Title = "Algorithm Parameters";
 }
 
 <h2>Adjust algorithm parameters:</h2>
-@using (Html.BeginForm()) {
+@using (Html.BeginForm("AlgorithmParameters", "Optimization")) {
     @Html.ValidationSummary(true)
     <fieldset>
Index: /branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Optimization/Index.cshtml
===================================================================
--- /branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Optimization/Index.cshtml	(revision 9165)
+++ /branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Optimization/Index.cshtml	(revision 9166)
@@ -2,5 +2,5 @@
 
 @{
-    ViewBag.Title = "Index";
+    ViewBag.Title = "Optimization-as-a-Service";
 }
 
@@ -32,5 +32,5 @@
 <ul>
 @foreach (var itm in Model.Scenarios) {
-    <li>@Html.ActionLink(itm.Name, "ProblemParameters", new { scenario=itm.Name })</li>
+    <li>@Html.ActionLink(itm.Id, "ProblemParameters", new { scenario=itm.Id })</li>
 }
 </ul>
Index: /branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Optimization/JobDetails.cshtml
===================================================================
--- /branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Optimization/JobDetails.cshtml	(revision 9165)
+++ /branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Optimization/JobDetails.cshtml	(revision 9166)
@@ -28,7 +28,25 @@
 
 <h3>Run details:</h3>
-@for (int j=0; j < Model.Runs.Count; j++) {
+<div class="collapsible">
+@if (Model.Runs.Count > 1) {
+    <h3>Analyze runs</h3>
+    <div>
+        <div class="resizable ui-widget-content" style="width: 800px; height: 600px;">
+            <div id="dataTableView" style="width: 96%; height: 96%;">    
+              <form action="#">
+                <label for="dataTable">DataTable:</label>
+                <select name="dataTable" id="dataTable"></select>
+                <label for="dataRow">DataRow:</label>
+                <select name="dataRow" id="dataRow"></select>
+                <div id="dataTableGraph" style="width: 100%; height: 100%;"></div>
+              </form>
+            </div>
+        </div>
+    </div>
+}
+@for (int j = 0; j < Model.Runs.Count; j++) {
     var run = Model.Runs[j];
-    <p>@run.Name:</p>
+    <h3>@run.Name</h3>
+    <div>
     <table>
       <thead>
@@ -40,7 +58,7 @@
       <tbody>
       @for (var i = 0; i < run.Results.Count; i++) {
-        var result = run.Results[i];      
+          var result = run.Results[i];      
         <tr>
-          <td>@result.Value.Name</td> 
+          <td>@Html.Label(result.Value.Name, result.Value.Name)</td> 
           @if (result.Value is HeuristicLab.Services.Optimization.ControllerService.Model.DecimalMatrix) {
               var matrix = (result.Value as HeuristicLab.Services.Optimization.ControllerService.Model.DecimalMatrix);              
@@ -65,7 +83,11 @@
                   </div>                
               </td>
-          }
+          }          
           else {
-              <td>@((result.Value as HeuristicLab.Services.Optimization.ControllerService.Model.StringValue).Value)</td>
+              <td>
+                @Html.DisplayFor(m => result.Value)               
+              </td>
+              <!-- Html.Partial(string.Format("~/Views/Shared/DisplayTemplates/{0}.cshtml", result.Value.GetType().Name), result.Value) -->                
+              <!--td>((result.Value as HeuristicLab.Services.Optimization.ControllerService.Model.StringValue).Value)</td-->
           }
        </tr>
@@ -73,3 +95,5 @@
       </tbody>
     </table>
+    </div>
 }
+</div>
Index: /branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Optimization/ProblemParameters.cshtml
===================================================================
--- /branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Optimization/ProblemParameters.cshtml	(revision 9165)
+++ /branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Optimization/ProblemParameters.cshtml	(revision 9166)
@@ -1,11 +1,11 @@
-﻿@model HeuristicLab.Services.Optimization.ControllerService.Model.InputParameters
+﻿@model HeuristicLab.Services.Optimization.ControllerService.Model.ProblemParameters
 
 @{
-    ViewBag.Title = "ProblemParameters";
+    ViewBag.Title = "Problem Parameters";
 }
 
 <h2>Adjust problem parameters:</h2>
 
-@using (Html.BeginForm()) {
+@using (Html.BeginForm("ProblemParameters", "Optimization")) {
     @Html.ValidationSummary(true)
     <fieldset>
Index: /branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Optimization/ScheduleJob.cshtml
===================================================================
--- /branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Optimization/ScheduleJob.cshtml	(revision 9165)
+++ /branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Optimization/ScheduleJob.cshtml	(revision 9166)
@@ -2,19 +2,38 @@
 
 @{
-    ViewBag.Title = "ScheduleJob";
+    ViewBag.Title = "Schedule Job";
 }
 
-<h2>Do you really want to schedule the following job?</h2>
-
-
-<h3>Problem Parameters:</h3>
-@Html.DisplayFor(model => Model.InputParameters)
-
+@using (Html.BeginForm()) {    
+    <fieldset>
+        <legend>Scheduling parameters</legend>
+        <div class="editor-label">
+            <label for="name">Name:</label>
+        </div>
+        <div class="editor-field">
+            <input id="name" name="Name" type="text" value="Web scheduled job" />
+        </div>
+        <div class="editor-label">
+            <label for="repetitions">Repetitions:</label>
+        </div>
+        <div class="editor-field">
+            <input id="repetitions" name="Repetitions" type="text" value="1" />
+        </div>
+        <div class="editor-label">
+            <label for="group">Group:</label>
+        </div>
+        <div class="editor-field">
+            <input id="group" name="Group" type="text" value="TESTAZURE" />
+        </div>
+        <div class="editor-field">
+            <input type="submit" value="Schedule job!" />
+        </div>
+    </fieldset>
+}
+@if (Model.FirstAlgorithm.Problem != null) {
+    <h3>Problem Parameters:</h3>
+    @Html.DisplayFor(model => Model.FirstAlgorithm.Problem.Parameters)
+}
+    
 <h3>Algorithm Parameters:</h3>
-@Html.DisplayFor(model => Model.AlgorithmParameters)
-
-@using (Html.BeginForm()) {    
-    <p>
-        <input type="submit" value="Schedule job!" />
-    </p>
-}
+@Html.DisplayFor(model => Model.FirstAlgorithm.Parameters)
Index: /branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Shared/DisplayTemplates/DecimalMatrix.cshtml
===================================================================
--- /branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Shared/DisplayTemplates/DecimalMatrix.cshtml	(revision 9165)
+++ /branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Shared/DisplayTemplates/DecimalMatrix.cshtml	(revision 9166)
@@ -10,5 +10,5 @@
       @for (int i = 0; i < Model.Value.Length; i++) {
       <tr>
-        @if (Model.RowNames.Length > i) {
+        @if (Model.RowNames != null && Model.RowNames.Length > i) {
         <th scope="row">@Model.RowNames[i]</th>
         }
Index: /branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Shared/DisplayTemplates/ProblemParameters.cshtml
===================================================================
--- /branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Shared/DisplayTemplates/ProblemParameters.cshtml	(revision 9166)
+++ /branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Shared/DisplayTemplates/ProblemParameters.cshtml	(revision 9166)
@@ -0,0 +1,10 @@
+﻿@model HeuristicLab.Services.Optimization.ControllerService.Model.ProblemParameters
+
+@foreach (var itm in Model.Items) {
+    <div class="editor-label param-input">
+        @Html.Label(itm.Value.Name, itm.Value.Name)
+    </div>
+    <div class="editor-label">
+        @Html.DisplayFor(model => itm.Value)
+    </div>
+}
Index: /branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Shared/DisplayTemplates/StringValue.cshtml
===================================================================
--- /branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Shared/DisplayTemplates/StringValue.cshtml	(revision 9166)
+++ /branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Shared/DisplayTemplates/StringValue.cshtml	(revision 9166)
@@ -0,0 +1,3 @@
+﻿@model HeuristicLab.Services.Optimization.ControllerService.Model.StringValue
+
+@Model.Value
Index: /branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Shared/EditorTemplates/DecimalMatrix.cshtml
===================================================================
--- /branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Shared/EditorTemplates/DecimalMatrix.cshtml	(revision 9165)
+++ /branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Shared/EditorTemplates/DecimalMatrix.cshtml	(revision 9166)
@@ -19,6 +19,7 @@
     </td>
     }
-    <td><a class="delete-row" href="#">Delete</a></td>
-    <td><input type="submit" name="AddRow" value="Add Row"/></td>
+    <!-- TODO: Add unique identifier for algorithm / input parameters -->
+    <td>@Html.ActionLink("-", "DeleteRow", new { paramName = @Model.Name, id = @i }) </td>
+    <td>@Html.ActionLink("+", "AddRow", new { paramName = @Model.Name, id = @i }) </td>
   </tr>  
   }
Index: /branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Shared/EditorTemplates/ProblemParameters.cshtml
===================================================================
--- /branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Shared/EditorTemplates/ProblemParameters.cshtml	(revision 9166)
+++ /branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Shared/EditorTemplates/ProblemParameters.cshtml	(revision 9166)
@@ -0,0 +1,10 @@
+﻿@model HeuristicLab.Services.Optimization.ControllerService.Model.ProblemParameters
+
+@foreach (var itm in Model.Items) {
+    <div class="editor-label">
+        @Html.Label(itm.Value.Name, itm.Value.Name)
+    </div>
+    <div class="editor-field">
+        @Html.EditorFor(model => itm.Value)
+    </div>
+}
Index: /branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Shared/_Layout.cshtml
===================================================================
--- /branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Shared/_Layout.cshtml	(revision 9165)
+++ /branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Shared/_Layout.cshtml	(revision 9166)
@@ -19,4 +19,5 @@
     <script src="@Url.Content("~/Content/jqplot/src/plugins/jqplot.canvasTextRenderer.js")" type="text/javascript"></script>
     <script src="@Url.Content("~/Content/jqplot/src/plugins/jqplot.canvasAxisLabelRenderer.js")" type="text/javascript"></script>
+    <script type="text/javascript" src="@Url.Content("~/Content/jqplot/src/plugins/jqplot.highlighter.js")"></script>
     <script type="text/javascript" src="@Url.Content("~/Content/jqplot/src/plugins/jqplot.barRenderer.js")"></script>
     <script type="text/javascript" src="@Url.Content("~/Content/jqplot/src/plugins/jqplot.categoryAxisRenderer.js")"></script>
Index: /branches/OaaS/HeuristicLab.Services.Optimization.Web/Web.config
===================================================================
--- /branches/OaaS/HeuristicLab.Services.Optimization.Web/Web.config	(revision 9165)
+++ /branches/OaaS/HeuristicLab.Services.Optimization.Web/Web.config	(revision 9166)
@@ -14,27 +14,22 @@
     </trace>
     <sources>
-      <source name="System.ServiceModel"
-              switchValue="Information, ActivityTracing"
-              propagateActivity="true" >
+      <source name="System.ServiceModel" switchValue="Information, ActivityTracing" propagateActivity="true">
         <listeners>
-          <add name="xml"/>
+          <add name="xml" />
         </listeners>
       </source>
       <source name="System.ServiceModel.MessageLogging">
         <listeners>
-          <add name="xml"/>
+          <add name="xml" />
         </listeners>
       </source>
-      <source name="myUserTraceSource"
-              switchValue="Information, ActivityTracing">
+      <source name="myUserTraceSource" switchValue="Information, ActivityTracing">
         <listeners>
-          <add name="xml"/>
+          <add name="xml" />
         </listeners>
       </source>
     </sources>
     <sharedListeners>
-      <add name="xml"
-           type="System.Diagnostics.XmlWriterTraceListener"
-                 initializeData="C:\logs\Traces.svclog" />
+      <add name="xml" type="System.Diagnostics.XmlWriterTraceListener" initializeData="C:\logs\Traces.svclog" />
     </sharedListeners>
   </system.diagnostics>
@@ -42,9 +37,5 @@
   
   <connectionStrings>
-    <add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true"
-      providerName="System.Data.SqlClient" />
-    <add name="DefaultConnection" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=aspnet_eb6c1a930dad4e2e9eaf3dcd73e6f924;Integrated Security=True;MultipleActiveResultSets=True"
-      providerName="System.Data.SqlClient" />
-    <add name="HeuristicLab.Authentication" connectionString="ADJUST_ME"/>
+    <add name="HeuristicLab.Authentication" connectionString="ADJUST_ME" />
   </connectionStrings>
   <appSettings>
@@ -66,8 +57,9 @@
       <forms loginUrl="~/Account/LogOn" timeout="2880" />
     </authentication>
-    <membership>
-      <providers>
-        <clear/>
-        <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="HeuristicLab.Authentication" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="HeuristicLab.Authentication"/>
+    <membership defaultProvider="AspNetSqlMembershipProvider">
+      <providers>
+        <clear />
+        <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="HeuristicLab.Authentication" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="HeuristicLab.Authentication" />
+        <!-- add applicationName="MockupProvider" name="MockupMembershipProvider" type="HeuristicLab.Services.Optimization.ControllerService.Mockup.MockupMembershipProvider"/ -->
       </providers>
     </membership>
@@ -79,9 +71,9 @@
       </providers>
     </profile>
-    <roleManager enabled="true">
+    <roleManager enabled="true" defaultProvider="AspNetSqlRoleProvider">
       <providers>
         <clear />
-        <add connectionStringName="HeuristicLab.Authentication" applicationName="HeuristicLab.Authentication"
-          name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" />
+        <add connectionStringName="HeuristicLab.Authentication" applicationName="HeuristicLab.Authentication" name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" />
+        <!-- add applicationName="MockupProvider" name="MockupRoleProvider" type="HeuristicLab.Services.Optimization.ControllerService.Mockup.MockupRoleProvider" /-->
       </providers>
     </roleManager>
@@ -101,4 +93,5 @@
       </providers>
     </sessionState>
+
   </system.web>
   <system.webServer>
@@ -128,13 +121,13 @@
   <system.serviceModel>
     <diagnostics>
-      <messageLogging logEntireMessage="true" logMalformedMessages="true" logMessagesAtServiceLevel="true" logMessagesAtTransportLevel="true" maxMessagesToLog="3000"/>
+      <messageLogging logEntireMessage="true" logMalformedMessages="true" logMessagesAtServiceLevel="true" logMessagesAtTransportLevel="true" maxMessagesToLog="3000" />
     </diagnostics>
     <bindings>
       <wsHttpBinding>
         <binding name="WSHttpBinding_IControllerService" receiveTimeout="00:10:00" sendTimeout="00:10:00" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647">
-          <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647"/>
+          <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
           <security mode="Message">
-            <transport clientCredentialType="Certificate"/>
-            <message clientCredentialType="UserName"/>
+            <transport clientCredentialType="Certificate" />
+            <message clientCredentialType="UserName" />
           </security>
         </binding>
@@ -142,6 +135,6 @@
           <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
           <security mode="Message">
-            <transport clientCredentialType="Certificate"/>
-            <message clientCredentialType="UserName"/>
+            <transport clientCredentialType="Certificate" />
+            <message clientCredentialType="UserName" />
           </security>
         </binding>
@@ -152,15 +145,17 @@
         <behavior name="ServiceBehaviour_IControllerService">
           <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
-          <serviceMetadata httpGetEnabled="true" httpsGetEnabled="false"/>
+          <serviceMetadata httpGetEnabled="true" httpsGetEnabled="false" />
           <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
-          <serviceDebug httpHelpPageEnabled="true" includeExceptionDetailInFaults="true"/>
-          <serviceAuthorization principalPermissionMode="UseAspNetRoles" roleProviderName="AspNetSqlRoleProvider"/>
+          <serviceDebug httpHelpPageEnabled="true" includeExceptionDetailInFaults="true" />
+          <serviceAuthorization principalPermissionMode="UseAspNetRoles" roleProviderName="AspNetSqlRoleProvider" />
+          <!--serviceAuthorization principalPermissionMode="UseAspNetRoles" roleProviderName="MockupRoleProvider" /-->
           <serviceCredentials>
-            <serviceCertificate findValue="localhost" x509FindType="FindBySubjectName"/>
-            <userNameAuthentication userNamePasswordValidationMode="MembershipProvider" membershipProviderName="AspNetSqlMembershipProvider"/>
+            <serviceCertificate findValue="localhost" x509FindType="FindBySubjectName" />
+            <userNameAuthentication userNamePasswordValidationMode="MembershipProvider" membershipProviderName="AspNetSqlMembershipProvider" />
+            <!--userNameAuthentication userNamePasswordValidationMode="MembershipProvider" membershipProviderName="MockupMembershipProvider" /-->
           </serviceCredentials>
-          <serviceSecurityAudit auditLogLocation="Application" suppressAuditFailure="false" messageAuthenticationAuditLevel="SuccessOrFailure"/>
-          <serviceThrottling maxConcurrentCalls="100"/>
-          <dataContractSerializer maxItemsInObjectGraph="2147483647"/>
+          <serviceSecurityAudit auditLogLocation="Application" suppressAuditFailure="false" messageAuthenticationAuditLevel="SuccessOrFailure" />
+          <serviceThrottling maxConcurrentCalls="100" />
+          <dataContractSerializer maxItemsInObjectGraph="2147483647" />
         </behavior>
       </serviceBehaviors>
@@ -172,5 +167,5 @@
             </serviceCertificate>
           </clientCredentials>
-          <dataContractSerializer maxItemsInObjectGraph="2147483647"/>
+          <dataContractSerializer maxItemsInObjectGraph="2147483647" />
         </behavior>
       </endpointBehaviors>
@@ -178,31 +173,37 @@
     <services>
       <service behaviorConfiguration="ServiceBehaviour_IControllerService" name="HeuristicLab.Services.Optimization.ControllerService.PlaceholderControllerService">
-        <endpoint address="mex" binding="mexHttpBinding" bindingConfiguration="" name="MexEndpoint" contract="IMetadataExchange"/>
-        <endpoint binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IControllerService" name="WSHttpBinding_IControllerService" contract="HeuristicLab.Services.Optimization.ControllerService.IControllerService"/>
+        <endpoint address="mex" binding="mexHttpBinding" bindingConfiguration="" name="MexEndpoint" contract="IMetadataExchange" />
+        <endpoint binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IControllerService" name="WSHttpBinding_IControllerService" contract="HeuristicLab.Services.Optimization.ControllerService.IControllerService" />
       </service>
     </services>
     <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
     <client>
-      <endpoint address="http://localhost:8080/ControllerService.svc" behaviorConfiguration="LocalCertValidation"
-          binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IControllerService"
-          contract="HeuristicLab.Services.Optimization.ControllerService.IControllerService" name="WSHttpBinding_IControllerService">
-        <identity>
-          <certificate encodedValue="ADJUST_ME" />
-        </identity>
-      </endpoint>
-      <endpoint address="http://127.0.0.1:81/HiveService.svc" behaviorConfiguration="LocalCertValidation"
-         binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IHiveService" contract="HeuristicLab.Clients.Hive.IHiveService" name="WSHttpBinding_IHiveService">
-        <identity>
-          <certificate encodedValue="ADJUST_ME" />
-        </identity>
-      </endpoint>
-      <!--
-      <endpoint address="http://optimization.cloudapp.net/HiveService.svc" behaviorConfiguration="LocalCertValidation"
-         binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IHiveService" contract="HeuristicLab.Clients.Hive.IHiveService" name="WSHttpBinding_IHiveService">
-        <identity>
-          <certificate encodedValue="ADJUST_ME" />
-        </identity>
-      </endpoint>
-      -->
+
+      
+      <endpoint address="http://127.0.0.1:8080/ControllerService.svc" behaviorConfiguration="LocalCertValidation" binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IControllerService" contract="HeuristicLab.Services.Optimization.ControllerService.IControllerService" name="WSHttpBinding_Local_IControllerService">
+        <identity>
+          <certificate encodedValue="ADJUST_ME" />
+        </identity>
+      </endpoint>
+      
+      <endpoint address="http://127.0.0.1:81/HiveService.svc" behaviorConfiguration="LocalCertValidation" binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IHiveService" contract="HeuristicLab.Clients.Hive.IHiveService" name="WSHttpBinding_Local_IHiveService">
+        <identity>
+          <certificate encodedValue="ADJUST_ME" />
+        </identity>
+      </endpoint>
+      
+      
+      <endpoint address="http://optimization1.cloudapp.net:8080/ControllerService.svc" behaviorConfiguration="LocalCertValidation" binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IControllerService" contract="HeuristicLab.Services.Optimization.ControllerService.IControllerService" name="WSHttpBinding_Remote_IControllerService">
+        <identity>
+          <certificate encodedValue="ADJUST_ME" />
+        </identity>
+      </endpoint>
+      
+      <endpoint address="http://optimization1.cloudapp.net/HiveService.svc" behaviorConfiguration="LocalCertValidation" binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IHiveService" contract="HeuristicLab.Clients.Hive.IHiveService" name="WSHttpBinding_Remote_IHiveService">
+        <identity>
+          <certificate encodedValue="ADJUST_ME" />
+        </identity>
+      </endpoint>
+      
     </client>
   </system.serviceModel>
Index: /branches/OaaS/HeuristicLab.Services.Optimization.Web/WebRole.cs
===================================================================
--- /branches/OaaS/HeuristicLab.Services.Optimization.Web/WebRole.cs	(revision 9165)
+++ /branches/OaaS/HeuristicLab.Services.Optimization.Web/WebRole.cs	(revision 9166)
@@ -29,5 +29,10 @@
       }
 
+      RoleEnvironment.Changed += RoleEnvironmentChanged;
+
       return base.OnStart();
+    }
+
+    private void RoleEnvironmentChanged(object sender, RoleEnvironmentChangedEventArgs e) {
     }
   }
Index: /branches/OaaS/HeuristicLab.Services.Optimization/ServiceConfiguration.Cloud.cscfg
===================================================================
--- /branches/OaaS/HeuristicLab.Services.Optimization/ServiceConfiguration.Cloud.cscfg	(revision 9165)
+++ /branches/OaaS/HeuristicLab.Services.Optimization/ServiceConfiguration.Cloud.cscfg	(revision 9166)
@@ -24,4 +24,7 @@
       <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountEncryptedPassword" value="MIIBnQYJKoZIhvcNAQcDoIIBjjCCAYoCAQAxggFOMIIBSgIBADAyMB4xHDAaBgNVBAMME1dpbmRvd3MgQXp1cmUgVG9vbHMCEBiSEYQzfxGpQrRVsLegHyUwDQYJKoZIhvcNAQEBBQAEggEALEyQxFoVGXNmWbDtfIra3tjA33W3n9ESgfWKGKv3f0Zsggkm3OzznfY9A8HIoZ7WMOvjl8l8gjQTSxSKGJG8052JM1V7y16jM/bjtShmk7N9h2vdX0rjxXLpdXjGji59PeL6rKiGu2ewPbJhNhvdTStqnpHydnvlb79J2ZbK8E5f+7ngCD7Gy9RQc8zm+1y3UzoqXxZlSVKhsVIvZMoIOuJM4TO7klDZJEsG3Rx/CUXFPAPf15H46t1B0zy2FrMW32BeWFr40qbUW+tKjg8Uiiw4EhHDtqryhzE3ZkjoR0iz7KUQBPDtvq8rSz049EW6ejgGuI2jDyW3iLfIeqfZEzAzBgkqhkiG9w0BBwEwFAYIKoZIhvcNAwcECFNbToWlDaTpgBAOc6871l7N2o4Mut92Cooo" />
       <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountExpiration" value="2013-07-05T23:59:59.0000000+02:00" />
+      <Setting name="Cloudia.WindowsAzure.Storage" value="ADJUST_ME" />
+      <Setting name="HiveEndpointName" value="WSHttpBinding_Remote_IHiveService" />
+      <Setting name="ControllerEndpointName" value="WSHttpBinding_Remote_IControllerService" />
     </ConfigurationSettings>
     <Certificates>
Index: /branches/OaaS/HeuristicLab.Services.Optimization/ServiceConfiguration.Local.cscfg
===================================================================
--- /branches/OaaS/HeuristicLab.Services.Optimization/ServiceConfiguration.Local.cscfg	(revision 9165)
+++ /branches/OaaS/HeuristicLab.Services.Optimization/ServiceConfiguration.Local.cscfg	(revision 9166)
@@ -24,4 +24,7 @@
       <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountEncryptedPassword" value="MIIBnQYJKoZIhvcNAQcDoIIBjjCCAYoCAQAxggFOMIIBSgIBADAyMB4xHDAaBgNVBAMME1dpbmRvd3MgQXp1cmUgVG9vbHMCEBiSEYQzfxGpQrRVsLegHyUwDQYJKoZIhvcNAQEBBQAEggEALEyQxFoVGXNmWbDtfIra3tjA33W3n9ESgfWKGKv3f0Zsggkm3OzznfY9A8HIoZ7WMOvjl8l8gjQTSxSKGJG8052JM1V7y16jM/bjtShmk7N9h2vdX0rjxXLpdXjGji59PeL6rKiGu2ewPbJhNhvdTStqnpHydnvlb79J2ZbK8E5f+7ngCD7Gy9RQc8zm+1y3UzoqXxZlSVKhsVIvZMoIOuJM4TO7klDZJEsG3Rx/CUXFPAPf15H46t1B0zy2FrMW32BeWFr40qbUW+tKjg8Uiiw4EhHDtqryhzE3ZkjoR0iz7KUQBPDtvq8rSz049EW6ejgGuI2jDyW3iLfIeqfZEzAzBgkqhkiG9w0BBwEwFAYIKoZIhvcNAwcECFNbToWlDaTpgBAOc6871l7N2o4Mut92Cooo" />
       <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountExpiration" value="2013-07-05T23:59:59.0000000+02:00" />
+      <Setting name="Cloudia.WindowsAzure.Storage" value="ADJUST_ME" />
+      <Setting name="HiveEndpointName" value="WSHttpBinding_Local_IHiveService" />
+      <Setting name="ControllerEndpointName" value="WSHttpBinding_Local_IControllerService" />
     </ConfigurationSettings>
     <Certificates>
Index: /branches/OaaS/HeuristicLab.Services.Optimization/ServiceDefinition.build.csdef
===================================================================
--- /branches/OaaS/HeuristicLab.Services.Optimization/ServiceDefinition.build.csdef	(revision 9165)
+++ /branches/OaaS/HeuristicLab.Services.Optimization/ServiceDefinition.build.csdef	(revision 9166)
@@ -32,9 +32,4 @@
       <Certificate name="localhost" storeLocation="LocalMachine" storeName="My" />
     </Certificates>
-    <Contents>
-      <Content destination=".\">
-        <SourceDirectory path="rcf/Debug/HeuristicLab.Services.Hive.WebRoleContent\" />
-      </Content>
-    </Contents>
   </WebRole>
   <WebRole name="HeuristicLab.Services.Optimization.Web" vmsize="Small">
@@ -56,4 +51,9 @@
       <Certificate name="localhost" storeLocation="LocalMachine" storeName="My" />
     </Certificates>
+    <ConfigurationSettings>
+      <Setting name="Cloudia.WindowsAzure.Storage" />
+      <Setting name="HiveEndpointName" />
+      <Setting name="ControllerEndpointName" />
+    </ConfigurationSettings>
   </WebRole>
 </ServiceDefinition>
Index: /branches/OaaS/HeuristicLab.Services.Optimization/ServiceDefinition.csdef
===================================================================
--- /branches/OaaS/HeuristicLab.Services.Optimization/ServiceDefinition.csdef	(revision 9165)
+++ /branches/OaaS/HeuristicLab.Services.Optimization/ServiceDefinition.csdef	(revision 9166)
@@ -42,4 +42,9 @@
       <Certificate name="localhost" storeLocation="LocalMachine" storeName="My" />
     </Certificates>
+    <ConfigurationSettings>
+      <Setting name="Cloudia.WindowsAzure.Storage" />
+      <Setting name="HiveEndpointName" />
+      <Setting name="ControllerEndpointName" />
+    </ConfigurationSettings>
   </WebRole>
 </ServiceDefinition>
