Allow WFG parameters to be set.

- Added a new class called WFGProblem that contains common functionality
  shared by all the WFG problems. In particular, it contains methods to
  set the 'M' and 'l' parameters (number of problems, dimensionality).
  This class also makes sure that the WFG problems are reinitialized
  when one of these parameters are set. This is unfortunately a bit ugly
  as the sub-problems need to be reconstructed when one of these
  parameters change.
- Updated the WFG-problems themselves by adding the initialization-logic
  in an initialization method.
- Changed the vepso.xml file to include examples of using the WFG
  problem-set.
Merge branch 'master' into next
Merge branch 'master' into next
Simplify stopping condition usage.

The stopping conditions where implemented in a way that caused a fair
amount of confusion. This has now been simplified and the need for the
google guava predicate class has been removed, preferring the FJ F class
instead. Additionally, the evaluation of the stopping conditions is now
done using the boolean disjunction monoid and the List applicative
functor.

Signed-off-by: Gary Pamparà <gpampara@gmail.com>
Use Booleans.or() => alias for Monoid.disjunctionMonoid.sumLeft

Signed-off-by: Gary Pamparà <gpampara@gmail.com>
Attraction-Repulsion PSO (ARPSO)

Signed-off-by: Gary Pamparà <gpampara@gmail.com>
Refactored the way in which RandomSentryDetect... keeps track of sentries.

RandomSentryDetectionStrategy now keeps a list of integers that
represent the population indexes of the sentries. This means that
this strategy can now be applied to algorithms where entities don't
survive across iterations.

Signed-off-by: Gary Pamparà <gpampara@gmail.com>
Removed the "getID" dependancy from two classes.

ChargedVelocityProvider and FDRVelocityProvider would use entity
IDs to check if entities are the same. Now the entity objects
themselves are compared.

Signed-off-by: Gary Pamparà <gpampara@gmail.com>
Removed specialised entity identification stuff.

Since a new ID is created in all the constructors of AbstractEntity,
all entity objects will always have unique IDs. In fact, in the
equals method, the code would never reach the last lines where it
compares IDs. So we may as well indentify entities based on the
object itself.

Signed-off-by: Gary Pamparà <gpampara@gmail.com>
Fixed up selectors.

The selectors now use their comparators which they never used.
Moved the EP population selection into a Selector.
Made EP and GA use a population selector.
Created subpackages for some weightings.
Correct unit test

Signed-off-by: Gary Pamparà <gpampara@gmail.com>
Workaround generic issue for VEPSO.

Signed-off-by: Gary Pamparà <gpampara@gmail.com>
Replaced getPosition with getCandidateSolution in Particle related code.

Both methods accessed the same information in pretty much the same
way. So only one is necessary. This is a step towards consolidating
all of the entities into one entity.

In some cases, it is required that getCandidateSolution returns a
Vector. The necessary cast has been added where ever I noticed such
situations.

Signed-off-by: Gary Pamparà <gpampara@gmail.com>
Corrected code to eliminated casting errors.

Corrected the dmoo code to eliminated casting errors.
In addition, classes were changed to not extend single-objective
classes, since this leads to errors with MOFitness.

The example xml file, dvepso-DMOP2.xml has been corrected.

Signed-off-by: Gary Pamparà <gpampara@gmail.com>
Updates neighbourhoodbest using Pareto-dominance

If two solutions are compared and both are non-dominated, one is
selected randomly as the neighbourhood best. If one solution dominates
the other solution, the dominant solution is selected as the
neighbourhood best.

Signed-off-by: Gary Pamparà <gpampara@gmail.com>
Michalewicz unit test too restrictive.

Differences in how the VM optimises code my cause this test to fail.

Signed-off-by: Gary Pamparà <gpampara@gmail.com>
Merge branches '194' and '195' into next
Merge branch 'next'
Added MeanOfVectorMeasurement and unit test.

Measurement wrapper that calculates the mean of the elements of a
Vector returned by the wrapped measurement.
Changed MeanOfVectorMeasurement to extend Measurement<Vector>.