188
ber of the generations – and consequently – decreas-
ing the number of evaluations.
4 EVOLUTIONARY PROCESS
4.1 Generating the initial population
The initial population contains three types of indi-
viduals:
− a set of original ship trajectories – segments join-
ing the start and destination points
− sets of safe trajectories determined by other
methods,
− randomly modified versions of the first two types
– sets of trajectories with additional nodes, or
with some nodes moved from their original geo-
graphical positions.
The first type of individuals results in an immedi-
ate solution in case of no collisions, or in faster con-
vergence in case of only constraint violations. The
second type provides sets of safe (though usually not
optimal) trajectories. They are generated by means
of two methods: one operating on raster grids
(Szlapczynski, 2006a) and the other planning a se-
quence of necessary manoeuvres (Szlapczynski,
2008). Finally, the third type of individuals (random-
ly modified individuals of the previous two types) is
used to generate the majority of a diverse initial
population and thus to ensure the vast searching
space.
4.2 Trajectory validations and fixing
Representing all of the constraints in the fitness
function would result in a very slow progress of the
evolutionary algorithm. A good example here is the
rule, according to which a course alteration should
not be lesser than 15 degrees. Had this constraint
been taken into account by the fitness function,
slight course alterations, (for example about 5 de-
grees) would be penalized severely. On the other
hand, individuals with no course alterations or with
large course alterations would not be penalized. The
individuals with no course alterations as well as
those with large course alterations would likely be
chosen for crossing and would spawn offspring,
which again – would probably be penalized for
slight course alterations. Therefore some of the con-
straints are applied as validating and fixing func-
tions. Each trajectory of an individual is analysed
and in case of unacceptable manoeuvres (such as
slight course alterations), the nodes being responsi-
ble are moved so as to round a manoeuvre up or
down to an acceptable value.
4.3 Specialised operators
The evolutionary operators, which have been used in
the current version of the method, can be divided in-
to the following groups.
1 Crossing operators: two types of crossing have
been used, both operating on pairs of individuals
and used to generate offspring:
− an offspring inherits whole trajectories from
both parents.
− each of the trajectories of the offspring is a
crossing of the appropriate trajectories of the
parents.
2 Operators avoiding collisions with prioritised
ships: three types of these operators have been
used, all operating on single trajectories. If a col-
lision with a prioritised ship has been registered,
depending on the circumstances (coordinates of
the collision point, way loss, number of target
ships and number of nodes within a trajectory)
one of the following operators is chosen:
− node moving: the node closest to the collision
point is moved away from it,
− segment moving: two nodes, which are closest
to the collision point are moved away from it,
− node insertion: a new node is inserted between
the two nodes closest to the collision point in
such a way that the collision will probably be
avoided,
None of these operations guarantees avoiding the
collision with a given target but they are likely to
do so and therefore highly effective statistically
and suitable for the evolutionary purposes.
3 An operator avoiding collisions with obstacles. a
course alteration manoeuvre is made (a new node
is inserted) in such a way, that the new trajectory
segment does not cross a given edge of an obsta-
cle (polygon).
4 Random operators: three types of these operators
have been used, all operating on single trajecto-
ries. They are mostly used when a given trajecto-
ry does not collide with any prioritised trajecto-
ries; otherwise one of the abovementioned
collision avoidance operators is more likely to be
used. These random operators include:
− node insertion: a node is inserted randomly into
the trajectory,
− node deletion: a randomly selected node is de-
leted,
− nodes joining: two neighbouring nodes are
joined, the new node being the middle point of
the segment joining them,
− node mutation: a randomly selected node is
moved (its polar coordinates are altered).
A trajectory mutation probability decreases with
the increase of the trajectory fitness value (2), so as