Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/29/17 15:26:16 (7 years ago)
Author:
abeham
Message:

#2797:

  • Updated PSO to make it more compatible with SPSO 2011
  • Removed truncation of velocity vector and instead rescaled it given the maximum velocity
  • Added non-zero initial velocity according to SPSO 2011
  • Removed complicated bouncing code due to box constraints and instead implemented as described in SPSO 2011
  • Calculating neighbor best has been changed to use personal best
  • Avoiding local and global particle update and instead relying on neighborbest
  • More randomization during velocity update by using a separate random numbers per dimension
  • Reusing problem specific solution creator in RealVectorParticleCreator instead of always using UniformRandomRealVectorCreator
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/RealVector.cs

    r14185 r15091  
    2020#endregion
    2121
     22using System;
    2223using HeuristicLab.Common;
    2324using HeuristicLab.Core;
     
    7778    }
    7879
     80    public double DotProduct(RealVector other) {
     81      if (other.Length != Length) throw new ArgumentException("Vectors are of unequal length.");
     82      var dotProd = 0.0;
     83      for (var i = 0; i < Length; i++)
     84        dotProd += this[i] * other[i];
     85      return dotProd;
     86    }
    7987  }
    8088}
Note: See TracChangeset for help on using the changeset viewer.