Пример #1
0
    def best_agent(self, best_agent):
        if not isinstance(best_agent, Agent):
            raise e.TypeError('`best_agent` should be an Agent')

        self._best_agent = best_agent
Пример #2
0
    def l(self, l):
        if not isinstance(l, (float, int)):
            raise e.TypeError('`l` should be a float or integer')

        self._l = l
Пример #3
0
    def memory(self, memory: np.ndarray) -> None:
        if not isinstance(memory, np.ndarray):
            raise e.TypeError("`memory` should be a numpy array")

        self._memory = memory
Пример #4
0
    def save_agents(self, save_agents: bool) -> None:
        if not isinstance(save_agents, bool):
            raise e.TypeError("`save_agents` should be a boolean")

        self._save_agents = save_agents
Пример #5
0
    def life(self, life):
        if not isinstance(life, np.ndarray):
            raise e.TypeError('`life` should be a numpy array')

        self._life = life
Пример #6
0
    def c1(self, c1: bool) -> None:
        if not isinstance(c1, bool):
            raise e.TypeError("`c1` should be a bool")

        self._c1 = c1
Пример #7
0
    def velocity(self, velocity: np.ndarray) -> None:
        if not isinstance(velocity, np.ndarray):
            raise e.TypeError("`velocity` should be a numpy array")

        self._velocity = velocity
Пример #8
0
    def pulse_rate(self, pulse_rate):
        if not isinstance(pulse_rate, np.ndarray):
            raise ex.TypeError('`pulse_rate` should be a numpy array')

        self._pulse_rate = pulse_rate
Пример #9
0
    def pointer(self, pointer):
        if not callable(pointer):
            raise e.TypeError('`pointer` should be a callable')

        self._pointer = pointer
Пример #10
0
    def velocity(self, velocity):
        if not isinstance(velocity, np.ndarray):
            raise ex.TypeError('`velocity` should be a numpy array')

        self._velocity = velocity
Пример #11
0
    def loudness(self, loudness):
        if not isinstance(loudness, np.ndarray):
            raise ex.TypeError('`loudness` should be a numpy array')

        self._loudness = loudness
Пример #12
0
    def frequency(self, frequency):
        if not isinstance(frequency, np.ndarray):
            raise ex.TypeError('`frequency` should be a numpy array')

        self._frequency = frequency
Пример #13
0
    def S(self, S):
        if not isinstance(S, np.ndarray):
            raise e.TypeError('`S` should be a numpy array')

        self._S = S
Пример #14
0
    def local_position(self, local_position):
        if not isinstance(local_position, np.ndarray):
            raise e.TypeError('`local_position` should be a numpy array')

        self._local_position = local_position
Пример #15
0
    def TM(self, TM: List[Agent]) -> None:
        if not isinstance(TM, list):
            raise e.TypeError("`TM` should be a list")

        self._TM = TM
Пример #16
0
    def name(self, name):
        if not isinstance(name, str):
            raise e.TypeError('`name` should be a string')

        self._name = name
Пример #17
0
    def environment(self, environment: List[Agent]) -> None:
        if not isinstance(environment, list):
            raise e.TypeError("`environment` should be a list")

        self._environment = environment
Пример #18
0
    def constraints(self, constraints):
        if not isinstance(constraints, list):
            raise e.TypeError('`constraints` should be a list')

        self._constraints = constraints
Пример #19
0
    def c2(self, c2: bool) -> None:
        if not isinstance(c2, bool):
            raise e.TypeError("`c2` should be a bool")

        self._c2 = c2
Пример #20
0
    def phi(self, phi):
        if not isinstance(phi, (float, int)):
            raise e.TypeError('`phi` should be a float or integer')

        self._phi = phi
Пример #21
0
    def local_position(self, local_position: np.ndarray) -> None:
        if not isinstance(local_position, np.ndarray):
            raise e.TypeError("`local_position` should be a numpy array")

        self._local_position = local_position
Пример #22
0
    def counter(self, counter: np.ndarray) -> None:
        if not isinstance(counter, np.ndarray):
            raise e.TypeError("`counter` should be a numpy array")

        self._counter = counter
Пример #23
0
    def counter(self, counter):
        if not isinstance(counter, np.ndarray):
            raise e.TypeError('`counter` should be a numpy array')

        self._counter = counter
Пример #24
0
    def life(self, life: np.ndarray) -> None:
        if not isinstance(life, np.ndarray):
            raise e.TypeError("`life` should be a numpy array")

        self._life = life
Пример #25
0
    def f(self, f):
        if not isinstance(f, (float, int)):
            raise e.TypeError('`f` should be a float or integer')

        self._f = f
Пример #26
0
    def name(self, name: str) -> None:
        if not isinstance(name, str):
            raise e.TypeError("`name` should be a string")

        self._name = name
Пример #27
0
    def fl(self, fl: float) -> None:
        if not isinstance(fl, (float, int)):
            raise e.TypeError("`fl` should be a float or integer")

        self._fl = fl
Пример #28
0
    def age(self, age):
        if not isinstance(age, list):
            raise e.TypeError('`age` should be a list')

        self._age = age
Пример #29
0
    def functions(self, functions):
        if not isinstance(functions, list):
            raise e.TypeError('`functions` should be a list')

        self._functions = functions
Пример #30
0
    def agents(self, agents):
        if not isinstance(agents, list):
            raise e.TypeError('`agents` should be a list')

        self._agents = agents