Skip to content

Record

rex.base.ExperimentRecord ¤

A data structure that holds recorded data of an experiment.

Attributes:

filter(nodes: Dict[str, BaseNode], filter_connections: bool = False) -> ExperimentRecord ¤
to_graph() -> Graph ¤
stack(method: str = 'padded') -> EpisodeRecord ¤

rex.base.EpisodeRecord ¤

A data structure that holds recorded data of an episode.

Attributes:

  • nodes (Dict[str, NodeRecord]) –

    The node records.

__getitem__(val: int) -> EpisodeRecord ¤

Get the value of the episode record at a specific index.

Parameters:

  • val (int) –

    the index to get the value from

Returns:

filter(nodes: Dict[str, BaseNode], filter_connections: bool = False) -> EpisodeRecord ¤

Filter the episode record.

Parameters:

  • nodes (Dict[str, BaseNode]) –

    Only keep record.nodes in of subgraph spanned by nodes.

  • filter_connections (bool, default: False ) –

    If True, only keep connections between nodes in nodes.

Returns:

  • EpisodeRecord

    A new episode record with only the nodes and connections in nodes.

to_graph() -> Graph ¤

Convert the episode record to a graph.

Returns:

  • Graph

    The graph of the episode record.


rex.base.NodeInfo ¤

A data structure that holds information about the node.

Attributes:

  • rate (float) –

    The rate of the node.

  • advance (bool) –

    Whether the node advances the episode.

  • scheduling (Scheduling) –

    The scheduling of the node.

  • phase (float) –

    The phase of the node.

  • delay_dist (DelayDistribution) –

    The delay distribution of the node.

  • delay (float) –

    The delay of the node.

  • inputs (Dict[str, InputInfo]) –

    The inputs of the node.

  • name (str) –

    The name of the node.

  • cls (str) –

    The class of the node.

  • color (str) –

    The color of the node.

  • order (int) –

    The order of the node.


rex.base.InputInfo ¤

A data structure that holds information about the input connection.

Attributes:

  • rate (float) –

    The rate of the connection.

  • window (int) –

    The window size of the connection.

  • blocking (bool) –

    Whether the connection is blocking.

  • skip (bool) –

    Whether the connection is skipped.

  • jitter (Jitter) –

    The jitter of the connection.

  • phase (float) –

    The phase of the connection.

  • delay_dist (DelayDistribution) –

    The delay distribution of the connection.

  • delay (float) –

    The delay of the connection.

  • name (str) –

    The name of the connection.

  • output (str) –

    The name of the output node.


rex.base.NodeRecord ¤

A data structure that holds information about a node.

Attributes:

  • info (NodeInfo) –

    The node information.

  • clock (Clock) –

    The clock of the node.

  • real_time_factor (float) –

    The real time factor of the node.

  • ts_start (float) –

    The start time of the node.

  • params (Base) –

    The parameters of the node.

  • inputs (Dict[str, InputRecord]) –

    The input record.

  • steps (StepRecord) –

    The step record.


rex.base.InputRecord ¤

A data structure that holds information about the input connection.

Attributes:


rex.base.StepRecord ¤

A data structure that holds information about a step.

Attributes:

  • eps (Union[int, ArrayLike]) –

    The episode number.

  • seq (Union[int, ArrayLike]) –

    The step number.

  • ts_start (Union[float, ArrayLike]) –

    The start time of the step.

  • ts_end (Union[float, ArrayLike]) –

    The end time of the step.

  • delay (Union[float, ArrayLike]) –

    The delay of the step.

  • rng (Array) –

    The random number generator.

  • inputs (InputState) –

    The input state.

  • state (Base) –

    The state of the node.

  • output (Base) –

    The output of the node


rex.base.AsyncStepRecord ¤

Bases: StepRecord

A data structure that holds information about an asynchronous step.

Attributes:

  • ts_scheduled (Union[float, ArrayLike]) –

    The scheduled time of the step.

  • ts_max (Union[float, ArrayLike]) –

    The maximum time of the step.

  • ts_end_prev (Union[float, ArrayLike]) –

    The end time of the previous step.

  • phase (Union[float, ArrayLike]) –

    The phase of the step.

  • phase_scheduled (Union[float, ArrayLike]) –

    The scheduled phase of the step.

  • phase_inputs (Union[float, ArrayLike]) –

    The phase of the inputs.

  • phase_last (Union[float, ArrayLike]) –

    The last phase of the step.

  • sent (Header) –

    The header of the sent message.

  • phase_overwrite (Union[float, ArrayLike]) –

    The phase overwrite.



rex.base.MessageRecord ¤

A data structure that holds information about a sent or received message.

Attributes:

  • seq_out (Union[int, ArrayLike]) –

    The sequence number of the sent message.

  • seq_in (Union[int, ArrayLike]) –

    The sequence number of the received message.

  • ts_sent (Union[float, ArrayLike]) –

    The time the message was sent.

  • ts_recv (Union[float, ArrayLike]) –

    The time the message was received.

  • delay (Union[float, ArrayLike]) –

    The delay of the message.


rex.base.Header ¤

A data structure that holds the header information of a record.

Attributes:

  • eps (Union[int, ArrayLike]) –

    The episode number.

  • seq (Union[int, ArrayLike]) –

    The step number.

  • ts (Union[float, ArrayLike]) –

    The time