ethos_penalps.process_state

Contents

ethos_penalps.process_state#

Module Contents#

Classes#

ProcessState

This class represents a state in process step. The states primary

OutputStreamProvidingState

This class represents a state in process step. The states primary

InputStreamProvidingState

This class represents a state in process step. The states primary

FullBatchInputStreamProvidingState

This class represents a state in process step. The states primary

InputAndOutputStreamProvidingState

This class represents a state in process step. The states primary

IntermediateState

This class represents a state in process step. The states primary

IntermediateStateBasedOnEnergy

This class represents a state in process step. The states primary

ProcessStateParallelContinuousInputWithStorage

This class represents a state in process step. The states primary

ContinuousOutputStreamProvidingState

This class represents a state in process step. The states primary

OutputStreamFromStorageState

This class represents a state in process step. The states primary

BatchOutputStreamProvidingState

This class represents a state in process step. The states primary

ContinuousInputStreamRequestingStateWithStorage

This class represents a state in process step. The states primary

BatchInputStreamRequestingStateWithStorage

This class represents a state in process step. The states primary

BatchInputStreamRequestingStateWithStorageEnergyBasedOnStream

This class represents a state in process step. The states primary

ProcessStateIdle

This class represents a state in process step. The states primary

ProcessStateSwitchHandler

Attributes#

logger

ethos_penalps.process_state.logger#
class ethos_penalps.process_state.ProcessState(process_state_name: str, process_step_name: str, process_step_data: ethos_penalps.process_step_data.ProcessStepData)#

Bases: abc.ABC

This class represents a state in process step. The states primary

_create_process_step_production_plan_entry(process_state_state: ethos_penalps.data_classes.ProcessStateData) ethos_penalps.data_classes.ProcessStepProductionPlanEntry#
create_process_state_energy_data_based_on_stream_mass(specific_energy_demand: float, load_type: ethos_penalps.load_profile_calculator.LoadType, stream: ethos_penalps.stream.BatchStream | ethos_penalps.stream.ContinuousStream)#
add_process_state_energy_data(process_state_energy_data: ethos_penalps.load_profile_calculator.ProcessStateEnergyLoadData)#
class ethos_penalps.process_state.OutputStreamProvidingState(process_state_name: str, process_step_name: str, process_step_data: ethos_penalps.process_step_data.ProcessStepData, maximum_stream_mass: float | None = None)#

Bases: ProcessState, abc.ABC

This class represents a state in process step. The states primary

determine_if_stream_mass_can_be_provided(output_stream_state: ethos_penalps.stream.ContinuousStreamState | ethos_penalps.stream.BatchStreamState) ethos_penalps.stream.ContinuousStreamState | ethos_penalps.stream.BatchStreamState#

Check if the required output_mass can be provided under the constraint of the maximum stream mass of this process state. Returns an adapted state if it exceeds the maximum mass.

Parameters:

output_stream_state (ContinuousStreamState | BatchStreamState) – _description_

Raises:
  • Exception – _description_

  • Exception – _description_

Returns:

_description_

Return type:

ContinuousStreamState | BatchStreamState

determine_if_storage_level_is_within_limits()#
abstract check_if_storage_can_supply_output_directly() bool#
class ethos_penalps.process_state.InputStreamProvidingState(process_state_name: str, process_step_name: str, process_step_data: ethos_penalps.process_step_data.ProcessStepData)#

Bases: ProcessState, abc.ABC

This class represents a state in process step. The states primary

__str__() str#

Return str(self).

fulfill_order() ethos_penalps.stream.ContinuousStreamState | ethos_penalps.stream.BatchStreamState#
abstract create_storage_entries()#
abstract determine_required_input_stream_state() ethos_penalps.stream.ContinuousStreamState | ethos_penalps.stream.BatchStreamState#

Creates the initial conversion of an output to an input stream

The following steps must be conducted the function

  1. Determine end time of the input stream

    1.1. Add the stream end time to time_data class with time_data.set_next_stream_end_time()

  2. Create stream state based on the output stream state and determined end time

  3. Add stream to process step data

  4. Return determined input stream state

determine_if_stream_branch_if_fulfilled() bool#
determine_if_production_branch_is_fulfilled() bool#
class ethos_penalps.process_state.FullBatchInputStreamProvidingState(process_state_name: str, process_step_name: str, process_step_data: ethos_penalps.process_step_data.ProcessStepData)#

Bases: InputStreamProvidingState

This class represents a state in process step. The states primary

create_storage_entries()#
fulfill_order() ethos_penalps.stream.ContinuousStreamState | ethos_penalps.stream.BatchStreamState#
determine_required_input_stream_state() ethos_penalps.stream.ContinuousStreamState | ethos_penalps.stream.BatchStreamState#

Creates the initial conversion of an output to an input stream

The following steps must be conducted the function

  1. Determine end time of the input stream

    1.1. Add the stream end time to time_data class with time_data.set_next_stream_end_time()

  2. Create stream state based on the output stream state and determined end time

  3. Add stream to process step data

  4. Return determined input stream state

determine_if_storage_level_is_within_limits()#
determine_if_stream_branch_if_fulfilled() bool#
class ethos_penalps.process_state.InputAndOutputStreamProvidingState(process_state_name: str, process_step_name: str, process_step_data: ethos_penalps.process_step_data.ProcessStepData)#

Bases: InputStreamProvidingState, OutputStreamProvidingState, abc.ABC

This class represents a state in process step. The states primary

abstract create_storage_entries()#
abstract check_if_storage_can_supply_output_directly() bool#
class ethos_penalps.process_state.IntermediateState(process_state_name: str, process_step_name: str, process_step_data: ethos_penalps.process_step_data.ProcessStepData)#

Bases: ProcessState, abc.ABC

This class represents a state in process step. The states primary

__str__() str#

Return str(self).

class ethos_penalps.process_state.IntermediateStateBasedOnEnergy(process_state_name: str, process_step_name: str, process_step_data: ethos_penalps.process_step_data.ProcessStepData)#

Bases: IntermediateState

This class represents a state in process step. The states primary

_create_process_step_production_plan_entry(process_state_state: ethos_penalps.data_classes.ProcessStateData, input_stream_state: ethos_penalps.stream.BatchStreamProductionPlanEntry | ethos_penalps.stream.ContinuousStreamProductionPlanEntry) ethos_penalps.data_classes.ProcessStepProductionPlanEntry#
class ethos_penalps.process_state.ProcessStateParallelContinuousInputWithStorage(process_state_name: str, process_step_name: str, process_step_data: ethos_penalps.process_step_data.ProcessStepData, maximum_stream_mass: float | None = None)#

Bases: InputAndOutputStreamProvidingState

This class represents a state in process step. The states primary

__str__() str#

Return str(self).

determine_required_input_stream_state() ethos_penalps.stream.BatchStreamState | ethos_penalps.stream.ContinuousStreamState#

Creates the initial conversion of an output to an input stream

The following steps must be conducted the function

  1. Determine end time of the input stream

    1.1. Add the stream end time to time_data class with time_data.set_next_stream_end_time()

  2. Create stream state based on the output stream state and determined end time

  3. Add stream to process step data

  4. Return determined input stream state

fulfill_order() ethos_penalps.stream.BatchStreamState#
create_storage_entries()#
check_if_storage_can_supply_output_directly() bool#
class ethos_penalps.process_state.ContinuousOutputStreamProvidingState(process_state_name: str, process_step_name: str, process_step_data: ethos_penalps.process_step_data.ProcessStepData, maximum_stream_mass: float | None = None)#

Bases: OutputStreamProvidingState

This class represents a state in process step. The states primary

check_if_storage_can_supply_output_directly() bool#
class ethos_penalps.process_state.OutputStreamFromStorageState(process_state_name: str, process_step_name: str, process_step_data: ethos_penalps.process_step_data.ProcessStepData, maximum_stream_mass: float | None = None)#

Bases: OutputStreamProvidingState

This class represents a state in process step. The states primary

check_if_storage_can_supply_output_directly() bool#
class ethos_penalps.process_state.BatchOutputStreamProvidingState(process_state_name: str, process_step_name: str, process_step_data: ethos_penalps.process_step_data.ProcessStepData, maximum_stream_mass: float | None = None)#

Bases: OutputStreamProvidingState

This class represents a state in process step. The states primary

check_if_storage_can_supply_output_directly() bool#
class ethos_penalps.process_state.ContinuousInputStreamRequestingStateWithStorage(process_state_name: str, process_step_name: str, process_step_data: ethos_penalps.process_step_data.ProcessStepData)#

Bases: InputStreamProvidingState

This class represents a state in process step. The states primary

determine_required_input_stream_state() ethos_penalps.stream.ContinuousStreamState#

Creates the initial conversion of an output to an input stream

The following steps must be conducted the function

  1. Determine end time of the input stream

    1.1. Add the stream end time to time_data class with time_data.set_next_stream_end_time()

  2. Create stream state based on the output stream state and determined end time

  3. Add stream to process step data

  4. Return determined input stream state

create_storage_entries()#
class ethos_penalps.process_state.BatchInputStreamRequestingStateWithStorage(process_state_name: str, process_step_name: str, process_step_data: ethos_penalps.process_step_data.ProcessStepData)#

Bases: InputStreamProvidingState

This class represents a state in process step. The states primary

determine_required_input_stream_state() ethos_penalps.stream.BatchStreamState#

Creates the initial conversion of an output to an input stream

The following steps must be conducted the function

  1. Determine end time of the input stream

    1.1. Add the stream end time to time_data class with time_data.set_next_stream_end_time()

  2. Create stream state based on the output stream state and determined end time

  3. Add stream to process step data

  4. Return determined input stream state

create_storage_entries()#
class ethos_penalps.process_state.BatchInputStreamRequestingStateWithStorageEnergyBasedOnStream(process_state_name: str, process_step_name: str, process_step_data: ethos_penalps.process_step_data.ProcessStepData)#

Bases: BatchInputStreamRequestingStateWithStorage

This class represents a state in process step. The states primary

_create_process_step_production_plan_entry(process_state_state: ethos_penalps.data_classes.ProcessStateData, input_stream_state: ethos_penalps.stream.ContinuousStreamState | ethos_penalps.stream.BatchStreamState) ethos_penalps.data_classes.ProcessStepProductionPlanEntry#
class ethos_penalps.process_state.ProcessStateIdle(process_state_name: str, process_step_name: str, process_step_data: ethos_penalps.process_step_data.ProcessStepData)#

Bases: ProcessState

This class represents a state in process step. The states primary

__str__() str#

Return str(self).

class ethos_penalps.process_state.ProcessStateSwitchHandler(process_step_data: ethos_penalps.process_step_data.ProcessStepData)#
add_process_state_switch(process_state_switch: ethos_penalps.process_state_switch.ProcessStateSwitch)#
create_process_state_switch_at_next_discrete_event(start_process_state: ProcessState, end_process_state: ProcessState) ethos_penalps.process_state_switch.ProcessStateSwitchAtNextDiscreteEvent#
create_process_state_switch_at_input_stream(start_process_state: ProcessState, end_process_state: ProcessState) ethos_penalps.process_state_switch.ProcessStateSwitchAtInputStreamProvided#
create_process_state_switch_at_output_stream(start_process_state: ProcessState, end_process_state: ProcessState) ethos_penalps.process_state_switch.ProcessStateSwitchAtOutputStreamProvided#
create_process_state_switch_delay(start_process_state: ProcessState, end_process_state: ProcessState, delay: datetime.timedelta) ethos_penalps.process_state_switch.ProcessStateSwitchDelay#
create_process_state_switch_after_output_and_input_stream(start_process_state: ProcessState, end_process_state: ProcessState) ethos_penalps.process_state_switch.ProcessStateSwitchAfterInputAndOutputStream#