Documentation
¶
Index ¶
- Variables
- func Compare(a, b float64) int
- func IsClose(a, b float64) bool
- type ALNS
- type AcceptanceCriterion
- type Context
- type HillClimbing
- type Listener
- type MaxIterations
- type MaxRuntime
- type NoImprovement
- type Operator
- type OperatorSelectionScheme
- type OperatorStatistics
- type Outcome
- type Result
- type RouletteWheel
- type State
- type Statistics
- type StoppingCriterion
- type StoppingCriterions
Constants ¶
This section is empty.
Variables ¶
View Source
var AbsoulteTolerance float64 = 1e-12 // for numbers near zero
View Source
var RelativeTolerance float64 = 1e-12 // for numbers that can be of large order
View Source
var RuntimeRand *rand.Rand = rand.New(&randomSource{})
View Source
var UseIsCloseComparison = true
Functions ¶
Types ¶
type ALNS ¶
type ALNS struct {
Rnd *rand.Rand
CollectObjectives bool
Listener Listener
DestroyOperators []Operator
RepairOperators []Operator
Selector OperatorSelectionScheme
Acceptor AcceptanceCriterion
Stop StoppingCriterion
InitialSolution State
Result Result
}
func (*ALNS) AddDestroyOperator ¶
func (*ALNS) AddRepairOperator ¶
type AcceptanceCriterion ¶
type HillClimbing ¶
type HillClimbing struct {
}
type MaxIterations ¶
type MaxIterations struct {
MaxIterations int
// contains filtered or unexported fields
}
type MaxRuntime ¶
type NoImprovement ¶
type NoImprovement struct {
MaxIterations int
// contains filtered or unexported fields
}
type OperatorSelectionScheme ¶
type OperatorStatistics ¶
type OperatorStatistics [4]int // see Outcome
func (OperatorStatistics) String ¶
func (o OperatorStatistics) String() string
type Result ¶
type Result struct {
BestState State
Statistics Statistics
}
type RouletteWheel ¶
type RouletteWheel struct {
// contains filtered or unexported fields
}
The `RouletteWheel` scheme updates operator weights as a convex combination of the current weight, and the new score.
func NewRouletteWheel ¶
type Statistics ¶
type Statistics struct {
IterationCount int // the number of iterations
TotalRuntime time.Duration // the total runtime
Runtimes []time.Duration // run times
Objectives []float64 // previous objective values, tracking progress
DestroyOperatorCounts []OperatorStatistics // the destroy operator counts
RepairOperatorCounts []OperatorStatistics // the repair operator counts
}
type StoppingCriterion ¶
type StoppingCriterions ¶
type StoppingCriterions []StoppingCriterion
Source Files
¶
Click to show internal directories.
Click to hide internal directories.