Documentation ¶
Overview ¶
Package alns defines interfaces for Adaptive Large Neighborhood Search.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProgressionEntry ¶
type ProgressionEntry struct { ElapsedSeconds float64 `json:"elapsed_seconds"` Value float64 `json:"value"` }
ProgressionEntry is a single entry in the progression of the solver.
type Progressioner ¶
type Progressioner interface { // Progression returns the progression of the solver. Progression() []ProgressionEntry }
Progressioner is an interface that can be implemented by a solver to indicate that is can return the progression of the solver.
type Solution ¶
type Solution[T any] interface { // Copy returns a copy of the solution which must be of type T the // `derived` type. This copy must be a deep copy. Copy() T // Score returns the score of the solution. Score() float64 // Random returns the random number generator used by the solution. Random() *rand.Rand }
Solution is a solution to a problem. It defines the minimum interface that a solution must implement to be used in Adaptive Local Neighborhood Search.
type Solver ¶
type Solver[T Solution[T], Options any] interface { // Solve starts the solving process using the given options. It returns the // solutions as a channel. Solve(context.Context, Options, ...T) (Solutions[T], error) }
Solver is an interface that can be implemented by a struct to indicate that it can solve a problem.
Click to show internal directories.
Click to hide internal directories.