Last change
on this file since 15728 was
15014,
checked in by pfleck, 8 years ago
|
Added code and tools for the ExternalEvaluationProblem. (e.g. Java-side evaluation)
|
File size:
779 bytes
|
Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Linq;
|
---|
4 | using System.Text;
|
---|
5 | using HeuristicLab.Problems.ExternalEvaluation.Service;
|
---|
6 | using Google.ProtocolBuffers;
|
---|
7 |
|
---|
8 | namespace ExternalEvaluation.Service.Host {
|
---|
9 | class Program {
|
---|
10 | static void Main(string[] args) {
|
---|
11 | ServerSocketListenerFactory socket = new ServerSocketListenerFactory(9991);
|
---|
12 | PollService service = new PollService(socket);
|
---|
13 | service.Start();
|
---|
14 | while (true) {
|
---|
15 | Console.WriteLine("Waiting for message...");
|
---|
16 | var solution = service.GetSolution();
|
---|
17 | if (solution == null) break;
|
---|
18 | Console.WriteLine("Received: " + solution.SolutionId);
|
---|
19 | service.SendQuality(solution, 1);
|
---|
20 | Console.WriteLine("Replied!");
|
---|
21 | }
|
---|
22 | }
|
---|
23 | }
|
---|
24 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.