Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ccssmnn/hego
/ functions
Functions
219 in github.com/ccssmnn/hego
⨍
Functions
219
◇
Types & classes
48
↓ 8 callers
Function
TS
TS performs tabu search optimization
tabu_search.go:53
↓ 8 callers
Method
Verify
Verify checks the validity of the settings and returns nil if everything is ok
particle_swarm.go:36
↓ 7 callers
Method
AddLine
(i int, cols []string)
logger.go:34
↓ 7 callers
Function
GA
GA Performs optimization. The optimization follows three steps: - for current population calculate fitness - select chromosomes with best fitness valu
genetic.go:243
↓ 7 callers
Function
SA
SA performs simulated annealing algorithm
anneal.go:62
↓ 6 callers
Method
Flush
()
logger.go:43
↓ 6 callers
Function
newLogger
(name string, cols []string, verbose, maxIter int)
logger.go:24
↓ 5 callers
Function
ACO
ACO performs the ant colony optimization algorithm
ant_colony.go:59
↓ 5 callers
Method
Performance
Performance is the objective, lower is better
ant_colony.go:23
↓ 5 callers
Function
Swap
Swap produces a neighbor of x by swapping two values
mutate/perm.go:6
↓ 5 callers
Method
Verify
Verify returns an error if settings verification fails
anneal.go:51
↓ 5 callers
Method
Verify
Verify returns an error, if settings are not valid
genetic.go:128
↓ 5 callers
Method
Verify
Verify checks the validity of the settings and returns nil if everything is ok
evolution_strategies.go:37
↓ 5 callers
Function
binaryWeightedChoice
binaryWeightedChoice returns n indizes with a probability defined by weights it uses a binary search and is more efficient for n > 1 than weightedChoi
genetic.go:44
↓ 4 callers
Function
ES
ES performs Evolutionary Strategy algorithm suited for minimizing a real valued function (objective) from a starting point x0 It takes advantage of po
evolution_strategies.go:54
↓ 4 callers
Function
Flip
Flip produces a neighbor of state by changing the value of one bit
mutate/binary.go:15
↓ 4 callers
Function
Gauss
Gauss returns a new vector with gaussian noise. dev is custom deviation
mutate/continuous.go:10
↓ 4 callers
Function
OnePointPerm
OnePointPerm cuts a in two pieces and fills the gap with values from b while preserving order. 12345678 + 26371485 -> 1234**** + *6*7**85 -> 12346785
crossover/perm.go:9
↓ 4 callers
Function
PSO
PSO performs particle swarm optimization. Objective is the function to minimize, init initializes a tupe of particle and velocity, settings holds algo
particle_swarm.go:59
↓ 4 callers
Function
TwoPointPerm
TwoPointPerm takes a slice of a and fills the gaps with values from b while preserving order. 12345678 + 26371485 -> **3456** + 2**71*8* -> 27345618
crossover/perm.go:42
↓ 4 callers
Method
Verify
Verify returns an error if settings verification fails
tabu_search.go:42
↓ 4 callers
Method
selectParents
(settings *GASettings)
genetic.go:225
↓ 4 callers
Function
weightedChoice
weightedChoice returns n indizes with a probability defined by weights weightedChoice([0.5, 0.3, 0.2], 3) will return 3 indizes. 0 with probability 0.
genetic.go:15
↓ 3 callers
Function
Arithmetic
Arithmetic chooses u in range and performs c = u * a + (1-u) * b for every element in a and b
crossover/continuous.go:11
↓ 3 callers
Method
Objective
Objective is the function to be minimized
tabu_search.go:12
↓ 3 callers
Function
TwoPointInt
TwoPointInt is analogue to OnePointInt with two intersection points
crossover/perm.go:96
↓ 3 callers
Function
UniformBool
UniformBool uniformly selects attributes from a or b panics if a and b have different lengths
crossover/binary.go:9
↓ 3 callers
Method
Verify
Verify checks validity of the ACOSettings and returns nil if settings are ok
ant_colony.go:51
↓ 2 callers
Method
Crossover
Crossover merges this and another genome to produce a descendant
genetic.go:87
↓ 2 callers
Method
Fitness
Fitness returns the objective function value for this genome
genetic.go:83
↓ 2 callers
Method
Neighbor
Neighbor produces a related state for local search
tabu_search.go:16
↓ 2 callers
Function
OnePointBool
OnePointBool randomly chooses intersection point. Takes all elements from a, where the index is below the intersection point and b for the rest panics
crossover/binary.go:27
↓ 2 callers
Function
OnePointInt
OnePointInt randomly chooses intersection point. Takes all elements from a, where the index is below the intersection point and b for the rest panics
crossover/perm.go:83
↓ 2 callers
Function
TwoPointBool
TwoPointBool is analogue to OnePointBool with two intersection points
crossover/binary.go:40
↓ 2 callers
Method
fillSchedule
resets schedule and writes nurse assignments into the schedule
examples/n-nurses/anneal/main.go:156
↓ 2 callers
Method
fillSchedule
resets schedule and writes nurse assignments into the schedule
examples/n-nurses/genetic/main.go:122
↓ 2 callers
Method
fillSchedule
resets schedule and writes nurse assignments into the schedule
examples/n-nurses/tabu/main.go:181
↓ 2 callers
Method
fillSchedule
resets schedule and writes nurse assignments into the schedule
examples/n-nurses/aco/main.go:143
↓ 2 callers
Function
findInSlice
findInSlice counts appearances of value in slice
crossover/perm_test.go:6
↓ 2 callers
Function
rastringin
(x, y float64)
examples/rastringin/genetic/main.go:13
↓ 2 callers
Function
tabbedJoin
(s []string)
logger.go:9
↓ 2 callers
Function
tournament
(weights []float64)
genetic.go:183
↓ 1 callers
Method
DropPheromone
DropPheromone leaves pheromone (depending on the performance) on the path of this ant
ant_colony.go:19
↓ 1 callers
Method
Energy
()
anneal.go:13
↓ 1 callers
Method
Equal
Equal returns true, when other state is equal to current one
tabu_search.go:14
↓ 1 callers
Method
Evaporate
Evaporate is called after one iteration and reduces the amount of pheromone on the paths
ant_colony.go:21
↓ 1 callers
Function
Flipn
Flipn produces a neighbor of state by changing the value of n bits
mutate/binary.go:24
↓ 1 callers
Method
Init
Init initializes the ant for creating a new tour
ant_colony.go:13
↓ 1 callers
Method
Mutate
Mutate returns a neighbor of this genome
genetic.go:85
↓ 1 callers
Method
Neighbor
()
anneal.go:14
↓ 1 callers
Method
PerceivePheromone
PerceivePheromone returns a pheromone slice where each element represents the pheromone for the next step (encoded by position)
ant_colony.go:17
↓ 1 callers
Method
Step
Step performs one step to the next position (encoded by int) and returns true when the tour is finished
ant_colony.go:15
↓ 1 callers
Function
SwapClose
SwapClose produces a neighbor of x by swapping two values that are next to each other
mutate/perm.go:16
↓ 1 callers
Method
assembleTour
assembleTour creates a tour list for the given vehicle index
examples/vehicle-routing/anneal/main.go:42
↓ 1 callers
Method
assembleTour
assembleTour creates a tour list for the given vehicle index
examples/vehicle-routing/genetic/main.go:43
↓ 1 callers
Method
assembleTour
assembleTour creates a tour list for the given vehicle index
examples/vehicle-routing/tabu/main.go:42
↓ 1 callers
Function
contains
(positions []int, position int)
mutate/binary.go:5
↓ 1 callers
Method
fitnessProportionalSelection
(n int)
genetic.go:160
↓ 1 callers
Function
initSchedule
()
examples/n-nurses/anneal/main.go:73
↓ 1 callers
Function
initSchedule
()
examples/n-nurses/genetic/main.go:75
↓ 1 callers
Function
initSchedule
()
examples/n-nurses/tabu/main.go:73
↓ 1 callers
Function
initSchedule
()
examples/n-nurses/aco/main.go:72
↓ 1 callers
Function
knapsack
(selection []bool, values, weights []float64, maxWeight float64)
examples/knapsack/anneal/main.go:10
↓ 1 callers
Function
knapsack
knapsack evaluates the objective for a given selection. Adds penalties for exceeding maxWeight
examples/knapsack/genetic/main.go:14
↓ 1 callers
Function
knapsack
(selection []bool, values, weights []float64, maxWeight float64)
examples/knapsack/tabu/main.go:10
↓ 1 callers
Function
knapsack
(selection []bool, values, weights []float64, maxWeight float64)
examples/knapsack/aco/main.go:10
↓ 1 callers
Method
rankBasedSelection
(n int)
genetic.go:174
↓ 1 callers
Function
rastringin
(x, y float64)
examples/rastringin/anneal/main.go:11
↓ 1 callers
Function
rastringin
(x, y float64)
examples/rastringin/tabu/main.go:11
↓ 1 callers
Function
readDistances
()
examples/salesman/anneal/main.go:16
↓ 1 callers
Function
readDistances
()
examples/salesman/genetic/main.go:17
↓ 1 callers
Function
readDistances
()
examples/salesman/tabu/main.go:16
↓ 1 callers
Function
readDistances
()
examples/salesman/aco/main.go:15
↓ 1 callers
Function
resetSchedule
sets all assignments in this schedule to false
examples/n-nurses/anneal/main.go:84
↓ 1 callers
Function
resetSchedule
sets all assignments in this schedule to false
examples/n-nurses/genetic/main.go:86
↓ 1 callers
Function
resetSchedule
sets all assignments in this schedule to false
examples/n-nurses/tabu/main.go:84
↓ 1 callers
Function
resetSchedule
sets all assignments in this schedule to false
examples/n-nurses/aco/main.go:83
↓ 1 callers
Function
schedulePenalty
schedulePenalty returns a penalty value for schedule properties that we want to avoid. e.g. having two shifts on the same day or working on a day afte
examples/n-nurses/anneal/main.go:46
↓ 1 callers
Function
schedulePenalty
schedulePenalty returns a penalty value for schedule properties that we want to avoid. e.g. having two shifts on the same day or working on a day afte
examples/n-nurses/genetic/main.go:48
↓ 1 callers
Function
schedulePenalty
schedulePenalty returns a penalty value for schedule properties that we want to avoid. e.g. having two shifts on the same day or working on a day afte
examples/n-nurses/tabu/main.go:46
↓ 1 callers
Function
schedulePenalty
schedulePenalty returns a penalty value for schedule properties that we want to avoid. e.g. having two shifts on the same day or working on a day afte
examples/n-nurses/aco/main.go:45
↓ 1 callers
Function
scheduleQuality
scheduleQuality returns a quality value for respecting shift requests and off requests
examples/n-nurses/anneal/main.go:23
↓ 1 callers
Function
scheduleQuality
scheduleQuality returns a quality value for respecting shift requests and off requests
examples/n-nurses/genetic/main.go:25
↓ 1 callers
Function
scheduleQuality
scheduleQuality returns a quality value for respecting shift requests and off requests
examples/n-nurses/tabu/main.go:23
↓ 1 callers
Function
scheduleQuality
scheduleQuality returns a quality value for respecting shift requests and off requests
examples/n-nurses/aco/main.go:22
↓ 1 callers
Function
shiftInSlice
shiftInSlice helps checking if two states are equal
examples/n-nurses/tabu/main.go:100
↓ 1 callers
Method
swapShift
swapShift chooses two nurses and swaps a shift between these nurses
examples/n-nurses/anneal/main.go:106
↓ 1 callers
Method
swapShift
swapShift chooses two nurses and swaps a shift between these nurses
examples/n-nurses/tabu/main.go:131
↓ 1 callers
Method
tournamentSelection
(n, size int)
genetic.go:204
↓ 1 callers
Method
transferShift
transferShift transfers a shift from one nurse to another one
examples/n-nurses/anneal/main.go:124
↓ 1 callers
Method
transferShift
transferShift transfers a shift from one nurse to another one
examples/n-nurses/tabu/main.go:149
Method
Crossover
(other Genome)
genetic_test.go:11
Method
Crossover
(other hego.Genome)
examples/n-nurses/genetic/main.go:117
Method
Crossover
(other hego.Genome)
examples/salesman/genetic/main.go:48
Method
Crossover
Crossover uses uniform Crossover for booleans
examples/knapsack/genetic/main.go:39
Method
Crossover
Crossover returns a child genome which is a combination of the current and other genome. Here an the Arithmetic crossover operation is used
examples/rastringin/genetic/main.go:22
Method
Crossover
Crossover combines the assignments and the order of both genomes
examples/vehicle-routing/genetic/main.go:54
Method
DropPheromone
(performance float64)
ant_colony_test.go:8
Method
DropPheromone
DropPheromone increases pheromone amount by 0.2 not considering the performance
examples/n-nurses/aco/main.go:127
Method
DropPheromone
DropPheromone adds pheromone to pheromone matrix along the tour of this ant the amount of pheromone that is dropped depends on the performance of the
examples/salesman/aco/main.go:92
next →
1–100 of 219, ranked by callers