Changeset 9166


Ignore:
Timestamp:
01/15/13 15:50:53 (8 years ago)
Author:
fschoepp
Message:

#1888:

  • Model: OptimizationScenario may be a tree of algorithms (and problems)
  • Model: Renamed InputParameters to ProblemParameters (as they are the parameters of a problem)
  • Model: Added JobExecutionDetails which contain Repetitions + Group (resource to use)
  • ScenarioParser parses the new XML scenario files
  • Website + Model: You are now able to add/remove rows from a table (no JavaScript involved yet)
  • Website + Controller: Added repetitions (enables batch jobs) and group (resource to use) to OaaS which will be used by the controller to schedule the job
  • Website: Updated templates to use new model structure
  • Website + Scenarios: Added the new algorithm Benchmark Algorithm
  • Controller: Added a singleton to make the (Azure/Mockup)-DAL exchangeable
  • Controller: Added mockup classes for DAL + IScenarioManager
  • Website/Result Page: Line Diagrams will be added via JavaScript, crawling their data using AJAX
  • Website: Most configuration parameters can be set in the ServiceDefinition directly
  • Added a mockup for the Membership classes: These can be used if no network connection is available or if other parts of the app shall be tested
  • Scenarios: Updated TSP mappings to new xsd
Location:
branches/OaaS
Files:
14 added
1 deleted
49 edited

Legend:

Unmodified
Added
Removed
  • branches/OaaS/HeuristicLab 3.3 Hive.Slave.sln

    r8251 r9166  
    9595    {7C4B1DE4-FC9A-4448-BCF8-3CB3FA3CB8FA}.Release|x86.Build.0 = Release|x86
    9696    {57E37188-4523-4F8D-8CEF-AE0AA27BB754}.Debug|Any CPU.ActiveCfg = Debug
    97     {57E37188-4523-4F8D-8CEF-AE0AA27BB754}.Debug|Any CPU.Build.0 = Debug
    9897    {57E37188-4523-4F8D-8CEF-AE0AA27BB754}.Debug|x64.ActiveCfg = Debug
    9998    {57E37188-4523-4F8D-8CEF-AE0AA27BB754}.Debug|x64.Build.0 = Debug
     
    119118    {BA8001DE-E83C-4B1F-8B2E-2695C4222491}.Release|x86.Build.0 = Release|x86
    120119    {C16CA1A6-7AE8-4B87-A6A6-9C290E8B9646}.Debug|Any CPU.ActiveCfg = Debug
    121     {C16CA1A6-7AE8-4B87-A6A6-9C290E8B9646}.Debug|Any CPU.Build.0 = Debug
    122120    {C16CA1A6-7AE8-4B87-A6A6-9C290E8B9646}.Debug|x64.ActiveCfg = Debug
    123121    {C16CA1A6-7AE8-4B87-A6A6-9C290E8B9646}.Debug|x64.Build.0 = Debug
  • branches/OaaS/HeuristicLab 3.3 Services.sln

    r8545 r9166  
    3939    Release.AspNetCompiler.FixedNames = "false"
    4040    Release.AspNetCompiler.Debug = "False"
    41     VWDPort = "48545"
     41    VWDPort = "25129"
    4242    VWDVirtualPath = "/Hive-3.3"
    4343    DefaultWebSiteLanguage = "Visual C#"
     
    191191    {F685556B-F6EB-4143-8E7E-662D00FDD299}.Release|x86.Build.0 = Release|x86
    192192    {034C2EE4-E303-4E45-98AB-F0074EC83B81}.Debug|Any CPU.ActiveCfg = Debug
    193     {034C2EE4-E303-4E45-98AB-F0074EC83B81}.Debug|Any CPU.Build.0 = Debug
    194193    {034C2EE4-E303-4E45-98AB-F0074EC83B81}.Debug|Mixed Platforms.ActiveCfg = Debug
    195194    {034C2EE4-E303-4E45-98AB-F0074EC83B81}.Debug|Mixed Platforms.Build.0 = Debug
     
    335334    {E0095F29-604B-4EE8-9EE8-8187DA3B24F1}.Release|x86.ActiveCfg = Release|Any CPU
    336335    {D6DD768C-707C-415A-B9F8-C1F7668F8560}.Debug|Any CPU.ActiveCfg = Debug|x86
     336    {D6DD768C-707C-415A-B9F8-C1F7668F8560}.Debug|Any CPU.Build.0 = Debug|x86
    337337    {D6DD768C-707C-415A-B9F8-C1F7668F8560}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
    338338    {D6DD768C-707C-415A-B9F8-C1F7668F8560}.Debug|Mixed Platforms.Build.0 = Debug|x86
  • branches/OaaS/HeuristicLab.Services.Optimization

    • Property svn:ignore
      •  

        old new  
        22csx
        33obj
         4rcf
  • branches/OaaS/HeuristicLab.Services.Optimization.Controller/Azure/DAL.cs

    r8958 r9166  
    66using Microsoft.WindowsAzure;
    77using Microsoft.WindowsAzure.StorageClient;
     8using Microsoft.WindowsAzure.ServiceRuntime;
     9using System.Diagnostics;
    810
    911namespace HeuristicLab.Services.Optimization.ControllerService.Azure {
     
    98100      get {
    99101        if (storageAccount == null) {
    100           storageAccount = CloudStorageAccount.Parse(CloudConfigurationManager.GetSetting(AzureConstants.CLOUD_SETTINGS_KEY));
     102          try {
     103            storageAccount = CloudStorageAccount.Parse(CloudConfigurationManager.GetSetting(AzureConstants.CLOUD_SETTINGS_KEY));
     104          }
     105          catch (Exception ex) {
     106            Trace.WriteLine(ex.Message);
     107            storageAccount = CloudStorageAccount.Parse("DefaultEndpointsProtocol=https;AccountName=optimizationstorage1;AccountKey=n7Leom8ZFWkof/VQ2a4aRSvwOlX+Gwr3uojQF9CFJw1osmGCV0WwaNC8s7nkZ+qteLduAgW2l75WFpbXrkvG4Q==");
     108          }
    101109        }
    102110        return storageAccount;
  • branches/OaaS/HeuristicLab.Services.Optimization.Controller/HL/HLMapper.cs

    r8958 r9166  
    1111namespace HeuristicLab.Services.Optimization.ControllerService {
    1212  public interface IScenarioMapper {
    13     void MapScenario(OptimizationScenario scenario, IAlgorithm algorithm);
     13    void MapScenario(OptimizationScenario scenario, out IAlgorithm algorithm);
    1414  }
    1515
     
    1818      var dv = parameter.Value as DecimalValue;
    1919      return new DoubleValue(dv.Value);     
     20    }
     21
     22    public static T Create<T>(Parameter typeParameter) {
     23      var type = Type.GetType((typeParameter.Value as TypeValue).Value);     
     24      return (T)Activator.CreateInstance(type, null);
    2025    }
    2126
  • branches/OaaS/HeuristicLab.Services.Optimization.Controller/HL/HiveMapper.cs

    r8958 r9166  
    77namespace HeuristicLab.Services.Optimization.ControllerService.Model {
    88  public static class HiveMapper {   
    9     public static double FindDoubleValue(this InputParameters ip, string what) {     
     9    public static double FindDoubleValue(this ProblemParameters ip, string what) {     
    1010      foreach (var param in ip.Items) {
    1111        if (param.Value.Name == what) {
  • branches/OaaS/HeuristicLab.Services.Optimization.Controller/HL/HiveScenarioManager.cs

    r9062 r9166  
    2020using HeuristicLab.Services.Optimization.ControllerService.Azure;
    2121using System.Data;
     22using HeuristicLab.Services.Optimization.ControllerService.General;
    2223
    2324namespace HeuristicLab.Services.Optimization.ControllerService {
     
    4344    private static object lockable;
    4445    private Dictionary<string, IScenarioMapper> mappers = new Dictionary<string, IScenarioMapper>();
    45     private IDataAccessLayer dal = new AzureDataAccessLayer();
     46    private IDataAccessLayer dal = DataAccessLayerProvider.GetLayer();
    4647
    4748    public static readonly string SCENARIO_TABLE = "Scenario";
     
    5152    }
    5253
    53     public void DispatchScenario(Model.User user, Model.OptimizationScenario scenario) {
    54       Experiment experiment = new Experiment();
    55       var problem = new TravelingSalesmanProblem();
    56       var algo = new GeneticAlgorithm();
    57       algo.Problem = problem;     
     54    public void DispatchScenario(Model.User user, Model.OptimizationScenario scenario, JobExecutionDetails details) {
     55      // Experiment experiment = new Experiment();
     56      // var problem = new TravelingSalesmanProblem();
     57      // var algo = new GeneticAlgorithm();
     58      // algo.Problem = problem;     
    5859     
    5960      IScenarioMapper mapper = GetMapper(scenario);
    60       mapper.MapScenario(scenario, algo); 
    61 
    62       //experiment.Optimizers.Add(algo);
    63       SendExperimentToHive(user, algo);
     61      IAlgorithm algo;
     62      mapper.MapScenario(scenario, out algo);
     63      if (details.Repititions > 1) {
     64        BatchRun br = new BatchRun();
     65        //br.Name = details.JobTitle;
     66        br.Optimizer = algo;       
     67        br.Repetitions = details.Repititions;
     68        SendExperimentToHive(user, br, details);
     69      }
     70      else {       
     71        SendExperimentToHive(user, algo, details);
     72      }
    6473    }
    6574
     
    7382    }
    7483
    75     private IScenarioMapper CompileMapper(string scenarioMapper) {
     84    public static IScenarioMapper CompileMapper(string scenarioMapper) {
    7685       // http://stackoverflow.com/questions/3188882/compile-and-run-dynamic-code-without-generating-exe
    7786      using (var csCodeProvider = new Microsoft.CSharp.CSharpCodeProvider()) {
     
    105114
    106115    private IScenarioMapper GetMapper(Model.OptimizationScenario scenario) {
    107       if (!mappers.ContainsKey(scenario.Name)) {
     116      var id = scenario.Id;
     117      if (!mappers.ContainsKey(id)) {
    108118        lock (lockable) {
    109           if (mappers.ContainsKey(scenario.Name))
    110             return mappers[scenario.Name];
     119          if (mappers.ContainsKey(id))
     120            return mappers[id];
    111121         
    112           var mapperString = GetMapperFromBlobStore(scenario.Name);
     122          var mapperString = GetMapperFromBlobStore(id);
    113123          var mapper = CompileMapper(mapperString);
    114124
    115           mappers[scenario.Name] = mapper;
     125          mappers[id] = mapper;
    116126          return mapper;
    117127        } // lock       
     
    120130     } 
    121131
    122     private void MapExperiment(Model.OptimizationScenario scenario, IAlgorithm algorithm) {     
     132    private void MapExperiment(Model.OptimizationScenario scenario, out IAlgorithm algorithm) {     
    123133      IScenarioMapper mapper = GetMapper(scenario);
    124       mapper.MapScenario(scenario, algorithm);     
    125     }
    126 
    127     private void SendExperimentToHive(Model.User user, IAlgorithm exp) {
     134      mapper.MapScenario(scenario, out algorithm);     
     135    }
     136
     137    private void ConfigureHive(Model.User user) {
     138      HiveServiceLocator.Instance.Username = user.Username;
     139      HiveServiceLocator.Instance.Password = user.Password;
     140      HiveServiceLocator.Instance.EndpointConfigurationName = Configuration.HiveEndpointName;     
     141    }
     142
     143    private void SendExperimentToHive(Model.User user, IOptimizer exp, JobExecutionDetails details) {     
    128144      var job = new RefreshableJob();
    129145      job.IsAllowedPrivileged = true;     
    130       job.Job.Name = "Web Scheduled Traveling Salesman Job";
    131       job.Job.ResourceNames = "TESTGROUP";
    132       job.RefreshAutomatically = false;
     146      job.Job.Name = details.JobTitle;
     147      job.Job.ResourceNames = details.Group;     
     148      job.RefreshAutomatically = false;     
     149      if (exp.ExecutionState != ExecutionState.Prepared) {
     150        exp.Prepare();
     151      }     
    133152      job.HiveTasks.Add(new OptimizerHiveTask(exp));
    134       HiveServiceLocator.Instance.Username = user.Username;
    135       HiveServiceLocator.Instance.Password = user.Password;
    136       HiveServiceLocator.Instance.EndpointConfigurationName = "WSHttpBinding_IHiveService";
     153      ConfigureHive(user);
    137154     
    138155      HiveClient.StartJob((ex) => {
     
    145162
    146163    public IList<Model.Job> GetJobs(User user) {
    147       HiveServiceLocator.Instance.Username = user.Username;
    148       HiveServiceLocator.Instance.Password = user.Password;
    149       HiveServiceLocator.Instance.EndpointConfigurationName = "WSHttpBinding_IHiveService";
     164      ConfigureHive(user);
    150165      var jobsLoaded = HiveServiceLocator.Instance.CallHiveService<IEnumerable<HeuristicLab.Clients.Hive.Job>>(s => s.GetJobs());
    151166      IList<Model.Job> jobs = new List<Model.Job>();
    152      
     167
    153168      foreach (var job in jobsLoaded) {
    154169        jobs.Add(ConvertJob(user, job));
     
    163178      if (job.CalculatingCount > 0)
    164179        state = JobState.Calculating;
    165       else if (job.JobCount == job.FinishedCount)
     180      else if (job.JobCount > 0 && job.JobCount == job.FinishedCount)
    166181        state = JobState.Finished;
    167182      else
    168183        state = JobState.Waiting;
    169       /*var jobTasks = HiveServiceLocator.Instance.CallHiveService<IEnumerable<HeuristicLab.Clients.Hive.LightweightTask>>(s => s.GetLightweightJobTasks(job.Id));
    170      
    171       foreach (var task in jobTasks) {       
    172         switch (task.State) {
    173           case TaskState.Aborted:
    174             state = JobState.Aborted;
    175             break;
    176           case TaskState.Failed:
    177             state = JobState.Failed;
    178             break;
    179         }
    180       }
    181       if (!state.HasValue) {
    182         if (job.CalculatingCount > 0)
    183           state = JobState.Calculating;
    184         else if (waitingJobs > 0)
    185           state = JobState.Waiting;
    186         else
    187           state = JobState.Finished;       
    188       }*/
    189184      return new Model.Job() { Id = job.Id.ToString(), Name = job.Name, Resource = job.ResourceNames, State = state.Value, DateCreated = job.DateCreated };
    190185    }
     
    192187
    193188    public Model.Job GetJob(User user, string id) {
    194       HiveServiceLocator.Instance.Username = user.Username;
    195       HiveServiceLocator.Instance.Password = user.Password;
    196       HiveServiceLocator.Instance.EndpointConfigurationName = "WSHttpBinding_IHiveService";
     189      ConfigureHive(user);
    197190      var guid = Guid.Parse(id);
    198191      return ConvertJob(user, HiveServiceLocator.Instance.CallHiveService<HeuristicLab.Clients.Hive.Job>(s => s.GetJob(guid)));
     
    201194
    202195    public void DeleteJob(User user, string id) {
    203       HiveServiceLocator.Instance.Username = user.Username;
    204       HiveServiceLocator.Instance.Password = user.Password;
    205       HiveServiceLocator.Instance.EndpointConfigurationName = "WSHttpBinding_IHiveService";
     196      ConfigureHive(user);
    206197      var guid = Guid.Parse(id);
    207198      HiveServiceLocator.Instance.CallHiveService(s => s.DeleteJob(guid));     
     
    209200
    210201    public IList<Model.Run> GetJobResults(User user, string id) {
    211       HiveServiceLocator.Instance.Username = user.Username;
    212       HiveServiceLocator.Instance.Password = user.Password;
    213       HiveServiceLocator.Instance.EndpointConfigurationName = "WSHttpBinding_IHiveService";
     202      ConfigureHive(user);
    214203      var guid = Guid.Parse(id);
    215204      var jobTasks = HiveServiceLocator.Instance.CallHiveService<IEnumerable<HeuristicLab.Clients.Hive.LightweightTask>>(s => s.GetLightweightJobTasks(guid));
  • branches/OaaS/HeuristicLab.Services.Optimization.Controller/HL/ScenarioParser.cs

    r8958 r9166  
    99using HeuristicLab.Services.Optimization.ControllerService.Azure;
    1010using HeuristicLab.Services.Optimization.ControllerService.Interfaces;
     11using System.Diagnostics;
    1112
    1213namespace HeuristicLab.Services.Optimization.ControllerService {
     
    1516    private static object lockable = new object();
    1617
    17     private IDataAccessLayer dal = new AzureDataAccessLayer();
     18    private IDataAccessLayer dal = DataAccessLayerProvider.GetLayer();
    1819
    1920    public IList<Model.OptimizationScenario> Scenarios {
     
    3233    public Model.OptimizationScenario GetByName(string name) {
    3334      foreach (var scen in Scenarios) {
    34         if (scen.Name == name) {
     35        if (scen.Id == name) {
    3536          return scen;
    3637        }
     
    115116    } */
    116117
     118    private Model.Problem ParseProblem(XmlReader reader) {
     119      var problem = new Model.Problem();
     120      while (reader.Read()) {
     121        if (reader.NodeType == XmlNodeType.EndElement)
     122          break;
     123        if (reader.Name == "parameters")
     124          problem.Parameters.Items = ParseParameters(reader);
     125      }
     126      return problem;
     127    }
     128
     129    private void ParseAlgorithms(out IList<Model.Algorithm> algos, XmlReader reader) {
     130      algos = new List<Model.Algorithm>();
     131      var depth = reader.Depth;
     132      do {
     133        if (reader.Name == "algorithm" && reader.Depth == depth) {
     134          var innerAlg = new Model.Algorithm();
     135          algos.Add(innerAlg);
     136         
     137          innerAlg.Mapper = reader.GetAttribute("mapper");
     138          reader.Read();
     139          for (;;) {
     140            if (reader.Name == "algorithm" && reader.NodeType == XmlNodeType.EndElement)
     141              break;
     142
     143            if (reader.Name == "parameters" && reader.NodeType == XmlNodeType.Element) {
     144              innerAlg.Parameters.Items = ParseParameters(reader);
     145              continue;
     146            }
     147            else if (reader.Name == "problem" && reader.NodeType == XmlNodeType.Element) {
     148              innerAlg.Problem = ParseProblem(reader);
     149              continue;
     150            }
     151            else if (reader.Name == "algorithm" && reader.NodeType == XmlNodeType.Element) {
     152              IList<Model.Algorithm> childAlgos;
     153              ParseAlgorithms(out childAlgos, reader);
     154              innerAlg.ChildAlgorithms = childAlgos;
     155              //TODO: Test with child algorithms
     156              continue;
     157            }
     158            reader.Read();
     159          }
     160        }
     161      } while (reader.Read() && reader.Depth >= depth);
     162    }
     163
     164    private Model.OptimizationScenario ParseScenarioElement(XmlReader reader) {
     165      var scenario = new Model.OptimizationScenario();
     166      var depth = reader.Depth;
     167      while (reader.Depth >= depth) {
     168        if (reader.Name == "scenario" && reader.NodeType == XmlNodeType.EndElement)
     169          break;
     170
     171        if (reader.Name == "name") {
     172          scenario.Id = reader.ReadElementContentAsString();
     173          continue;
     174        }
     175        else if (reader.Name == "algorithm") {
     176          IList<Model.Algorithm> algos;
     177          ParseAlgorithms(out algos, reader);
     178          scenario.Algorithm = algos;
     179          continue;
     180        }
     181        reader.Read();
     182      }
     183      return scenario;
     184    }
     185
    117186    private Model.OptimizationScenario ParseScenario(StringReader str) {
    118187      // Set the validation settings.     
     
    120189      var settings = GetSettings();
    121190      settings.ValidationEventHandler += (sender, args) => {
    122         Console.WriteLine(args.Message);
     191        Trace.WriteLine(args.Message);
    123192        isErrorPresent = true;
    124193      };
    125       Model.OptimizationScenario scenario = null;
     194      Model.OptimizationScenario scenario = null;     
    126195      using (var reader = XmlReader.Create(str, settings)) {       
    127         while (!isErrorPresent && !reader.EOF) {
     196        while (!reader.EOF) {
    128197          if (reader.Name == "scenario" && reader.NodeType == XmlNodeType.Element) {
    129             scenario = new Model.OptimizationScenario();
    130             scenario.ProblemType = reader.GetAttribute("mapper");
    131             scenario.ProblemType = reader.GetAttribute("algorithmType");
    132             scenario.ProblemType = reader.GetAttribute("problemType");
    133           }
    134           else if (reader.Name == "name") {
    135             scenario.Name = reader.ReadElementContentAsString();
    136             continue;
    137           }
    138           else if (reader.Name == "problemParameters") {
    139             IList<Model.Parameter> problemParameters = ParseParameters(reader);
    140             foreach (var param in problemParameters)
    141               scenario.InputParameters.Items.Add(param);
    142           }
    143           else if (reader.Name == "algorithmParameters") {
    144             IList<Model.Parameter> algoParameters = ParseParameters(reader);
    145             foreach (var param in algoParameters)
    146               scenario.AlgorithmParameters.Items.Add(param);
     198            scenario = ParseScenarioElement(reader);           
    147199          }
    148200          reader.Read();
     
    185237      IList<Model.Parameter> parameters = new List<Model.Parameter>();
    186238      while (reader.Read()) {
    187         if (reader.Name.EndsWith("Parameters"))
     239        if (reader.Name == "parameters" && reader.NodeType == XmlNodeType.EndElement)
    188240          break;
    189241        // parse parameter
    190         if (reader.Depth == 2 && reader.Name == "param" && reader.NodeType == XmlNodeType.Element) {
     242        if (reader.Name == "param" && reader.NodeType == XmlNodeType.Element) {
    191243          var param = new Model.Parameter();
    192244          var typeAtt = reader.GetAttribute("type");
  • branches/OaaS/HeuristicLab.Services.Optimization.Controller/HeuristicLab.Services.Optimization.ControllerService.csproj

    r9062 r9166  
    3636      <HintPath>..\bin\ALGLIB-3.5.0.dll</HintPath>
    3737    </Reference>
     38    <Reference Include="HeuristicLab.ALGLIB-3.5.0">
     39      <HintPath>..\bin\HeuristicLab.ALGLIB-3.5.0.dll</HintPath>
     40    </Reference>
     41    <Reference Include="HeuristicLab.Algorithms.Benchmarks-3.3">
     42      <HintPath>..\bin\HeuristicLab.Algorithms.Benchmarks-3.3.dll</HintPath>
     43    </Reference>
    3844    <Reference Include="HeuristicLab.Algorithms.GeneticAlgorithm-3.3">
    3945      <HintPath>..\bin\HeuristicLab.Algorithms.GeneticAlgorithm-3.3.dll</HintPath>
     
    9298      <HintPath>..\bin\HeuristicLab.Operators-3.3.dll</HintPath>
    9399    </Reference>
     100    <Reference Include="HeuristicLab.Operators.Views.GraphVisualization-3.3">
     101      <HintPath>..\bin\HeuristicLab.Operators.Views.GraphVisualization-3.3.dll</HintPath>
     102    </Reference>
    94103    <Reference Include="HeuristicLab.Optimization-3.3">
    95104      <HintPath>..\HeuristicLab.Optimization\3.3\obj\Debug\HeuristicLab.Optimization-3.3.dll</HintPath>
     
    129138      <SpecificVersion>False</SpecificVersion>
    130139      <HintPath>..\bin\HeuristicLab.Selection-3.3.dll</HintPath>
     140    </Reference>
     141    <Reference Include="HeuristicLab.SequentialEngine-3.3">
     142      <HintPath>..\bin\HeuristicLab.SequentialEngine-3.3.dll</HintPath>
    131143    </Reference>
    132144    <Reference Include="HeuristicLab.Tracing-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     
    153165  <ItemGroup>
    154166    <Compile Include="Azure\DAL.cs" />
    155     <Compile Include="HL\HiveScenarioManagerOld.cs" />
     167    <Compile Include="General\Configuration.cs" />
    156168    <Compile Include="HL\HiveMapper.cs" />
    157169    <Compile Include="HL\HiveScenarioManager.cs" />
     
    161173    <Compile Include="Interfaces\IScenarioManager.cs" />
    162174    <Compile Include="Interfaces\Model\ControllerModel.cs" />
     175    <Compile Include="Mockup\MockupDAL.cs" />
     176    <Compile Include="Mockup\MockupScenarioManager.cs" />
    163177    <Compile Include="PlaceholderControllerService.cs" />
    164178    <Compile Include="Properties\AssemblyInfo.cs" />
     
    172186    <None Include="packages.config" />
    173187  </ItemGroup>
     188  <ItemGroup />
    174189  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
    175190  <PropertyGroup>
  • branches/OaaS/HeuristicLab.Services.Optimization.Controller/Interfaces/DAL.cs

    r8958 r9166  
    2727    IBlobDao CreateBlobDao();
    2828  }
     29
     30  public static class DataAccessLayerProvider {   
     31    private static IDataAccessLayer layer = new Azure.AzureDataAccessLayer();
     32    //private static IDataAccessLayer layer = new Mockup.MockupDataAccessLayer();
     33
     34    public static IDataAccessLayer GetLayer() {
     35      return layer;
     36    }
     37  }
    2938}
    3039
  • branches/OaaS/HeuristicLab.Services.Optimization.Controller/Interfaces/IControllerService.cs

    r8958 r9166  
    2020
    2121    [OperationContract]
    22     void ScheduleOptimizationScenario(User user, OptimizationScenario scenario);
     22    void ScheduleOptimizationScenario(User user, OptimizationScenario scenario, JobExecutionDetails details);
    2323
    2424    [OperationContract]
  • branches/OaaS/HeuristicLab.Services.Optimization.Controller/Interfaces/IScenarioManager.cs

    r8958 r9166  
    77namespace HeuristicLab.Services.Optimization.ControllerService.Interfaces {
    88  public interface IScenarioManager {
    9     void DispatchScenario(User user, OptimizationScenario scenario);
     9    void DispatchScenario(User user, OptimizationScenario scenario, JobExecutionDetails details);
    1010    IList<Job> GetJobs(User user);
    1111    Job GetJob(User user, string id);
  • branches/OaaS/HeuristicLab.Services.Optimization.Controller/Interfaces/Model/ControllerModel.cs

    r9062 r9166  
    4545    public string[] RowNames { get; set; }
    4646
     47    public void CopyRow(int index) {
     48      var newData = new double[Value.Length + 1][];
     49      var copyRow = new double[Value[index].Length];
     50      for (var i = 0; i < copyRow.Length; i++) {
     51        copyRow[i] = Value[index][i];
     52      }
     53      for (var i = 0; i < newData.Length; i++) {
     54        if (i < index) {
     55          newData[i] = Value[i];
     56        }
     57        else if (i == index) {
     58          newData[i] = copyRow;
     59        }
     60        else if (i > index) {
     61          newData[i] = Value[i - 1];
     62        }
     63      }
     64      Value = newData;
     65    }
     66
     67    public void DeleteRow(int index) {
     68      if (Value.Length == 1)
     69        return;
     70
     71      var newData = new double[Value.Length - 1][];
     72      for (var i = 0; i < Value.Length; i++) {
     73        if (i < index) {
     74          newData[i] = Value[i];
     75        }
     76        else if (i > index) {
     77          newData[i - 1] = Value[i];
     78        }
     79      }
     80      Value = newData;
     81    }
     82
    4783    public override bool TrySetFromString(string input) {
    4884      var splitted = input.Split(':');
     
    6197        return false;
    6298      // very, very buggy
    63       if (i >= Value.Length || j >= Value[0].Length ) {
     99      /*if (i >= Value.Length || j >= Value[0].Length ) {
    64100        double[][] valueArr = new double[i >= Value.GetLength(0) ? i : Value.GetLength(0)][];       
    65101        for (int k = 0; k < Value.Length; k++) {
     
    70106        }
    71107        Value = valueArr;
    72       }
     108      }*/
    73109
    74110      Value[i][j] = value;
     
    186222
    187223  [DataContract]
    188   public class InputParameters {
     224  public class ProblemParameters {
    189225    private IList<Parameter> items = new List<Parameter>();
    190226
     
    226262
    227263  [DataContract]
     264  public class Problem {
     265    public Problem() { Parameters = new ProblemParameters(); }
     266
     267    [DataMember]
     268    public ProblemParameters Parameters { get; set; }
     269
     270    [DataMember]
     271    public string Class { get; set; }
     272  }
     273
     274  [DataContract]
     275  public class Algorithm {
     276    public Algorithm() { Parameters = new AlgorithmParameters(); }
     277
     278    [DataMember]
     279    public AlgorithmParameters Parameters { get; set; }
     280
     281    [DataMember]
     282    public Problem Problem{ get; set; }
     283
     284    [DataMember]
     285    public IList<Algorithm> ChildAlgorithms { get; set; }
     286
     287    [DataMember]
     288    public string Class { get; set; }
     289
     290    [DataMember]
     291    public string Mapper { get; set; }
     292  }
     293
     294  [DataContract]
    228295  public class OptimizationScenario {
    229296    [DataMember]
     297    public string Id { get; set; }
     298   
     299    [DataMember]
     300    public IList<Algorithm> Algorithm { get; set; }
     301
     302    public Algorithm FirstAlgorithm { get { return Algorithm.FirstOrDefault(); } } 
     303  }
     304
     305  [DataContract]
     306  public class Experiment {
     307    [DataMember]
     308    public IList<OptimizationScenario> Scenarios { get; set; }
     309
     310    public Experiment() {
     311      Scenarios = new List<OptimizationScenario>();
     312    }
     313  }
     314
     315  [DataContract]
     316  public enum JobState {
     317    [EnumMember]
     318    Waiting,
     319    [EnumMember]
     320    Calculating,
     321    [EnumMember]
     322    Aborted,
     323    [EnumMember]
     324    Failed,
     325    [EnumMember]
     326    Finished
     327  }
     328
     329  [DataContract]
     330  public class JobExecutionDetails {
     331    [DataMember]
     332    public int Repititions { get; set; }
     333
     334    [DataMember]
     335    public string JobTitle { get; set; }
     336
     337    [DataMember]
     338    public string Group { get; set; }
     339  }
     340
     341  [DataContract]
     342  public class Job {
     343    [DataMember]
     344    public string Id { get; set; }
     345
     346    [DataMember]
     347    public JobState State { get; set; }
     348
     349    [DataMember]
    230350    public string Name { get; set; }
    231351
    232352    [DataMember]
    233     public string ProblemType { get; set; }
    234 
    235     [DataMember]
    236     public string AlgorithmType { get; set; }
    237 
    238     [DataMember]
    239     public string MapperType { get; set; }
    240 
    241     private InputParameters inputParams = new InputParameters();
    242 
    243     [DataMember]
    244     public InputParameters InputParameters {
    245       get { return inputParams; }
    246       set { inputParams = value; }
    247     }
    248 
    249 
    250     private AlgorithmParameters algorithmParameters = new AlgorithmParameters();
    251 
    252     [DataMember]
    253     public AlgorithmParameters AlgorithmParameters {
    254       get { return algorithmParameters; }
    255       set { algorithmParameters = value; }
    256     }
    257   }
    258 
    259   [DataContract]
    260   public enum JobState {
    261     [EnumMember]
    262     Waiting,
    263     [EnumMember]
    264     Calculating,
    265     [EnumMember]
    266     Aborted,
    267     [EnumMember]
    268     Failed,
    269     [EnumMember]
    270     Finished
    271   }
    272 
    273   [DataContract]
    274   public class Job {
     353    public string Resource { get; set; }
     354
     355    [DataMember]
     356    public DateTime DateCreated { get; set; }
     357  }
     358
     359  [DataContract]
     360  public class Run {
    275361    [DataMember]
    276362    public string Id { get; set; }
    277363
    278364    [DataMember]
    279     public JobState State { get; set; }
    280 
    281     [DataMember]
    282365    public string Name { get; set; }
    283366
    284367    [DataMember]
    285     public string Resource { get; set; }
    286 
    287     [DataMember]
    288     public DateTime DateCreated { get; set; }
    289   }
    290 
    291   [DataContract]
    292   public class Run {
    293     [DataMember]
    294     public string Id { get; set; }
    295 
    296     [DataMember]
    297     public string Name { get; set; }
    298 
    299     [DataMember]
    300368    public IList<Parameter> Results { get; set; }
    301369  }
  • branches/OaaS/HeuristicLab.Services.Optimization.Controller/PlaceholderControllerService.cs

    r8958 r9166  
    5151      this.scenarios = new List<Model.OptimizationScenario>() { tsp };*/     
    5252      //hiveManager.DispatchScenario(tsp);
     53      //hiveManager = new MockupScenarioManager();
    5354      hiveManager = new HiveScenarioManager();
    5455      scenarios = parser.Scenarios;
     
    6364    public Model.OptimizationScenario GetOptimizationScenarioByName(string name) {
    6465      var scen = (from e in scenarios
    65                   where e.Name == name
     66                  where e.Id == name
    6667                  select e).FirstOrDefault();     
    6768      return scen;
    6869    }
    6970
    70     public void ScheduleOptimizationScenario(Model.User user, Model.OptimizationScenario scenario) {
    71       hiveManager.DispatchScenario(user, scenario);
     71    public void ScheduleOptimizationScenario(Model.User user, Model.OptimizationScenario scenario, JobExecutionDetails details) {
     72      hiveManager.DispatchScenario(user, scenario, details);
    7273    }
    7374
     
    9798        return false;
    9899      }     
    99       var added = hiveManager.AddScenario(user, scenario.Name, scenarioXml, scenarioMapper);
     100      var added = hiveManager.AddScenario(user, scenario.Id, scenarioXml, scenarioMapper);
    100101      if (added)
    101102        scenarios.Add(scenario);
     
    114115    public IEnumerable<string> GetOptimizationScenarioNames() {
    115116      return (from e in scenarios
    116               select e.Name).AsEnumerable();     
     117              select e.Id).AsEnumerable();     
    117118    }
    118119  }
  • branches/OaaS/HeuristicLab.Services.Optimization.ControllerService.Tests/HeuristicLab.Services.Optimization.ControllerService.Tests.csproj

    r8817 r9166  
    4040      <HintPath>..\bin\ALGLIB-3.5.0.dll</HintPath>
    4141    </Reference>
     42    <Reference Include="HeuristicLab.Algorithms.Benchmarks-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     43      <SpecificVersion>False</SpecificVersion>
     44      <HintPath>..\bin\HeuristicLab.Algorithms.Benchmarks-3.3.dll</HintPath>
     45    </Reference>
    4246    <Reference Include="HeuristicLab.Algorithms.GeneticAlgorithm-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    4347      <SpecificVersion>False</SpecificVersion>
  • branches/OaaS/HeuristicLab.Services.Optimization.ControllerService.Tests/Program.cs

    r8817 r9166  
    1212using HeuristicLab.Persistence.Core;
    1313using HeuristicLab.Core;
     14using HeuristicLab.Optimization;
    1415
    1516namespace HeuristicLab.Services.Optimization.ControllerService.Tests {
     
    1718    static void Main(string[] args) {
    1819      Console.WriteLine(AppDomain.CurrentDomain.BaseDirectory);   
    19       //TestScenarioParser();
    20       TestCodeDOM();
     20      TestScenarioParser();
     21      //TestCodeDOM();
    2122      //TestPython();
    2223      //TestOtis();
     
    6566        cp.ReferencedAssemblies.Add("System.dll");
    6667
    67         tsp.BestKnownQuality = HLMapper.ConvertToDoubleValue(scen.InputParameters.FindByName("BestKnownQuality"));
     68        tsp.BestKnownQuality = HLMapper.ConvertToDoubleValue(scen.FirstAlgorithm.Problem.Parameters.FindByName("BestKnownQuality"));
    6869       
    6970        var res = csCodeProvider.CompileAssemblyFromSource(
     
    120121        var type = res.CompiledAssembly.GetType("TSPScenarioMapper");
    121122        var mapper = Activator.CreateInstance(type) as IScenarioMapper;
    122         mapper.MapScenario(scen, algo);
     123        //mapper.MapScenario(scen, algo);
    123124      }     
    124125    }
     
    217218    static void TestScenarioParser() {
    218219      ScenarioParser parser = new ScenarioParser();
    219       var scen = parser.GetByName("Traveling Salesman Problem");
    220       TravelingSalesmanProblem tsp = new TravelingSalesmanProblem();
    221       // proceed with mapping between scen and tsp
     220      //var scen = parser.GetByName("Traveling Salesman Problem");
     221      var scen = parser.GetByName("Benchmark Algorithm");
     222
     223      var mapper = HiveScenarioManager.CompileMapper(
     224@"
     225using System;
     226using System.Collections.Generic;
     227using System.Linq;
     228using System.Text;
     229using HeuristicLab.Data;
     230using HeuristicLab.Services.Optimization.ControllerService.Model;
     231using HeuristicLab.Optimization;
     232using HeuristicLab.Services.Optimization.ControllerService;
     233using HeuristicLab.Algorithms.Benchmarks;
     234using HeuristicLab.Parameters;
     235using HeuristicLab.PluginInfrastructure;
     236
     237
     238namespace HeuristicLab.Mappers {
     239  public class BenchmarkScenarioMapper : IScenarioMapper {
     240    public void MapScenario(OptimizationScenario scenario, out IAlgorithm algorithm) {
     241      var alg = scenario.FirstAlgorithm;
     242      var bm = new BenchmarkAlgorithm();
     243      bm.Benchmark = (IBenchmark) Activator.CreateInstance((from t in ApplicationManager.Manager.GetTypes(typeof(IBenchmark))
     244                        where t.Name == HLMapper.GetStringValue(alg.Parameters.FindByName(""Benchmark""))
     245                       select t).FirstOrDefault());
     246      ((ValueParameter<IntValue>)bm.Parameters[""ChunkSize""]).Value = HLMapper.ConvertToIntValue(alg.Parameters.FindByName(""ChunkSize""));
     247      ((ValueParameter<DoubleValue>)bm.Parameters[""TimeLimit""]).Value = HLMapper.ConvertToDoubleValue(alg.Parameters.FindByName(""TimeLimit""));
     248
     249      algorithm = bm;
    222250    }
    223251  }
    224252}
     253
     254");
     255      IAlgorithm algo;
     256      //mapper = new BenchmarkScenarioMapper();
     257      mapper.MapScenario(scen, out algo);
     258      // proceed with mapping between scen and tsp
     259    }
     260  }
     261}
  • branches/OaaS/HeuristicLab.Services.Optimization.ControllerService.Tests/mappings/scenario.xsd

    r8817 r9166  
    88 <xsd:complexType name="scenarioType">
    99  <xsd:sequence maxOccurs="1">   
    10    <xsd:element name="name" type="xsd:string"/>
    11    <xsd:element name="problemParameters" type="paramsType"/>
    12    <xsd:element name="algorithmParameters" type="paramsType"/>
    13   </xsd:sequence>
    14   <xsd:attribute name="problemType" use="required"/>
    15   <xsd:attribute name="algorithmType" use="required"/>
    16   <xsd:attribute name="mapper" use="required"/>
     10   <xsd:element name="name" minOccurs="1" type="xsd:string"/>   
     11   <xsd:element name="algorithm" minOccurs="1" maxOccurs="unbounded" type="algorithmType"/>   
     12  </xsd:sequence> 
    1713 </xsd:complexType>
     14
     15<xsd:complexType name="algorithmType">
     16  <xsd:sequence maxOccurs="1">
     17  <xsd:element name="parameters" type="paramsType"/>
     18  <xsd:element name="problem" minOccurs="0" type="problemType"/> 
     19  <xsd:element name="algorithm" minOccurs="0" maxOccurs="unbounded" type="algorithmType"/>   
     20  </xsd:sequence> 
     21  <xsd:attribute name="mapper" use="required"/>   
     22</xsd:complexType>
     23
     24<xsd:complexType name="problemType">
     25  <xsd:sequence maxOccurs="1">
     26  <xsd:element name="parameters" type="paramsType"/> 
     27  </xsd:sequence> 
     28  <xsd:attribute name="class"/>
     29</xsd:complexType>
    1830
    1931 <xsd:complexType name="paramsType">
    2032  <xsd:sequence>
    21    <xsd:element name="param" type="parameterType" minOccurs="1" maxOccurs="unbounded"/>     
     33   <xsd:element name="param" type="parameterType" minOccurs="0" maxOccurs="unbounded"/>     
    2234  </xsd:sequence> 
    2335 </xsd:complexType>
  • branches/OaaS/HeuristicLab.Services.Optimization.ControllerService.Tests/mappings/tsp.xml

    r8817 r9166  
    11<?xml version='1.0'?>
    2 <scenario problemType="HeuristicLab.Problems.TravelingSalesman.TravelingSalesman"
    3           algorithmType="HeuristicLab.Algorithms.GeneticAlgorithm"
    4       xmlns="urn:scenario-schema"
    5           mapper="HeuristicLab.Controllers.HLMapper">
     2<scenario xmlns="urn:scenario-schema">
    63  <name>Traveling Salesman Problem</name>
    7   <problemParameters>
    8     <param type="Decimal" name="BestKnownQuality" value="6110.0"/>
    9     <param type="DecimalVector" name="BestKnownSolution">
    10       <value v1="0"/>
    11       <value v1="40"/>
    12       <value v1="38"/>
    13     </param>
    14     <param type="DecimalMatrix" name="Coordinates">
    15       <value v1="334.5909" v2="161.7809"/>
    16       <value v1="503.5909" v2="172.7809"/>
    17     </param>
    18     <param type="Type" name="EvaluatorParameter">
    19       <choice name="HeuristicLab.Problems.TravelingSalesman.TSPRoundedEuclideanPathEvaluator" />
    20       <choice name="HeuristicLab.Problems.TravelingSalesman.TSPGeoPathEvaluator" selected="true"/>
    21       <choice name="HeuristicLab.Problems.TravelingSalesman.TSPEuclideanPathEvaluator"/>
    22     </param>   
    23     <param type="Boolean" name="UseDistanceMatrix" value="true"/>
    24   </problemParameters>
    25   <algorithmParameters>
    26     <param type="Type" name="CrossoverParameter">
    27       <choice name="OrderCrossover2"/>
    28       <choice name="CosaCrossover" selected="true"/>
    29     </param>   
    30     <param type="Integer" name="Elites" value="1"/>
    31     <param type="Integer" name="MaximumGenerations" value="1000"/>
    32     <param type="Percent" name="MutationProbability" value="5"/>
    33     <param type="Type" name="Mutator">
    34       <choice name="InversionManipulator" selected="true"/>
    35       <choice name="ScrambleManipulator"/>
    36     </param>
    37     <param type="Integer" name="PopulationSize" value="100"/>
    38     <param type="Integer" name="Seed" value="100"/>
    39     <param type="Type" name="Selector">
    40       <choice name="ProportionalSelector" selected="true"/>
    41       <choice name="BestSelector"/>
    42     </param>
    43     <param type="Boolean" name="SetSeedRandomly" value="true"/>
    44   </algorithmParameters>
     4  <algorithm mapper="HeuristicLab.Mappers.TSPScenarioMapper">
     5    <parameters>
     6    <param type="Type" name="CrossoverParameter">
     7      <choice name="OrderCrossover2"/>
     8      <choice name="CosaCrossover" selected="true"/>
     9    </param>   
     10    <param type="Integer" name="Elites" value="1"/>
     11    <param type="Integer" name="MaximumGenerations" value="1000"/>
     12    <param type="Percent" name="MutationProbability" value="5"/>
     13    <param type="Type" name="Mutator">
     14      <choice name="InversionManipulator" selected="true"/>
     15      <choice name="ScrambleManipulator"/>
     16    </param>
     17    <param type="Integer" name="PopulationSize" value="100"/>
     18    <param type="Integer" name="Seed" value="100"/>
     19    <param type="Type" name="Selector">
     20      <choice name="ProportionalSelector" selected="true"/>
     21      <choice name="BestSelector"/>
     22    </param>
     23    <param type="Boolean" name="SetSeedRandomly" value="true"/>
     24    </parameters>
     25  <problem>
     26    <parameters>
     27      <param type="Decimal" name="BestKnownQuality" value="6110.0"/>
     28      <param type="DecimalVector" name="BestKnownSolution">
     29        <value v1="0"/>
     30        <value v1="40"/>
     31        <value v1="38"/>
     32        <value v1="60"/>
     33      </param>
     34      <param type="DecimalMatrix" name="Coordinates">
     35        <value v1="334.5909" v2="161.7809"/>
     36        <value v1="503.5909" v2="172.7809"/>
     37        <value v1="400.5909" v2="300.7809"/>
     38        <value v1="700.5909" v2="700.7809"/>
     39      </param>
     40      <param type="Type" name="EvaluatorParameter">
     41        <choice name="HeuristicLab.Problems.TravelingSalesman.TSPRoundedEuclideanPathEvaluator" />
     42        <choice name="HeuristicLab.Problems.TravelingSalesman.TSPGeoPathEvaluator" selected="true"/>
     43        <choice name="HeuristicLab.Problems.TravelingSalesman.TSPEuclideanPathEvaluator"/>
     44      </param>   
     45      <param type="Boolean" name="UseDistanceMatrix" value="true"/>
     46    </parameters>
     47  </problem>
     48  </algorithm>
    4549</scenario>
  • branches/OaaS/HeuristicLab.Services.Optimization.HiveController

    • Property svn:ignore set to
      bin
      obj
  • branches/OaaS/HeuristicLab.Services.Optimization.Web/Content/Styling.js

    r9062 r9166  
    3333            show: true,
    3434            placement: 'outsideGrid'
     35        },
     36        highlighter: {
     37            show: true,
     38            sizeAdjust: 7.5
    3539        }
    3640    });
     41}
     42
     43function handleDatatableSelectionChanged(datatable, datarow) {
     44    $.ajax({
     45        url: '/chart/GetDatatableContent?datatable=' + datatable + '&datarow=' + datarow,
     46
     47        success: function (result) {
     48            var plot = generatePlot('dataTableGraph', result)
     49            plot.replot({ resetAxes: true });
     50
     51            var resizer = $("#dataTableGraph").closest('.resizable');
     52            $(resizer).unbind('resizestop');
     53            $(resizer).bind('resizestop', function (event, ui) {
     54                var id = $(this).children('div').get(0).id;
     55                $("#dataTableGraph").height($(this).height() * 0.96);
     56                $("#dataTableGraph").width($(this).width() * 0.96);
     57                plot.replot({ resetAxes: true });
     58            });
     59        },
     60        error: function (jqXHR, textStatus, errorThrown) {
     61            alert(textStatus);
     62        }
     63    });
     64}
     65
     66function redrawAccordions() {
     67    $(".collapsible").accordion("refresh");
     68}
     69
     70function injectDatatableAnalyzer() {
     71    var datatable = null;
     72    var row = null;
     73
     74    // crawl datatables for current run results
     75    if ($("#dataTable").length > 0) {
     76        $.ajax({
     77            url: '/chart/GetDatatables',
     78
     79            success: function (result) {
     80                $("#dataTable").empty();
     81                $.each(result.Datatables, function (index, tableName) {
     82                    // http://stackoverflow.com/questions/1801499/how-to-change-options-of-select-with-jquery
     83                    $("#dataTable").append($("<option></option>").attr("value", tableName).text(tableName));
     84                });
     85
     86                // select first row
     87                // http://stackoverflow.com/questions/1414276/how-to-make-first-option-of-select-selected-with-jquery
     88                $("#dataTable").val($("#dataTable option:first").val());
     89                // fire selection changed event
     90                $("#dataTable").change();
     91            },
     92            error: function (jqXHR, textStatus, errorThrown) {
     93                alert(textStatus);
     94            }
     95        });
     96
     97        $("#dataTable option:selected").each(function () {
     98            datatable = $(this).text();
     99        });
     100
     101        $("#dataTable").change(function () {
     102            $("#dataTable option:selected").each(function () {
     103                datatable = $(this).text();
     104                $.ajax({
     105                    url: '/chart/GetRowNames?datatable=' + datatable,
     106
     107                    success: function (result) {
     108                        $("#dataRow").empty();
     109                        $.each(result.RowNames, function (index, rowName) {
     110                            // http://stackoverflow.com/questions/1801499/how-to-change-options-of-select-with-jquery
     111                            $("#dataRow").append($("<option></option>").attr("value", rowName).text(rowName));
     112                        });
     113
     114                        // select first row
     115                        // http://stackoverflow.com/questions/1414276/how-to-make-first-option-of-select-selected-with-jquery
     116                        $("#dataRow").val($("#dataRow option:first").val());
     117                        // fire selection changed event
     118                        //$("#dataRow").change();
     119                    },
     120                    error: function (jqXHR, textStatus, errorThrown) {
     121                        alert(textStatus);
     122                    }
     123                });
     124            });
     125        });
     126
     127        $("#dataRow").change(function () {
     128            $("#dataRow option:selected").each(function () {
     129                row = $(this).text();
     130                handleDatatableSelectionChanged(datatable, row);
     131            });
     132        });
     133    }
     134}
     135
     136function injectMatrixGraph() {
     137    $(".matrix-graph").each(function (i) {
     138        var tabable = $(this).closest(".tabable");
     139        var id = this.id;
     140        var resizerId = $(this).parent().get(0).id;
     141        var indices = retrieveMatrix(id);
     142        var graphCreated = false;
     143
     144        $(tabable).bind('tabsactivate', function (event, ui) {
     145            if ($(ui.newPanel[0]).hasClass("resizable") && !graphCreated) {
     146                graphCreated = true;
     147                var id = $(ui.newPanel[0]).children("div")[0].id;
     148                var resizerId = $("#" + id).parent().get(0).id;
     149                var indices = retrieveMatrix(id);
     150
     151                $.ajax({
     152                    url: '/Chart/GetMatrixContentForGraph?run=' + indices.runId + '&parameterOffset=' + indices.parameterOffset + "&showMarker=false",
     153
     154                    success: function (result) {
     155                        var plot = generatePlot(id, result);
     156                        tabable.bind('tabsshow', function (event, ui) {
     157                            if (ui.index == 1 && plot._drawCount == 0) {
     158                                plot.replot();
     159                            }
     160                            redrawAccordions();
     161                        });
     162                        var resizer = $("#" + id).closest('.resizable');
     163                        $(resizer).bind('resizestop', function (event, ui) {
     164                            var id = $(this).children('div').get(0).id;
     165                            $("#" + id).height($(this).height() * 0.96);
     166                            $("#" + id).width($(this).width() * 0.96);
     167                            plot.replot({ resetAxes: true });
     168                        });
     169                    },
     170                    error: function (jqXHR, textStatus, errorThrown) {
     171                        alert(textStatus);
     172                        alert(errorThrown);
     173                    }
     174                });
     175            }
     176        });
     177    });
     178}
     179
     180function injectTableModifiers() {
     181    // TODO: Make row add / delete via javascript
     182    var i = 10 + 20;
     183    return i;
    37184}
    38185
     
    108255
    109256    try {
    110         $(".collapsible").accordion("resize",
    111         {
     257        $(".collapsible").accordion({
     258            heightStyle: "content",
    112259            collapsible: true,
    113260            active: false
     
    131278            $(this).resizable();
    132279        });
    133 
    134         $(".matrix-graph").each(function (i) {
    135             var tabable = $(this).closest(".tabable");
    136             var id = this.id;
    137             var resizerId = $(this).parent().get(0).id;
    138             var indices = retrieveMatrix(id);
    139 
    140             $.ajax({
    141                 url: '/Chart/GetMatrixContentForGraph?run=' + indices.runId + '&parameterOffset=' + indices.parameterOffset + "&showMarker=false",
    142 
    143                 success: function (result) {
    144                     var plot = generatePlot(id, result);
    145                     tabable.bind('tabsshow', function (event, ui) {
    146                         if (ui.index == 1 && plot._drawCount == 0) {
    147                             plot.replot();
    148                         }
    149                     });
    150                     var resizer = $("#"+id).closest('.resizable');
    151                     $(resizer).bind('resizestop', function (event, ui) {
    152                         var id = $(this).children('div').get(0).id;
    153                         $("#"+id).height($(this).height() * 0.96);
    154                         $("#" + id).width($(this).width() * 0.96);
    155                         plot.replot({ resetAxes: true });
    156                     });
    157                 },
    158                 error: function (jqXHR, textStatus, errorThrown) {
    159                     alert(textStatus);
    160                     alert(errorThrown);
    161                 }
    162             });
    163         });
    164     } catch (e) {
    165     }
     280    } catch (e) {
     281    }
     282
     283    injectMatrixGraph();
     284    injectDatatableAnalyzer();
     285    //injectTableModifiers();
    166286}
    167287);
  • branches/OaaS/HeuristicLab.Services.Optimization.Web/Content/jqplot

    • Property svn:ignore set to
      extras
      NDdata
      examples
      .hg_archival.txt
      .hgignore
      .hgtags
      build.xml
      dist.props
  • branches/OaaS/HeuristicLab.Services.Optimization.Web/Content/jqplot/src

    • Property svn:ignore set to
      changes.txt
  • branches/OaaS/HeuristicLab.Services.Optimization.Web/ControllerService.svc

    r8384 r9166  
    22  Language="C#"
    33  Debug="true"
    4   Service="HeuristicLab.Services.Optimization.ControllerService.PlaceholderControllerService"
     4  Service="HeuristicLab.Services.Optimization.ControllerService.PlaceholderControllerService"    
    55  %>
  • branches/OaaS/HeuristicLab.Services.Optimization.Web/Controllers/ChartController.cs

    r9062 r9166  
    157157          return Json("error", JsonRequestBehavior.AllowGet);
    158158        }
     159
     160        [HttpGet]
     161        public JsonResult GetDatatableContent(string datatable, string datarow) {
     162          try {
     163            var model = Session["jobDetails"] as JobDetailsModel;
     164            var plotableData = new PlotableData();
     165
     166            for (var i=0; i < model.Runs.Count; i++) {             
     167              foreach (var result in model.Runs[i].Results) {
     168                if (result.Value.Name == datatable) {
     169                  var matrix = result.Value as DecimalMatrix;
     170                  var index = Array.IndexOf(matrix.RowNames, datarow);
     171                  plotableData.Series.Add(
     172                    new SeriesEntry() {
     173                      Label = "" + (i + 1) + ". Run - " + datatable + " - " + datarow,
     174                      Values = matrix.Value[index]
     175                    }
     176                  );
     177                  break;
     178                }
     179              }
     180            }
     181
     182            return Json(plotableData, JsonRequestBehavior.AllowGet);
     183          }
     184          catch (Exception e) {
     185            Trace.TraceError(e.Message);
     186          }
     187          Response.StatusCode = 400;
     188          Response.Status = "Session timed out";
     189          return Json("error", JsonRequestBehavior.AllowGet);
     190        }
     191
     192        [HttpGet]
     193        public JsonResult GetDatatables() {
     194          try {
     195            var model = Session["jobDetails"] as JobDetailsModel;
     196            var dts = new DatatableContainer();
     197            var datatables = new List<string>();
     198            foreach (var param in model.Runs[0].Results) {
     199              if (param.Value is DecimalMatrix) {
     200                datatables.Add(param.Value.Name);
     201              }
     202            }
     203
     204            dts.Datatables = datatables.ToArray();
     205
     206            return Json(dts, JsonRequestBehavior.AllowGet);
     207          }
     208          catch (Exception e) {
     209            Trace.TraceError(e.Message);
     210          }
     211          Response.StatusCode = 400;
     212          Response.Status = "Session timed out or ";
     213          return Json("error", JsonRequestBehavior.AllowGet);
     214        }
     215
     216        [HttpGet]
     217        public JsonResult GetRowNames(string datatable) {
     218          var model = Session["jobDetails"] as JobDetailsModel;
     219          try {
     220            foreach (var param in model.Runs[0].Results) {
     221              if (param.Value.Name == datatable) {
     222                var matrix = param.Value as DecimalMatrix;
     223               
     224                var rowNames = new RowNameContainer() {
     225                  RowNames = new List<string>(matrix.RowNames)
     226                };
     227                return Json(rowNames, JsonRequestBehavior.AllowGet);               
     228              }
     229            }           
     230          }
     231          catch(Exception ex) {
     232            Trace.WriteLine(ex.Message);
     233          }
     234          Response.StatusCode = 400;
     235          Response.Status = "Session timed out";
     236          return Json("error", JsonRequestBehavior.AllowGet);
     237        }
    159238    }
    160239}
  • branches/OaaS/HeuristicLab.Services.Optimization.Web/Controllers/OptimizationController.cs

    r9062 r9166  
    1010using System.Web.Security;
    1111using HeuristicLab.Services.Optimization.Web.Models;
     12using HeuristicLab.Services.Optimization.ControllerService.General;
    1213
    1314namespace HeuristicLab.Services.Optimization.Web.Controllers
     
    1617    public class OptimizationController : Controller
    1718    {
    18       public const string DEFAULT_CONTROLLER_ENDPOINT = "WSHttpBinding_IControllerService";
     19      public static readonly string DEFAULT_CONTROLLER_ENDPOINT = Configuration.ControllerEndpointName;
    1920
    2021      public delegate T ControllerServiceDelegate<T>(IControllerService service);
     
    2526          Response.Redirect("/Account/Logon");
    2627
    27         using (var cf = new ChannelFactory<IControllerService>(OptimizationController.DEFAULT_CONTROLLER_ENDPOINT)) {
     28        using (var cf = new ChannelFactory<IControllerService>(DEFAULT_CONTROLLER_ENDPOINT)) {
    2829          var credentialBehaviour = cf.Endpoint.Behaviors.Find<ClientCredentials>();
    2930          credentialBehaviour.UserName.UserName = Membership.GetUser().UserName;
     
    3839          Response.Redirect("/Account/Logon");
    3940
    40         using (var cf = new ChannelFactory<IControllerService>(OptimizationController.DEFAULT_CONTROLLER_ENDPOINT)) {         
     41        using (var cf = new ChannelFactory<IControllerService>(DEFAULT_CONTROLLER_ENDPOINT)) {         
    4142          var credentialBehaviour = cf.Endpoint.Behaviors.Find<ClientCredentials>();
    4243          credentialBehaviour.UserName.UserName = Membership.GetUser().UserName;
     
    6667          });
    6768          Session["scenario"] = optScenario;
    68           return View(optScenario.InputParameters);
     69          if (optScenario.FirstAlgorithm.Problem == null)
     70            return RedirectToAction("AlgorithmParameters");
     71          return View(optScenario.FirstAlgorithm.Problem.Parameters);
     72        }
     73
     74        public ActionResult ProblemParameters2() {                   
     75          return View("ProblemParameters", (Session["scenario"] as OptimizationScenario).FirstAlgorithm.Problem.Parameters);
    6976        }
    7077
     
    93100
    94101        [HttpPost]
    95         public ActionResult ProblemParameters(InputParameters parameters) {
     102        public ActionResult ProblemParameters(ProblemParameters parameters) {
    96103          if (ModelState.IsValid) {
    97104            return RedirectToAction("AlgorithmParameters", parameters);
     
    101108
    102109        public ActionResult AlgorithmParameters() {
    103           return View((Session["scenario"] as OptimizationScenario).AlgorithmParameters);
     110          return View((Session["scenario"] as OptimizationScenario).FirstAlgorithm.Parameters);
    104111        }
    105112
     
    117124
    118125        [HttpPost]
    119         public ActionResult ScheduleJob(OptimizationScenario scenario) {
     126        public ActionResult ScheduleJob(ScheduleJobModel jobModel) {
    120127          using (var cf = new ChannelFactory<IControllerService>(OptimizationController.DEFAULT_CONTROLLER_ENDPOINT)) {
    121128            var credentialBehaviour = cf.Endpoint.Behaviors.Find<ClientCredentials>();
     
    124131            var controllerProxy = cf.CreateChannel();
    125132            User u = new User() { Username = Membership.GetUser().UserName, Password = Session["pw"] as string };
    126             controllerProxy.ScheduleOptimizationScenario(u, Session["scenario"] as OptimizationScenario);
     133            var scenario = Session["scenario"] as OptimizationScenario;
     134            var details = new JobExecutionDetails() { Group = jobModel.Group, JobTitle = jobModel.Name, Repititions = jobModel.Repetitions };
     135            controllerProxy.ScheduleOptimizationScenario(u, scenario, details);
    127136          }
    128137          return RedirectToAction("Index");
    129138        }
     139        // TODO: Add unique identifier for algorithm / input parameters
     140        public ActionResult AddRow(int id, string paramName) {
     141          var os = Session["scenario"] as OptimizationScenario;
     142          var parameter = os.FirstAlgorithm.Problem.Parameters.FindByName(paramName);
     143          bool inputParam = true;
     144          if (parameter == null) {
     145            parameter = os.FirstAlgorithm.Parameters.FindByName(paramName);
     146            inputParam = false;
     147          }
     148          var dm = parameter.Value as DecimalMatrix;
     149          dm.CopyRow(id);
     150          return inputParam ? View("ProblemParameters", os.FirstAlgorithm.Problem.Parameters) : View("AlgorithmParameters", os.FirstAlgorithm.Parameters);
     151        }
     152
     153        public ActionResult DeleteRow(int id, string paramName) {
     154          var os = Session["scenario"] as OptimizationScenario;
     155          var parameter = os.FirstAlgorithm.Problem.Parameters.FindByName(paramName);
     156          bool inputParam = true;
     157          if (parameter == null) {
     158            parameter = os.FirstAlgorithm.Parameters.FindByName(paramName);
     159            inputParam = false;
     160          }
     161          var dm = parameter.Value as DecimalMatrix;
     162          dm.DeleteRow(id);
     163          return inputParam ? View("ProblemParameters", os.FirstAlgorithm.Problem.Parameters) : View("AlgorithmParameters", os.FirstAlgorithm.Parameters);
     164        }
    130165    }
    131166}
  • branches/OaaS/HeuristicLab.Services.Optimization.Web/Global.asax.cs

    r8506 r9166  
    3232      RegisterGlobalFilters(GlobalFilters.Filters);
    3333      RegisterRoutes(RouteTable.Routes);
    34       ModelBinders.Binders.Add(typeof(Optimization.ControllerService.Model.InputParameters), new ProblemParametersModelBinder());
     34      ModelBinders.Binders.Add(typeof(Optimization.ControllerService.Model.ProblemParameters), new ProblemParametersModelBinder());
    3535      ModelBinders.Binders.Add(typeof(Optimization.ControllerService.Model.AlgorithmParameters), new AlgorithmParametersModelBinder());
    3636    }
  • branches/OaaS/HeuristicLab.Services.Optimization.Web/HeuristicLab.Services.Optimization.Web.csproj

    r9062 r9166  
    105105      <DependentUpon>Global.asax</DependentUpon>
    106106    </Compile>
     107    <Compile Include="Mockup\MockupMembershipProvider.cs" />
    107108    <Compile Include="Models\AccountModels.cs" />
    108109    <Compile Include="Models\AdminModels.cs" />
     
    329330  </ItemGroup>
    330331  <ItemGroup>
    331     <Content Include="Views\Shared\EditorTemplates\InputParameters.cshtml" />
     332    <Content Include="Views\Shared\EditorTemplates\ProblemParameters.cshtml" />
    332333  </ItemGroup>
    333334  <ItemGroup>
     
    368369  </ItemGroup>
    369370  <ItemGroup>
    370     <Content Include="Views\Shared\DisplayTemplates\InputParameters.cshtml" />
     371    <Content Include="Views\Shared\DisplayTemplates\ProblemParameters.cshtml" />
    371372  </ItemGroup>
    372373  <ItemGroup>
     
    386387    <Content Include="Views\Chart\GenerateChart.cshtml" />
    387388    <Content Include="Views\Optimization\Copy of JobDetails.cshtml" />
     389    <Content Include="Views\Shared\DisplayTemplates\StringValue.cshtml" />
    388390  </ItemGroup>
    389391  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
  • branches/OaaS/HeuristicLab.Services.Optimization.Web/Mappings/scenario.xsd

    r8817 r9166  
    88 <xsd:complexType name="scenarioType">
    99  <xsd:sequence maxOccurs="1">   
    10    <xsd:element name="name" type="xsd:string"/>
    11    <xsd:element name="problemParameters" type="paramsType"/>
    12    <xsd:element name="algorithmParameters" type="paramsType"/>
    13   </xsd:sequence>
    14   <xsd:attribute name="problemType" use="required"/>
    15   <xsd:attribute name="algorithmType" use="required"/>
    16   <xsd:attribute name="mapper" use="required"/>
     10   <xsd:element name="name" minOccurs="1" type="xsd:string"/>   
     11   <xsd:element name="algorithm" minOccurs="1" maxOccurs="unbounded" type="algorithmType"/>   
     12  </xsd:sequence> 
    1713 </xsd:complexType>
     14
     15<xsd:complexType name="algorithmType">
     16  <xsd:sequence maxOccurs="1">
     17  <xsd:element name="parameters" type="paramsType"/>
     18  <xsd:element name="problem" minOccurs="0" type="problemType"/> 
     19  <xsd:element name="algorithm" minOccurs="0" maxOccurs="unbounded" type="algorithmType"/>   
     20  </xsd:sequence> 
     21  <xsd:attribute name="mapper" use="required"/>   
     22</xsd:complexType>
     23
     24<xsd:complexType name="problemType">
     25  <xsd:sequence maxOccurs="1">
     26  <xsd:element name="parameters" type="paramsType"/> 
     27  </xsd:sequence> 
     28  <xsd:attribute name="class"/>
     29</xsd:complexType>
    1830
    1931 <xsd:complexType name="paramsType">
    2032  <xsd:sequence>
    21    <xsd:element name="param" type="parameterType" minOccurs="1" maxOccurs="unbounded"/>     
     33   <xsd:element name="param" type="parameterType" minOccurs="0" maxOccurs="unbounded"/>     
    2234  </xsd:sequence> 
    2335 </xsd:complexType>
  • branches/OaaS/HeuristicLab.Services.Optimization.Web/Mappings/tsp.cs

    r8958 r9166  
    44using System.Text;
    55using HeuristicLab.Data;
    6 using HeuristicLab.Services.Optimization.ControllerService.Model; 
     6using HeuristicLab.Services.Optimization.ControllerService.Model;
    77using HeuristicLab.Optimization;
    88using HeuristicLab.Services.Optimization.ControllerService;
    99using HeuristicLab.Algorithms.GeneticAlgorithm;
    1010using HeuristicLab.Problems.TravelingSalesman;
    11 public class TSPScenarioMapper : IScenarioMapper {
    12   public void MapScenario(OptimizationScenario scenario, IAlgorithm algorithm) {
    13     Console.WriteLine("Mapping scenario!");
    14     var ga = algorithm as GeneticAlgorithm;
    15     var problem = algorithm.Problem as TravelingSalesmanProblem;
    16                  
    17     problem.BestKnownQuality = HLMapper.ConvertToDoubleValue(scenario.InputParameters.FindByName("BestKnownQuality"));
    18     problem.BestKnownSolution = HLMapper.ConvertToPermutation(scenario.InputParameters.FindByName("BestKnownSolution"));
    19     problem.Coordinates = HLMapper.ConvertToDoubleMatrix(scenario.InputParameters.FindByName("Coordinates"));
    20     var evalParam = HLMapper.GetStringValue(scenario.InputParameters.FindByName("EvaluatorParameter"));
    21     if (evalParam == "HeuristicLab.Problems.TravelingSalesman.TSPRoundedEuclideanPathEvaluator") {
    22       problem.EvaluatorParameter.Value = new TSPRoundedEuclideanPathEvaluator();
     11namespace HeuristicLab.Mappers {
     12  public class TSPScenarioMapper : IScenarioMapper {
     13    public void MapScenario(OptimizationScenario scenario, out IAlgorithm algorithm) {
     14      Console.WriteLine("Mapping scenario!");
     15      var ga = new GeneticAlgorithm();
     16      var problem = new TravelingSalesmanProblem();
     17      ga.Problem = problem;
     18      algorithm = ga;
     19
     20      problem.BestKnownQuality = HLMapper.ConvertToDoubleValue(scenario.FirstAlgorithm.Problem.Parameters.FindByName("BestKnownQuality"));
     21      problem.BestKnownSolution = HLMapper.ConvertToPermutation(scenario.FirstAlgorithm.Problem.Parameters.FindByName("BestKnownSolution"));
     22      problem.Coordinates = HLMapper.ConvertToDoubleMatrix(scenario.FirstAlgorithm.Problem.Parameters.FindByName("Coordinates"));
     23      var evalParam = HLMapper.GetStringValue(scenario.FirstAlgorithm.Problem.Parameters.FindByName("EvaluatorParameter"));
     24      if (evalParam == "HeuristicLab.Problems.TravelingSalesman.TSPRoundedEuclideanPathEvaluator") {
     25        problem.EvaluatorParameter.Value = new TSPRoundedEuclideanPathEvaluator();
     26      }
     27      else if (evalParam == "HeuristicLab.Problems.TravelingSalesman.TSPGeoPathEvaluator") {
     28        problem.EvaluatorParameter.Value = new TSPGeoPathEvaluator();
     29      }
     30      else {
     31        problem.EvaluatorParameter.Value = new TSPEuclideanPathEvaluator();
     32      }
     33      problem.UseDistanceMatrix = HLMapper.ConvertToBoolValue(scenario.FirstAlgorithm.Problem.Parameters.FindByName("UseDistanceMatrix"));
     34      Console.WriteLine("Mapping algorithm...");
     35      ga.Mutator = HLMapper.FindInItemSet<HeuristicLab.Optimization.IManipulator>(ga.MutatorParameter.ValidValues, scenario.FirstAlgorithm.Parameters.FindByName("Mutator"));
     36      ga.CrossoverParameter.Value = HLMapper.FindOperator<HeuristicLab.Optimization.ICrossover>(problem, scenario.FirstAlgorithm.Parameters.FindByName("CrossoverParameter"));
     37      ga.Elites = HLMapper.ConvertToIntValue(scenario.FirstAlgorithm.Parameters.FindByName("Elites"));
     38      ga.MaximumGenerations = HLMapper.ConvertToIntValue(scenario.FirstAlgorithm.Parameters.FindByName("MaximumGenerations"));
     39      ga.MutationProbability = HLMapper.ConvertToPercentValue(scenario.FirstAlgorithm.Parameters.FindByName("MutationProbability"));
     40      ga.PopulationSize = HLMapper.ConvertToIntValue(scenario.FirstAlgorithm.Parameters.FindByName("PopulationSize"));
     41      ga.Seed = HLMapper.ConvertToIntValue(scenario.FirstAlgorithm.Parameters.FindByName("Seed"));
     42      ga.Selector = HLMapper.FindInItemSet<HeuristicLab.Optimization.ISelector>(ga.SelectorParameter.ValidValues, scenario.FirstAlgorithm.Parameters.FindByName("Selector"));
     43      ga.SetSeedRandomly = HLMapper.ConvertToBoolValue(scenario.FirstAlgorithm.Parameters.FindByName("SetSeedRandomly"));
    2344    }
    24     else if (evalParam == "HeuristicLab.Problems.TravelingSalesman.TSPGeoPathEvaluator") {
    25       problem.EvaluatorParameter.Value = new TSPGeoPathEvaluator();
    26     }
    27     else {
    28       problem.EvaluatorParameter.Value = new TSPEuclideanPathEvaluator();
    29     }
    30     problem.UseDistanceMatrix = HLMapper.ConvertToBoolValue(scenario.InputParameters.FindByName("UseDistanceMatrix"));
    31     Console.WriteLine("Mapping algorithm...");
    32     ga.Mutator = HLMapper.FindInItemSet<HeuristicLab.Optimization.IManipulator>(ga.MutatorParameter.ValidValues, scenario.AlgorithmParameters.FindByName("Mutator"));
    33     ga.CrossoverParameter.Value = HLMapper.FindOperator<HeuristicLab.Optimization.ICrossover>(problem, scenario.AlgorithmParameters.FindByName("CrossoverParameter"));
    34     ga.Elites = HLMapper.ConvertToIntValue(scenario.AlgorithmParameters.FindByName("Elites"));
    35     ga.MaximumGenerations = HLMapper.ConvertToIntValue(scenario.AlgorithmParameters.FindByName("MaximumGenerations"));
    36     ga.MutationProbability = HLMapper.ConvertToPercentValue(scenario.AlgorithmParameters.FindByName("MutationProbability"));               
    37     ga.PopulationSize = HLMapper.ConvertToIntValue(scenario.AlgorithmParameters.FindByName("PopulationSize"));
    38     ga.Seed = HLMapper.ConvertToIntValue(scenario.AlgorithmParameters.FindByName("Seed"));
    39     ga.Selector = HLMapper.FindInItemSet<HeuristicLab.Optimization.ISelector>(ga.SelectorParameter.ValidValues, scenario.AlgorithmParameters.FindByName("Selector"));
    40     ga.SetSeedRandomly = HLMapper.ConvertToBoolValue(scenario.AlgorithmParameters.FindByName("SetSeedRandomly"));
    4145  }
    4246}
  • branches/OaaS/HeuristicLab.Services.Optimization.Web/Mappings/tsp.xml

    r8958 r9166  
    11<?xml version='1.0'?>
    2 <scenario problemType="HeuristicLab.Problems.TravelingSalesman.TravelingSalesman"
    3           algorithmType="HeuristicLab.Algorithms.GeneticAlgorithm"
    4       xmlns="urn:scenario-schema"
    5           mapper="HeuristicLab.Controllers.HLMapper">
     2<scenario xmlns="urn:scenario-schema">
    63  <name>Traveling Salesman Problem</name>
    7   <problemParameters>
    8     <param type="Decimal" name="BestKnownQuality" value="6110.0"/>
    9     <param type="DecimalVector" name="BestKnownSolution">
    10       <value v1="0"/>
    11       <value v1="40"/>
    12       <value v1="38"/>
    13       <value v1="60"/>
    14     </param>
    15     <param type="DecimalMatrix" name="Coordinates">
    16       <value v1="334.5909" v2="161.7809"/>
    17       <value v1="503.5909" v2="172.7809"/>
    18       <value v1="400.5909" v2="300.7809"/>
    19       <value v1="700.5909" v2="700.7809"/>
    20     </param>
    21     <param type="Type" name="EvaluatorParameter">
    22       <choice name="HeuristicLab.Problems.TravelingSalesman.TSPRoundedEuclideanPathEvaluator" />
    23       <choice name="HeuristicLab.Problems.TravelingSalesman.TSPGeoPathEvaluator" selected="true"/>
    24       <choice name="HeuristicLab.Problems.TravelingSalesman.TSPEuclideanPathEvaluator"/>
    25     </param>   
    26     <param type="Boolean" name="UseDistanceMatrix" value="true"/>
    27   </problemParameters>
    28   <algorithmParameters>
    29     <param type="Type" name="CrossoverParameter">
    30       <choice name="OrderCrossover2"/>
    31       <choice name="CosaCrossover" selected="true"/>
    32     </param>   
    33     <param type="Integer" name="Elites" value="1"/>
    34     <param type="Integer" name="MaximumGenerations" value="1000"/>
    35     <param type="Percent" name="MutationProbability" value="5"/>
    36     <param type="Type" name="Mutator">
    37       <choice name="InversionManipulator" selected="true"/>
    38       <choice name="ScrambleManipulator"/>
    39     </param>
    40     <param type="Integer" name="PopulationSize" value="100"/>
    41     <param type="Integer" name="Seed" value="100"/>
    42     <param type="Type" name="Selector">
    43       <choice name="ProportionalSelector" selected="true"/>
    44       <choice name="BestSelector"/>
    45     </param>
    46     <param type="Boolean" name="SetSeedRandomly" value="true"/>
    47   </algorithmParameters>
     4  <algorithm mapper="HeuristicLab.Mappers.TSPScenarioMapper">
     5    <parameters>
     6    <param type="Type" name="CrossoverParameter">
     7      <choice name="OrderCrossover2"/>
     8      <choice name="CosaCrossover" selected="true"/>
     9    </param>   
     10    <param type="Integer" name="Elites" value="1"/>
     11    <param type="Integer" name="MaximumGenerations" value="1000"/>
     12    <param type="Percent" name="MutationProbability" value="5"/>
     13    <param type="Type" name="Mutator">
     14      <choice name="InversionManipulator" selected="true"/>
     15      <choice name="ScrambleManipulator"/>
     16    </param>
     17    <param type="Integer" name="PopulationSize" value="100"/>
     18    <param type="Integer" name="Seed" value="100"/>
     19    <param type="Type" name="Selector">
     20      <choice name="ProportionalSelector" selected="true"/>
     21      <choice name="BestSelector"/>
     22    </param>
     23    <param type="Boolean" name="SetSeedRandomly" value="true"/>
     24    </parameters>
     25  <problem>
     26    <parameters>
     27      <param type="Decimal" name="BestKnownQuality" value="6110.0"/>
     28      <param type="DecimalVector" name="BestKnownSolution">
     29        <value v1="0"/>
     30        <value v1="40"/>
     31        <value v1="38"/>
     32        <value v1="60"/>
     33      </param>
     34      <param type="DecimalMatrix" name="Coordinates">
     35        <value v1="334.5909" v2="161.7809"/>
     36        <value v1="503.5909" v2="172.7809"/>
     37        <value v1="400.5909" v2="300.7809"/>
     38        <value v1="700.5909" v2="700.7809"/>
     39      </param>
     40      <param type="Type" name="EvaluatorParameter">
     41        <choice name="HeuristicLab.Problems.TravelingSalesman.TSPRoundedEuclideanPathEvaluator" />
     42        <choice name="HeuristicLab.Problems.TravelingSalesman.TSPGeoPathEvaluator" selected="true"/>
     43        <choice name="HeuristicLab.Problems.TravelingSalesman.TSPEuclideanPathEvaluator"/>
     44      </param>   
     45      <param type="Boolean" name="UseDistanceMatrix" value="true"/>
     46    </parameters>
     47  </problem>
     48  </algorithm>
    4849</scenario>
  • branches/OaaS/HeuristicLab.Services.Optimization.Web/Models/ChartModels.cs

    r9062 r9166  
    1818    }   
    1919  }
     20
     21  public class RowNameContainer {
     22    private IList<string> rowNames = new List<string>();
     23
     24    public IList<string> RowNames {
     25      get { return rowNames; }
     26      set { rowNames = value; }
     27    }
     28  }
     29
     30  public class DatatableContainer {
     31    public string[] Datatables { get; set; }
     32  }
    2033}
  • branches/OaaS/HeuristicLab.Services.Optimization.Web/Models/OptimizationModels.cs

    r9062 r9166  
    77
    88namespace HeuristicLab.Services.Optimization.Web.Models {
     9  public class ScheduleJobModel {
     10    public int Repetitions { get; set; }
     11    public string Name { get; set; }
     12    public string Group { get; set; }
     13  }
    914
    1015  public class OptimizationModel {
     
    4146          realValue += value.AttemptedValue;
    4247        }
    43         var param = (from par in scenario.InputParameters.Items where par.Value.Name == realKey select par).FirstOrDefault();
     48        var param = (from par in scenario.FirstAlgorithm.Problem.Parameters.Items where par.Value.Name == realKey select par).FirstOrDefault();
    4449        if (param != null && !param.Value.TrySetFromString(realValue)) {
    4550          bindingContext.ModelState.AddModelError(bindingContext.ModelName, new Exception(string.Format("Unable to parse {0} into destination type {1}", value, param.Type)));
    4651        }
    4752      }
    48       return scenario.InputParameters;
     53      return scenario.FirstAlgorithm.Problem.Parameters;
    4954    }
    5055  }
     
    5560      foreach (var key in controllerContext.RequestContext.HttpContext.Request.Form.AllKeys) {
    5661        var value = bindingContext.ValueProvider.GetValue(key);
    57         var param = (from par in scenario.AlgorithmParameters.Items where par.Value.Name == key select par).FirstOrDefault();
     62        var param = (from par in scenario.FirstAlgorithm.Parameters.Items where par.Value.Name == key select par).FirstOrDefault();
    5863        if (param != null && !param.Value.TrySetFromString(value.AttemptedValue)) {
    5964          bindingContext.ModelState.AddModelError(bindingContext.ModelName, new Exception(string.Format("Unable to parse {0} into destination type {1}", value, param.Type)));
    6065        }
    6166      }
    62       return scenario.AlgorithmParameters;
     67      return scenario.FirstAlgorithm.Parameters;
    6368    }
    6469  }
  • branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Optimization/AlgorithmParameters.cshtml

    r8506 r9166  
    22
    33@{
    4     ViewBag.Title = "AlgorithmParameters";
     4    ViewBag.Title = "Algorithm Parameters";
    55}
    66
    77<h2>Adjust algorithm parameters:</h2>
    8 @using (Html.BeginForm()) {
     8@using (Html.BeginForm("AlgorithmParameters", "Optimization")) {
    99    @Html.ValidationSummary(true)
    1010    <fieldset>
  • branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Optimization/Index.cshtml

    r9062 r9166  
    22
    33@{
    4     ViewBag.Title = "Index";
     4    ViewBag.Title = "Optimization-as-a-Service";
    55}
    66
     
    3232<ul>
    3333@foreach (var itm in Model.Scenarios) {
    34     <li>@Html.ActionLink(itm.Name, "ProblemParameters", new { scenario=itm.Name })</li>
     34    <li>@Html.ActionLink(itm.Id, "ProblemParameters", new { scenario=itm.Id })</li>
    3535}
    3636</ul>
  • branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Optimization/JobDetails.cshtml

    r9062 r9166  
    2828
    2929<h3>Run details:</h3>
    30 @for (int j=0; j < Model.Runs.Count; j++) {
     30<div class="collapsible">
     31@if (Model.Runs.Count > 1) {
     32    <h3>Analyze runs</h3>
     33    <div>
     34        <div class="resizable ui-widget-content" style="width: 800px; height: 600px;">
     35            <div id="dataTableView" style="width: 96%; height: 96%;">   
     36              <form action="#">
     37                <label for="dataTable">DataTable:</label>
     38                <select name="dataTable" id="dataTable"></select>
     39                <label for="dataRow">DataRow:</label>
     40                <select name="dataRow" id="dataRow"></select>
     41                <div id="dataTableGraph" style="width: 100%; height: 100%;"></div>
     42              </form>
     43            </div>
     44        </div>
     45    </div>
     46}
     47@for (int j = 0; j < Model.Runs.Count; j++) {
    3148    var run = Model.Runs[j];
    32     <p>@run.Name:</p>
     49    <h3>@run.Name</h3>
     50    <div>
    3351    <table>
    3452      <thead>
     
    4058      <tbody>
    4159      @for (var i = 0; i < run.Results.Count; i++) {
    42         var result = run.Results[i];     
     60          var result = run.Results[i];     
    4361        <tr>
    44           <td>@result.Value.Name</td>
     62          <td>@Html.Label(result.Value.Name, result.Value.Name)</td>
    4563          @if (result.Value is HeuristicLab.Services.Optimization.ControllerService.Model.DecimalMatrix) {
    4664              var matrix = (result.Value as HeuristicLab.Services.Optimization.ControllerService.Model.DecimalMatrix);             
     
    6583                  </div>               
    6684              </td>
    67           }
     85          }         
    6886          else {
    69               <td>@((result.Value as HeuristicLab.Services.Optimization.ControllerService.Model.StringValue).Value)</td>
     87              <td>
     88                @Html.DisplayFor(m => result.Value)               
     89              </td>
     90              <!-- Html.Partial(string.Format("~/Views/Shared/DisplayTemplates/{0}.cshtml", result.Value.GetType().Name), result.Value) -->               
     91              <!--td>((result.Value as HeuristicLab.Services.Optimization.ControllerService.Model.StringValue).Value)</td-->
    7092          }
    7193       </tr>
     
    7395      </tbody>
    7496    </table>
     97    </div>
    7598}
     99</div>
  • branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Optimization/ProblemParameters.cshtml

    r8506 r9166  
    1 @model HeuristicLab.Services.Optimization.ControllerService.Model.InputParameters
     1@model HeuristicLab.Services.Optimization.ControllerService.Model.ProblemParameters
    22
    33@{
    4     ViewBag.Title = "ProblemParameters";
     4    ViewBag.Title = "Problem Parameters";
    55}
    66
    77<h2>Adjust problem parameters:</h2>
    88
    9 @using (Html.BeginForm()) {
     9@using (Html.BeginForm("ProblemParameters", "Optimization")) {
    1010    @Html.ValidationSummary(true)
    1111    <fieldset>
  • branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Optimization/ScheduleJob.cshtml

    r8506 r9166  
    22
    33@{
    4     ViewBag.Title = "ScheduleJob";
     4    ViewBag.Title = "Schedule Job";
    55}
    66
    7 <h2>Do you really want to schedule the following job?</h2>
    8 
    9 
    10 <h3>Problem Parameters:</h3>
    11 @Html.DisplayFor(model => Model.InputParameters)
    12 
     7@using (Html.BeginForm()) {   
     8    <fieldset>
     9        <legend>Scheduling parameters</legend>
     10        <div class="editor-label">
     11            <label for="name">Name:</label>
     12        </div>
     13        <div class="editor-field">
     14            <input id="name" name="Name" type="text" value="Web scheduled job" />
     15        </div>
     16        <div class="editor-label">
     17            <label for="repetitions">Repetitions:</label>
     18        </div>
     19        <div class="editor-field">
     20            <input id="repetitions" name="Repetitions" type="text" value="1" />
     21        </div>
     22        <div class="editor-label">
     23            <label for="group">Group:</label>
     24        </div>
     25        <div class="editor-field">
     26            <input id="group" name="Group" type="text" value="TESTAZURE" />
     27        </div>
     28        <div class="editor-field">
     29            <input type="submit" value="Schedule job!" />
     30        </div>
     31    </fieldset>
     32}
     33@if (Model.FirstAlgorithm.Problem != null) {
     34    <h3>Problem Parameters:</h3>
     35    @Html.DisplayFor(model => Model.FirstAlgorithm.Problem.Parameters)
     36}
     37   
    1338<h3>Algorithm Parameters:</h3>
    14 @Html.DisplayFor(model => Model.AlgorithmParameters)
    15 
    16 @using (Html.BeginForm()) {   
    17     <p>
    18         <input type="submit" value="Schedule job!" />
    19     </p>
    20 }
     39@Html.DisplayFor(model => Model.FirstAlgorithm.Parameters)
  • branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Shared/DisplayTemplates/DecimalMatrix.cshtml

    r9062 r9166  
    1010      @for (int i = 0; i < Model.Value.Length; i++) {
    1111      <tr>
    12         @if (Model.RowNames.Length > i) {
     12        @if (Model.RowNames != null && Model.RowNames.Length > i) {
    1313        <th scope="row">@Model.RowNames[i]</th>
    1414        }
  • branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Shared/EditorTemplates/DecimalMatrix.cshtml

    r9062 r9166  
    1919    </td>
    2020    }
    21     <td><a class="delete-row" href="#">Delete</a></td>
    22     <td><input type="submit" name="AddRow" value="Add Row"/></td>
     21    <!-- TODO: Add unique identifier for algorithm / input parameters -->
     22    <td>@Html.ActionLink("-", "DeleteRow", new { paramName = @Model.Name, id = @i }) </td>
     23    <td>@Html.ActionLink("+", "AddRow", new { paramName = @Model.Name, id = @i }) </td>
    2324  </tr> 
    2425  }
  • branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Shared/_Layout.cshtml

    r9062 r9166  
    1919    <script src="@Url.Content("~/Content/jqplot/src/plugins/jqplot.canvasTextRenderer.js")" type="text/javascript"></script>
    2020    <script src="@Url.Content("~/Content/jqplot/src/plugins/jqplot.canvasAxisLabelRenderer.js")" type="text/javascript"></script>
     21    <script type="text/javascript" src="@Url.Content("~/Content/jqplot/src/plugins/jqplot.highlighter.js")"></script>
    2122    <script type="text/javascript" src="@Url.Content("~/Content/jqplot/src/plugins/jqplot.barRenderer.js")"></script>
    2223    <script type="text/javascript" src="@Url.Content("~/Content/jqplot/src/plugins/jqplot.categoryAxisRenderer.js")"></script>
  • branches/OaaS/HeuristicLab.Services.Optimization.Web/Web.config

    r8506 r9166  
    1414    </trace>
    1515    <sources>
    16       <source name="System.ServiceModel"
    17               switchValue="Information, ActivityTracing"
    18               propagateActivity="true" >
     16      <source name="System.ServiceModel" switchValue="Information, ActivityTracing" propagateActivity="true">
    1917        <listeners>
    20           <add name="xml"/>
     18          <add name="xml" />
    2119        </listeners>
    2220      </source>
    2321      <source name="System.ServiceModel.MessageLogging">
    2422        <listeners>
    25           <add name="xml"/>
     23          <add name="xml" />
    2624        </listeners>
    2725      </source>
    28       <source name="myUserTraceSource"
    29               switchValue="Information, ActivityTracing">
     26      <source name="myUserTraceSource" switchValue="Information, ActivityTracing">
    3027        <listeners>
    31           <add name="xml"/>
     28          <add name="xml" />
    3229        </listeners>
    3330      </source>
    3431    </sources>
    3532    <sharedListeners>
    36       <add name="xml"
    37            type="System.Diagnostics.XmlWriterTraceListener"
    38                  initializeData="C:\logs\Traces.svclog" />
     33      <add name="xml" type="System.Diagnostics.XmlWriterTraceListener" initializeData="C:\logs\Traces.svclog" />
    3934    </sharedListeners>
    4035  </system.diagnostics>
     
    4237 
    4338  <connectionStrings>
    44     <add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true"
    45       providerName="System.Data.SqlClient" />
    46     <add name="DefaultConnection" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=aspnet_eb6c1a930dad4e2e9eaf3dcd73e6f924;Integrated Security=True;MultipleActiveResultSets=True"
    47       providerName="System.Data.SqlClient" />
    48     <add name="HeuristicLab.Authentication" connectionString="ADJUST_ME"/>
     39    <add name="HeuristicLab.Authentication" connectionString="ADJUST_ME" />
    4940  </connectionStrings>
    5041  <appSettings>
     
    6657      <forms loginUrl="~/Account/LogOn" timeout="2880" />
    6758    </authentication>
    68     <membership>
    69       <providers>
    70         <clear/>
    71         <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"/>
     59    <membership defaultProvider="AspNetSqlMembershipProvider">
     60      <providers>
     61        <clear />
     62        <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" />
     63        <!-- add applicationName="MockupProvider" name="MockupMembershipProvider" type="HeuristicLab.Services.Optimization.ControllerService.Mockup.MockupMembershipProvider"/ -->
    7264      </providers>
    7365    </membership>
     
    7971      </providers>
    8072    </profile>
    81     <roleManager enabled="true">
     73    <roleManager enabled="true" defaultProvider="AspNetSqlRoleProvider">
    8274      <providers>
    8375        <clear />
    84         <add connectionStringName="HeuristicLab.Authentication" applicationName="HeuristicLab.Authentication"
    85           name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" />
     76        <add connectionStringName="HeuristicLab.Authentication" applicationName="HeuristicLab.Authentication" name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" />
     77        <!-- add applicationName="MockupProvider" name="MockupRoleProvider" type="HeuristicLab.Services.Optimization.ControllerService.Mockup.MockupRoleProvider" /-->
    8678      </providers>
    8779    </roleManager>
     
    10193      </providers>
    10294    </sessionState>
     95
    10396  </system.web>
    10497  <system.webServer>
     
    128121  <system.serviceModel>
    129122    <diagnostics>
    130       <messageLogging logEntireMessage="true" logMalformedMessages="true" logMessagesAtServiceLevel="true" logMessagesAtTransportLevel="true" maxMessagesToLog="3000"/>
     123      <messageLogging logEntireMessage="true" logMalformedMessages="true" logMessagesAtServiceLevel="true" logMessagesAtTransportLevel="true" maxMessagesToLog="3000" />
    131124    </diagnostics>
    132125    <bindings>
    133126      <wsHttpBinding>
    134127        <binding name="WSHttpBinding_IControllerService" receiveTimeout="00:10:00" sendTimeout="00:10:00" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647">
    135           <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647"/>
     128          <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
    136129          <security mode="Message">
    137             <transport clientCredentialType="Certificate"/>
    138             <message clientCredentialType="UserName"/>
     130            <transport clientCredentialType="Certificate" />
     131            <message clientCredentialType="UserName" />
    139132          </security>
    140133        </binding>
     
    142135          <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
    143136          <security mode="Message">
    144             <transport clientCredentialType="Certificate"/>
    145             <message clientCredentialType="UserName"/>
     137            <transport clientCredentialType="Certificate" />
     138            <message clientCredentialType="UserName" />
    146139          </security>
    147140        </binding>
     
    152145        <behavior name="ServiceBehaviour_IControllerService">
    153146          <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
    154           <serviceMetadata httpGetEnabled="true" httpsGetEnabled="false"/>
     147          <serviceMetadata httpGetEnabled="true" httpsGetEnabled="false" />
    155148          <!-- 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 -->
    156           <serviceDebug httpHelpPageEnabled="true" includeExceptionDetailInFaults="true"/>
    157           <serviceAuthorization principalPermissionMode="UseAspNetRoles" roleProviderName="AspNetSqlRoleProvider"/>
     149          <serviceDebug httpHelpPageEnabled="true" includeExceptionDetailInFaults="true" />
     150          <serviceAuthorization principalPermissionMode="UseAspNetRoles" roleProviderName="AspNetSqlRoleProvider" />
     151          <!--serviceAuthorization principalPermissionMode="UseAspNetRoles" roleProviderName="MockupRoleProvider" /-->
    158152          <serviceCredentials>
    159             <serviceCertificate findValue="localhost" x509FindType="FindBySubjectName"/>
    160             <userNameAuthentication userNamePasswordValidationMode="MembershipProvider" membershipProviderName="AspNetSqlMembershipProvider"/>
     153            <serviceCertificate findValue="localhost" x509FindType="FindBySubjectName" />
     154            <userNameAuthentication userNamePasswordValidationMode="MembershipProvider" membershipProviderName="AspNetSqlMembershipProvider" />
     155            <!--userNameAuthentication userNamePasswordValidationMode="MembershipProvider" membershipProviderName="MockupMembershipProvider" /-->
    161156          </serviceCredentials>
    162           <serviceSecurityAudit auditLogLocation="Application" suppressAuditFailure="false" messageAuthenticationAuditLevel="SuccessOrFailure"/>
    163           <serviceThrottling maxConcurrentCalls="100"/>
    164           <dataContractSerializer maxItemsInObjectGraph="2147483647"/>
     157          <serviceSecurityAudit auditLogLocation="Application" suppressAuditFailure="false" messageAuthenticationAuditLevel="SuccessOrFailure" />
     158          <serviceThrottling maxConcurrentCalls="100" />
     159          <dataContractSerializer maxItemsInObjectGraph="2147483647" />
    165160        </behavior>
    166161      </serviceBehaviors>
     
    172167            </serviceCertificate>
    173168          </clientCredentials>
    174           <dataContractSerializer maxItemsInObjectGraph="2147483647"/>
     169          <dataContractSerializer maxItemsInObjectGraph="2147483647" />
    175170        </behavior>
    176171      </endpointBehaviors>
     
    178173    <services>
    179174      <service behaviorConfiguration="ServiceBehaviour_IControllerService" name="HeuristicLab.Services.Optimization.ControllerService.PlaceholderControllerService">
    180         <endpoint address="mex" binding="mexHttpBinding" bindingConfiguration="" name="MexEndpoint" contract="IMetadataExchange"/>
    181         <endpoint binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IControllerService" name="WSHttpBinding_IControllerService" contract="HeuristicLab.Services.Optimization.ControllerService.IControllerService"/>
     175        <endpoint address="mex" binding="mexHttpBinding" bindingConfiguration="" name="MexEndpoint" contract="IMetadataExchange" />
     176        <endpoint binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IControllerService" name="WSHttpBinding_IControllerService" contract="HeuristicLab.Services.Optimization.ControllerService.IControllerService" />
    182177      </service>
    183178    </services>
    184179    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
    185180    <client>
    186       <endpoint address="http://localhost:8080/ControllerService.svc" behaviorConfiguration="LocalCertValidation"
    187           binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IControllerService"
    188           contract="HeuristicLab.Services.Optimization.ControllerService.IControllerService" name="WSHttpBinding_IControllerService">
    189         <identity>
    190           <certificate encodedValue="ADJUST_ME" />
    191         </identity>
    192       </endpoint>
    193       <endpoint address="http://127.0.0.1:81/HiveService.svc" behaviorConfiguration="LocalCertValidation"
    194          binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IHiveService" contract="HeuristicLab.Clients.Hive.IHiveService" name="WSHttpBinding_IHiveService">
    195         <identity>
    196           <certificate encodedValue="ADJUST_ME" />
    197         </identity>
    198       </endpoint>
    199       <!--
    200       <endpoint address="http://optimization.cloudapp.net/HiveService.svc" behaviorConfiguration="LocalCertValidation"
    201          binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IHiveService" contract="HeuristicLab.Clients.Hive.IHiveService" name="WSHttpBinding_IHiveService">
    202         <identity>
    203           <certificate encodedValue="ADJUST_ME" />
    204         </identity>
    205       </endpoint>
    206       -->
     181
     182     
     183      <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">
     184        <identity>
     185          <certificate encodedValue="ADJUST_ME" />
     186        </identity>
     187      </endpoint>
     188     
     189      <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">
     190        <identity>
     191          <certificate encodedValue="ADJUST_ME" />
     192        </identity>
     193      </endpoint>
     194     
     195     
     196      <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">
     197        <identity>
     198          <certificate encodedValue="ADJUST_ME" />
     199        </identity>
     200      </endpoint>
     201     
     202      <endpoint address="http://optimization1.cloudapp.net/HiveService.svc" behaviorConfiguration="LocalCertValidation" binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IHiveService" contract="HeuristicLab.Clients.Hive.IHiveService" name="WSHttpBinding_Remote_IHiveService">
     203        <identity>
     204          <certificate encodedValue="ADJUST_ME" />
     205        </identity>
     206      </endpoint>
     207     
    207208    </client>
    208209  </system.serviceModel>
  • branches/OaaS/HeuristicLab.Services.Optimization.Web/WebRole.cs

    r8958 r9166  
    2929      }
    3030
     31      RoleEnvironment.Changed += RoleEnvironmentChanged;
     32
    3133      return base.OnStart();
     34    }
     35
     36    private void RoleEnvironmentChanged(object sender, RoleEnvironmentChangedEventArgs e) {
    3237    }
    3338  }
  • branches/OaaS/HeuristicLab.Services.Optimization/ServiceConfiguration.Cloud.cscfg

    r8817 r9166  
    2424      <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountEncryptedPassword" value="MIIBnQYJKoZIhvcNAQcDoIIBjjCCAYoCAQAxggFOMIIBSgIBADAyMB4xHDAaBgNVBAMME1dpbmRvd3MgQXp1cmUgVG9vbHMCEBiSEYQzfxGpQrRVsLegHyUwDQYJKoZIhvcNAQEBBQAEggEALEyQxFoVGXNmWbDtfIra3tjA33W3n9ESgfWKGKv3f0Zsggkm3OzznfY9A8HIoZ7WMOvjl8l8gjQTSxSKGJG8052JM1V7y16jM/bjtShmk7N9h2vdX0rjxXLpdXjGji59PeL6rKiGu2ewPbJhNhvdTStqnpHydnvlb79J2ZbK8E5f+7ngCD7Gy9RQc8zm+1y3UzoqXxZlSVKhsVIvZMoIOuJM4TO7klDZJEsG3Rx/CUXFPAPf15H46t1B0zy2FrMW32BeWFr40qbUW+tKjg8Uiiw4EhHDtqryhzE3ZkjoR0iz7KUQBPDtvq8rSz049EW6ejgGuI2jDyW3iLfIeqfZEzAzBgkqhkiG9w0BBwEwFAYIKoZIhvcNAwcECFNbToWlDaTpgBAOc6871l7N2o4Mut92Cooo" />
    2525      <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountExpiration" value="2013-07-05T23:59:59.0000000+02:00" />
     26      <Setting name="Cloudia.WindowsAzure.Storage" value="ADJUST_ME" />
     27      <Setting name="HiveEndpointName" value="WSHttpBinding_Remote_IHiveService" />
     28      <Setting name="ControllerEndpointName" value="WSHttpBinding_Remote_IControllerService" />
    2629    </ConfigurationSettings>
    2730    <Certificates>
  • branches/OaaS/HeuristicLab.Services.Optimization/ServiceConfiguration.Local.cscfg

    r8817 r9166  
    2424      <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountEncryptedPassword" value="MIIBnQYJKoZIhvcNAQcDoIIBjjCCAYoCAQAxggFOMIIBSgIBADAyMB4xHDAaBgNVBAMME1dpbmRvd3MgQXp1cmUgVG9vbHMCEBiSEYQzfxGpQrRVsLegHyUwDQYJKoZIhvcNAQEBBQAEggEALEyQxFoVGXNmWbDtfIra3tjA33W3n9ESgfWKGKv3f0Zsggkm3OzznfY9A8HIoZ7WMOvjl8l8gjQTSxSKGJG8052JM1V7y16jM/bjtShmk7N9h2vdX0rjxXLpdXjGji59PeL6rKiGu2ewPbJhNhvdTStqnpHydnvlb79J2ZbK8E5f+7ngCD7Gy9RQc8zm+1y3UzoqXxZlSVKhsVIvZMoIOuJM4TO7klDZJEsG3Rx/CUXFPAPf15H46t1B0zy2FrMW32BeWFr40qbUW+tKjg8Uiiw4EhHDtqryhzE3ZkjoR0iz7KUQBPDtvq8rSz049EW6ejgGuI2jDyW3iLfIeqfZEzAzBgkqhkiG9w0BBwEwFAYIKoZIhvcNAwcECFNbToWlDaTpgBAOc6871l7N2o4Mut92Cooo" />
    2525      <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountExpiration" value="2013-07-05T23:59:59.0000000+02:00" />
     26      <Setting name="Cloudia.WindowsAzure.Storage" value="ADJUST_ME" />
     27      <Setting name="HiveEndpointName" value="WSHttpBinding_Local_IHiveService" />
     28      <Setting name="ControllerEndpointName" value="WSHttpBinding_Local_IControllerService" />
    2629    </ConfigurationSettings>
    2730    <Certificates>
  • branches/OaaS/HeuristicLab.Services.Optimization/ServiceDefinition.build.csdef

    r8817 r9166  
    3232      <Certificate name="localhost" storeLocation="LocalMachine" storeName="My" />
    3333    </Certificates>
    34     <Contents>
    35       <Content destination=".\">
    36         <SourceDirectory path="rcf/Debug/HeuristicLab.Services.Hive.WebRoleContent\" />
    37       </Content>
    38     </Contents>
    3934  </WebRole>
    4035  <WebRole name="HeuristicLab.Services.Optimization.Web" vmsize="Small">
     
    5651      <Certificate name="localhost" storeLocation="LocalMachine" storeName="My" />
    5752    </Certificates>
     53    <ConfigurationSettings>
     54      <Setting name="Cloudia.WindowsAzure.Storage" />
     55      <Setting name="HiveEndpointName" />
     56      <Setting name="ControllerEndpointName" />
     57    </ConfigurationSettings>
    5858  </WebRole>
    5959</ServiceDefinition>
  • branches/OaaS/HeuristicLab.Services.Optimization/ServiceDefinition.csdef

    r8817 r9166  
    4242      <Certificate name="localhost" storeLocation="LocalMachine" storeName="My" />
    4343    </Certificates>
     44    <ConfigurationSettings>
     45      <Setting name="Cloudia.WindowsAzure.Storage" />
     46      <Setting name="HiveEndpointName" />
     47      <Setting name="ControllerEndpointName" />
     48    </ConfigurationSettings>
    4449  </WebRole>
    4550</ServiceDefinition>
  • branches/OaaS/otis

    • Property svn:ignore set to
      src
      tools
      ref
      go.bat
      notes.txt
      otis.build
  • branches/OaaS/otis/build/bin

    • Property svn:ignore set to
      Release
  • branches/OaaS/otis/build/bin/Debug

    • Property svn:ignore set to
      Otis.Sample.exe
      Otis.Sample.exe.config
      Otis.Sample.pdb
      Otis.Sample.vshost.exe
      Otis.Sample.vshost.exe.config
      Otis.Sample.vshost.exe.manifest
      Otis.XML
Note: See TracChangeset for help on using the changeset viewer.