ethos_penalps.node_operations#

Module Contents#

Classes#

NodeOperation

Helper class that provides a standard way to create an ABC using

UpstreamNewProductionOrder

This order is passed in upstream direction and

UpstreamAdaptionOrder

This order is passed in upstream direction

DownstreamAdaptionOrder

The order is passed downstream and requests an adaption of the previously

DownstreamValidationOrder

This order is passed downstream and validates that the previously

TerminateProduction

Helper class that provides a standard way to create an ABC using

Functions#

get_new_uuid(→ str)

class ethos_penalps.node_operations.NodeOperation#

Bases: abc.ABC

Helper class that provides a standard way to create an ABC using inheritance.

next_node_name: str | None#
starting_node_name: str#
ethos_penalps.node_operations.get_new_uuid() str#
class ethos_penalps.node_operations.UpstreamNewProductionOrder#

Bases: NodeOperation

This order is passed in upstream direction and requests a new output stream from the target node.

Parameters:

NodeOperation (_type_) – _description_

stream_state: ethos_penalps.stream.ContinuousStreamState | ethos_penalps.stream.BatchStreamState#
production_order: ethos_penalps.data_classes.ProductionOrder#
starting_node_output_branch_data: ethos_penalps.simulation_data.simulation_data_branch.IncompleteOutputBranchData#
operation_type: str = 'Upstream new production order'#
__post_init__()#
class ethos_penalps.node_operations.UpstreamAdaptionOrder#

Bases: NodeOperation

This order is passed in upstream direction as a response to a previous input stream adaption request which is passed downstream. The start node of this operation has accepted the previously proposed adaption.

Parameters:

NodeOperation (_type_) – _description_

stream_state: ethos_penalps.stream.ContinuousStreamState | ethos_penalps.stream.BatchStreamState#
production_order: ethos_penalps.data_classes.ProductionOrder#
starting_node_output_branch_data: ethos_penalps.simulation_data.simulation_data_branch.IncompleteOutputBranchData#
target_node_output_branch_data: ethos_penalps.simulation_data.simulation_data_branch.IncompleteOutputBranchData#
operation_type: str = 'Upstream adaption order'#
__post_init__()#
class ethos_penalps.node_operations.DownstreamAdaptionOrder#

Bases: NodeOperation

The order is passed downstream and requests an adaption of the previously requests input stream of the target node. The adaption is either a shift to an earlier delivery or a reduced delivered mass. The adaption request will always be accepted.

Parameters:

NodeOperation (_type_) – _description_

stream_state: ethos_penalps.stream.ContinuousStreamState | ethos_penalps.stream.BatchStreamState#
production_order: ethos_penalps.data_classes.ProductionOrder#
starting_node_output_branch_data: ethos_penalps.simulation_data.simulation_data_branch.IncompleteOutputBranchData#
target_node_output_branch_data: ethos_penalps.simulation_data.simulation_data_branch.IncompleteOutputBranchData#
operation_type: str = 'Downstream adaption operation'#
class ethos_penalps.node_operations.DownstreamValidationOrder#

Bases: NodeOperation

This order is passed downstream and validates that the previously requested input stream can be delivered as requested.

Parameters:

NodeOperation (_type_) – _description_

starting_node_output_branch_data: ethos_penalps.simulation_data.simulation_data_branch.CompleteOutputBranchData#
target_node_output_branch_identifier: ethos_penalps.data_classes.OutputBranchIdentifier#
target_node_temporal_identifier: ethos_penalps.data_classes.TemporalBranchIdentifier#
production_order: ethos_penalps.data_classes.ProductionOrder#
operation_type: str = 'Downstream validation operation'#
class ethos_penalps.node_operations.TerminateProduction#

Bases: NodeOperation

Helper class that provides a standard way to create an ABC using inheritance.

operation_type: str = 'Terminate production'#