analytics

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 17, 2026 License: MIT Imports: 1 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComputeWorkshiftEquipmentAvailabilityRate

func ComputeWorkshiftEquipmentAvailabilityRate(
	now time.Time,
	workshift Workshift,
	downtimes []DowntimeInterval,
) float64

func ComputeWorkshiftEquipmentOEE

func ComputeWorkshiftEquipmentOEE(availability, performance, quality float64) float64

func ComputeWorkshiftEquipmentPerformanceRate

func ComputeWorkshiftEquipmentPerformanceRate() float64

func ComputeWorkshiftEquipmentQualityRate

func ComputeWorkshiftEquipmentQualityRate(production Production) float64

Types

type Downtime

type Downtime struct {
	ID              string `json:"id"`
	SpecificationID string `json:"specification_id"`
	Interval
}

type DowntimeInterval

type DowntimeInterval struct {
	Interval
}

type Equipment

type Equipment struct {
	ID       string `json:"id"`
	Name     string `json:"name"`
	Category string `json:"category"`
}

type Interval

type Interval struct {
	StartedAt  time.Time `json:"started_at"`
	FinishedAt time.Time `json:"finished_at"`
}

func (Interval) Allocation

func (i Interval) Allocation(now time.Time, other Interval) time.Duration

func (Interval) Duration

func (i Interval) Duration(now time.Time) time.Duration

func (Interval) Finish

func (i Interval) Finish(now time.Time) time.Time

func (Interval) Intersection

func (i Interval) Intersection(now time.Time, other Interval) (Interval, bool)

func (Interval) Start

func (i Interval) Start() time.Time

type Production

type Production struct {
	Good   int64 `json:"good"`
	Defect int64 `json:"defect"`
}

func (Production) Quality

func (p Production) Quality() float64

type Report

type Report struct {
	Workshift  Workshift
	Equipment  Equipment
	Production []Production
	Downtimes  []Downtime
}

func (Report) Availability

func (r Report) Availability(now time.Time) float64

func (Report) DowntimeDuration

func (r Report) DowntimeDuration(now time.Time) time.Duration

func (Report) Pareto

func (r Report) Pareto(now time.Time) map[string]time.Duration

func (Report) PlanDuration

func (r Report) PlanDuration(now time.Time) time.Duration

func (Report) Timeline

func (r Report) Timeline(now time.Time) []TimelineItem

type TimelineItem

type TimelineItem struct {
	DowntimeID      string
	SpecificationID string
	Interval
}

type Workshift

type Workshift struct {
	ID   string `json:"id"`
	Name string `json:"name"`
	Interval
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL