Skip to content
This repository has been archived by the owner on Dec 10, 2019. It is now read-only.

Particle Swarm Optimization library in Julia

License

GPL-3.0, Unknown licenses found

Licenses found

GPL-3.0
LICENSE
Unknown
LICENSE.md
Notifications You must be signed in to change notification settings

tyhal/ParticleSwarmOptimization.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ParticleSwarmOptimization

Partical Swarm Optimization library in Julia

project log

Pkg.clone("git@github.com:tylerhale/ParticleSwarmOptimization.jl.git")
Pkg.add("ParticleSwarmOptimization")
Pkg.build("ParticleSwarmOptimization")
Pkg.update()
using Blink
Blink.AtomShell.install()
Pkg.test("ParticleSwarmOptimization")
using ParticleSwarmOptimization; PSO = ParticleSwarmOptimization;

Julia

GR for speed, Plotly(JS) for interactivity, PyPlot otherwise. https://juliaplots.github.io/backends/

Core types

# Info for a single plot
type ParticlePlotInfo
  x::Float64
  y::Float64
  ParticlePlotInfo(x=0,y=0) = new(x,y)
end
# A population element
type Particle
   plot::ParticlePlotInfo
   indx::Integer # Id in array
   fitn::Float64 # Fitness
   befi::Float64 # Best Fitness
   data::Any
end
# Generic plotting object to render the Swarm on a scatterplot
type SwarmsPlotInfo
  colo::String # Swarm Color
  name::String # Name of Swarm :3
  xmin::Float64
  ymin::Float64
  xmax::Float64
  ymax::Float64
  updt::Function # Update for particles
  SwarmsPlotInfo(c::String,n::String) = new(c,n,0,0,0,0,(p::Particle) -> ParticlePlotInfo(p.indx,p.fitn))
end
# Basic swarm object holds functions and state to create any swarm you need
type Swarm
  plot::SwarmsPlotInfo
  part::Array{Particle,1} # Particle
  glfi::Float64 # Best Global
  fifu::Function # fitness func
  move::Function # move func (glfi::Float64,swdata::Any,pt::Particle)
  data::Any # data
end

About

Particle Swarm Optimization library in Julia

Topics

Resources

License

GPL-3.0, Unknown licenses found

Licenses found

GPL-3.0
LICENSE
Unknown
LICENSE.md

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages