Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/10/13 13:29:24 (12 years ago)
Author:
fschoepp
Message:

#1888:

  • Added input parameters to the run class. They will be populated by the back-end and returned to the web pages which renders them.
  • Added a ParameterMapper class which converts HL specific model classes to OaaS independent classes. The conversion gets delegated to IParameterHandler which have to be implemented manually and registered for a certain Type before. All parameters which can be converted to IStringConvertible, IStringConvertibleMatrix, IString* will be converted into a OaaS-StringValue instance.
  • Added IParameterHandlers for PathTSPTour and PermutationType (required for TSP).
  • AlgorithmConverter now makes sure that the id of a run is unique. (All runs of a RunList will be shown now.)
  • Web pages are capable of rendering both the results of a run and their input parameters (added a accordion to wrap their content).
  • Renamed "Traveling Salesman Problem" to "Genetic Algorithm - TSP".
  • Changed js-files to render both input and result parameters of a Run.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/OaaS/HeuristicLab.Services.Optimization.Controller/Parsers/AlgorithmConverter.cs

    r9324 r9350  
    189189      jrun["name"] = run.Name;
    190190      jrun["results"] = ConvertParametersToJson(run.Results);
     191      jrun["params"] = ConvertParametersToJson(run.InputParameters);
    191192      return jrun;
    192193    }
     
    196197      foreach (var run in runs)
    197198        jarray.Add(ConvertRunToJson(run));
     199     
     200     
     201      // if there are multiple different jobs to execute and they have the same id, we must change it here manually
     202      var maxId = new Dictionary<string,int>();
     203      for (int i = 0; i < jarray.Count; i++) {
     204        for (int j = i + 1; j < jarray.Count; j++) {
     205          if (jarray[i]["id"].ToString() == jarray[j]["id"].ToString()) {
     206            int max;
     207            if (!maxId.TryGetValue(jarray[i]["id"].ToString(), out max)) {
     208              max = 1;
     209              maxId[jarray[i]["id"].ToString()] = max;             
     210            }
     211            maxId[jarray[i]["id"].ToString()]++;
     212            // change j's entry
     213            jarray[j]["id"] = jarray[j]["id"].ToString() + " (" + max + ")";
     214            jarray[j]["name"] = jarray[j]["name"] + " (" + max + ")";
     215          }
     216        }
     217      }
    198218      return jarray;
    199219    }
Note: See TracChangeset for help on using the changeset viewer.