:py:mod:`ethos_penalps.node_operations`
=======================================

.. py:module:: ethos_penalps.node_operations


Module Contents
---------------

Classes
~~~~~~~

.. autoapisummary::

   ethos_penalps.node_operations.NodeOperation
   ethos_penalps.node_operations.UpstreamNewProductionOrder
   ethos_penalps.node_operations.UpstreamAdaptionOrder
   ethos_penalps.node_operations.DownstreamAdaptionOrder
   ethos_penalps.node_operations.DownstreamValidationOrder
   ethos_penalps.node_operations.TerminateProduction



Functions
~~~~~~~~~

.. autoapisummary::

   ethos_penalps.node_operations.get_new_uuid



.. py:class:: NodeOperation


   Bases: :py:obj:`abc.ABC`

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

   .. py:attribute:: next_node_name
      :type: str | None

      

   .. py:attribute:: starting_node_name
      :type: str

      


.. py:function:: get_new_uuid() -> str


.. py:class:: UpstreamNewProductionOrder


   Bases: :py:obj:`NodeOperation`

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

   :param NodeOperation: _description_
   :type NodeOperation: _type_

   .. py:attribute:: stream_state
      :type: ethos_penalps.stream.ContinuousStreamState | ethos_penalps.stream.BatchStreamState

      

   .. py:attribute:: production_order
      :type: ethos_penalps.data_classes.ProductionOrder

      

   .. py:attribute:: starting_node_output_branch_data
      :type: ethos_penalps.simulation_data.simulation_data_branch.IncompleteOutputBranchData

      

   .. py:attribute:: operation_type
      :type: str
      :value: 'Upstream new production order'

      

   .. py:method:: __post_init__()



.. py:class:: UpstreamAdaptionOrder


   Bases: :py:obj:`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.

   :param NodeOperation: _description_
   :type NodeOperation: _type_

   .. py:attribute:: stream_state
      :type: ethos_penalps.stream.ContinuousStreamState | ethos_penalps.stream.BatchStreamState

      

   .. py:attribute:: production_order
      :type: ethos_penalps.data_classes.ProductionOrder

      

   .. py:attribute:: starting_node_output_branch_data
      :type: ethos_penalps.simulation_data.simulation_data_branch.IncompleteOutputBranchData

      

   .. py:attribute:: target_node_output_branch_data
      :type: ethos_penalps.simulation_data.simulation_data_branch.IncompleteOutputBranchData

      

   .. py:attribute:: operation_type
      :type: str
      :value: 'Upstream adaption order'

      

   .. py:method:: __post_init__()



.. py:class:: DownstreamAdaptionOrder


   Bases: :py:obj:`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.

   :param NodeOperation: _description_
   :type NodeOperation: _type_

   .. py:attribute:: stream_state
      :type: ethos_penalps.stream.ContinuousStreamState | ethos_penalps.stream.BatchStreamState

      

   .. py:attribute:: production_order
      :type: ethos_penalps.data_classes.ProductionOrder

      

   .. py:attribute:: starting_node_output_branch_data
      :type: ethos_penalps.simulation_data.simulation_data_branch.IncompleteOutputBranchData

      

   .. py:attribute:: target_node_output_branch_data
      :type: ethos_penalps.simulation_data.simulation_data_branch.IncompleteOutputBranchData

      

   .. py:attribute:: operation_type
      :type: str
      :value: 'Downstream adaption operation'

      


.. py:class:: DownstreamValidationOrder


   Bases: :py:obj:`NodeOperation`

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

   :param NodeOperation: _description_
   :type NodeOperation: _type_

   .. py:attribute:: starting_node_output_branch_data
      :type: ethos_penalps.simulation_data.simulation_data_branch.CompleteOutputBranchData

      

   .. py:attribute:: target_node_output_branch_identifier
      :type: ethos_penalps.data_classes.OutputBranchIdentifier

      

   .. py:attribute:: target_node_temporal_identifier
      :type: ethos_penalps.data_classes.TemporalBranchIdentifier

      

   .. py:attribute:: production_order
      :type: ethos_penalps.data_classes.ProductionOrder

      

   .. py:attribute:: operation_type
      :type: str
      :value: 'Downstream validation operation'

      


.. py:class:: TerminateProduction


   Bases: :py:obj:`NodeOperation`

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

   .. py:attribute:: operation_type
      :type: str
      :value: 'Terminate production'

      


