- Timestamp:
- 05/12/20 17:06:04 (5 years ago)
- Location:
- branches/3026_IntegrationIntoSymSpace
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.App/Runner.cs
r17519 r17540 51 51 if (configuredResults.Contains(res.Key)) { 52 52 if (res.Value is ISymbolicRegressionSolution solution) { 53 /* TEST */54 var csFormatter = new CSharpSymbolicExpressionTreeStringFormatter();55 File.WriteAllText(@"C:\Workspace\output\csFormatted.cs", csFormatter.Format(solution.Model.SymbolicExpressionTree));56 /* END TEST */57 53 var formatter = new SymbolicDataAnalysisExpressionMATLABFormatter(); 58 54 var x = formatter.Format(solution.Model.SymbolicExpressionTree); -
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Converters/RegressionProblemDataConverter.cs
r17519 r17540 254 254 }; 255 255 } 256 257 258 private IJsonItem GetTargetVariable(IItem item) => 259 new StringJsonItem() { 256 257 258 private IJsonItem GetTargetVariable(IItem item) { 259 var vars = (IEnumerable<StringValue>)((dynamic)item).InputVariables; 260 return new StringJsonItem() { 260 261 Name = TargetVariable, 261 262 Value = (string)((dynamic)item).TargetVariable, 262 //ConcreteRestrictedItems = variables.Select(x => x.Value) 263 }; 264 265 private IJsonItem GetAllowedInputVariables(IItem item) => 266 new StringArrayJsonItem() { 263 ConcreteRestrictedItems = vars.Select(x => x.Value) 264 }; 265 } 266 267 private IJsonItem GetAllowedInputVariables(IItem item) { 268 var vars = (IEnumerable<StringValue>)((dynamic)item).InputVariables; 269 return new StringArrayJsonItem() { 267 270 Name = AllowedInputVariables, 268 271 Value = ((IEnumerable<string>)((dynamic)item).AllowedInputVariables).ToArray(), 269 //ConcreteRestrictedItems = variables.Select(x => x.Value) 270 }; 272 ConcreteRestrictedItems = vars.Select(x => x.Value) 273 }; 274 } 271 275 #endregion 272 276 } -
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/HeuristicLab.JsonInterface.csproj
r17483 r17540 63 63 <Compile Include="Constants.cs" /> 64 64 <Compile Include="Converters\AlgorithmConverter.cs" /> 65 <Compile Include="Converters\BatchRunConverter.cs" /> 66 <Compile Include="Converters\ExperimentConverter.cs" /> 65 67 <Compile Include="Converters\RegressionProblemDataConverter.cs" /> 66 68 <Compile Include="Converters\ResultParameterConverter.cs" /> -
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/JCGenerator.cs
r17519 r17540 31 31 #region Serialize HL File 32 32 ProtoBufSerializer serializer = new ProtoBufSerializer(); 33 string hlFilePath = fullPath + templateName + ".hl";33 string hlFilePath = Path.Combine(fullPath, templateName + ".hl"); 34 34 serializer.Serialize(optimizer, hlFilePath); 35 35 #endregion -
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/JsonItemConverter.cs
r17519 r17540 62 62 IJsonItemConverter converter = GetConverter(item.GetType()); 63 63 if (converter == null) return new UnsupportedJsonItem(); 64 IJsonItem tmp = GetConverter(item.GetType()).Extract(item, root);64 IJsonItem tmp = converter.Extract(item, root); 65 65 ExtractCache.Add(hash, tmp); 66 66 return tmp;
Note: See TracChangeset
for help on using the changeset viewer.