跳转至

BaseMethodInterface(基础接口类)

evotoolkit.core.BaseMethodInterface

Bases: ABC

Base Adapter

Source code in src/evotoolkit/core/method_interface/base_method_interface.py
class BaseMethodInterface(abc.ABC):
    """Base Adapter"""

    def __init__(self, task: BaseTask):
        self.task = task

    @abstractmethod
    def make_init_sol(self) -> Solution:
        """Create initial solution from task info."""
        raise NotImplementedError()

    @abstractmethod
    def parse_response(self, response_str: str) -> Solution:
        raise NotImplementedError()

make_init_sol abstractmethod

make_init_sol() -> Solution

Create initial solution from task info.

Source code in src/evotoolkit/core/method_interface/base_method_interface.py
@abstractmethod
def make_init_sol(self) -> Solution:
    """Create initial solution from task info."""
    raise NotImplementedError()

所有方法接口的基类。参见: