- Timestamp:
- 07/22/10 00:44:01 (14 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.ExternalEvaluation/3.3/Drivers
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.ExternalEvaluation/3.3/Drivers/EvaluationChannel.cs
r3872 r4068 20 20 #endregion 21 21 22 using System;23 22 using Google.ProtocolBuffers; 24 23 using HeuristicLab.Core; -
trunk/sources/HeuristicLab.Problems.ExternalEvaluation/3.3/Drivers/EvaluationServiceClient.cs
r3895 r4068 21 21 22 22 using System; 23 using System.Collections.Generic;24 using System.Linq;25 using System.Text;26 23 using HeuristicLab.Core; 24 using HeuristicLab.Data; 25 using HeuristicLab.Parameters; 27 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 using HeuristicLab.Parameters;29 using HeuristicLab.Data;30 27 31 28 namespace HeuristicLab.Problems.ExternalEvaluation { … … 54 51 55 52 #region IEvaluationServiceClient Members 56 53 57 54 public QualityMessage Evaluate(SolutionMessage solution) { 58 55 int tries = 0, maxTries = RetryParameter.Value.Value; … … 66 63 result = (QualityMessage)Channel.Receive(QualityMessage.CreateBuilder()); 67 64 success = true; 68 } catch (InvalidOperationException) { 65 } 66 catch (InvalidOperationException) { 69 67 throw; 70 } catch { 68 } 69 catch { 71 70 if (tries >= maxTries) 72 71 throw; … … 85 84 Channel.Send(solution); 86 85 success = true; 87 } catch (InvalidOperationException) { 86 } 87 catch (InvalidOperationException) { 88 88 throw; 89 } catch { 89 } 90 catch { 90 91 if (tries >= maxTries) 91 92 throw; … … 102 103 try { 103 104 Channel.Open(); 104 } catch (Exception e) { 105 } 106 catch (Exception e) { 105 107 throw new InvalidOperationException(Name + ": The channel could not be opened.", e); 106 108 } … … 112 114 try { 113 115 message = (QualityMessage)Channel.Receive(QualityMessage.CreateBuilder()); 114 } catch { } 116 } 117 catch { } 115 118 ((Action<QualityMessage>)callback).Invoke(message); 116 119 }
Note: See TracChangeset
for help on using the changeset viewer.