Hardaware Loop

class HardwareLoop(scenario, manual_triggering=False, plot_information=True, iteration_priority=IterationPriority.DROPS, record_drops=True, **kwargs)[source]

Bases: Serializable, Generic[PhysicalScenarioType, PDT], Pipeline[PhysicalScenarioType, PDT]

Hermespy hardware loop configuration.

Parameters:
  • scenario (PhysicalScenarioType) – The physical scenario being controlled by the hardware loop.

  • manual_triggering (bool, optional) – Require a keyboard user input to trigger each drop manually. Disabled by default.

  • plot_information (bool, optional) – Plot information during loop runtime. Enabled by default.

  • iteration_priority (IterationPriority, optional) – Which dimension to iterate over first. Defaults to IterationPriority.DROPS.

  • record_drops (bool, optional) – Record drops during loop runtime. Enabled by default.

add_dimension(dimension)[source]

Add a new dimension to the simulation grid.

Parameters:

dimension (GridDimension) – Dimension to be added.

Raises:

ValueError – If the dimension already exists within the grid.

Return type:

None

add_evaluator(evaluator)[source]

Add new evaluator to the hardware loop.

Parameters:

evaluator (Evaluator) – The evaluator to be added.

Return type:

None

add_plot(plot)[source]

Add a new plot to be visualized by the hardware loop during runtime.

Parameters:

plot (HardwareLoopPlot) – The plot to be added.

Return type:

None

evaluator_index(evaluator)[source]

Index of the given evaluator.

Parameters:

evaluator (Evaluator) – The evaluator to be searched for.

Return type:

int

Returns: The index of the evaluator.

new_dimension(dimension, sample_points, *args)[source]

Add a dimension to the sweep grid.

Must be a property of the HardwareLoop.scenario().

Parameters:
  • dimension (str) – String representation of dimension location relative to the investigated object.

  • sample_points (List[Any]) – List points at which the dimension will be sampled into a grid. The type of points must be identical to the grid arguments / type.

  • *args (Tuple[Any], optional) – References to the object the imension belongs to. Resolved to the investigated object by default, but may be an attribute or sub-attribute of the investigated object.

Return type:

GridDimension

Returns: The newly created dimension object.

replay(file_location)[source]

Replay a stored pipeline run.

Parameters:

file_location (str) – File system location of the replay.

Return type:

None

run(overwrite=True, campaign='default')[source]

Run the hardware loop configuration.

Parameters:
  • overwrite (bool, optional) – Allow the replacement of an already existing savefile.

  • campaing (str, optional) – Name of the measurement campaign.

Return type:

None

property evaluators: List[Evaluator]

List of registered evaluators.

property iteration_priority: IterationPriority

Iteration priority of the hardware loop.

manual_triggering: bool

Require a user input to trigger each drop manually

property num_evaluators: int

Number of registered evaluators.

Returns: The number of evaluators.

plot_information: bool

Plot information during loop runtime

record_drops: bool

Record drops during loop runtime

yaml_tag: Optional[str] = 'HardwareLoop'

YAML serialization tag