The first step in solving a problem with JECoLi is to decide on how to represent a solution for the problem.
JECoLi has a number of options, namely:
The elements can be of the classes: Boolean (binary representations), Integer, Double (real valued representations).
An individual is represented by a class that implements the interface ISolution. Each solution must be able to return its genome (representation) and its fitness.
Implementation of representations in JECoLi relies on 2 different classes (for each representation):
Linear representations are implemented by a class that implements the interface ILinearRepresentation<G>, where G is the class of each gene (e.g. Double, Boolean or Integer).
Solution factories define the classes to create new genomes.
The class to use depends on the type of representation:
Some parameters need to be provided to the factory, namely solution size, maximum value (integer representations), bounds/ limits of the genes (real valued representations), etc. These are normally passed through the constructors.