Last change
on this file since 74 was 73, checked in by Bart Vastenhouw, 3 years ago |
Fix for IssueValue hashcode.
|
File size:
1.3 KB
|
Rev | Line | |
---|
[73] | 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 | "geniusweb.protocol.session.learn.LearnSettings.LearnSettings" ])
|
---|
| 13 | @JsonTypeInfo(use = Id.NAME, include = As.WRAPPER_OBJECT)
|
---|
| 14 | class NegoSettings(ABC):
|
---|
| 15 | '''
|
---|
| 16 | Interface for negotiation settings. A negotiation can be either a single
|
---|
| 17 | session or a tournament
|
---|
| 18 | '''
|
---|
| 19 | @abstractmethod
|
---|
| 20 | def getMaxRunTime(self) -> float:
|
---|
| 21 | '''
|
---|
| 22 | @return the maximum run time (seconds). In deterministic runs this can be
|
---|
| 23 | an exact number (#sessions * runtime per session) but this
|
---|
| 24 | interface also allows more random tournament protocols. The
|
---|
| 25 | protocol should stick closely with the maximum it provides to
|
---|
| 26 | enable planning of tournaments properly.
|
---|
| 27 | '''
|
---|
| 28 |
|
---|
| 29 | @abstractmethod
|
---|
| 30 | def getProtocol(self, logger:Reporter)->NegoProtocol :
|
---|
| 31 | '''
|
---|
| 32 | @param logger the logger where the protocol can log events to.
|
---|
| 33 | @return an initialized and ready to use {@link NegoProtocol} that can
|
---|
| 34 | handle this Negotiation.
|
---|
| 35 | '''
|
---|
Note:
See
TracBrowser
for help on using the repository browser.