Package mystic :: Module strategy

Module strategy

source code

Differential Evolution Strategies

These strategies are to be passed into DifferentialEvolutionSolver's Solve method, and determine how the candidate parameter values mutate across a population.

Functions
 
get_random_candidates(NP, exclude, N)
select N random candidates from population of size NP, where exclude is the candidate to exclude from selection.
source code
 
Best1Exp(inst, candidate)
trial solution is current best solution plus scaled difference of two randomly chosen candidates; mutates until random stop
source code
 
Best1Bin(inst, candidate)
trial solution is current best solution plus scaled difference of two randomly chosen candidates; mutates at random
source code
 
Rand1Exp(inst, candidate)
trial solution is randomly chosen candidate plus scaled difference of two other randomly chosen candidates; mutates until random stop
source code
 
RandToBest1Exp(inst, candidate)
trial solution is itself plus scaled difference of best solution and trial solution, plus the difference of two randomly chosen candidates; mutates at random
source code
 
Best2Exp(inst, candidate)
trial solution is current best solution plus scaled contributions from four randomly chosen candidates; mutates until random stop
source code
 
Rand2Exp(inst, candidate)
trial solution is randomly chosen candidate plus scaled contributions from four other randomly chosen candidates; mutates until random stop
source code
 
Rand1Bin(inst, candidate)
trial solution is randomly chosen candidate plus scaled difference of two other randomly chosen candidates; mutates at random
source code
 
RandToBest1Bin(inst, candidate)
trial solution is itself plus scaled difference of best solution and trial solution, plus the difference of two randomly chosen candidates; mutates until random stop
source code
 
Best2Bin(inst, candidate)
trial solution is current best solution plus scaled contributions of four randomly chosen candidates; mutates at random
source code
 
Rand2Bin(inst, candidate)
trial solution is randomly chosen candidate plus scaled contributions of four other randomly chosen candidates; mutates at random
source code
Function Details

get_random_candidates(NP, exclude, N)

source code 

select N random candidates from population of size NP, where exclude is the candidate to exclude from selection.

Thus, get_random_candidates(x,1,2) randomly selects two nPop[i], where i != 1

Best1Exp(inst, candidate)

source code 

trial solution is current best solution plus scaled difference of two randomly chosen candidates; mutates until random stop

trial = best + scale*(candidate1 - candidate2)

Best1Bin(inst, candidate)

source code 

trial solution is current best solution plus scaled difference of two randomly chosen candidates; mutates at random

trial = best + scale*(candidate1 - candidate2)

Rand1Exp(inst, candidate)

source code 

trial solution is randomly chosen candidate plus scaled difference of two other randomly chosen candidates; mutates until random stop

trial = candidate1 + scale*(candidate2 - candidate3)

RandToBest1Exp(inst, candidate)

source code 

trial solution is itself plus scaled difference of best solution and trial solution, plus the difference of two randomly chosen candidates; mutates at random

trial += scale*(best - trial) + scale*(candidate1 - candidate2)

Best2Exp(inst, candidate)

source code 

trial solution is current best solution plus scaled contributions from four randomly chosen candidates; mutates until random stop

trial = best + scale*(candidate1 + candidate2 - candidate3 - candidate4)

Rand2Exp(inst, candidate)

source code 

trial solution is randomly chosen candidate plus scaled contributions from four other randomly chosen candidates; mutates until random stop

trial = candidate1 + scale*(candidate2 + candidate3 - candidate4 - candidate5)

Rand1Bin(inst, candidate)

source code 

trial solution is randomly chosen candidate plus scaled difference of two other randomly chosen candidates; mutates at random

trial = candidate1 + scale*(candidate2 - candidate3)

RandToBest1Bin(inst, candidate)

source code 

trial solution is itself plus scaled difference of best solution and trial solution, plus the difference of two randomly chosen candidates; mutates until random stop

trial += scale*(best - trial) + scale*(candidate1 - candidate2)

Best2Bin(inst, candidate)

source code 

trial solution is current best solution plus scaled contributions of four randomly chosen candidates; mutates at random

trial = best + scale*(candidate1 - candidate2 - candidate3 - candidate4)

Rand2Bin(inst, candidate)

source code 

trial solution is randomly chosen candidate plus scaled contributions of four other randomly chosen candidates; mutates at random

trial = candidate1 + scale*(candidate2 - candidate3 - candidate4 - candidate5)