- Timestamp:
- 05/31/10 21:06:45 (15 years ago)
- Location:
- trunk/sources
- Files:
-
- 12 added
- 1 deleted
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/sources/HeuristicLab.Problems.ExternalEvaluation.Views/3.3/EvaluationProcessChannelView.Designer.cs ¶
r3872 r3881 1 namespace HeuristicLab.Problems.ExternalEvaluation.Views { 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 * 5 * This file is part of HeuristicLab. 6 * 7 * HeuristicLab is free software: you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation, either version 3 of the License, or 10 * (at your option) any later version. 11 * 12 * HeuristicLab is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 #endregion 21 22 namespace HeuristicLab.Problems.ExternalEvaluation.Views { 2 23 partial class EvaluationProcessChannelView { 3 24 /// <summary> -
TabularUnified trunk/sources/HeuristicLab.Problems.ExternalEvaluation.Views/3.3/EvaluationServiceClientView.Designer.cs ¶
r3872 r3881 1 namespace HeuristicLab.Problems.ExternalEvaluation.Views { 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 * 5 * This file is part of HeuristicLab. 6 * 7 * HeuristicLab is free software: you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation, either version 3 of the License, or 10 * (at your option) any later version. 11 * 12 * HeuristicLab is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 #endregion 21 22 namespace HeuristicLab.Problems.ExternalEvaluation.Views { 2 23 partial class EvaluationServiceClientView { 3 24 /// <summary> -
TabularUnified trunk/sources/HeuristicLab.Problems.ExternalEvaluation.Views/3.3/HeuristicLab.Problems.ExternalEvaluation.Views-3.3.csproj ¶
r3872 r3881 97 97 <Compile Include="HeuristicLabProblemsExternalEvaluationViewsPlugin.cs" /> 98 98 <Compile Include="Properties\AssemblyInfo.cs" /> 99 <Compile Include="SolutionMessageBuilderView.cs"> 100 <SubType>UserControl</SubType> 101 </Compile> 102 <Compile Include="SolutionMessageBuilderView.Designer.cs"> 103 <DependentUpon>SolutionMessageBuilderView.cs</DependentUpon> 104 </Compile> 99 105 </ItemGroup> 100 106 <ItemGroup> 107 <ProjectReference Include="..\..\HeuristicLab.Collections\3.3\HeuristicLab.Collections-3.3.csproj"> 108 <Project>{958B43BC-CC5C-4FA2-8628-2B3B01D890B6}</Project> 109 <Name>HeuristicLab.Collections-3.3</Name> 110 </ProjectReference> 101 111 <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj"> 102 112 <Project>{A9AD58B9-3EF9-4CC1-97E5-8D909039FF5C}</Project> … … 138 148 <DependentUpon>EvaluationServiceClientView.cs</DependentUpon> 139 149 </EmbeddedResource> 150 <EmbeddedResource Include="SolutionMessageBuilderView.resx"> 151 <DependentUpon>SolutionMessageBuilderView.cs</DependentUpon> 152 </EmbeddedResource> 140 153 </ItemGroup> 141 154 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> -
TabularUnified trunk/sources/HeuristicLab.Problems.ExternalEvaluation.Views/3.3/HeuristicLabProblemsExternalEvaluationViewsPlugin.cs ¶
r3865 r3881 29 29 [Plugin("HeuristicLab.Problems.ExternalEvaluation.Views", "3.3.0.0")] 30 30 [PluginFile("HeuristicLab.Problems.ExternalEvaluation.Views-3.3.dll", PluginFileType.Assembly)] 31 //[PluginDependency("HeuristicLab.Collections", "3.3")]31 [PluginDependency("HeuristicLab.Collections", "3.3")] 32 32 [PluginDependency("HeuristicLab.Common", "3.3")] 33 33 //[PluginDependency("HeuristicLab.Common.Resources", "3.3")] -
TabularUnified trunk/sources/HeuristicLab.Problems.ExternalEvaluation/3.3/ExternalEvaluator.cs ¶
r3872 r3881 38 38 } 39 39 40 public IValueParameter<SolutionMessageBuilder> MessageBuilderParameter { 41 get { return (IValueParameter<SolutionMessageBuilder>)Parameters["MessageBuilder"]; } 42 } 43 44 private SolutionMessageBuilder MessageBuilder { 45 get { return MessageBuilderParameter.Value; } 46 } 47 40 48 public ExternalEvaluator() 41 49 : base() { 42 50 Parameters.Add(new LookupParameter<DoubleValue>("Quality", "The quality of the current solution.")); 43 51 Parameters.Add(new ValueLookupParameter<IEvaluationServiceClient>("Client", "The client that communicates with the external process.")); 52 Parameters.Add(new ValueParameter<SolutionMessageBuilder>("MessageBuilder", "The message builder that converts from HeuristicLab objects to SolutionMessage representation.", new SolutionMessageBuilder())); 44 53 } 45 54 46 55 public override IOperation Apply() { 47 56 IEvaluationServiceClient client = ClientParameter.ActualValue; 48 SolutionMessage.Builder messageBuilder = SolutionMessage.CreateBuilder();49 messageBuilder.SolutionId = 0;57 SolutionMessage.Builder protobufBuilder = SolutionMessage.CreateBuilder(); 58 protobufBuilder.SolutionId = 0; 50 59 foreach (IParameter param in CollectedValues) { 51 60 IItem value = param.ActualValue; … … 54 63 string name = lookupParam != null ? lookupParam.TranslatedName : param.Name; 55 64 try { 56 value.AddToSolutionMessage(name, messageBuilder);65 MessageBuilder.AddToMessage(value, name, protobufBuilder); 57 66 } catch (ArgumentException ex) { 58 67 throw new InvalidOperationException("ERROR in " + Name + ": Parameter " + name + " cannot be added to the message.", ex); … … 60 69 } 61 70 } 62 QualityMessage answer = client.Evaluate( messageBuilder.Build());71 QualityMessage answer = client.Evaluate(protobufBuilder.Build()); 63 72 if (QualityParameter.ActualValue == null) 64 73 QualityParameter.ActualValue = new DoubleValue(answer.Quality); -
TabularUnified trunk/sources/HeuristicLab.Problems.ExternalEvaluation/3.3/HeuristicLab.Problems.ExternalEvaluation-3.3.csproj ¶
r3872 r3881 83 83 <ItemGroup> 84 84 <None Include="HeuristicLabProblemsExternalEvaluationPlugin.cs.frame" /> 85 <Compile Include="Converters\BoolConverter.cs" /> 86 <Compile Include="Converters\TimeSpanValueConverter.cs" /> 87 <Compile Include="Converters\DateTimeValueConverter.cs" /> 88 <Compile Include="Converters\DoubleConverter.cs" /> 89 <Compile Include="Converters\IntegerConverter.cs" /> 90 <Compile Include="Converters\StringConverter.cs" /> 85 91 <Compile Include="Drivers\EvaluationServiceClient.cs" /> 86 92 <Compile Include="Drivers\EvaluationChannel.cs" /> … … 93 99 <Compile Include="Interfaces\IEvaluationChannel.cs" /> 94 100 <Compile Include="Interfaces\IExternalEvaluationProblemEvaluator.cs" /> 101 <Compile Include="Interfaces\IItemToSolutionMessageConverter.cs" /> 95 102 <Compile Include="Properties\AssemblyInfo.cs" /> 96 103 <None Include="Properties\AssemblyInfo.frame" /> 97 104 <Compile Include="Protos\ExternalEvaluationMessages.cs" /> 98 <Compile Include="SolutionMessageBuild ing.cs" />105 <Compile Include="SolutionMessageBuilder.cs" /> 99 106 <None Include="Protos\ProcessProtos.cmd" /> 100 107 </ItemGroup> -
TabularUnified trunk/sources/HeuristicLab.Problems.ExternalEvaluation/3.3/Protos/ExternalEvaluationMessages.proto ¶
r3872 r3881 14 14 required string name = 1; 15 15 repeated int32 data = 2; 16 optional int32 length = 3; 16 17 } 17 18 repeated IntegerArrayVariable integerArrayVars = 3; … … 26 27 required string name = 1; 27 28 repeated double data = 2; 29 optional int32 length = 3; 28 30 } 29 31 repeated DoubleArrayVariable doubleArrayVars = 5; … … 38 40 required string name = 1; 39 41 repeated bool data = 2; 42 optional int32 length = 3; 40 43 } 41 44 repeated BoolArrayVariable boolArrayVars = 7; … … 50 53 required string name = 1; 51 54 repeated string data = 2; 55 optional int32 length = 3; 52 56 } 53 57 repeated StringArrayVariable stringArrayVars = 9;
Note: See TracChangeset
for help on using the changeset viewer.