Changeset 16871
- Timestamp:
- 04/29/19 14:47:51 (6 years ago)
- Location:
- misc/tools/ExternalEvaluation/CSharp
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
misc/tools/ExternalEvaluation/CSharp/ExternalEvaluation.Service.Host/ExternalEvaluation.Service.Host.csproj
r15014 r16871 93 93 <Reference Include="Google.ProtocolBuffers-2.4.1.473"> 94 94 <HintPath>..\Google.ProtocolBuffers-2.4.1.473.dll</HintPath> 95 <Private> False</Private>95 <Private>True</Private> 96 96 </Reference> 97 97 <Reference Include="System" /> -
misc/tools/ExternalEvaluation/CSharp/ExternalEvaluation.Service/ExternalEvaluation.Service.csproj
r15014 r16871 112 112 set Outdir=$(Outdir) 113 113 114 "$(SolutionDir)ProtoGen.exe" --proto_path="$(SolutionDir)" "$(ProjectDir)ExternalEvaluationMessages.proto" --include_imports -output_directory="$(ProjectDir)"115 114 call PreBuildEvent.cmd</PreBuildEvent> 116 115 </PropertyGroup> -
misc/tools/ExternalEvaluation/CSharp/ExternalEvaluation.Service/ExternalEvaluationMessages.cs
r15014 r16871 16 16 #region Extension registration 17 17 public static void RegisterAllExtensions(pb::ExtensionRegistry registry) { 18 registry.Add(global::HeuristicLab.Problems.ExternalEvaluation.SingleObjectiveQualityMessage.QualityMessage_); 19 registry.Add(global::HeuristicLab.Problems.ExternalEvaluation.MultiObjectiveQualityMessage.QualityMessage_); 18 20 } 19 21 #endregion … … 41 43 internal static pbd::MessageDescriptor internal__static_HeuristicLab_Problems_ExternalEvaluation_QualityMessage__Descriptor; 42 44 internal static pb::FieldAccess.FieldAccessorTable<global::HeuristicLab.Problems.ExternalEvaluation.QualityMessage, global::HeuristicLab.Problems.ExternalEvaluation.QualityMessage.Builder> internal__static_HeuristicLab_Problems_ExternalEvaluation_QualityMessage__FieldAccessorTable; 45 internal static pbd::MessageDescriptor internal__static_HeuristicLab_Problems_ExternalEvaluation_SingleObjectiveQualityMessage__Descriptor; 46 internal static pb::FieldAccess.FieldAccessorTable<global::HeuristicLab.Problems.ExternalEvaluation.SingleObjectiveQualityMessage, global::HeuristicLab.Problems.ExternalEvaluation.SingleObjectiveQualityMessage.Builder> internal__static_HeuristicLab_Problems_ExternalEvaluation_SingleObjectiveQualityMessage__FieldAccessorTable; 47 internal static pbd::MessageDescriptor internal__static_HeuristicLab_Problems_ExternalEvaluation_MultiObjectiveQualityMessage__Descriptor; 48 internal static pb::FieldAccess.FieldAccessorTable<global::HeuristicLab.Problems.ExternalEvaluation.MultiObjectiveQualityMessage, global::HeuristicLab.Problems.ExternalEvaluation.MultiObjectiveQualityMessage.Builder> internal__static_HeuristicLab_Problems_ExternalEvaluation_MultiObjectiveQualityMessage__FieldAccessorTable; 43 49 #endregion 44 50 #region Descriptor … … 83 89 "YRgCIAEoCRpBChNTdHJpbmdBcnJheVZhcmlhYmxlEgwKBG5hbWUYASACKAkS" + 84 90 "DAoEZGF0YRgCIAMoCRIOCgZsZW5ndGgYAyABKAUaKQoLUmF3VmFyaWFibGUS" + 85 "DAoEbmFtZRgBIAIoCRIMCgRkYXRhGAIgASgMIkAKDlF1YWxpdHlNZXNzYWdl" + 86 "EhIKCnNvbHV0aW9uSWQYASACKAUSDwoHcXVhbGl0eRgCIAIoASoJCOgHEICA" + 87 "gIACMpQBChFFdmFsdWF0aW9uU2VydmljZRJ/CghFdmFsdWF0ZRI5LkhldXJp" + 88 "c3RpY0xhYi5Qcm9ibGVtcy5FeHRlcm5hbEV2YWx1YXRpb24uU29sdXRpb25N" + 89 "ZXNzYWdlGjguSGV1cmlzdGljTGFiLlByb2JsZW1zLkV4dGVybmFsRXZhbHVh" + 90 "dGlvbi5RdWFsaXR5TWVzc2FnZUIuCixjb20uaGV1cmlzdGljbGFiLnByb2Js" + 91 "ZW1zLmV4dGVybmFsZXZhbHVhdGlvbg=="); 91 "DAoEbmFtZRgBIAIoCRIMCgRkYXRhGAIgASgMIskBCg5RdWFsaXR5TWVzc2Fn" + 92 "ZRISCgpzb2x1dGlvbklkGAEgAigFEksKBHR5cGUYAiACKA4yPS5IZXVyaXN0" + 93 "aWNMYWIuUHJvYmxlbXMuRXh0ZXJuYWxFdmFsdWF0aW9uLlF1YWxpdHlNZXNz" + 94 "YWdlLlR5cGUiSwoEVHlwZRIhCh1TaW5nbGVPYmplY3RpdmVRdWFsaXR5TWVz" + 95 "c2FnZRABEiAKHE11bHRpT2JqZWN0aXZlUXVhbGl0eU1lc3NhZ2UQAioJCOgH" + 96 "EICAgIACIs0BCh1TaW5nbGVPYmplY3RpdmVRdWFsaXR5TWVzc2FnZRIPCgdx" + 97 "dWFsaXR5GAEgAigBMpoBCg5xdWFsaXR5TWVzc2FnZRI4LkhldXJpc3RpY0xh" + 98 "Yi5Qcm9ibGVtcy5FeHRlcm5hbEV2YWx1YXRpb24uUXVhbGl0eU1lc3NhZ2UY" + 99 "6AcgAigLMkcuSGV1cmlzdGljTGFiLlByb2JsZW1zLkV4dGVybmFsRXZhbHVh" + 100 "dGlvbi5TaW5nbGVPYmplY3RpdmVRdWFsaXR5TWVzc2FnZSLNAQocTXVsdGlP" + 101 "YmplY3RpdmVRdWFsaXR5TWVzc2FnZRIRCglxdWFsaXRpZXMYASADKAEymQEK" + 102 "DnF1YWxpdHlNZXNzYWdlEjguSGV1cmlzdGljTGFiLlByb2JsZW1zLkV4dGVy" + 103 "bmFsRXZhbHVhdGlvbi5RdWFsaXR5TWVzc2FnZRjpByACKAsyRi5IZXVyaXN0" + 104 "aWNMYWIuUHJvYmxlbXMuRXh0ZXJuYWxFdmFsdWF0aW9uLk11bHRpT2JqZWN0" + 105 "aXZlUXVhbGl0eU1lc3NhZ2Uy0gIKEUV2YWx1YXRpb25TZXJ2aWNlEp0BChdF" + 106 "dmFsdWF0ZVNpbmdsZU9iamVjdGl2ZRI5LkhldXJpc3RpY0xhYi5Qcm9ibGVt" + 107 "cy5FeHRlcm5hbEV2YWx1YXRpb24uU29sdXRpb25NZXNzYWdlGkcuSGV1cmlz" + 108 "dGljTGFiLlByb2JsZW1zLkV4dGVybmFsRXZhbHVhdGlvbi5TaW5nbGVPYmpl" + 109 "Y3RpdmVRdWFsaXR5TWVzc2FnZRKcAQoXRXZhbHVhdGVNdWx0aU9iamVjdGl2" + 110 "ZXMSOS5IZXVyaXN0aWNMYWIuUHJvYmxlbXMuRXh0ZXJuYWxFdmFsdWF0aW9u" + 111 "LlNvbHV0aW9uTWVzc2FnZRpGLkhldXJpc3RpY0xhYi5Qcm9ibGVtcy5FeHRl" + 112 "cm5hbEV2YWx1YXRpb24uTXVsdGlPYmplY3RpdmVRdWFsaXR5TWVzc2FnZUIu" + 113 "Cixjb20uaGV1cmlzdGljbGFiLnByb2JsZW1zLmV4dGVybmFsZXZhbHVhdGlv" + 114 "bg=="); 92 115 pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) { 93 116 descriptor = root; … … 135 158 internal__static_HeuristicLab_Problems_ExternalEvaluation_QualityMessage__FieldAccessorTable = 136 159 new pb::FieldAccess.FieldAccessorTable<global::HeuristicLab.Problems.ExternalEvaluation.QualityMessage, global::HeuristicLab.Problems.ExternalEvaluation.QualityMessage.Builder>(internal__static_HeuristicLab_Problems_ExternalEvaluation_QualityMessage__Descriptor, 137 new string[] { "SolutionId", "Quality", }); 160 new string[] { "SolutionId", "Type", }); 161 internal__static_HeuristicLab_Problems_ExternalEvaluation_SingleObjectiveQualityMessage__Descriptor = Descriptor.MessageTypes[2]; 162 internal__static_HeuristicLab_Problems_ExternalEvaluation_SingleObjectiveQualityMessage__FieldAccessorTable = 163 new pb::FieldAccess.FieldAccessorTable<global::HeuristicLab.Problems.ExternalEvaluation.SingleObjectiveQualityMessage, global::HeuristicLab.Problems.ExternalEvaluation.SingleObjectiveQualityMessage.Builder>(internal__static_HeuristicLab_Problems_ExternalEvaluation_SingleObjectiveQualityMessage__Descriptor, 164 new string[] { "Quality", }); 165 global::HeuristicLab.Problems.ExternalEvaluation.SingleObjectiveQualityMessage.QualityMessage_ = pb::GeneratedSingleExtension<global::HeuristicLab.Problems.ExternalEvaluation.SingleObjectiveQualityMessage>.CreateInstance(global::HeuristicLab.Problems.ExternalEvaluation.SingleObjectiveQualityMessage.Descriptor.Extensions[0]); 166 internal__static_HeuristicLab_Problems_ExternalEvaluation_MultiObjectiveQualityMessage__Descriptor = Descriptor.MessageTypes[3]; 167 internal__static_HeuristicLab_Problems_ExternalEvaluation_MultiObjectiveQualityMessage__FieldAccessorTable = 168 new pb::FieldAccess.FieldAccessorTable<global::HeuristicLab.Problems.ExternalEvaluation.MultiObjectiveQualityMessage, global::HeuristicLab.Problems.ExternalEvaluation.MultiObjectiveQualityMessage.Builder>(internal__static_HeuristicLab_Problems_ExternalEvaluation_MultiObjectiveQualityMessage__Descriptor, 169 new string[] { "Qualities", }); 170 global::HeuristicLab.Problems.ExternalEvaluation.MultiObjectiveQualityMessage.QualityMessage_ = pb::GeneratedSingleExtension<global::HeuristicLab.Problems.ExternalEvaluation.MultiObjectiveQualityMessage>.CreateInstance(global::HeuristicLab.Problems.ExternalEvaluation.MultiObjectiveQualityMessage.Descriptor.Extensions[0]); 138 171 return null; 139 172 }; … … 4210 4243 private QualityMessage() { } 4211 4244 private static readonly QualityMessage defaultInstance = new QualityMessage().MakeReadOnly(); 4212 private static readonly string[] _qualityMessageFieldNames = new string[] { " quality", "solutionId" };4213 private static readonly uint[] _qualityMessageFieldTags = new uint[] { 17, 8};4245 private static readonly string[] _qualityMessageFieldNames = new string[] { "solutionId", "type" }; 4246 private static readonly uint[] _qualityMessageFieldTags = new uint[] { 8, 16 }; 4214 4247 public static QualityMessage DefaultInstance { 4215 4248 get { return defaultInstance; } … … 4231 4264 get { return global::HeuristicLab.Problems.ExternalEvaluation.ExternalEvaluationMessages.internal__static_HeuristicLab_Problems_ExternalEvaluation_QualityMessage__FieldAccessorTable; } 4232 4265 } 4266 4267 #region Nested types 4268 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 4269 [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 4270 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.4.1.473")] 4271 public static class Types { 4272 [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 4273 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.4.1.473")] 4274 public enum Type { 4275 SingleObjectiveQualityMessage = 1, 4276 MultiObjectiveQualityMessage = 2, 4277 } 4278 4279 } 4280 #endregion 4233 4281 4234 4282 public const int SolutionIdFieldNumber = 1; … … 4242 4290 } 4243 4291 4244 public const int QualityFieldNumber = 2;4245 private bool has Quality;4246 private double quality_;4247 public bool Has Quality{4248 get { return has Quality; }4249 } 4250 public double Quality{4251 get { return quality_; }4292 public const int TypeFieldNumber = 2; 4293 private bool hasType; 4294 private global::HeuristicLab.Problems.ExternalEvaluation.QualityMessage.Types.Type type_ = global::HeuristicLab.Problems.ExternalEvaluation.QualityMessage.Types.Type.SingleObjectiveQualityMessage; 4295 public bool HasType { 4296 get { return hasType; } 4297 } 4298 public global::HeuristicLab.Problems.ExternalEvaluation.QualityMessage.Types.Type Type { 4299 get { return type_; } 4252 4300 } 4253 4301 … … 4255 4303 get { 4256 4304 if (!hasSolutionId) return false; 4257 if (!has Quality) return false;4305 if (!hasType) return false; 4258 4306 if (!ExtensionsAreInitialized) return false; 4259 4307 return true; … … 4266 4314 pb::ExtendableMessage<QualityMessage, QualityMessage.Builder>.ExtensionWriter extensionWriter = CreateExtensionWriter(this); 4267 4315 if (hasSolutionId) { 4268 output.WriteInt32(1, field_names[ 1], SolutionId);4269 } 4270 if (has Quality) {4271 output.Write Double(2, field_names[0], Quality);4316 output.WriteInt32(1, field_names[0], SolutionId); 4317 } 4318 if (hasType) { 4319 output.WriteEnum(2, field_names[1], (int) Type, Type); 4272 4320 } 4273 4321 extensionWriter.WriteUntil(536870912, output); … … 4285 4333 size += pb::CodedOutputStream.ComputeInt32Size(1, SolutionId); 4286 4334 } 4287 if (has Quality) {4288 size += pb::CodedOutputStream.Compute DoubleSize(2, Quality);4335 if (hasType) { 4336 size += pb::CodedOutputStream.ComputeEnumSize(2, (int) Type); 4289 4337 } 4290 4338 size += ExtensionsSerializedSize; … … 4418 4466 SolutionId = other.SolutionId; 4419 4467 } 4420 if (other.Has Quality) {4421 Quality = other.Quality;4468 if (other.HasType) { 4469 Type = other.Type; 4422 4470 } 4423 4471 this.MergeExtensionFields(other); … … 4469 4517 break; 4470 4518 } 4471 case 17: { 4472 result.hasQuality = input.ReadDouble(ref result.quality_); 4519 case 16: { 4520 object unknown; 4521 if(input.ReadEnum(ref result.type_, out unknown)) { 4522 result.hasType = true; 4523 } else if(unknown is int) { 4524 if (unknownFields == null) { 4525 unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields); 4526 } 4527 unknownFields.MergeVarintField(2, (ulong)(int)unknown); 4528 } 4473 4529 break; 4474 4530 } … … 4503 4559 } 4504 4560 4561 public bool HasType { 4562 get { return result.hasType; } 4563 } 4564 public global::HeuristicLab.Problems.ExternalEvaluation.QualityMessage.Types.Type Type { 4565 get { return result.Type; } 4566 set { SetType(value); } 4567 } 4568 public Builder SetType(global::HeuristicLab.Problems.ExternalEvaluation.QualityMessage.Types.Type value) { 4569 PrepareBuilder(); 4570 result.hasType = true; 4571 result.type_ = value; 4572 return this; 4573 } 4574 public Builder ClearType() { 4575 PrepareBuilder(); 4576 result.hasType = false; 4577 result.type_ = global::HeuristicLab.Problems.ExternalEvaluation.QualityMessage.Types.Type.SingleObjectiveQualityMessage; 4578 return this; 4579 } 4580 } 4581 static QualityMessage() { 4582 object.ReferenceEquals(global::HeuristicLab.Problems.ExternalEvaluation.ExternalEvaluationMessages.Descriptor, null); 4583 } 4584 } 4585 4586 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 4587 [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 4588 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.4.1.473")] 4589 public sealed partial class SingleObjectiveQualityMessage : pb::GeneratedMessage<SingleObjectiveQualityMessage, SingleObjectiveQualityMessage.Builder> { 4590 private SingleObjectiveQualityMessage() { } 4591 private static readonly SingleObjectiveQualityMessage defaultInstance = new SingleObjectiveQualityMessage().MakeReadOnly(); 4592 private static readonly string[] _singleObjectiveQualityMessageFieldNames = new string[] { "quality" }; 4593 private static readonly uint[] _singleObjectiveQualityMessageFieldTags = new uint[] { 9 }; 4594 public static SingleObjectiveQualityMessage DefaultInstance { 4595 get { return defaultInstance; } 4596 } 4597 4598 public override SingleObjectiveQualityMessage DefaultInstanceForType { 4599 get { return DefaultInstance; } 4600 } 4601 4602 protected override SingleObjectiveQualityMessage ThisMessage { 4603 get { return this; } 4604 } 4605 4606 public static pbd::MessageDescriptor Descriptor { 4607 get { return global::HeuristicLab.Problems.ExternalEvaluation.ExternalEvaluationMessages.internal__static_HeuristicLab_Problems_ExternalEvaluation_SingleObjectiveQualityMessage__Descriptor; } 4608 } 4609 4610 protected override pb::FieldAccess.FieldAccessorTable<SingleObjectiveQualityMessage, SingleObjectiveQualityMessage.Builder> InternalFieldAccessors { 4611 get { return global::HeuristicLab.Problems.ExternalEvaluation.ExternalEvaluationMessages.internal__static_HeuristicLab_Problems_ExternalEvaluation_SingleObjectiveQualityMessage__FieldAccessorTable; } 4612 } 4613 4614 public const int QualityMessage_FieldNumber = 1000; 4615 public static pb::GeneratedExtensionBase<global::HeuristicLab.Problems.ExternalEvaluation.SingleObjectiveQualityMessage> QualityMessage_; 4616 public const int QualityFieldNumber = 1; 4617 private bool hasQuality; 4618 private double quality_; 4619 public bool HasQuality { 4620 get { return hasQuality; } 4621 } 4622 public double Quality { 4623 get { return quality_; } 4624 } 4625 4626 public override bool IsInitialized { 4627 get { 4628 if (!hasQuality) return false; 4629 return true; 4630 } 4631 } 4632 4633 public override void WriteTo(pb::ICodedOutputStream output) { 4634 int size = SerializedSize; 4635 string[] field_names = _singleObjectiveQualityMessageFieldNames; 4636 if (hasQuality) { 4637 output.WriteDouble(1, field_names[0], Quality); 4638 } 4639 UnknownFields.WriteTo(output); 4640 } 4641 4642 private int memoizedSerializedSize = -1; 4643 public override int SerializedSize { 4644 get { 4645 int size = memoizedSerializedSize; 4646 if (size != -1) return size; 4647 4648 size = 0; 4649 if (hasQuality) { 4650 size += pb::CodedOutputStream.ComputeDoubleSize(1, Quality); 4651 } 4652 size += UnknownFields.SerializedSize; 4653 memoizedSerializedSize = size; 4654 return size; 4655 } 4656 } 4657 4658 public static SingleObjectiveQualityMessage ParseFrom(pb::ByteString data) { 4659 return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); 4660 } 4661 public static SingleObjectiveQualityMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { 4662 return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); 4663 } 4664 public static SingleObjectiveQualityMessage ParseFrom(byte[] data) { 4665 return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); 4666 } 4667 public static SingleObjectiveQualityMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { 4668 return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); 4669 } 4670 public static SingleObjectiveQualityMessage ParseFrom(global::System.IO.Stream input) { 4671 return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); 4672 } 4673 public static SingleObjectiveQualityMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { 4674 return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); 4675 } 4676 public static SingleObjectiveQualityMessage ParseDelimitedFrom(global::System.IO.Stream input) { 4677 return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); 4678 } 4679 public static SingleObjectiveQualityMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { 4680 return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); 4681 } 4682 public static SingleObjectiveQualityMessage ParseFrom(pb::ICodedInputStream input) { 4683 return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); 4684 } 4685 public static SingleObjectiveQualityMessage ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) { 4686 return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); 4687 } 4688 private SingleObjectiveQualityMessage MakeReadOnly() { 4689 return this; 4690 } 4691 4692 public static Builder CreateBuilder() { return new Builder(); } 4693 public override Builder ToBuilder() { return CreateBuilder(this); } 4694 public override Builder CreateBuilderForType() { return new Builder(); } 4695 public static Builder CreateBuilder(SingleObjectiveQualityMessage prototype) { 4696 return new Builder(prototype); 4697 } 4698 4699 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 4700 [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 4701 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.4.1.473")] 4702 public sealed partial class Builder : pb::GeneratedBuilder<SingleObjectiveQualityMessage, Builder> { 4703 protected override Builder ThisBuilder { 4704 get { return this; } 4705 } 4706 public Builder() { 4707 result = DefaultInstance; 4708 resultIsReadOnly = true; 4709 } 4710 internal Builder(SingleObjectiveQualityMessage cloneFrom) { 4711 result = cloneFrom; 4712 resultIsReadOnly = true; 4713 } 4714 4715 private bool resultIsReadOnly; 4716 private SingleObjectiveQualityMessage result; 4717 4718 private SingleObjectiveQualityMessage PrepareBuilder() { 4719 if (resultIsReadOnly) { 4720 SingleObjectiveQualityMessage original = result; 4721 result = new SingleObjectiveQualityMessage(); 4722 resultIsReadOnly = false; 4723 MergeFrom(original); 4724 } 4725 return result; 4726 } 4727 4728 public override bool IsInitialized { 4729 get { return result.IsInitialized; } 4730 } 4731 4732 protected override SingleObjectiveQualityMessage MessageBeingBuilt { 4733 get { return PrepareBuilder(); } 4734 } 4735 4736 public override Builder Clear() { 4737 result = DefaultInstance; 4738 resultIsReadOnly = true; 4739 return this; 4740 } 4741 4742 public override Builder Clone() { 4743 if (resultIsReadOnly) { 4744 return new Builder(result); 4745 } else { 4746 return new Builder().MergeFrom(result); 4747 } 4748 } 4749 4750 public override pbd::MessageDescriptor DescriptorForType { 4751 get { return global::HeuristicLab.Problems.ExternalEvaluation.SingleObjectiveQualityMessage.Descriptor; } 4752 } 4753 4754 public override SingleObjectiveQualityMessage DefaultInstanceForType { 4755 get { return global::HeuristicLab.Problems.ExternalEvaluation.SingleObjectiveQualityMessage.DefaultInstance; } 4756 } 4757 4758 public override SingleObjectiveQualityMessage BuildPartial() { 4759 if (resultIsReadOnly) { 4760 return result; 4761 } 4762 resultIsReadOnly = true; 4763 return result.MakeReadOnly(); 4764 } 4765 4766 public override Builder MergeFrom(pb::IMessage other) { 4767 if (other is SingleObjectiveQualityMessage) { 4768 return MergeFrom((SingleObjectiveQualityMessage) other); 4769 } else { 4770 base.MergeFrom(other); 4771 return this; 4772 } 4773 } 4774 4775 public override Builder MergeFrom(SingleObjectiveQualityMessage other) { 4776 if (other == global::HeuristicLab.Problems.ExternalEvaluation.SingleObjectiveQualityMessage.DefaultInstance) return this; 4777 PrepareBuilder(); 4778 if (other.HasQuality) { 4779 Quality = other.Quality; 4780 } 4781 this.MergeUnknownFields(other.UnknownFields); 4782 return this; 4783 } 4784 4785 public override Builder MergeFrom(pb::ICodedInputStream input) { 4786 return MergeFrom(input, pb::ExtensionRegistry.Empty); 4787 } 4788 4789 public override Builder MergeFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) { 4790 PrepareBuilder(); 4791 pb::UnknownFieldSet.Builder unknownFields = null; 4792 uint tag; 4793 string field_name; 4794 while (input.ReadTag(out tag, out field_name)) { 4795 if(tag == 0 && field_name != null) { 4796 int field_ordinal = global::System.Array.BinarySearch(_singleObjectiveQualityMessageFieldNames, field_name, global::System.StringComparer.Ordinal); 4797 if(field_ordinal >= 0) 4798 tag = _singleObjectiveQualityMessageFieldTags[field_ordinal]; 4799 else { 4800 if (unknownFields == null) { 4801 unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields); 4802 } 4803 ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name); 4804 continue; 4805 } 4806 } 4807 switch (tag) { 4808 case 0: { 4809 throw pb::InvalidProtocolBufferException.InvalidTag(); 4810 } 4811 default: { 4812 if (pb::WireFormat.IsEndGroupTag(tag)) { 4813 if (unknownFields != null) { 4814 this.UnknownFields = unknownFields.Build(); 4815 } 4816 return this; 4817 } 4818 if (unknownFields == null) { 4819 unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields); 4820 } 4821 ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name); 4822 break; 4823 } 4824 case 9: { 4825 result.hasQuality = input.ReadDouble(ref result.quality_); 4826 break; 4827 } 4828 } 4829 } 4830 4831 if (unknownFields != null) { 4832 this.UnknownFields = unknownFields.Build(); 4833 } 4834 return this; 4835 } 4836 4837 4505 4838 public bool HasQuality { 4506 4839 get { return result.hasQuality; } … … 4523 4856 } 4524 4857 } 4525 static QualityMessage() { 4858 static SingleObjectiveQualityMessage() { 4859 object.ReferenceEquals(global::HeuristicLab.Problems.ExternalEvaluation.ExternalEvaluationMessages.Descriptor, null); 4860 } 4861 } 4862 4863 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 4864 [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 4865 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.4.1.473")] 4866 public sealed partial class MultiObjectiveQualityMessage : pb::GeneratedMessage<MultiObjectiveQualityMessage, MultiObjectiveQualityMessage.Builder> { 4867 private MultiObjectiveQualityMessage() { } 4868 private static readonly MultiObjectiveQualityMessage defaultInstance = new MultiObjectiveQualityMessage().MakeReadOnly(); 4869 private static readonly string[] _multiObjectiveQualityMessageFieldNames = new string[] { "qualities" }; 4870 private static readonly uint[] _multiObjectiveQualityMessageFieldTags = new uint[] { 9 }; 4871 public static MultiObjectiveQualityMessage DefaultInstance { 4872 get { return defaultInstance; } 4873 } 4874 4875 public override MultiObjectiveQualityMessage DefaultInstanceForType { 4876 get { return DefaultInstance; } 4877 } 4878 4879 protected override MultiObjectiveQualityMessage ThisMessage { 4880 get { return this; } 4881 } 4882 4883 public static pbd::MessageDescriptor Descriptor { 4884 get { return global::HeuristicLab.Problems.ExternalEvaluation.ExternalEvaluationMessages.internal__static_HeuristicLab_Problems_ExternalEvaluation_MultiObjectiveQualityMessage__Descriptor; } 4885 } 4886 4887 protected override pb::FieldAccess.FieldAccessorTable<MultiObjectiveQualityMessage, MultiObjectiveQualityMessage.Builder> InternalFieldAccessors { 4888 get { return global::HeuristicLab.Problems.ExternalEvaluation.ExternalEvaluationMessages.internal__static_HeuristicLab_Problems_ExternalEvaluation_MultiObjectiveQualityMessage__FieldAccessorTable; } 4889 } 4890 4891 public const int QualityMessage_FieldNumber = 1001; 4892 public static pb::GeneratedExtensionBase<global::HeuristicLab.Problems.ExternalEvaluation.MultiObjectiveQualityMessage> QualityMessage_; 4893 public const int QualitiesFieldNumber = 1; 4894 private pbc::PopsicleList<double> qualities_ = new pbc::PopsicleList<double>(); 4895 public scg::IList<double> QualitiesList { 4896 get { return pbc::Lists.AsReadOnly(qualities_); } 4897 } 4898 public int QualitiesCount { 4899 get { return qualities_.Count; } 4900 } 4901 public double GetQualities(int index) { 4902 return qualities_[index]; 4903 } 4904 4905 public override bool IsInitialized { 4906 get { 4907 return true; 4908 } 4909 } 4910 4911 public override void WriteTo(pb::ICodedOutputStream output) { 4912 int size = SerializedSize; 4913 string[] field_names = _multiObjectiveQualityMessageFieldNames; 4914 if (qualities_.Count > 0) { 4915 output.WriteDoubleArray(1, field_names[0], qualities_); 4916 } 4917 UnknownFields.WriteTo(output); 4918 } 4919 4920 private int memoizedSerializedSize = -1; 4921 public override int SerializedSize { 4922 get { 4923 int size = memoizedSerializedSize; 4924 if (size != -1) return size; 4925 4926 size = 0; 4927 { 4928 int dataSize = 0; 4929 dataSize = 8 * qualities_.Count; 4930 size += dataSize; 4931 size += 1 * qualities_.Count; 4932 } 4933 size += UnknownFields.SerializedSize; 4934 memoizedSerializedSize = size; 4935 return size; 4936 } 4937 } 4938 4939 public static MultiObjectiveQualityMessage ParseFrom(pb::ByteString data) { 4940 return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); 4941 } 4942 public static MultiObjectiveQualityMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { 4943 return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); 4944 } 4945 public static MultiObjectiveQualityMessage ParseFrom(byte[] data) { 4946 return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); 4947 } 4948 public static MultiObjectiveQualityMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { 4949 return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); 4950 } 4951 public static MultiObjectiveQualityMessage ParseFrom(global::System.IO.Stream input) { 4952 return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); 4953 } 4954 public static MultiObjectiveQualityMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { 4955 return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); 4956 } 4957 public static MultiObjectiveQualityMessage ParseDelimitedFrom(global::System.IO.Stream input) { 4958 return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); 4959 } 4960 public static MultiObjectiveQualityMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { 4961 return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); 4962 } 4963 public static MultiObjectiveQualityMessage ParseFrom(pb::ICodedInputStream input) { 4964 return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); 4965 } 4966 public static MultiObjectiveQualityMessage ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) { 4967 return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); 4968 } 4969 private MultiObjectiveQualityMessage MakeReadOnly() { 4970 qualities_.MakeReadOnly(); 4971 return this; 4972 } 4973 4974 public static Builder CreateBuilder() { return new Builder(); } 4975 public override Builder ToBuilder() { return CreateBuilder(this); } 4976 public override Builder CreateBuilderForType() { return new Builder(); } 4977 public static Builder CreateBuilder(MultiObjectiveQualityMessage prototype) { 4978 return new Builder(prototype); 4979 } 4980 4981 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 4982 [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 4983 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.4.1.473")] 4984 public sealed partial class Builder : pb::GeneratedBuilder<MultiObjectiveQualityMessage, Builder> { 4985 protected override Builder ThisBuilder { 4986 get { return this; } 4987 } 4988 public Builder() { 4989 result = DefaultInstance; 4990 resultIsReadOnly = true; 4991 } 4992 internal Builder(MultiObjectiveQualityMessage cloneFrom) { 4993 result = cloneFrom; 4994 resultIsReadOnly = true; 4995 } 4996 4997 private bool resultIsReadOnly; 4998 private MultiObjectiveQualityMessage result; 4999 5000 private MultiObjectiveQualityMessage PrepareBuilder() { 5001 if (resultIsReadOnly) { 5002 MultiObjectiveQualityMessage original = result; 5003 result = new MultiObjectiveQualityMessage(); 5004 resultIsReadOnly = false; 5005 MergeFrom(original); 5006 } 5007 return result; 5008 } 5009 5010 public override bool IsInitialized { 5011 get { return result.IsInitialized; } 5012 } 5013 5014 protected override MultiObjectiveQualityMessage MessageBeingBuilt { 5015 get { return PrepareBuilder(); } 5016 } 5017 5018 public override Builder Clear() { 5019 result = DefaultInstance; 5020 resultIsReadOnly = true; 5021 return this; 5022 } 5023 5024 public override Builder Clone() { 5025 if (resultIsReadOnly) { 5026 return new Builder(result); 5027 } else { 5028 return new Builder().MergeFrom(result); 5029 } 5030 } 5031 5032 public override pbd::MessageDescriptor DescriptorForType { 5033 get { return global::HeuristicLab.Problems.ExternalEvaluation.MultiObjectiveQualityMessage.Descriptor; } 5034 } 5035 5036 public override MultiObjectiveQualityMessage DefaultInstanceForType { 5037 get { return global::HeuristicLab.Problems.ExternalEvaluation.MultiObjectiveQualityMessage.DefaultInstance; } 5038 } 5039 5040 public override MultiObjectiveQualityMessage BuildPartial() { 5041 if (resultIsReadOnly) { 5042 return result; 5043 } 5044 resultIsReadOnly = true; 5045 return result.MakeReadOnly(); 5046 } 5047 5048 public override Builder MergeFrom(pb::IMessage other) { 5049 if (other is MultiObjectiveQualityMessage) { 5050 return MergeFrom((MultiObjectiveQualityMessage) other); 5051 } else { 5052 base.MergeFrom(other); 5053 return this; 5054 } 5055 } 5056 5057 public override Builder MergeFrom(MultiObjectiveQualityMessage other) { 5058 if (other == global::HeuristicLab.Problems.ExternalEvaluation.MultiObjectiveQualityMessage.DefaultInstance) return this; 5059 PrepareBuilder(); 5060 if (other.qualities_.Count != 0) { 5061 result.qualities_.Add(other.qualities_); 5062 } 5063 this.MergeUnknownFields(other.UnknownFields); 5064 return this; 5065 } 5066 5067 public override Builder MergeFrom(pb::ICodedInputStream input) { 5068 return MergeFrom(input, pb::ExtensionRegistry.Empty); 5069 } 5070 5071 public override Builder MergeFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) { 5072 PrepareBuilder(); 5073 pb::UnknownFieldSet.Builder unknownFields = null; 5074 uint tag; 5075 string field_name; 5076 while (input.ReadTag(out tag, out field_name)) { 5077 if(tag == 0 && field_name != null) { 5078 int field_ordinal = global::System.Array.BinarySearch(_multiObjectiveQualityMessageFieldNames, field_name, global::System.StringComparer.Ordinal); 5079 if(field_ordinal >= 0) 5080 tag = _multiObjectiveQualityMessageFieldTags[field_ordinal]; 5081 else { 5082 if (unknownFields == null) { 5083 unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields); 5084 } 5085 ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name); 5086 continue; 5087 } 5088 } 5089 switch (tag) { 5090 case 0: { 5091 throw pb::InvalidProtocolBufferException.InvalidTag(); 5092 } 5093 default: { 5094 if (pb::WireFormat.IsEndGroupTag(tag)) { 5095 if (unknownFields != null) { 5096 this.UnknownFields = unknownFields.Build(); 5097 } 5098 return this; 5099 } 5100 if (unknownFields == null) { 5101 unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields); 5102 } 5103 ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name); 5104 break; 5105 } 5106 case 10: 5107 case 9: { 5108 input.ReadDoubleArray(tag, field_name, result.qualities_); 5109 break; 5110 } 5111 } 5112 } 5113 5114 if (unknownFields != null) { 5115 this.UnknownFields = unknownFields.Build(); 5116 } 5117 return this; 5118 } 5119 5120 5121 public pbc::IPopsicleList<double> QualitiesList { 5122 get { return PrepareBuilder().qualities_; } 5123 } 5124 public int QualitiesCount { 5125 get { return result.QualitiesCount; } 5126 } 5127 public double GetQualities(int index) { 5128 return result.GetQualities(index); 5129 } 5130 public Builder SetQualities(int index, double value) { 5131 PrepareBuilder(); 5132 result.qualities_[index] = value; 5133 return this; 5134 } 5135 public Builder AddQualities(double value) { 5136 PrepareBuilder(); 5137 result.qualities_.Add(value); 5138 return this; 5139 } 5140 public Builder AddRangeQualities(scg::IEnumerable<double> values) { 5141 PrepareBuilder(); 5142 result.qualities_.Add(values); 5143 return this; 5144 } 5145 public Builder ClearQualities() { 5146 PrepareBuilder(); 5147 result.qualities_.Clear(); 5148 return this; 5149 } 5150 } 5151 static MultiObjectiveQualityMessage() { 4526 5152 object.ReferenceEquals(global::HeuristicLab.Problems.ExternalEvaluation.ExternalEvaluationMessages.Descriptor, null); 4527 5153 } -
misc/tools/ExternalEvaluation/CSharp/ExternalEvaluation.Service/PollService.cs
r15014 r16871 44 44 45 45 public QualityMessage.Builder PrepareQualityMessage(SolutionMessage msg, double quality) { 46 SingleObjectiveQualityMessage qmsg = SingleObjectiveQualityMessage.CreateBuilder() 47 .SetQuality(quality) 48 .Build(); 46 49 QualityMessage.Builder qualityMessageBuilder = QualityMessage.CreateBuilder(); 47 50 qualityMessageBuilder.SetSolutionId(msg.SolutionId) 48 .SetQuality(quality); 51 .SetType(QualityMessage.Types.Type.SingleObjectiveQualityMessage) 52 .SetExtension(SingleObjectiveQualityMessage.QualityMessage_, qmsg); 49 53 return qualityMessageBuilder; 50 54 } … … 55 59 56 60 public void SendQuality(SolutionMessage msg, double quality) { 57 QualityMessage.Builder qualityMessageBuilder = QualityMessage.CreateBuilder(); 58 qualityMessageBuilder.SetSolutionId(msg.SolutionId) 59 .SetQuality(quality); 60 Send(qualityMessageBuilder.Build(), msg); 61 var answer = PrepareQualityMessage(msg, quality); 62 Send(answer.Build(), msg); 61 63 } 62 64 -
misc/tools/ExternalEvaluation/CSharp/ExternalEvaluation.Service/Properties/AssemblyInfo.cs
r15014 r16871 1 using System.Reflection;1 using System.Reflection; 2 2 using System.Runtime.CompilerServices; 3 3 using System.Runtime.InteropServices; … … 34 34 // [assembly: AssemblyVersion("1.0.*")] 35 35 [assembly: AssemblyVersion("3.3.0.0")] 36 [assembly: AssemblyFileVersion("3.3.7. 0")]36 [assembly: AssemblyFileVersion("3.3.7.15014")]
Note: See TracChangeset
for help on using the changeset viewer.