ethos_penalps.post_processing.time_series_visualizations.stream_gantt_chart

ethos_penalps.post_processing.time_series_visualizations.stream_gantt_chart#

Module Contents#

Functions#

slice_data_frames(...)

create_stream_gantt_charts(data_frame_list[, ...])

Create a stream gantt chart.

create_stream_subplot(axs, fig, subplot_number, ...[, ...])

Attributes#

logger

ethos_penalps.post_processing.time_series_visualizations.stream_gantt_chart.logger#
ethos_penalps.post_processing.time_series_visualizations.stream_gantt_chart.slice_data_frames(list_of_meta_data_objects: list[ethos_penalps.stream.StreamDataFrameMetaInformation | ethos_penalps.data_classes.ProcessStepDataFrameMetaInformation | ethos_penalps.data_classes.LoadProfileDataFrameMetaInformation | ethos_penalps.data_classes.StorageDataFrameMetaInformation | ethos_penalps.data_classes.EmptyMetaDataInformation | ethos_penalps.data_classes.ProductionOrderMetadata], start_date: datetime.datetime, end_date: datetime.datetime) list[ethos_penalps.stream.StreamDataFrameMetaInformation | ethos_penalps.data_classes.ProcessStepDataFrameMetaInformation | ethos_penalps.data_classes.LoadProfileDataFrameMetaInformation | ethos_penalps.data_classes.StorageDataFrameMetaInformation | ethos_penalps.data_classes.EmptyMetaDataInformation | ethos_penalps.data_classes.ProductionOrderMetadata]#
ethos_penalps.post_processing.time_series_visualizations.stream_gantt_chart.create_stream_gantt_charts(data_frame_list: list[ethos_penalps.stream.StreamDataFrameMetaInformation], reverse_y_graph_order=False, output_file_path: str | None = None, start_time_column_name: str = 'start_time', end_time_column_name: str = 'end_time', row_name: str = 'Object name', colour_column_name: str = 'Colour', maximum_limit_has_been_set_column='Maximum limit has been set', min_value_column_name: str = 'minimum_operation_rate', max_value_column_name: str = 'maximum_operation_rate', cmap_name: str = 'Greens', number_of_colorbar_ticks: float = 4, show_graph: bool = False)#

Create a stream gantt chart.

Parameters:
  • data_frame (pd.DataFrame) –

    Contains the data used to plot the gantt chart. Each row must contain one entry for the columns: - Start time

    • Describes the start time of an task which is represented by an individual block in the graph

    • End time

      • Describes the end time of an task which is represented by an individual block in the graph

    • Object name

      • Corresponds to a row in the Graph

    • Color columns

      • Constitutes the different colors that a block can have in the graph

    • Object type

      • Determines on which side of the graph the name of the Object name is displayed

      • can be either “Stream” or “Process step”

    • Maximum limit has been set # TODO: Implement visualization for limited streams

      • is either 1 or 0. 1 indicates that an external limit has been set. 0 indicates that nor external limit has been set

  • reverse_y_graph_order (bool, optional) – Reverses the vertical order of streams displayed if set to True, defaults to False

  • output_file_path (str | None, optional) – Can be used to provide a full path including file name and file extension to store the Gantt chart. If set to None an image folder is created and the file is stored as an .svg graphic with a timestamp, defaults to None

  • start_time_column_name (str, optional) – Provides the column name in the data frame which contains the start times of the streams, defaults to “Start time”

  • end_time_column_name (str, optional) – Provides the column name in the data frame which contains the end times of the streams, defaults to “End time”

  • row_name (str, optional) – Provides the column name in the data frame object names. Each unique object is represented by an own row or rather subplot , defaults to “Object name”

  • color_column_name (str, optional) – Provides the column name in the data frame which contains an rgb tuple for each bar in the graph. The rgb tuple is expected to represent a value between the min and max value, defaults to “Color”

  • maximum_limit_has_been_set_column (str, optional) – Provides the column name in the data frame which contains the information if the stream has been restricted , defaults to “Maximum limit has been set”

  • min_value_column_name (str, optional) – Provides the column name in the data frame which contains the minimum operation rate of each bar, defaults to “Minimum operation rate”

  • max_value_column_name (str, optional) – Provides the column name in the data frame which contains the maximum operation rate of each bar, defaults to “Maximum operation rate”

  • cmap_name (str, optional) – Contains the name of the matplotlib color bar which is used in the plotting. Should be the same used to determine the rgb values in the colour column, defaults to “Greens”

  • number_of_colorbar_ticks (float, optional) – Represents the number of ticks at the color bar , defaults to 4

ethos_penalps.post_processing.time_series_visualizations.stream_gantt_chart.create_stream_subplot(axs: proplot.gridspec.SubplotGrid, fig: proplot.Figure, subplot_number: int, stream_data_frame_meta_information: ethos_penalps.stream.StreamDataFrameMetaInformation, start_time_column_name: str = 'start_time', min_value_column_name: str = 'minimum_operation_rate', max_value_column_name: str = 'maximum_operation_rate', end_time_column_name: str = 'end_time', row_name: str = 'Object name', colour_column_name: str = 'Colour', cmap_name: str = 'Greens', number_of_colorbar_ticks: float = 4)#