- Timestamp:
- 01/07/20 17:19:05 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/JCGenerator.cs
r17394 r17395 20 20 } 21 21 22 public static string GenerateTemplate(I Algorithm algorithm) {22 public static string GenerateTemplate(IOptimizer optimizer) { 23 23 // data container 24 24 GenData genData = new GenData() { … … 28 28 29 29 ProtoBufSerializer serializer = new ProtoBufSerializer(); 30 serializer.Serialize( algorithm, @"C:\Workspace\template.hl");30 serializer.Serialize(optimizer, @"C:\Workspace\template.hl"); 31 31 genData.Template[Constants.Metadata][Constants.HLFileLocation] = @"C:\Workspace\template.hl"; 32 32 … … 34 34 // template and save it an JArray incl. all parameters of the JsonItem, 35 35 // 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); 39 37 40 38 // save the JArray with JsonItems (= IParameterizedItems)
Note: See TracChangeset
for help on using the changeset viewer.