Questions tagged [particle-swarm]

In computer science, particle swarm optimization (PSO) is a computational method that optimizes a problem by iteratively trying to improve a candidate solution with regard to a given measure of quality.

In computer science, particle swarm optimization (PSO) is a computational method that optimizes a problem by iteratively trying to improve a candidate solution with regard to a given measure of quality.

Algorithm:

Initialize all agents;
while (not maximum iterations nor minimum error )
{
    foreach(agent in agents) 
     {
        Calculate function value at agent position;
        If (value < best_value_in_history)
            best_value_in_history= value;
    }

    current_best_value= calculate best value of all current agents positions;

    foreach(agent in agents)
    { 
         agent current_velocity =
             w * current_velocity + 
             p * random_double() * (current_best_value.position - current_position) + 
             g * random_double * (best_value_in_history.position - current_position);
         update_agent_position(current_velocity);
    }

}

where w,p,g are selected by the practitioner and control the behaviour and efficacy of the PSO method.

Third party implementations:

  • RRSI is a C# project to simulate particle swarm optimization on communicating robots.
  • SwarmOps C# and ANSI C codes for several optimization methods, including a few global best PSO variants.
  • Java Based PSO Framework part of the open-source project CIlib (Computational Intelligence Library).
  • PSO visualisation applet randomly generated particle swarm of 12 particles attempts to find the "global maximum" on the landscape.
175 questions
0
votes
1 answer

Explain Matlab Code

This code is part of PSO Algorithm, in MATLAB. What is the type of empty_particle and particle?…
shdotcom
  • 157
  • 1
  • 11
0
votes
1 answer

What are the content(elements) of posistion vector and velocity vector in the Particle Swarm Optimization (PSO) algorithm?

In the Particle Swarm Optimization (PSO) algorithm, the position of each particle represented by a row vector (x). The same with velocity, it represented by a velocity vector (v) I have found this in the Mathworks website: ...Particle i has…
shdotcom
  • 157
  • 1
  • 11
0
votes
2 answers

What are the particles (code wise) in Particle / Genetical Swarm Optimization algorithm?

Edit Hi, I am trying to implement Particle (or Genetical) Swarm Optimization. However, I am already stuck in the first step... I am getting confused on how to initialise the particles, and what these particles (in terms of code) are. I've found…
0
votes
1 answer

Particle Swarm Optimization: what means gBest value?

I am designing a Particle Swarm Optimization simulator for MATLAB and I have a doubt about the gBest local position. As I understood reading about the algorithm, gBest value identify the global best value that has EVER discovered by the particles.…
Víctor
  • 3
  • 2
0
votes
1 answer

Draw circle from using points

I have a number of agents (for example 6 or 8) and I want to align them as a circle formation with boids algorithm. Global positions of agents are not known but each agent knows other agents positions relative to itself. Also agents can update…
acs
  • 796
  • 2
  • 14
  • 33
0
votes
0 answers

Error using xlsread (line 247) Error registering event(s), Advise failed

I'm running a Particle Swarm Optimization on MATLAB and I use excel files for my inputs (temperature, time, demand, etc). I am using Matlab R2014a, Windows7, MS office 2013 My input files are imported…
vpapats
  • 13
  • 3
0
votes
1 answer

Particle Swarm Optimzation

I have a question in resolving a traffic problem using the PSO algorithm. Supposing we have n vehicles (limiting it here in just four vehicules) theses vehicles have the same destination. They have different starting cities.(suppose we know their…
Geekoo
  • 1
  • 1
0
votes
1 answer

AI - PSO - Choosing the right representations

Let's say I have a set S of N natural numbers and N subsets (S1, S2, ...Sn) of that set. I want to generate 2 subsets D1 and D2 ( D1 + D2 = S, D1 and D2 have no common elements ) so that D1 and D2 does not contain any of those N subsets. Quick…
user3002428
  • 299
  • 5
  • 17
0
votes
0 answers

algorithm: move bars on a grid to minimize interactions

I have to model a chemical phenomenon. To do that, I decided to use a square grid, where I put "bars": (The bars are represented in green). The grid and the bars can have variable dimensions. The bars can be horizontal or vertical, and the grid is…
JPFrancoia
  • 4,866
  • 10
  • 43
  • 73
0
votes
1 answer

Particle swarm optimization algorithm

What is the difference between the gbest and lbest in particle swarm optimization, and Why is named Lbest PSO ?
lena
  • 730
  • 2
  • 11
  • 23
0
votes
0 answers

Infinite loop in pso cluster algorithm

I am having some trouble with clusters. I am doing some self learning for my course and I wanted to try out a clustering algorithm. This is not my homework. When I execute this code, which seems perfectly logical, the value &p[] always returns 0…
GermanShepherd
  • 151
  • 1
  • 13
0
votes
1 answer

Particle Swarm Optimization in MATLAB with a GPU

My MATLAB code uses the GPU to create raw data(25 seconds). Then in MATLAB, this raw data gets processed into scaler quantities that can be fed into an objective function(15 seconds). Is it possible for a MATLAB particle swarm optimization code to…
Jordan
  • 305
  • 3
  • 13
0
votes
1 answer

Matrix out of bound in particle swarm optimization: How to limit the values?

I am finding weights of a cognitive map which is similar to a feedforward neural network, difference being that there is no self connection (hence diagonals = 0 ). The weight matrix is 3*3 and each particle represents the weights that are needed to…
SKM
  • 959
  • 2
  • 19
  • 45
0
votes
1 answer

Training neural network using particle swarm optimization in matlab

I want to train a neural network using Particle Swarm Optimization algorithm, but matlab toolbox doesn't have any function for train network with this algorithm, I've searched and founded some PSO toolboxes but they didn't work. Can anybody help me…
starrr
  • 1,013
  • 1
  • 17
  • 48
0
votes
1 answer

Shortest path using Particle Swarm Optimisation

I want to solve the Shortest Path problem using PSO in MATLAB.I encoded the path using priority encoding [1], and I'm using constriction and velocity clamping [2]. The problem I'm facing is that the code is extremely slow compared to Dijkstra. I,…
1 2 3
11
12