:py:mod:`ethos_penalps.stream_node_distributor`
===============================================

.. py:module:: ethos_penalps.stream_node_distributor


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

Classes
~~~~~~~

.. autoapisummary::

   ethos_penalps.stream_node_distributor.SplittedOrderCollection
   ethos_penalps.stream_node_distributor.OrderDistributor




.. py:class:: SplittedOrderCollection


   .. py:attribute:: stream_name
      :type: str

      

   .. py:attribute:: commodity
      :type: ethos_penalps.data_classes.Commodity

      

   .. py:attribute:: process_chain_identifier
      :type: ethos_penalps.data_classes.ProcessChainIdentifier

      

   .. py:attribute:: order_data_frame
      :type: pandas.DataFrame

      

   .. py:attribute:: target_mass
      :type: numbers.Number

      

   .. py:attribute:: current_order_number
      :type: int
      :value: 0

      

   .. py:method:: check_if_order_are_empty()


   .. py:method:: get_order_by_order_number(order_number: int) -> ethos_penalps.data_classes.ProductionOrder


   .. py:method:: update_order(produced_mass: numbers.Number)



.. py:class:: OrderDistributor(stream_handler: ethos_penalps.stream_handler.StreamHandler, production_order_collection: ethos_penalps.data_classes.OrderCollection, node_name: str)


   .. py:method:: update_order_collection(new_order_collection: ethos_penalps.data_classes.OrderCollection)


   .. py:method:: set_current_splitted_order_by_chain_identifier(process_chain_identifier: ethos_penalps.data_classes.ProcessChainIdentifier)


   .. py:method:: get_current_splitted_order() -> SplittedOrderCollection


   .. py:method:: check_if_there_are_sufficient_order_for_distribution()


   .. py:method:: split_production_order_dict()


   .. py:method:: aggregate_order_continuos_streams(order_data_frame: pandas.DataFrame, total_operation_rate_of_streams: numbers.Number) -> pandas.DataFrame


   .. py:method:: aggregate_order_batch_streams(input_order_data_frame: pandas.DataFrame, order_target_mass: numbers.Number) -> pandas.DataFrame


   .. py:method:: get_current_production_order() -> ethos_penalps.data_classes.ProductionOrder


   .. py:method:: update_production_order(produced_mass: numbers.Number)


   .. py:method:: get_current_stream_name() -> str


   .. py:method:: add_stream_name(stream_name: str, process_chain_identifier: ethos_penalps.data_classes.ProcessChainIdentifier)


   .. py:method:: check_if_current_order_is_fulfilled() -> bool


   .. py:method:: update_current_order_number()


   .. py:method:: check_if_process_chain_orders_are_satisfied() -> bool


   .. py:method:: get_stream_name_chain_identifier(process_chain_identifier: ethos_penalps.data_classes.ProcessChainIdentifier) -> str



