org.moeaframework.core
Class Solution

A solution to an optimization problem, storing the decision variables,
objectives, constraints and attributes. Attributes are arbitrary (key, value) pairs; they are instance-specific and are not carried over in
the copy constructor.

Solutions should only be constructed in Problem.newSolution() or
cloned from an existing solution with copy(). This ensures the
solutions and configured correctly for the given optimization problem.

Solution

copy

Returns an independent copy of this solution. It is required that
x.copy() is completely independent from x . This means
any method invoked on x.copy() in no way alters the state of
x and vice versa. It is typically the case that
x.copy().getClass() == x.getClass() and
x.copy().equals(x)

Note that a solution's attributes are not copied, as the attributes are
generally specific to each instance.