lib

package
v0.0.0-...-6ef832e Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WorkUnitsSize

func WorkUnitsSize(units ...WorkUnit) int

Types

type AlternatingEpicBottomlessInventory

type AlternatingEpicBottomlessInventory struct {
	InitialInventoryBase
	// contains filtered or unexported fields
}

func (*AlternatingEpicBottomlessInventory) Select

type Grapher

type Grapher struct {
	// contains filtered or unexported fields
}

func CreateGrapher

func CreateGrapher(runs []ProductionLineRun, minCapacity, maxCapacity int) *Grapher

func (*Grapher) PlotAchievedOutput

func (g *Grapher) PlotAchievedOutput(simRun int)

func (*Grapher) PlotAllWorkCenterInventories

func (g *Grapher) PlotAllWorkCenterInventories(simRun int)

func (*Grapher) PlotAllWorkCenterUnusedCapacity

func (g *Grapher) PlotAllWorkCenterUnusedCapacity(simRun int)

func (*Grapher) PlotCumulativeUnusedCapacity

func (g *Grapher) PlotCumulativeUnusedCapacity(simRun int)

func (*Grapher) PlotLag

func (g *Grapher) PlotLag(simRun int)

func (*Grapher) PlotRelativeCumulativeUnusedCapacity

func (g *Grapher) PlotRelativeCumulativeUnusedCapacity(simRun int)

type InitialInventoryBase

type InitialInventoryBase struct {
}

func (InitialInventoryBase) Add

func (b InitialInventoryBase) Add(unit WorkUnit)

func (InitialInventoryBase) AddAll

func (b InitialInventoryBase) AddAll(units []WorkUnit)

func (InitialInventoryBase) Get

func (b InitialInventoryBase) Get() []WorkUnit

func (InitialInventoryBase) Set

func (b InitialInventoryBase) Set(units []WorkUnit)

func (InitialInventoryBase) TotalSize

func (b InitialInventoryBase) TotalSize() int

type Inventory

type Inventory interface {
	InventoryReceiver
	Select(size int) ([]WorkUnit, []WorkUnit)
	TotalSize() int
	Set([]WorkUnit)
	Get() []WorkUnit
}

func CreateAlternatingBottomlessInventory

func CreateAlternatingBottomlessInventory(meanSize float64) Inventory

type InventoryReceiver

type InventoryReceiver interface {
	Add(unit WorkUnit)
	AddAll(units []WorkUnit)
}

type OutputCollector

type OutputCollector struct {
	// contains filtered or unexported fields
}

func (*OutputCollector) Add

func (o *OutputCollector) Add(unit WorkUnit)

func (*OutputCollector) AddAll

func (o *OutputCollector) AddAll(units []WorkUnit)

func (*OutputCollector) CollectedSize

func (o *OutputCollector) CollectedSize() int

type ProductionLine

type ProductionLine struct {
	// contains filtered or unexported fields
}

func CreateProductionLine

func CreateProductionLine(size int) *ProductionLine

func CreateProductionLineWithSourceInventory

func CreateProductionLineWithSourceInventory(size int, inventory Inventory) *ProductionLine

func (*ProductionLine) Run

func (pl *ProductionLine) Run(from, to int) ProductionLineRun

func (*ProductionLine) WorkCenterCount

func (pl *ProductionLine) WorkCenterCount() int

type ProductionLineRun

type ProductionLineRun struct {
	AchievedOutput int
	WorkCenterStat []WorkCenterRun
}

func CreateProductionRunLog

func CreateProductionRunLog(workCenters int) ProductionLineRun

type SimpleBottomlessInventory

type SimpleBottomlessInventory struct {
	InitialInventoryBase
}

func (SimpleBottomlessInventory) Select

func (b SimpleBottomlessInventory) Select(size int) ([]WorkUnit, []WorkUnit)

type WorkCenter

type WorkCenter struct {
	Index     int
	Inventory Inventory
	Output    InventoryReceiver
}

func (*WorkCenter) Run

func (wc *WorkCenter) Run(from, to int) WorkCenterRun

type WorkCenterInventory

type WorkCenterInventory struct {
	// contains filtered or unexported fields
}

func (*WorkCenterInventory) Add

func (inv *WorkCenterInventory) Add(unit WorkUnit)

func (*WorkCenterInventory) AddAll

func (inv *WorkCenterInventory) AddAll(units []WorkUnit)

func (*WorkCenterInventory) Get

func (inv *WorkCenterInventory) Get() []WorkUnit

func (*WorkCenterInventory) Select

func (inv *WorkCenterInventory) Select(size int) ([]WorkUnit, []WorkUnit)

func (*WorkCenterInventory) Set

func (inv *WorkCenterInventory) Set(units []WorkUnit)

func (*WorkCenterInventory) TotalSize

func (inv *WorkCenterInventory) TotalSize() int

type WorkCenterRun

type WorkCenterRun struct {
	WorkCenterIndex        int
	InventorySizeBeforeRun int
	InventorySizeAfterRun  int
	InventoryAtStart       []WorkUnit
	RunCapacity            int

	PassOnInventory    []WorkUnit
	RemainingInventory []WorkUnit
	UnusedRunCapacity  int
}

func (*WorkCenterRun) InventoryAtEnd

func (wcr *WorkCenterRun) InventoryAtEnd() int

func (*WorkCenterRun) UnusedCapacity

func (wcr *WorkCenterRun) UnusedCapacity() int

type WorkUnit

type WorkUnit struct {
	Size             int
	RequiredCapacity int
}

func NewWorkUnit

func NewWorkUnit(size int) WorkUnit

func (WorkUnit) CanSelect

func (wu WorkUnit) CanSelect(units int) bool

func (WorkUnit) Clone

func (wu WorkUnit) Clone() WorkUnit

Jump to

Keyboard shortcuts

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