Changeset 6140 for trunk/sources
- Timestamp:
- 05/06/11 15:08:57 (14 years ago)
- Location:
- trunk/sources
- Files:
-
- 5 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.ExternalEvaluation.Views/3.3/HeuristicLab.Problems.ExternalEvaluation.Views-3.3.csproj
r5832 r6140 111 111 <ItemGroup> 112 112 <None Include="HeuristicLabProblemsExternalEvaluationViewsPlugin.cs.frame" /> 113 <Compile Include="EvaluationCacheView.cs"> 114 <SubType>UserControl</SubType> 115 </Compile> 116 <Compile Include="EvaluationCacheView.Designer.cs"> 117 <DependentUpon>EvaluationCacheView.cs</DependentUpon> 118 </Compile> 113 119 <Compile Include="EvaluationServiceClientView.cs"> 114 120 <SubType>UserControl</SubType> … … 197 203 </BootstrapperPackage> 198 204 </ItemGroup> 205 <ItemGroup> 206 <EmbeddedResource Include="EvaluationCacheView.resx"> 207 <DependentUpon>EvaluationCacheView.cs</DependentUpon> 208 </EmbeddedResource> 209 </ItemGroup> 199 210 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> 200 211 <PropertyGroup> -
trunk/sources/HeuristicLab.Problems.ExternalEvaluation/3.3/ExternalEvaluator.cs
r5445 r6140 32 32 [StorableClass] 33 33 public class ExternalEvaluator : ValuesCollector, IExternalEvaluationProblemEvaluator { 34 34 35 public ILookupParameter<DoubleValue> QualityParameter { 35 36 get { return (ILookupParameter<DoubleValue>)Parameters["Quality"]; } … … 43 44 } 44 45 45 pr ivateSolutionMessageBuilder MessageBuilder {46 protected SolutionMessageBuilder MessageBuilder { 46 47 get { return MessageBuilderParameter.Value; } 47 48 } … … 61 62 62 63 public override IOperation Apply() { 64 SolutionMessage message = BuildSolutionMessage(); 65 63 66 IEvaluationServiceClient client = ClientParameter.ActualValue; 67 QualityMessage answer = client.Evaluate(message); 68 69 if (QualityParameter.ActualValue == null) 70 QualityParameter.ActualValue = new DoubleValue(answer.Quality); 71 else QualityParameter.ActualValue.Value = answer.Quality; 72 73 return base.Apply(); 74 } 75 76 protected virtual SolutionMessage BuildSolutionMessage() { 64 77 SolutionMessage.Builder protobufBuilder = SolutionMessage.CreateBuilder(); 65 78 protobufBuilder.SolutionId = 0; … … 71 84 try { 72 85 MessageBuilder.AddToMessage(value, name, protobufBuilder); 73 } 74 catch (ArgumentException ex) { 86 } catch (ArgumentException ex) { 75 87 throw new InvalidOperationException("ERROR in " + Name + ": Parameter " + name + " cannot be added to the message.", ex); 76 88 } 77 89 } 78 90 } 79 QualityMessage answer = client.Evaluate(protobufBuilder.Build()); 80 if (QualityParameter.ActualValue == null) 81 QualityParameter.ActualValue = new DoubleValue(answer.Quality); 82 else QualityParameter.ActualValue.Value = answer.Quality; 83 84 return base.Apply(); 91 return protobufBuilder.Build(); 85 92 } 86 93 } -
trunk/sources/HeuristicLab.Problems.ExternalEvaluation/3.3/HeuristicLab.Problems.ExternalEvaluation-3.3.csproj
r5163 r6140 98 98 </Reference> 99 99 <Reference Include="System.Drawing" /> 100 <Reference Include="System.Windows.Forms" /> 100 101 <Reference Include="System.Xml.Linq"> 101 102 <RequiredTargetFramework>3.5</RequiredTargetFramework> … … 115 116 <Compile Include="Converters\IntegerConverter.cs" /> 116 117 <Compile Include="Converters\StringConverter.cs" /> 118 <Compile Include="CachedExternalEvaluator.cs" /> 119 <Compile Include="EvaluationCache.cs" /> 117 120 <Compile Include="Drivers\EvaluationServiceClient.cs" /> 118 121 <Compile Include="Drivers\EvaluationChannel.cs" /> … … 150 153 <Name>HeuristicLab.Common-3.3</Name> 151 154 </ProjectReference> 155 <ProjectReference Include="..\..\HeuristicLab.Core.Views\3.3\HeuristicLab.Core.Views-3.3.csproj"> 156 <Project>{E226881D-315F-423D-B419-A766FE0D8685}</Project> 157 <Name>HeuristicLab.Core.Views-3.3</Name> 158 </ProjectReference> 152 159 <ProjectReference Include="..\..\HeuristicLab.Core\3.3\HeuristicLab.Core-3.3.csproj"> 153 160 <Project>{C36BD924-A541-4A00-AFA8-41701378DDC5}</Project> … … 165 172 <Project>{6908BDCE-D925-43F3-94AC-A531E6DF2591}</Project> 166 173 <Name>ProtocolBuffers</Name> 174 </ProjectReference> 175 <ProjectReference Include="..\..\HeuristicLab.MainForm.WindowsForms\3.3\HeuristicLab.MainForm.WindowsForms-3.3.csproj"> 176 <Project>{AB687BBE-1BFE-476B-906D-44237135431D}</Project> 177 <Name>HeuristicLab.MainForm.WindowsForms-3.3</Name> 178 </ProjectReference> 179 <ProjectReference Include="..\..\HeuristicLab.MainForm\3.3\HeuristicLab.MainForm-3.3.csproj"> 180 <Project>{3BD61258-31DA-4B09-89C0-4F71FEF5F05A}</Project> 181 <Name>HeuristicLab.MainForm-3.3</Name> 167 182 </ProjectReference> 168 183 <ProjectReference Include="..\..\HeuristicLab.Operators\3.3\HeuristicLab.Operators-3.3.csproj">
Note: See TracChangeset
for help on using the changeset viewer.