- Timestamp:
- 07/08/16 14:40:02 (8 years ago)
- Location:
- branches/crossvalidation-2434
- Files:
-
- 1 deleted
- 11 edited
- 7 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/crossvalidation-2434
- Property svn:mergeinfo changed
-
branches/crossvalidation-2434/HeuristicLab.Problems.ExternalEvaluation/3.4/EvaluationCache.cs
r12012 r14029 30 30 using System.Text.RegularExpressions; 31 31 using System.Threading; 32 using Google.ProtocolBuffers; 32 33 using HeuristicLab.Common; 33 34 using HeuristicLab.Common.Resources; … … 47 48 48 49 public readonly string Key; 49 public double Value; 50 51 public CacheEntry(string key, double value) { 52 Key = key; 53 Value = value; 50 51 private QualityMessage message; 52 private byte[] rawMessage; 53 54 private object lockObject = new object(); 55 56 public byte[] RawMessage { 57 get { return rawMessage; } 58 set { 59 lock (lockObject) { 60 rawMessage = value; 61 message = null; 62 } 63 } 54 64 } 55 65 56 66 public CacheEntry(string key) { 57 67 Key = key; 68 } 69 70 public QualityMessage GetMessage(ExtensionRegistry extensions) { 71 lock (lockObject) { 72 if (message == null && rawMessage != null) 73 message = QualityMessage.ParseFrom(ByteString.CopyFrom(rawMessage), extensions); 74 } 75 return message; 76 } 77 public void SetMessage(QualityMessage value) { 78 lock (lockObject) { 79 message = value; 80 rawMessage = value.ToByteArray(); 81 } 58 82 } 59 83 … … 69 93 } 70 94 95 public string QualityString(IFormatProvider formatProvider = null) { 96 if (formatProvider == null) formatProvider = CultureInfo.CurrentCulture; 97 if (RawMessage == null) return "-"; 98 var msg = message ?? CreateBasicQualityMessage(); 99 switch (msg.Type) { 100 case QualityMessage.Types.Type.SingleObjectiveQualityMessage: 101 return msg.GetExtension(SingleObjectiveQualityMessage.QualityMessage_).Quality.ToString(formatProvider); 102 case QualityMessage.Types.Type.MultiObjectiveQualityMessage: 103 var qualities = msg.GetExtension(MultiObjectiveQualityMessage.QualityMessage_).QualitiesList; 104 return string.Format("[{0}]", string.Join(",", qualities.Select(q => q.ToString(formatProvider)))); 105 default: 106 return "-"; 107 } 108 } 109 private QualityMessage CreateBasicQualityMessage() { 110 var extensions = ExtensionRegistry.CreateInstance(); 111 ExternalEvaluationMessages.RegisterAllExtensions(extensions); 112 return QualityMessage.ParseFrom(ByteString.CopyFrom(rawMessage), extensions); 113 } 114 71 115 public override string ToString() { 72 return string.Format("{{{0} : {1}}}", Key, Value);73 } 74 } 75 76 public delegate double Evaluator(SolutionMessage message);116 return string.Format("{{{0} : {1}}}", Key, QualityString()); 117 } 118 } 119 120 public delegate QualityMessage Evaluator(SolutionMessage message); 77 121 #endregion 78 122 … … 126 170 127 171 #region Persistence 172 #region BackwardsCompatibility3.4 128 173 [Storable(Name = "Cache")] 129 private IEnumerable<KeyValuePair<string, double>> Cache_Persistence { 130 get { 131 if (IsPersistent) { 132 return GetCacheValues(); 133 } else { 134 return Enumerable.Empty<KeyValuePair<string, double>>(); 135 } 136 } 174 private IEnumerable<KeyValuePair<string, double>> Cache_Persistence_backwardscompatability { 175 get { return Enumerable.Empty<KeyValuePair<string, double>>(); } 137 176 set { 138 SetCacheValues(value); 139 } 177 var rawMessages = value.ToDictionary(kvp => kvp.Key, 178 kvp => QualityMessage.CreateBuilder() 179 .SetSolutionId(0) 180 .SetExtension( 181 SingleObjectiveQualityMessage.QualityMessage_, 182 SingleObjectiveQualityMessage.CreateBuilder().SetQuality(kvp.Value).Build()) 183 .Build().ToByteArray()); 184 SetCacheValues(rawMessages); 185 } 186 } 187 #endregion 188 [Storable(Name = "CacheNew")] 189 private IEnumerable<KeyValuePair<string, byte[]>> Cache_Persistence { 190 get { return IsPersistent ? GetCacheValues() : Enumerable.Empty<KeyValuePair<string, byte[]>>(); } 191 set { SetCacheValues(value); } 140 192 } 141 193 [StorableHook(HookType.AfterDeserialization)] … … 149 201 protected EvaluationCache(bool deserializing) : base(deserializing) { } 150 202 protected EvaluationCache(EvaluationCache original, Cloner cloner) 151 : base(original, cloner) {203 : base(original, cloner) { 152 204 SetCacheValues(original.GetCacheValues()); 153 205 Hits = original.Hits; … … 190 242 } 191 243 192 public double GetValue(SolutionMessage message, Evaluator evaluate) {244 public QualityMessage GetValue(SolutionMessage message, Evaluator evaluate, ExtensionRegistry extensions) { 193 245 var entry = new CacheEntry(message.ToString()); 194 246 bool lockTaken = false; … … 205 257 Monitor.Exit(cacheLock); 206 258 OnChanged(); 207 return node.Value. Value;259 return node.Value.GetMessage(extensions); 208 260 } else { 209 261 if (!waited && activeEvaluations.Contains(entry.Key)) { … … 217 269 OnChanged(); 218 270 try { 219 entry. Value = evaluate(message);271 entry.SetMessage(evaluate(message)); 220 272 Monitor.Enter(cacheLock, ref lockTaken); 221 273 index[entry] = list.AddLast(entry); 222 274 Trim(); 223 } 224 finally { 275 } finally { 225 276 if (!lockTaken) 226 277 Monitor.Enter(cacheLock, ref lockTaken); … … 231 282 } 232 283 OnChanged(); 233 return entry. Value;284 return entry.GetMessage(extensions); 234 285 } 235 286 } 236 287 } 237 } 238 finally { 288 } finally { 239 289 if (lockTaken) 240 290 Monitor.Exit(cacheLock); … … 250 300 } 251 301 252 private IEnumerable<KeyValuePair<string, double>> GetCacheValues() {302 private IEnumerable<KeyValuePair<string, byte[]>> GetCacheValues() { 253 303 lock (cacheLock) { 254 return index.ToDictionary(kvp => kvp.Key.Key, kvp => kvp.Key. Value);255 } 256 } 257 258 private void SetCacheValues(IEnumerable<KeyValuePair<string, double>> value) {304 return index.ToDictionary(kvp => kvp.Key.Key, kvp => kvp.Key.RawMessage); 305 } 306 } 307 308 private void SetCacheValues(IEnumerable<KeyValuePair<string, byte[]>> value) { 259 309 lock (cacheLock) { 260 list = new LinkedList<CacheEntry>();261 i ndex = new Dictionary<CacheEntry, LinkedListNode<CacheEntry>>();310 if (list == null) list = new LinkedList<CacheEntry>(); 311 if (index == null) index = new Dictionary<CacheEntry, LinkedListNode<CacheEntry>>(); 262 312 foreach (var kvp in value) { 263 var entry = new CacheEntry(kvp.Key) { Value = kvp.Value };313 var entry = new CacheEntry(kvp.Key) { RawMessage = kvp.Value }; 264 314 index[entry] = list.AddLast(entry); 265 315 } … … 274 324 "\"{0}\", {1}", 275 325 Regex.Replace(entry.Key, "\\s", "").Replace("\"", "\"\""), 276 entry. Value));326 entry.QualityString(CultureInfo.InvariantCulture))); 277 327 } 278 328 } -
branches/crossvalidation-2434/HeuristicLab.Problems.ExternalEvaluation/3.4/ExternalEvaluationProblem.cs
r12504 r14029 35 35 36 36 namespace HeuristicLab.Problems.ExternalEvaluation { 37 [Item("External Evaluation Problem ", "A problem that is evaluated in a different process.")]37 [Item("External Evaluation Problem (single-objective)", "A problem that is evaluated in a different process.")] 38 38 [Creatable(CreatableAttribute.Categories.ExternalEvaluationProblems, Priority = 100)] 39 39 [StorableClass] 40 public sealed class ExternalEvaluationProblem : SingleObjectiveBasicProblem<IEncoding> { 40 // BackwardsCompatibility3.3 41 // Rename class to SingleObjectiveExternalEvaluationProblem 42 public class ExternalEvaluationProblem : SingleObjectiveBasicProblem<IEncoding>, IExternalEvaluationProblem { 41 43 42 44 public static new Image StaticItemImage { … … 57 59 get { return (IFixedValueParameter<SingleObjectiveOptimizationSupportScript>)Parameters["SupportScript"]; } 58 60 } 61 62 private IFixedValueParameter<BoolValue> MaximizationParameter { 63 get { return (IFixedValueParameter<BoolValue>)Parameters["Maximization"]; } 64 } 59 65 #endregion 60 66 61 67 #region Properties 68 public new IEncoding Encoding { 69 get { return base.Encoding; } 70 set { base.Encoding = value; } 71 } 62 72 public EvaluationCache Cache { 63 73 get { return CacheParameter.Value; } … … 78 88 79 89 [StorableConstructor] 80 pr ivateExternalEvaluationProblem(bool deserializing) : base(deserializing) { }81 pr ivateExternalEvaluationProblem(ExternalEvaluationProblem original, Cloner cloner) : base(original, cloner) { }90 protected ExternalEvaluationProblem(bool deserializing) : base(deserializing) { } 91 protected ExternalEvaluationProblem(ExternalEvaluationProblem original, Cloner cloner) : base(original, cloner) { } 82 92 public override IDeepCloneable Clone(Cloner cloner) { 83 93 return new ExternalEvaluationProblem(this, cloner); … … 89 99 Parameters.Add(new OptionalValueParameter<EvaluationCache>("Cache", "Cache of previously evaluated solutions.")); 90 100 Parameters.Add(new ValueParameter<CheckedItemCollection<IEvaluationServiceClient>>("Clients", "The clients that are used to communicate with the external application.", new CheckedItemCollection<IEvaluationServiceClient>() { new EvaluationServiceClient() })); 91 Parameters.Add(new ValueParameter<SolutionMessageBuilder>("MessageBuilder", "The message builder that converts from HeuristicLab objects to SolutionMessage representation.", new SolutionMessageBuilder()) );101 Parameters.Add(new ValueParameter<SolutionMessageBuilder>("MessageBuilder", "The message builder that converts from HeuristicLab objects to SolutionMessage representation.", new SolutionMessageBuilder()) { Hidden = true }); 92 102 Parameters.Add(new FixedValueParameter<SingleObjectiveOptimizationSupportScript>("SupportScript", "A script that can provide neighborhood and analyze the results of the optimization.", new SingleObjectiveOptimizationSupportScript())); 93 103 … … 100 110 } 101 111 112 public virtual void SetMaximization(bool maximization) { 113 MaximizationParameter.Value.Value = maximization; 114 } 115 102 116 public override double Evaluate(Individual individual, IRandom random) { 103 return Cache == null ? EvaluateOnNextAvailableClient(BuildSolutionMessage(individual)).Quality 104 : Cache.GetValue(BuildSolutionMessage(individual), m => EvaluateOnNextAvailableClient(m).Quality); 117 var qualityMessage = Evaluate(BuildSolutionMessage(individual)); 118 if (!qualityMessage.HasExtension(SingleObjectiveQualityMessage.QualityMessage_)) 119 throw new InvalidOperationException("The received message is not a SingleObjectiveQualityMessage."); 120 return qualityMessage.GetExtension(SingleObjectiveQualityMessage.QualityMessage_).Quality; 121 } 122 public virtual QualityMessage Evaluate(SolutionMessage solutionMessage) { 123 return Cache == null 124 ? EvaluateOnNextAvailableClient(solutionMessage) 125 : Cache.GetValue(solutionMessage, EvaluateOnNextAvailableClient, GetQualityMessageExtensions()); 105 126 } 106 127 … … 114 135 #endregion 115 136 116 #region Evaluation Helpers 137 public virtual ExtensionRegistry GetQualityMessageExtensions() { 138 var extensions = ExtensionRegistry.CreateInstance(); 139 extensions.Add(SingleObjectiveQualityMessage.QualityMessage_); 140 return extensions; 141 } 142 143 #region Evaluation 117 144 private HashSet<IEvaluationServiceClient> activeClients = new HashSet<IEvaluationServiceClient>(); 118 145 private object clientLock = new object(); 146 119 147 private QualityMessage EvaluateOnNextAvailableClient(SolutionMessage message) { 120 148 IEvaluationServiceClient client = null; … … 130 158 try { 131 159 return client.Evaluate(message, GetQualityMessageExtensions()); 132 } 133 finally { 160 } finally { 134 161 lock (clientLock) { 135 162 activeClients.Remove(client); … … 139 166 } 140 167 141 private ExtensionRegistry GetQualityMessageExtensions() { 142 return ExtensionRegistry.CreateInstance(); 143 } 144 145 private SolutionMessage BuildSolutionMessage(Individual individual) { 168 private SolutionMessage BuildSolutionMessage(Individual individual, int solutionId = 0) { 146 169 lock (clientLock) { 147 170 SolutionMessage.Builder protobufBuilder = SolutionMessage.CreateBuilder(); 148 protobufBuilder.SolutionId = 0;171 protobufBuilder.SolutionId = solutionId; 149 172 var scope = new Scope(); 150 173 individual.CopyToScope(scope); … … 152 175 try { 153 176 MessageBuilder.AddToMessage(variable.Value, variable.Name, protobufBuilder); 154 } 155 catch (ArgumentException ex) { 156 throw new InvalidOperationException(string.Format("ERROR while building solution message: Parameter {0} cannot be added to the message", name), ex); 177 } catch (ArgumentException ex) { 178 throw new InvalidOperationException(string.Format("ERROR while building solution message: Parameter {0} cannot be added to the message", Name), ex); 157 179 } 158 180 } -
branches/crossvalidation-2434/HeuristicLab.Problems.ExternalEvaluation/3.4/HeuristicLab.Problems.ExternalEvaluation-3.4.csproj
r11961 r14029 134 134 <Compile Include="Drivers\EvaluationStreamChannel.cs" /> 135 135 <Compile Include="Drivers\EvaluationTCPChannel.cs" /> 136 <Compile Include="Interfaces\IExternalEvaluationProblem.cs" /> 137 <Compile Include="Interfaces\IMultiObjectiveOptimizationSupport.cs" /> 138 <Compile Include="MultiObjectiveExternalEvaluationProblem.cs" /> 136 139 <Compile Include="ExternalEvaluationProblem.cs" /> 137 140 <Compile Include="Interfaces\IEvaluationServiceClient.cs" /> … … 141 144 <Compile Include="Plugin.cs" /> 142 145 <Compile Include="Programmable\CompiledOptimizationSupport.cs" /> 146 <Compile Include="Programmable\CompiledMultiObjectiveOptimizationSupport.cs" /> 143 147 <Compile Include="Programmable\CompiledSingleObjectiveOptimizationSupport.cs" /> 148 <Compile Include="Programmable\MultiObjectiveOptimizationSupportScript.cs" /> 149 <Compile Include="Programmable\OptimizationSupportScript.cs" /> 144 150 <Compile Include="Programmable\SingleObjectiveOptimizationSupportScript.cs" /> 145 <Compile Include="Programmable\ SingleObjectiveOptimizationSupportScriptException.cs" />151 <Compile Include="Programmable\OptimizationSupportScriptException.cs" /> 146 152 <Compile Include="Programmable\Templates.Designer.cs"> 147 153 <AutoGen>True</AutoGen> -
branches/crossvalidation-2434/HeuristicLab.Problems.ExternalEvaluation/3.4/Plugin.cs.frame
r12753 r14029 23 23 24 24 namespace HeuristicLab.Problems.ExternalEvaluation { 25 [Plugin("HeuristicLab.Problems.ExternalEvaluation", "3.4.2 2.$WCREV$")]25 [Plugin("HeuristicLab.Problems.ExternalEvaluation", "3.4.23.$WCREV$")] 26 26 [PluginFile("HeuristicLab.Problems.ExternalEvaluation-3.4.dll", PluginFileType.Assembly)] 27 27 [PluginDependency("HeuristicLab.Analysis", "3.3")] -
branches/crossvalidation-2434/HeuristicLab.Problems.ExternalEvaluation/3.4/Programmable/CompiledSingleObjectiveOptimizationSupport.cs
r11961 r14029 1 using System; 2 using System.Linq; 3 using System.Collections.Generic; 4 using HeuristicLab.Common; 1 using System.Collections.Generic; 5 2 using HeuristicLab.Core; 6 using HeuristicLab.Data;7 3 using HeuristicLab.Optimization; 8 4 … … 14 10 // Write or update results given the range of vectors and resulting qualities 15 11 // Uncomment the following lines if you want to retrieve the best individual 16 //var bestIndex = Maximization ? 17 // qualities.Select((v, i) => Tuple.Create(i, v)).OrderByDescending(x => x.Item2).First().Item1 18 // : qualities.Select((v, i) => Tuple.Create(i, v)).OrderBy(x => x.Item2).First().Item1; 19 //var best = individuals[bestIndex]; 12 // Maximization: 13 // var bestIndex = qualities.Select((v, i) => Tuple.Create(i, v)).OrderByDescending(x => x.Item2).First().Item1; 14 // Minimization: 15 // var bestIndex = qualities.Select((v, i) => Tuple.Create(i, v)).OrderBy(x => x.Item2).First().Item1; 16 // var best = individuals[bestIndex]; 20 17 } 21 18 … … 38 35 } 39 36 } 40 -
branches/crossvalidation-2434/HeuristicLab.Problems.ExternalEvaluation/3.4/Programmable/SingleObjectiveOptimizationSupportScript.cs
r12012 r14029 20 20 #endregion 21 21 22 using System;23 22 using System.Collections.Generic; 24 using System.Linq;25 using System.Reflection;26 23 using HeuristicLab.Common; 27 24 using HeuristicLab.Core; … … 29 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 30 27 using HeuristicLab.Problems.ExternalEvaluation.Programmable; 31 using HeuristicLab.Scripting;32 28 33 29 namespace HeuristicLab.Problems.ExternalEvaluation { 34 30 [Item("ProblemDefinitionScript", "Script that defines the parameter vector and evaluates the solution for a programmable problem.")] 35 31 [StorableClass] 36 public sealed class SingleObjectiveOptimizationSupportScript : Script, ISingleObjectiveOptimizationSupport { 37 38 [Storable] 39 private VariableStore variableStore; 40 public VariableStore VariableStore { 41 get { return variableStore; } 42 } 43 44 protected override string CodeTemplate { 45 get { return Templates.CompiledSingleObjectiveOptimizationSupport; } 46 } 47 32 public sealed class SingleObjectiveOptimizationSupportScript : OptimizationSupportScript<ISingleObjectiveOptimizationSupport>, ISingleObjectiveOptimizationSupport { 48 33 [StorableConstructor] 49 34 private SingleObjectiveOptimizationSupportScript(bool deserializing) : base(deserializing) { } 50 private SingleObjectiveOptimizationSupportScript(SingleObjectiveOptimizationSupportScript original, Cloner cloner) 51 : base(original, cloner) { 52 variableStore = cloner.Clone(original.variableStore); 53 } 54 public SingleObjectiveOptimizationSupportScript() 55 : base() { 56 variableStore = new VariableStore(); 57 } 35 private SingleObjectiveOptimizationSupportScript(SingleObjectiveOptimizationSupportScript original, Cloner cloner) : base(original, cloner) { } 36 public SingleObjectiveOptimizationSupportScript() : base(Templates.CompiledSingleObjectiveOptimizationSupport) { } 58 37 59 38 public override IDeepCloneable Clone(Cloner cloner) { 60 39 return new SingleObjectiveOptimizationSupportScript(this, cloner); 61 }62 63 private readonly object compileLock = new object();64 private volatile ISingleObjectiveOptimizationSupport compiledInstance;65 private ISingleObjectiveOptimizationSupport CompiledInstance {66 get {67 if (compiledInstance == null) {68 lock (compileLock) {69 if (compiledInstance == null) {70 Compile();71 }72 }73 }74 return compiledInstance;75 }76 set { compiledInstance = value; }77 }78 79 public override Assembly Compile() {80 var assembly = base.Compile();81 var types = assembly.GetTypes();82 if (!types.Any(x => typeof(CompiledOptimizationSupport).IsAssignableFrom(x)))83 throw new SingleObjectiveOptimizationSupportException("The compiled code doesn't contain an optimization support." + Environment.NewLine + "The support class must be a subclass of CompiledOptimizationSupport.");84 if (types.Count(x => typeof(CompiledOptimizationSupport).IsAssignableFrom(x)) > 1)85 throw new SingleObjectiveOptimizationSupportException("The compiled code contains multiple support classes." + Environment.NewLine + "Only one subclass of CompiledOptimizationSupport is allowed.");86 87 CompiledOptimizationSupport inst;88 try {89 inst = (CompiledOptimizationSupport)Activator.CreateInstance(types.Single(x => typeof(CompiledOptimizationSupport).IsAssignableFrom(x)));90 inst.vars = new Variables(VariableStore);91 } catch (Exception e) {92 compiledInstance = null;93 throw new SingleObjectiveOptimizationSupportException("Instantiating the optimization support class failed." + Environment.NewLine + "Check your default constructor.", e);94 }95 96 var soInst = inst as ISingleObjectiveOptimizationSupport;97 if (soInst == null)98 throw new SingleObjectiveOptimizationSupportException("The optimization support class does not implement ISingleObjectiveOptimizationSupport." + Environment.NewLine + "Please implement that interface in the subclass of CompiledOptimizationSupport.");99 100 CompiledInstance = soInst;101 102 return assembly;103 }104 105 protected override void OnCodeChanged() {106 base.OnCodeChanged();107 compiledInstance = null;108 40 } 109 41 -
branches/crossvalidation-2434/HeuristicLab.Problems.ExternalEvaluation/3.4/Programmable/Templates.Designer.cs
r11893 r14029 2 2 // <auto-generated> 3 3 // This code was generated by a tool. 4 // Runtime Version:4.0.30319. 342094 // Runtime Version:4.0.30319.42000 5 5 // 6 6 // Changes to this file may cause incorrect behavior and will be lost if … … 68 68 ///using HeuristicLab.Core; 69 69 ///using HeuristicLab.Data; 70 ///using HeuristicLab.Encodings.PermutationEncoding;71 70 ///using HeuristicLab.Optimization; 72 ///using HeuristicLab.Problems.Programmable;73 71 /// 74 ///namespace HeuristicLab.Problems.Programmable { 75 /// public class CompiledSingleObjectiveProblemDefinition : CompiledProblemDefinition, ISingleObjectiveProblemDefinition { 76 /// public bool Maximization { get { return false; } } 72 ///namespace HeuristicLab.Problems.ExternalEvaluation { 73 /// public class CompiledMultiObjectiveOptimizationSupport : CompiledOptimizationSupport, IMultiObjectiveOptimizationSupport { 77 74 /// 78 /// [rest of string was truncated]";. 75 /// public void Analyze(Individual[] individuals, double[][] qualities, ResultCollection results, IRandom random) { 76 /// // Use vars.yourVaria [rest of string was truncated]";. 77 /// </summary> 78 internal static string CompiledMultiObjectiveOptimizationSupport { 79 get { 80 return ResourceManager.GetString("CompiledMultiObjectiveOptimizationSupport", resourceCulture); 81 } 82 } 83 84 /// <summary> 85 /// Looks up a localized string similar to using System; 86 ///using System.Linq; 87 ///using System.Collections.Generic; 88 ///using HeuristicLab.Common; 89 ///using HeuristicLab.Core; 90 ///using HeuristicLab.Data; 91 ///using HeuristicLab.Optimization; 92 /// 93 ///namespace HeuristicLab.Problems.ExternalEvaluation { 94 /// public class CompiledSingleObjectiveOptimizationSupport : CompiledOptimizationSupport, ISingleObjectiveOptimizationSupport { 95 /// 96 /// public void Analyze(Individual[] individuals, double[] qualities, ResultCollection results, IRandom random) { 97 /// // Use vars.yourVaria [rest of string was truncated]";. 79 98 /// </summary> 80 99 internal static string CompiledSingleObjectiveOptimizationSupport { -
branches/crossvalidation-2434/HeuristicLab.Problems.ExternalEvaluation/3.4/Programmable/Templates.resx
r11893 r14029 119 119 </resheader> 120 120 <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> 121 <data name="CompiledMultiObjectiveOptimizationSupport" type="System.Resources.ResXFileRef, System.Windows.Forms"> 122 <value>compiledmultiobjectiveoptimizationsupport.cs;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value> 123 </data> 121 124 <data name="CompiledSingleObjectiveOptimizationSupport" type="System.Resources.ResXFileRef, System.Windows.Forms"> 122 125 <value>CompiledSingleObjectiveOptimizationSupport.cs;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value> -
branches/crossvalidation-2434/HeuristicLab.Problems.ExternalEvaluation/3.4/Properties/AssemblyInfo.cs.frame
r12753 r14029 34 34 // [assembly: AssemblyVersion("1.0.*")] 35 35 [assembly: AssemblyVersion("3.4.0.0")] 36 [assembly: AssemblyFileVersion("3.4.2 2.$WCREV$")]36 [assembly: AssemblyFileVersion("3.4.23.$WCREV$")] -
branches/crossvalidation-2434/HeuristicLab.Problems.ExternalEvaluation/3.4/Protos/ExternalEvaluationMessages.proto
r8298 r14029 64 64 } 65 65 66 // Nested Extensions http://www.indelible.org/ink/protobuf-polymorphism/ 66 67 message QualityMessage { 67 68 required int32 solutionId = 1; 68 required double quality = 2; 69 69 enum Type { 70 SingleObjectiveQualityMessage = 1; 71 MultiObjectiveQualityMessage = 2; 72 } 73 required Type type = 2; 70 74 extensions 1000 to max; 71 75 } 76 77 message SingleObjectiveQualityMessage { 78 extend QualityMessage { 79 required SingleObjectiveQualityMessage qualityMessage = 1000; // unique QualityMessage extension number 80 } 81 required double quality = 1; 82 } 83 message MultiObjectiveQualityMessage { 84 extend QualityMessage { 85 required MultiObjectiveQualityMessage qualityMessage = 1001; // unique QualityMessage extension number 86 } 87 repeated double qualities = 1; 88 } 89 72 90 73 91 service EvaluationService { 74 rpc Evaluate (SolutionMessage) returns (QualityMessage); 92 rpc EvaluateSingleObjective (SolutionMessage) returns (SingleObjectiveQualityMessage); 93 rpc EvaluateMultiObjectives (SolutionMessage) returns (MultiObjectiveQualityMessage); 75 94 }
Note: See TracChangeset
for help on using the changeset viewer.