Last change
on this file since 70 was 69, checked in by Wouter Pasman, 3 years ago |
Added MOPAC protocol. For GeniusWeb 2.0.3
|
File size:
1.2 KB
|
Line | |
---|
1 | from abc import ABC, abstractmethod
|
---|
2 |
|
---|
3 | from pyson.JsonSubTypes import JsonSubTypes
|
---|
4 | from pyson.JsonTypeInfo import JsonTypeInfo, As, Id
|
---|
5 | from tudelft_utilities_logging.Reporter import Reporter
|
---|
6 |
|
---|
7 | from geniusweb.protocol.NegoProtocol import NegoProtocol
|
---|
8 |
|
---|
9 |
|
---|
10 | @JsonSubTypes( ["geniusweb.protocol.session.saop.SAOPSettings.SAOPSettings",
|
---|
11 | "geniusweb.protocol.session.mopac.MOPACSettings.MOPACSettings" ])
|
---|
12 | @JsonTypeInfo(use = Id.NAME, include = As.WRAPPER_OBJECT)
|
---|
13 | class NegoSettings(ABC):
|
---|
14 | '''
|
---|
15 | Interface for negotiation settings. A negotiation can be either a single
|
---|
16 | session or a tournament
|
---|
17 | '''
|
---|
18 | @abstractmethod
|
---|
19 | def getMaxRunTime(self) -> float:
|
---|
20 | '''
|
---|
21 | @return the maximum run time (seconds). In deterministic runs this can be
|
---|
22 | an exact number (#sessions * runtime per session) but this
|
---|
23 | interface also allows more random tournament protocols. The
|
---|
24 | protocol should stick closely with the maximum it provides to
|
---|
25 | enable planning of tournaments properly.
|
---|
26 | '''
|
---|
27 |
|
---|
28 | @abstractmethod
|
---|
29 | def getProtocol(self, logger:Reporter)->NegoProtocol :
|
---|
30 | '''
|
---|
31 | @param logger the logger where the protocol can log events to.
|
---|
32 | @return an initialized and ready to use {@link NegoProtocol} that can
|
---|
33 | handle this Negotiation.
|
---|
34 | '''
|
---|
Note:
See
TracBrowser
for help on using the repository browser.