Documentation
¶
Overview ¶
Package data contains functions for loading problem test cases
Index ¶
- func GraphColors(cfg *GraphColoring) []string
- func GraphEdges(graph *ds.Graph) []string
- func GraphNumbers(cfg *GraphColoring) []int
- func GraphVertices(graph *ds.Graph) []string
- func SortBySchedStart(a, b SlotSched) int
- func SortByStartTime(a, b TimeRange) int
- func SpanTerminals(graph *Graph) []string
- func SpanVertices(graph *Graph) []string
- type AssignmentCfg
- type Bins
- type CarSequence
- type Cars
- type Graph
- type GraphColoring
- type GraphColorsFn
- type GraphPartition
- type GraphPath
- type GraphSpanFn
- type GraphVariablesFn
- type Intervals
- type ItemAllocation
- type Knapsack
- type Numbers
- type NurseSchedule
- type QuadraticAssignment
- type Resource
- type Scene
- type ShopSchedule
- type SlotSched
- type Subsets
- type Task
- type TimeRange
- type Warehouse
- type Weapons
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GraphNumbers ¶
func GraphNumbers(cfg *GraphColoring) []int
GraphNumbers returns numbers as graph colors
func GraphVertices ¶
GraphVertices returns graph vertices
func SortBySchedStart ¶
func SortByStartTime ¶
func SpanTerminals ¶
SpanTerminals returns graph terminals
Types ¶
type AssignmentCfg ¶
type AssignmentCfg struct {
Workers []string
Capacity []float64
Tasks []string
Cost [][]float64
Value [][]float64
Teams [][]string
MaxPerTeam int
}
func NewAssignment ¶
func NewAssignment(name string, mustBeEqual bool) *AssignmentCfg
NewAssignment creates a new AssignmentCfg
type CarSequence ¶
type CarSequence struct {
OptionMax []int
OptionWindow []int
Cars []string
CarOptions map[string][]bool
}
func NewCarSequence ¶
func NewCarSequence(name string) *CarSequence
NewCarSequence loads a CarSequence config
type Graph ¶
type Graph struct {
*ds.Graph
K int
EdgeWeight []float64
EdgeColor []string
VertexWeight []float64
VertexColor []string
Terminals []string
Groups [][]string
}
func NewDirectedGraph ¶
NewDirectedGraph loads a directed Graph config
func NewUndirectedGraph ¶
NewUndirectedGraph loads an undirected Graph config
type GraphColoring ¶
func NewGraphColoring ¶
func NewGraphColoring(name string) *GraphColoring
NewGraphColoring loads a GraphColoring config
type GraphColorsFn ¶
type GraphColorsFn[T any] = func(*GraphColoring) []T
type GraphPartition ¶
func NewGraphPartition ¶
func NewGraphPartition(name string) *GraphPartition
NewGraphPartition laods a GraphPartition config
type GraphPath ¶
type GraphPath struct {
Start int // index of start vertex in vertices list
End int // index of end vertex in vertices list
OriginalIndex map[int]int // map VariableIndex => OriginalIndex
Vertices []ds.Vertex
Between []ds.Vertex // list of vertices that are not start, end
Distance [][]float64
Items []string
Cost [][]float64
FromOrigin []float64
ToOrigin []float64
}
func NewGraphTour ¶
NewGraphTour loads a GraphPath config with only vertices and distance matrix
type GraphSpanFn ¶
type GraphVariablesFn ¶
type Intervals ¶
func NewIntervals ¶
NewIntervals loads an Intervals config
type ItemAllocation ¶
func NewItemAllocation ¶
func NewItemAllocation(name string) *ItemAllocation
NewItemAllocation creates a new ItemAllocation config
type Knapsack ¶
type NurseSchedule ¶
type NurseSchedule struct {
Nurses []string
Days []string
Shifts []string
ShiftMin []int
ShiftMax []int
MaxConsecutiveShift int
MaxTotalShift int
DailyLimit int
PreferShifts map[string][]string
PreferDays map[string][]string
}
func NewNurseSchedule ¶
func NewNurseSchedule(name string) *NurseSchedule
NewNurseSchedule creates a new NurseSchedule config
type QuadraticAssignment ¶
func NewQuadraticAssignment ¶
func NewQuadraticAssignment(name string) *QuadraticAssignment
NewQuadraticAssignment creates a new Quadratic Assignment config
type Resource ¶
func NewResource ¶
NewResource creates a new Resource config
type Scene ¶
type ShopSchedule ¶
type ShopSchedule struct {
Machines []string
Jobs []string
TaskTimes map[string][]int
JobTasks map[string][]Task
MaxMakespan int
}
func NewShopSchedule ¶
func NewShopSchedule(name string) *ShopSchedule
NewShopSchedule creates a new ShopSchedule config
func (*ShopSchedule) GetTasks ¶
func (s *ShopSchedule) GetTasks() []Task