Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

DowntimeFrequencyIncrease - Detect an increasing number of downtimes of specific type

  • Code Block
    languagec#
    Task Build(TimeSpan timeSpan, string? elementPath = null, int percentile = 95)

    Calculates and stores as a parameter the ‘usual number of downtimes’ for each observed downtime type in the time period defined as ‘timeSpan’.
    In essence, ‘usual number' is calculated by aggregating the number of downtimes of each type for each hour, creating a histogram, and retrieving 95th percentile.
    When executing the Build command, you can choose to run it only for a specific element by providing elementPath or selecting a different percentile cutoff for the algorithm.

  • Code Block
    languagec#
    Task<ICollection<IncreasedDowntimeFrequency>> Run(string? elementPath = null)

    Creates a list of IncreasedDowntimeFrequency objects, each describing an interesting instance of increased downtime frequency. You can filter or aggregate the result, use it to generate new hints, or calculate other parameters. Each entry contains the following details:

    Code Block
    languagec#
    public record IncreasedDowntimeFrequency(
        string ElementName,
        string ElementPath,
        Guid ElementId,
        Guid WorkEventId, 
        string WorkEventName,
        DateTime From, 
        DateTime To, 
        int Count, 
        int CutOff);

    Note that the Run function can only be executed after the Build method pre-calculating statistics. We recommend to separate this process into 2 functions:
    - Build should be executed once a week/ once a month.
    - Run can be executed every hour/after a shift etc.

  • Code Block
    languagec#
    void CreateHints(HintFunctionOutput output, ICollection<IncreasedDowntimeFrequency> increasedFrequency)

    Will add new hints to the output using a default formatter (in english)

CounterMismatch - Detect inconsistent production count for two different machines of the same line

  • Code Block
    languagec#
    Task<ICollection<MachineCounterMismatch>> Run(
      TimeSpan timeSpan,
      double threshold = 20, // acceptable threshold, 20% difference by default 
      string? linePath = null)

    Analyse production count in the defined by timeSpan time period. Production output of each machine is compared to the BaseQuantity machine. Units are converted if necessary. If the difference between counts exceeds the allowed threshold. An object MachineCounterMismatch with details is returned:

    Code Block
    languagec#
    public record MachineCounterMismatch(
        Guid ElementId,
        string ElementPath,
        string ElementName,
        double TotalCounter,
        Guid BaseQuantityId,
        string BaseQuantityName,
        string BaseQuantityPath,
        double BaseQuantityCounter,
        string Unit);
  • Code Block
    languagec#
    void CreateHints(HintFunctionOutput output, ICollection<MachineCounterMismatch> hints)

    Will add new hints to the output using a default formatter (in english)

ProductionWithoutOrder - Detect when the line was producing without any running order

  • Code Block
    languagec#
    // Increasing threshold reduces sensitivity of the hint
    // More production difference between order production and raw line production is acceptable
    Task<ICollection<ProductionWithoutOrderModel>> Run(
      double threshold = 0,
      TimeSpan? checkDuration = null,
      TimeSpan? bucketHourOffset = null)

    Analyse the production and orders in the provided checkDuration. This period of time is analyse in the context of orders and production. If there is some production in this period of time which is not part of any order - a new instance of ProductionWithoutOrderModel is raised with the following details:

    Code Block
    public record ProductionWithoutOrderModel(
            DateTime From,
            DateTime To,
            Guid ElementId,
            string ElementPath,
            string ElementName,
            double TotalCount,
            double TotalCountFromOrders,
            string Unit);
  • Code Block
    languagec#
    void CreateHints(HintFunctionOutput output, ICollection<ProductionWithoutOrderModel> hints)

    Will add new hints to the output using a default formatter (in english)

...