Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/07/20 17:19:05 (4 years ago)
Author:
dpiringe
Message:

#3026:

  • moved from usage of IAlgorithm to IOptimizer (in JCGenerator and JsonTemplateInstantiator)
  • added new converter: AlgorithmConverter
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/JCGenerator.cs

    r17394 r17395  
    2020    }
    2121   
    22     public static string GenerateTemplate(IAlgorithm algorithm) {
     22    public static string GenerateTemplate(IOptimizer optimizer) {
    2323      // data container
    2424      GenData genData = new GenData() {
     
    2828
    2929      ProtoBufSerializer serializer = new ProtoBufSerializer();
    30       serializer.Serialize(algorithm, @"C:\Workspace\template.hl");
     30      serializer.Serialize(optimizer, @"C:\Workspace\template.hl");
    3131      genData.Template[Constants.Metadata][Constants.HLFileLocation] = @"C:\Workspace\template.hl";
    3232
     
    3434      // template and save it an JArray incl. all parameters of the JsonItem,
    3535      // which have parameters aswell
    36       AddInstantiableIItem(Constants.Algorithm, algorithm, genData);
    37       if (algorithm.Problem != null) // only when an problem exists
    38         AddInstantiableIItem(Constants.Problem, algorithm.Problem, genData);
     36      AddInstantiableIItem(Constants.Optimizer, optimizer, genData);
    3937
    4038      // save the JArray with JsonItems (= IParameterizedItems)
Note: See TracChangeset for help on using the changeset viewer.