- Added
number_of_function_evaluations
field in algorithms and serialised data. This fields calculate the number of times individual's objectives and constraints are evaluated during an evolution. - Renamed struct to specify stopping condition values. For example,
the
StoppingConditionType::MaxGeneration(MaxGeneration(250))
can be defined asStoppingConditionType::MaxGeneration(MaxGenerationValue(250))
. This is done to avoid confusion between the enumStoppingConditionType
value and the value of the stopping condition. - Added the following new stopping conditions:
MaxFunctionEvaluations
,Any
andAll
. The first one stops the evolution after a maximum number of functon evaluations. The second and third allows to combine multiple condition. For example, they allow to stop the algorithm when either a specific duration or evolution number are reached (usingAny
).
- Added new Python API to generate reference points with
DasDarren1998
. The new class allows getting the weights for theNSGA3
algorithm and plotting them. See the Python type hints for name and description of the new class methods. - Added
AdaptiveNSGA3
to use the adaptive approach to handle the reference points. This implements the new algorithm from Jain and Deb (2014) (doi.org/10.1109/TEVC.2013.2281534) to handle problems where not all reference points intersect the optimal Pareto front. This helps to reduce crowding and enhance the solution quality. See the new example file and results. - The algorithm additional data are now exported in
AlgorithExport
in theExport additional_data in AlgorithmExport
field. This contains, for example, the reference points forNSGA3
.
- Removed crate
hv-wfg-sys
. The hyper-volume fromHyperVolumeWhile2012
is now calculated using the Rust implementation of the While et al. (2012) approach from the paper. No public API has been changed. - Replaced
GPL
license withMIT
license.
- Remove
plot
feature andplotters
as dependency. Charts can now be generated via the Python packageoptirustic
- Added python API for NSGA3 to plot reference points from the algorithm's data
- Added python function
plot_reference_points
to plot reference points from a vector - Updated reference point examples to use new serialise function
- Added Python scripts to plot serialised reference points
- Added new charts in example folder generated from serialised data
- Added
Hypervolume::estimate_reference_point_from_file
andHypervolume::estimate_reference_point_from_files
methods, to easily estimate the reference point from a file or set of files. - Python package API now includes the following new methods:
convergence_data
(to fetch the convergence data instead of plotting it),estimate_reference_point_from_file
andestimate_reference_point_from_files
.
- Made
Elapsed
fields public. - Added
Constraint::target()
andConstraint::operator()
to access the struct target and operator data respectively. - Added
Variable::label
to get a label describing the type of variable set on a problem. - Added
Individual::constraints()
andIndividual::objectives()
to access an individual's constraint and objective values grouped by their name. - Added
Individual::data()
to access any custom data set on an individual (such as the rank, crowding distance or reference point distance). - Added new
optirustic-py
crate to load serialised data from Python and plot Pareto front and convergence charts.
- Added
AlgorithmSerialisedExport::problem()
andAlgorithmSerialisedExport::individuals()
to get theProblem
and vector ofIndividual
from serialised data. - Implemented trait to convert from
AlgorithmSerialisedExport
toAlgorithmExport
.
- Added
exported_on
field inAlgorithmSerialisedExport
. This field contains the string with the date and time when the serialised data was exported - Added
OError::File
to handle error messages related to files (for example when data is serialised or deserialised). - Implemented
TryInto
trait to convertProblemExport
(from serialised data) toProblem
. - When serialised data are imported in
Algorithm::read_json_file
, the sign of objective values that are maximised is inverted. Maximised objectives are stored as negative values in theObjective
struct and the sign is inverted back for the user inAlgorithm::save_to_json
when data is serialised. - Fixed history export at desired generation step. The file was exported after 1 or 2 generations instead.
- Added
Hypervolume
struct to calculate metric from serialised data and examples. The hyper-volume can now be calculated from the following sources:- an array of
Individual
usingHyperVolume::from_individual
- an array of objectives given as
f64
usingHyperVolume::from_values
- a JSON file using
HyperVolume::from_file
- a folder with JSON files using
HyperVolume::from_files
- an array of
- The
NSGA2
algorithm now usesf64::MAX
instead off64::INFINITE
to handle points without a crowding distance. Infinite is not supported by serde and was converted tonull
.