Internals

Listing all non-exported types and functions here for now, but split off categories onto separate pages in the future!

GlobalOptimization.AbstractAdaptationStrategyType
AbstractAdaptationStrategy

Subtypes of this type should be used in conjunction with subtypes of AbstractMutationParameters and AbstractCrossoverParameters to control how the parameters are adapted in their respective adapt! methods.

source
GlobalOptimization.AbstractBinomialCrossoverParametersType
AbstractBinomialCrossoverParameters

An abstract type representing the parameters for a binomial crossover strategy in Differential Evolution (DE). The crossover! method is provided for subtypes of this abstract type, however, the get_parameter, initialize!, and adapt! methods are must still be defined.

source
GlobalOptimization.AbstractCrossoverParametersType
AbstractCrossoverParameters

An abstract type representing the parameters for a crossover strategy in Differential Evolution (DE).

Subtypes of this abstract type should define the following methods:

  • get_parameter(params::AbstractCrossoverParameters, i): Returns the crossover parameter for the i-th candidate.
  • initialize!(params::AbstractCrossoverParameters, num_dims, population_size): Initializes the crossover parameters.
  • adapt!(params::AbstractCrossoverParameters, improved, global_best_improved): Adapts the crossover parameters based on the improvement status of the candidates.
  • crossover!(population::DEPopulation, crossover_params, search_space): Performs the crossover operation on the population using the specified crossover parameters.
source
GlobalOptimization.AbstractCrossoverTransformationType
AbstractCrossoverTransformation

An abstract type representing a transformation applied to a candidate prior to applying the crossover operator.

Subtypes of this abstract type should define the following methods:

  • initialize!(transformation::AbstractCrossoverTransformation, population_size): Initializes the transformation with the population
  • update_transformation!(transformation::AbstractCrossoverTransformation, population): Updates the transformation based on the current population
  • to_transformed(transformation::AbstractCrossoverTransformation, c, m): Transforms the candidate c and mutant m to an alternative representation, returning the transformed candidate, transformed mutant, and a boolean indicating whether the transformation was applied.
  • from_transformed!(transformation::AbstractCrossoverTransformation, mt, m): Transforms the mutant mt back to the original representation m.
source
GlobalOptimization.AbstractMBHDistributionType
AbstractMBHDistribution{T}

Abstract type for MBH distributions.

All subtypes of AbstractMBHDistribution must implement the following methods:

  • initialize!(dist::AbstractMBHDistribution, ss::ContinuousRectangularSearchSpace): Initializes the distribution with the search space.
  • draw_step!(step::AbstractVector{T}, dist::AbstractMBHDistribution{T}): Draws a step from the distribution and stores it in step.
  • get_show_trace_elements(dist::AbstractMBHDistribution{T}, trace_mode::Union{Val{:detailed}, Val{:all}}): Returns the trace elements for the distribution to be shown in the terminal terminal terminal terminal terminal terminal terminal terminal terminal.
  • get_save_trace_elements(dist::AbstractMBHDistribution{T}, trace_mode::Union{Val{:detailed}, Val{:all}}): Returns the trace elements for the distribution to be saved to a file.

Note: The AbstractMBHDistribution interface is tightly coupled with the AbstractHopperSet interface and could use some refactoring to decouple the two. If an additional adaptive distribution is added, a new abstract type, such as AbstractAdaptiveMBHDistribution, should be added, and MBHAdaptiveDistribution should be re-named to something more specific.

source
GlobalOptimization.AbstractMutationOperatorType
AbstractMutationOperator

The abstract type for all DE mutation strategies. This type is used to define the mutation strategies available in the DE algorithm.

Subtypes of this type should implement the following method:

  • get_parameters(strategy::AbstractMutationOperator, dist): Returns the mutation parameters for the given strategy and distribution. The parameters should be returned as a SVector{4, Float64} containing the F₁, F₂, F₃, and F₄ weights for the unified mutation strategy.
source
GlobalOptimization.AbstractMutationParametersType
AbstractMutationParameters

The abstract type for all DE mutation parameters. This type is used to define the mutation parameters available in the DE algorithm.

Subtypes of this type should implement the following methods:

  • get_parameters(params::AbstractMutationParameters, i): Returns the mutation parameters for the given mutation parameters object and index i. The parameters should be returned as a tuple of four Float64 values representing the F₁, F₂, F₃, and F₄ weights for the unified mutation strategy.
  • initialize!(params::AbstractMutationParameters, population_size): Initializes the mutation parameters for the given population size.
  • adapt!(params::AbstractMutationParameters, improved, global_best_improved): Adapts the mutation parameters based on whether the population has improved and whether the global best candidate has improved.
  • mutate!(population::DEPopulation, F::AbstractMutationParameters): Mutates the population using the mutation parameters.
source
GlobalOptimization.AbstractOptimizerType
AbstractOptimizer

Abstract type of all optimization algorithms.

All subtypes must have the following fields:

  • options<:AbstractAlgorithmSpecificOptions: The options for the optimizer. See the AbstractAlgorithmSpecificOptions interface documentation for details.
  • cache<:AbstractOptimizerCache: The cache for the optimizer. See the AbstractOptimizerCache interface documentation for details.

All subtypes must define the following methods:

  • initialize!(opt<:AbstractOptimizer): Initialize the optimizer.
  • step!(opt<:AbstractOptimizer): Perform a single step/iteration with the optimizer.
  • get_best_fitness(opt<:AbstractOptimizer): Get the best fitness of the optimizer.
  • get_best_candidate(opt<:AbstractOptimizer): Get the best candidate of the optimizer.
  • get_show_trace_elements(opt<:AbstractOptimizer, trace_mode::Union{Val{:detailed}, Val{:all}}): Returns a Tuple of TraceElements and, if necessary, Vector{TraceElement}s, of data to be printed to the terminal. Note that separate methods should be defined for Val{:detailed} and Val{:all} if applicable.
  • get_save_trace_elements(opt<:AbstractOptimizer, trace_mode::Union{Val{:detailed}, Val{:all}}): Returns a Tuple of TraceElements and, if necessary, Vector{TraceElement}s, of data to be saved to the trace file. Note that separate methods should be defined for Val{:detailed} and Val{:all} if applicable.
source
GlobalOptimization.AbstractOptimizerCacheType
AbstractOptimizerCache

Abstract type of all optimization algorithm caches.

All subtypes must have the following fields:

  • iteration: The current iteration number of the optimizer.
  • start_time: The start time of the optimization.
  • stall_start_time: THe start time of the stall.
  • stall_iteration: The iteration number of the stall.
  • stall_value: The objective function value at start of stall.

These fields must be initialized in the initialize!(opt) method of the optimizer.

source
GlobalOptimization.AbstractPopulationBasedOptimizerType
AbstractPopulationBasedOptimizer

Abstract type of all population based optimization algorithms.

All subtypes must have the following fields:

  • options<:AbstractAlgorithmSpecificOptions: The options for the optimizer. See the AbstractAlgorithmSpecificOptions interface documentation for details.
  • cache<:AbstractPopulationBasedOptimizerCache: The cache for the optimizer. See the AbstractPopulationBasedOptimizerCache interface documentation for details.

All subtypes must define the following methods:

  • initialize!(<:AbstractPopulationBasedOptimizer): Initialize the optimizer.
  • step!(<:AbstractPopulationBasedOptimizer): Perform a single step/iteration with the optimizer.
  • get_population(opt<:AbstractPopulationBasedOptimizer): Get the population of the optimizer. This should return a subtype of AbstractPopulation.
  • get_show_trace_elements(opt<:AbstractOptimizer, trace_mode::Union{Val{:detailed}, Val{:all}}): Returns a Tuple of TraceElements and, if necessary, Vector{TraceElement}s, of data to be printed to the terminal. Note that separate methods should be defined for Val{:detailed} and Val{:all} if applicable.
  • get_save_trace_elements(opt<:AbstractOptimizer, trace_mode::Union{Val{:detailed}, Val{:all}}): Returns a Tuple of TraceElements and, if necessary, Vector{TraceElement}s, of data to be saved to the trace file. Note that separate methods should be defined for Val{:detailed} and Val{:all} if applicable.

Note that the get_best_fitness and get_best_candidate methods required by the AbstractOptimizer interface are provided for subtypes of AbstractPopulationBasedOptimizer.

source
GlobalOptimization.AbstractPopulationBasedOptimizerCacheType
AbstractPopulationBasedOptimizerCache

Abstract type of all population based optimization algorithm caches.

All subtypes must have the following fields:

  • All fields of AbstractOptimizerCache.
  • global_best_candidate: The global best candidate of the population.
  • global_best_fitness: The global best fitness of the population.

These fields must be initialized in the initialize!(opt) method of the optimizer. Additionally, the global_best_candidate and global_best_fitness fields must be updated in each iteration when appropriate (i.e., when the global best candidate improves) in iterate!(opt).

source
GlobalOptimization.AbstractRandomNeighborhoodVelocityUpdateSchemeType
AbstractRandomNeighborhoodVelocityUpdateScheme

Abstract type for a velocity update scheme that randomly selects the particles in the neighborhood of a given particle.

Subtypes of this abstract type have an implementation of the update_velocity! method provided, but must still define the initialize! and adapt! methods.

source
GlobalOptimization.AbstractSelectorType
AbstractSelector

Subtypes of this type should be used to select candidates from the population and must implement the following methods:

  • initialize!(s::AbstractSelector, population_size::Int): Initializes the selector with the population size.
  • select(s::AbstractSelector, target::Int, pop_size::Int): Selects candidates based on the target index and population size.
source
GlobalOptimization.AbstractVelocityUpdateSchemeType
AbstractVelocityUpdateScheme

Abstract type for velocity update schemes in Particle Swarm Optimization (PSO).

All subtypes much define the following methods:

  • initialize!(vu::AbstractVelocityUpdateScheme, swarm_size::Int): Initialize the velocity update scheme for a given swarm size.
  • update_velocity!(swarm::Swarm, vu::AbstractVelocityUpdateScheme): Update the velocity of each candidate in the swarm using the specified velocity update scheme.
  • adapt!(vu::AbstractVelocityUpdateScheme, improved::Bool, stall_iteration::Int): Adapt the velocity update scheme based on the improvement status of the swarm and the stall iteration counter.
  • get_show_trace_elements(vu::AbstractVelocityUpdateScheme, trace_mode::Union{Val{:detailed},Val{:all}}): Get the elements to show in the trace for the velocity update scheme.
  • get_save_trace_elements(vu::AbstractVelocityUpdateScheme, trace_mode::Union{Val{:detailed},Val{:all}}): Get the elements to save in the trace for the velocity update scheme.
source
GlobalOptimization.DEOptionsType

DEOptions

Options for the Differential Evolution (DE) algorithms.

Fields:

  • general<:GeneralOptions: The general options.
  • pop_init_method<:AbstractPopulationInitialization: The population initialization method.
  • mutation_params<:AbstractMutationParameters: The mutation strategy parameters.
  • crossover_params<:AbstractCrossoverParameters: The crossover strategy parameters.
  • initial_space<:Union{Nothing,ContinuousRectangularSearchSpace}: The initial space to initialize the population.
source
GlobalOptimization.DEPopulationType
DEPopulation{T <: AbstractFloat} <: AbstractPopulation{T}

The full population representation for the DE algorithms, including both the candidates and the mutants.

source
GlobalOptimization.GlobalOptimizationTraceType
GlobalOptimizationTrace{SHT, SAT, TM}

A structure to hold the global optimization trace settings.

Fields:

  • show_trace::SHT: A flag indicating whether to show the trace in the console.
  • save_trace::SAT: A flag indicating whether to save the trace to a file.
  • save_file::String: The file path where the trace will be saved.
  • trace_level::TraceLevel{TM}: The trace level settings, which can be TraceMinimal, TraceDetailed, or TraceAll.
source
GlobalOptimization.MinimalPopulationBasedOptimizerCacheType
MinimalPopulationBasedOptimizerCache{T}

A minimal implementation of the AbstractPopulationBasedOptimizerCache type.

Algorithms employing this cache must initialize all fields in initialize!(opt) and must update the iteration field each iteration in iterate!(opt). Additionally, the global_best_candidate and global_best_fitness fields must be updated in each iteration when appropriate (i.e., when the global best candidate improves) in iterate!(opt).

source
GlobalOptimization.ResultsType
Results{T}

A simple struct for returning results.

Fields

  • fbest::T: The best function value found.
  • xbest::Vector{T}: The best candidate found.
  • iters::Int: The number of iterations performed.
  • time::Float64: The time taken to perform the optimization in seconds.
  • exitFlag::Int: The exit flag of the optimization.
source
GlobalOptimization.ResultsMethod
Results(fbest::T, xbest::AbstractVector{T}, iters, time, exitFlag)

Constructs a new Results struct.

Arguments

  • fbest::T: The best function value found.
  • xbest::AbstractVector{T}: The best candidate found.
  • iters::Int: The number of iterations performed.
  • time::AbstractFloat: The time taken to perform the optimization in seconds.
  • exitFlag::Int: The exit flag of the optimization.

Returns

  • Results{T}
source
GlobalOptimization.TraceElementType
TraceElement{T}

A structure to hold a single trace element, which includes a label, flag, length, precision, and value.

An AbstractOptimizer should return a tuple of TraceElement objects when the get_show_trace_elements or get_save_trace_elements functions are called.

Fields:

  • label::String: The label for the trace element.
  • flag::Char: A character indicating the format of the value (e.g., 'd' for integer, 'f' for float).
  • length::Int: The length of the formatted string representation of the value.
  • precision::Int: The precision for floating-point values.
  • value::T: The value of the trace element, which can be of any type T.
source
Base.eachindexMethod
eachindex(pop::AbstractPopulation)

Returns an iterator for the indices of the population.

source
Base.lengthMethod
length(pop::AbstractPopulation)

Returns the number of candidates in the population.

source
Base.sizeMethod
size(pop::AbstractPopulation)

Returns the size of the population.

source
GlobalOptimization.adapt!Method
adapt!(vu::AbstractVelocityUpdateScheme, improved::Bool, stall_iteration::Int)

Adapt the velocity update scheme based on the improvement status of the swarm and the stall iteration counter.

source
GlobalOptimization.candidatesMethod
candidates(pop::AbstractPopulation, [i::Integer])

Returns the candidates from a population. If i is specified, returns the i-th candidate.

source
GlobalOptimization.check_fitness!Method
check_fitness!(c::AbstractHopperSet, options::Union{GeneralOptions,Val{true},Val{false}})

Checks the fitness of the candidate c to ensure that it is valid iff the option has been enabled.

source
GlobalOptimization.check_fitness!Method
check_fitness!(pop::AbstractPopulation, options::Union{GeneralOptions,Val{true},Val{false}})

Checks the fitness of each candidate in the population pop to ensure that it is valid iff options <: Union{GeneralOptions{D,Val{true}}, Val{true}}, otherwise, does nothing.

source
GlobalOptimization.construct_resultsMethod
construct_results(opt::AbstractOptimizer, status::Status)

Construct the results from the optimizer opt with the appropriate Status to indicate the stopping criteria.

source
GlobalOptimization.crossover!Method
crossover!(population::DEPopulation{T}, crossover_params, search_space)

Performs the crossover operation on the population population using the DE crossover strategy.

This function also ensures that, after crossover, the mutants are within the search space.

source
GlobalOptimization.dim_deltaMethod
dim_delta(ss::ContinuousRectangularSearchSpace{T}, [i::Integer])

Returns the difference between the maximum and minimum values for the i-th dimension of ss. If i is not specified, returns a vector of all differences.

Arguments

  • ss::ContinuousRectangularSearchSpace{T}`
  • i::Integer: the dimension to return the difference between the maximum and minimum values for.

Returns

  • T or Vector{T} the difference between the maximum and minimum values for the i-th dimension of ss or a vector of all differences if i not provided.
source
GlobalOptimization.dim_maxMethod
dim_max(ss::ContinuousRectangularSearchSpace{T}, [i::Integer])

Returns the maximum value for the i-th dimension of ss. If i is not specified, returns a vector of all maximum values.

Arguments

  • ss::ContinuousRectangularSearchSpace{T}
  • i::Integer: the dimension to return the maximum value for.

Returns

  • T or Vector{T}: the minimum value for the i-th dimension of ss or a vector of all minimum values if i not provided.
source
GlobalOptimization.dim_minMethod
dim_min(ss::ContinuousRectangularSearchSpace{T}, [i::Integer])

Returns the minimum value for the i-th dimension of ss. If i is not specified, returns a vector of all minimum values.

Arguments

  • ss::RontinuousRectangularSearchSpace{T}
  • i::Integer: the dimension to return the minimum value for.

Returns

  • T or Vector{T}: the minimum value for the i-th dimension of ss or a vector of all minimum values if i not provided.
source
GlobalOptimization.dim_rangeMethod
dim_range(ss::ContinuousRectangularSearchSpace{T}, [i::Integer])

Returns the range of values for the i-th dimension of ss. If i is not specified, returns a vector of all ranges.

Arguments

  • ss::ContinuousRectangularSearchSpace{T}
  • i::Integer: the dimension to return the range of values for.

Returns

  • Tuple{T, T} or Vector{Tuple{T, T}}: the range of values for the i-th dimension of ss or a vector of all ranges if i not provided.
source
GlobalOptimization.draw_step!Method
draw_step!(step::AbstractVector{T}, dist::AbstractMBHDistribution{T})

Draws a step from the distribution dist and stores it in step.

source
GlobalOptimization.draw_update!Method
draw_update!(hopper::Hopper{T}, distribution::AbstractMBHDistribution{T})

Draws a perterbation from distribution and updates candidate for the hopper hopper.

source
GlobalOptimization.enforce_bounds!Method
enforce_bounds!(swarm::Swarm{T}, evaluator::BatchEvaluator)

Enforces the bounds of the search space on each candidate in the swarm swarm. If a candidate

source
GlobalOptimization.evaluate!Method
evaluate!(job::Function, job_ids::AbstractVector{Int}, evaluator::BatchJobEvaluator)

Evaluates job for each element of job_args using the given evaluator.

source
GlobalOptimization.evaluate!Method
evaluate!(pop::AbstractPopulation, evaluator::BatchEvaluator)

Evaluates the fitness of a population using the given evaluator.

source
GlobalOptimization.evaluate_fitness!Method
evaluate_fitness!(swarm::Swarm{T}, evaluator::BatchEvaluator)

Evaluates the fitness of each candidate in the swarm swarm using the evaluator. Updates the swarms best candidates if any are found.

source
GlobalOptimization.feasibleMethod
feasible(x, ss::ContinuousRectangularSearchSpace)

Returns true if the point x is feasible in the search space ss, otherwise returns false.

Arguments

  • x::AbstractVector{T}: the point to check for feasibility.
  • ss::ContinuousRectangularSearchSpace{T}: the search space to check for feasibility in.

Returns

  • Bool: true if x is in ss, otherwise false.

Throws

  • DimensionMismatch: if x does not have the same number of dimensions as ss.
source
GlobalOptimization.fitnessMethod
fitness(pop::AbstractPopulation, [i::Integer])

Returns the fitness of the candidates from a population. If i is specified, returns the i-th fitness.

source
GlobalOptimization.get_populationMethod
get_population(opt::AbstractPopulationBasedOptimizer)

Returns the population of the optimizer opt. This should return a subtype of AbstractPopulation.

source
GlobalOptimization.get_scalar_functionMethod
get_scalar_function(prob::AbstractProblem)

Returns cost function plus the infeasibility penalty squared as a scalar value.
This is used for PSO (GA, Differential Evolution, etc. if we ever get around to adding those)
source
GlobalOptimization.hop!Method
hop!(hopper::Union{Hopper, AbstractHopperSet}, ss, eval, dist, ls)

Performs a single hop for the hopper hopper in the search space ss using the evaluator eval, the distribution dist, and the local search ls.

source
GlobalOptimization.initialize!Method
initialize!(cache::AbstractOptimizerCache, best_fitness)

A helper function to initialize the cache of an optimizer. This function should be called in the initialize!(opt) method of the optimizer.

source
GlobalOptimization.initialize!Method
initialize!(opt::AbstractOptimizer)

Initialize the optimizer opt. All memory allocations that are not possible to do in the constructor should be done here when possible.

source
GlobalOptimization.initialize!Method
initialize!(cache::AbstractPopulationBasedOptimizerCache)

A helper function to initialize the cache of a population based optimizer. This function should be called in the initialize!(opt) method of the optimizer, after initializing the global_best_candidate and global_best_fitness fields of the cache.

source
GlobalOptimization.initialize!Method
initialize!(
    hopper::Hopper{T},
    search_space::ContinuousRectangularSearchSpace{T},
    evaluator::FeasibilityHandlingEvaluator{T},
)

Initializes the hopper position in the search space.

source
GlobalOptimization.initialize!Method
initialize!(
    swarm::Swarm{T},
    pop_init_method::AbstractPopulationInitialization,
    search_space::ContinuousRectangularSearchSpace{T}
)

Initializes the swarm population with pop_init_method in the search_space.

source
GlobalOptimization.intersectionMethod
intersection(
    ss1::ContinuousRectangularSearchSpace{T1},
    ss2::ContinuousRectangularSearchSpace{T2}
)

Returns the intersection of the two search spaces ss1 and ss2 as a new search space.

Arguments

  • ss1::ContinuousRectangularSearchSpace{T1}
  • ss2::ContinuousRectangularSearchSpace{T2}

Returns

  • `ContinuousRectangularSearchSpace{promote_type(T1, T2)}

Throws

  • DimensionMismatch: if ss1 and ss2 do not have the same number of dimensions.
source
GlobalOptimization.mutate!Method
mutate!(population::DEPopulation{T}, F)

Mutates the population population using the DE mutation strategy.

This is an implementation of the unified mutation strategy proposed by Ji Qiang and Chad Mitchell in "A Unified Differential Evolution Algorithm for Global Optimization".

source
GlobalOptimization.num_dimsMethod
num_dims(ss::ContinuousRectangularSearchSpace)

Returns the number of dimensions in the search space ss.

Arguments

  • ss::ContinuousRectangularSearchSpace

Returns

  • Integer
source
GlobalOptimization.push!Method
push!(step_memory::MBHStepMemoory{T}, step::Vector{T}, pre_step_fitness::T, post_step_fitness::T)

Pushes a step into the step memory.

source
GlobalOptimization.reset!Method
reset!(hopper::Hopper)

Resets the candidate to state prior to the last draw_update! call.

Note: This just subtracts the last step from the candidate.

source
GlobalOptimization.scalar_functionMethod
scalar_function(prob::OptimizationProblem, x::AbstractArray)

Evaluates the objective function f of the optimization problem prob at x and returns the cost function plus the infeasibility.

source
GlobalOptimization.scalar_functionMethod
scalar_function(prob::AbstractNonlinearEquationProblem, x::AbstractArray)

Evaluates the set of nonlinear equations f and returns the nonlinear least squares cost plus half the infeasibility squared.

source
GlobalOptimization.scalar_function_with_penaltyMethod
scalar_function_with_penalty(prob::OptimizationProblem, x::AbstractArray)

Evaluates the objective function f of the optimization problem prob at x and returns the cost function and the infeasibility penalty term as tuple. i.e., for an OptimizationProblem, this is simply the original function.

source
GlobalOptimization.scalar_function_with_penaltyMethod
scalar_function_with_penalty(prob::AbstractNonlinearEquationProblem, x::AbstractArray)

Evaluates the set of nonlinear equations f and returns the nonlinear least squares cost and the infeasibility penalty term as a tuple.

source
GlobalOptimization.set_fitness!Method
set_fitness(pop::AbstractPopulation, fitness, [i::Integer])

Sets the fitness of the candidates from a population. If i is specified, sets the i-th fitness.

source
GlobalOptimization.step!Method
step!(opt::AbstractOptimizer)

Perform a single step/iteration with the optimizer opt. This function should be non-allocating if possible.

source
GlobalOptimization.step_MAD_medianMethod
step_MAD_median(step_memory::MBHStepMemory{T}, var_idx::Integer)

Returns the mean absolute deviation (MAD) around the median of the step memory. If var_idx is specified, then the MAD median of the step memory for the variable at index var_idx is returned.

source
GlobalOptimization.step_stdMethod
step_std(step_memory::MBHStepMemory{T}, var_idx::Integer)

Returns the standard deviation of the step memory. If var_idx is specified, then the standard deviation of the step memory for the variable at index var_idx is returned.

source
GlobalOptimization.update_fitness!Method
update_fitness!(hopper::AbstractHopperSet{T}, distribution::AbstractMBHDistribution{T})

Updates the hopper fitness information after previously evaluating the fitness of the hopper.

source
GlobalOptimization.update_global_best!Method
update_global_best!(opt::AbstractPopulationBasedOptimizer)

Updates the global best candidate and fitness in the cache of the population based optimizer opt when a better candidate is found. Returns true if the global best candidate was updated, false otherwise.

source
GlobalOptimization.update_velocity!Method
update_velocity!(swarm::Swarm, vu::AbstractVelocityUpdateScheme)

Update the velocity of each candidate in the swarm using the specified velocity update scheme.

source