protocol
particle_swarm_optimization_protocol
Protocol for continuous bounded particle swarm optimization problem definitions. A problem object must define the three required predicates and may optionally define predicates for initial velocities, stopping, and progress reporting.
logtalk_load(particle_swarm_optimization(loader))staticPublic predicates
initial_positions/1
Returns a non-empty list of initial particle positions. All positions must be non-empty lists of numbers with the same dimensions as the position bounds.
staticinitial_positions(Positions)initial_positions(-list(list(number))) - oneposition_bounds/1
Returns one Lower-Upper numeric bound pair per position dimension, with Lower =< Upper.
staticposition_bounds(Bounds)position_bounds(-list(pair)) - oneinitial_velocities/1
Returns one initial velocity vector per initial position. Each vector must have the same dimensions as the position bounds, with every component between plus or minus the corresponding position range. Optional. When not defined or when it fails, velocities are initialized randomly.
staticinitial_velocities(Velocities)initial_velocities(-list(list(number))) - zero_or_onefitness/2
Computes the fitness of a particle position. The optimization direction is selected using the optimizer objective/1 option.
staticfitness(Position,Fitness)fitness(+list(number),-number) - onestop_condition/3
True when the search should stop given the completed iteration count, best position, and best fitness. Optional. When not defined, the search runs for the configured maximum number of iterations.
staticstop_condition(Iteration,BestPosition,BestFitness)stop_condition(+non_negative_integer,+list(number),+number) - zero_or_oneprogress/5
Called periodically to report the completed iteration count, best position, best fitness, mean swarm fitness, and swarm diversity. Diversity is the mean Euclidean distance from the swarm centroid. Optional.
staticprogress(Iteration,BestPosition,BestFitness,MeanFitness,Diversity)progress(+non_negative_integer,+list(number),+number,+number,+number) - zero_or_oneProtected predicates
(none)
Private predicates
(none)
Operators
(none)
See also