PositionSender

Full Name

neuroptimiser.core.processes.PositionSender

Description

class PositionSender[source]

Bases: AbstractProcess

Position Sender Process

This process is designed to send the position and fitness of a unit from inside the bounds to outside the bounds. It manages the input and output ports for position and fitness data, allowing units to communicate their states.

Inports
p_inInPort

Input port for the position tensor from inside the bounds.

fp_inInPort

Input port for the fitness tensor from inside the bounds.

Outports
p_outOutPort

Output port for the position tensor to outside the bounds.

fp_outOutPort

Output port for the fitness tensor to outside the bounds.

See also

neuroptimiser.core.models.PyPositionSenderModel

Model implementation of the PositionSender process.

__init__(agent_id, internal_shape, external_shape, **kwargs)[source]

Initialise the PositionSender with the given parameters.

Parameters:
  • agent_id (int) – ID of the agent for which the position sender is being created.

  • internal_shape (tuple) – Shape of the internal position and fitness (e.g., (num_dimensions,)).

  • external_shape (tuple) – Shape of the external position and fitness (e.g., (num_agents, num_dimensions)).

Keyword Arguments:

**kwargs (dict, optional) – Additional keyword arguments to be passed to the parent class AbstractProcess.

reset() None[source]

Reset the PositionSender to its initial state.

This method is currently a placeholder and does not perform any operations for compatibility purposes.