2

If I have an array A that consist of 50 elements, and I want to use the Particle swarm optimization (PSO) algorithm, to generate another array B with the same size (50 elements).

Where the value of the elements in B are similar or nearest to the value of elements in A, for example:

A[0]= 0.44       -----------------         B[0] = 0.40

A[1]= 0.3        -----------------         B[1] = 0.315

A[2]= 0.2        -----------------         B[2] = 0.18

A[3]= 0.08       -----------------         B[3] = 0.0684

A[4]= 0.012      -----------------         B[4] = 0.01117  

the new array B generated by PSO algorithm.

In this case, does that mean each particle (candidate solution) of PSO also must consists of 50 positions and the number of dimensions is 50? Or not?

kratenko
  • 7,354
  • 4
  • 36
  • 61
shdotcom
  • 157
  • 1
  • 11

1 Answers1

0

Yes, the short answer is that each candidate solution will also be of dimension 50.

I'm a little confused as to what function you are optimizing here but, in general, the dimensions of a given particle's location in the search space is going to match exactly the number of dimensions of a candidate solution. That's because the particle positions are candidate solutions.

If A is a position of a particle, i.e. a possible solution to whatever function you are attempting to minimize, and the particle moves to another position B then that array will have the same number of dimensions as A.

Paul
  • 5,473
  • 1
  • 30
  • 37