ethos_penalps.process_state_network_navigator#

Module Contents#

Classes#

OutputStreamAdaptionDecider

ProcessStateNetworkNavigator

An input branch is created to determine the required input stream

Attributes#

logger

ethos_penalps.process_state_network_navigator.logger#
class ethos_penalps.process_state_network_navigator.OutputStreamAdaptionDecider(original_stream_state: ethos_penalps.stream.ContinuousStreamState | ethos_penalps.stream.BatchStreamState)#
add_adapted_state(adapted_state: ethos_penalps.stream.ContinuousStreamState | ethos_penalps.stream.BatchStreamState)#
class ethos_penalps.process_state_network_navigator.ProcessStateNetworkNavigator(production_plan: ethos_penalps.production_plan.ProductionPlan, process_state_handler: ethos_penalps.process_state_handler.ProcessStateHandler)#

An input branch is created to determine the required input stream to provide an output stream that is requested. It also - determines if multiple input streams are required to provide the requested output stream state - handles conflicts if the input stream can not be provided from the upstream process step as requested

determine_if_output_stream_requires_adaption() OutputStreamAdaptionDecider#

Determines if the output stream can be provided as requested. Currently tests if this process step is busy and shifts the production to the first time available. Also tests for a maximum mass provided in a single stream. Cuts the stream to maximum mass if more mass is requested.

Returns:

_description_

Return type:

OutputStreamAdaptionDecider

store_current_simulation_data()#
shift_output_stream_to_first_manageable_date_if_necessary() OutputStreamAdaptionDecider#

Checks if the output stream must be shifted because the process step is not available yet. If a shift is necessary the state is shifted to the earliest available date

Raises:

Exception – _description_

Returns:

_description_

Return type:

_type_

determine_start_time_for_shift_to_production_state(stream_end_time: datetime.datetime) datetime.datetime#

Determines the time when process state shift must be initiated to shift into the process state providing state in time. This is necessary to shift over pre output stream providing states

Parameters:

stream_end_time (datetime.datetime) – Output stream end time

Raises:

Exception – Stream end time must be before idle time.

Returns:

Initiation date for process state shift from idle to output stream providing state

Return type:

datetime.datetime

determine_input_stream_from_output_stream() ethos_penalps.stream.ContinuousStreamState | ethos_penalps.stream.BatchStreamState#
combine_input_and_output_stream(new_input_stream_state: ethos_penalps.stream.ContinuousStreamState | ethos_penalps.stream.BatchStreamState) ethos_penalps.stream.ContinuousStreamState | ethos_penalps.stream.BatchStreamState#

Reacts to an adaption of the input stream that was requested by this branch

Parameters:

new_input_stream_state (ContinuousStreamState | BatchStreamState) – _description_

Raises:
  • Exception – _description_

  • Exception – _description_

  • Exception – _description_

  • Exception – _description_

  • Exception – _description_

Returns:

_description_

Return type:

ContinuousStreamState | BatchStreamState

fulfill_temporal_branch() ethos_penalps.stream.ContinuousStreamState | ethos_penalps.stream.BatchStreamState#
store_input_stream_state_to_temporary_production_plan()#

Stores the input stream state to the production plan. Should be called before the branch is validated

reset_temporal_branch()#
provide_output_stream_from_storage()#
validate_temporal_branch_without_input_stream()#
validate_temporal_branch()#
create_process_state_entries()#