Metadata-Version: 2.4
Name: jmetalpy
Version: 1.10.0
Summary: Python version of the jMetal framework
Author-email: "Antonio J. Nebro" <ajnebro@uma.es>, Cristóbal Barba <cbarba@uma.es>
Maintainer-email: "Antonio J. Nebro" <ajnebro@uma.es>, Cristóbal Barba <cbarba@uma.es>
License-Expression: MIT
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: tqdm>=4.66
Requires-Dist: numpy>=2.1
Requires-Dist: pandas>=2.2.3
Requires-Dist: plotly>=5.24
Requires-Dist: matplotlib>=3.9
Requires-Dist: scipy>=1.14.1
Requires-Dist: statsmodels>=0.14.4
Requires-Dist: moocore>=0.1.9
Provides-Extra: core
Requires-Dist: tqdm>=4.66; extra == "core"
Requires-Dist: numpy>=2.1; extra == "core"
Requires-Dist: pandas>=2.2.3; extra == "core"
Requires-Dist: plotly>=5.24; extra == "core"
Requires-Dist: matplotlib>=3.9; extra == "core"
Requires-Dist: scipy>=1.14.1; extra == "core"
Requires-Dist: statsmodels>=0.14.4; extra == "core"
Requires-Dist: moocore>=0.1.9; extra == "core"
Provides-Extra: docs
Requires-Dist: tqdm>=4.66; extra == "docs"
Requires-Dist: numpy>=2.1; extra == "docs"
Requires-Dist: pandas>=2.2.3; extra == "docs"
Requires-Dist: plotly>=5.24; extra == "docs"
Requires-Dist: matplotlib>=3.9; extra == "docs"
Requires-Dist: scipy>=1.14.1; extra == "docs"
Requires-Dist: statsmodels>=0.14.4; extra == "docs"
Requires-Dist: mkdocs>=1.6.1; extra == "docs"
Requires-Dist: mkdocs-material>=9.7.7; extra == "docs"
Requires-Dist: mkdocstrings[python]>=1.0.6; extra == "docs"
Provides-Extra: distributed
Requires-Dist: tqdm>=4.66; extra == "distributed"
Requires-Dist: numpy>=2.1; extra == "distributed"
Requires-Dist: pandas>=2.2.3; extra == "distributed"
Requires-Dist: plotly>=5.24; extra == "distributed"
Requires-Dist: matplotlib>=3.9; extra == "distributed"
Requires-Dist: scipy>=1.14.1; extra == "distributed"
Requires-Dist: statsmodels>=0.14.4; extra == "distributed"
Requires-Dist: dask[complete]>=2026.8.0; extra == "distributed"
Requires-Dist: distributed>=2026.8.0; extra == "distributed"
Requires-Dist: pyspark>=4.2.0; extra == "distributed"
Provides-Extra: test
Requires-Dist: tqdm>=4.66; extra == "test"
Requires-Dist: numpy>=2.1; extra == "test"
Requires-Dist: pandas>=2.2.3; extra == "test"
Requires-Dist: plotly>=5.24; extra == "test"
Requires-Dist: matplotlib>=3.9; extra == "test"
Requires-Dist: scipy>=1.14.1; extra == "test"
Requires-Dist: statsmodels>=0.14.4; extra == "test"
Requires-Dist: mockito>=2.0.4; extra == "test"
Requires-Dist: moocore>=0.1.9; extra == "test"
Requires-Dist: pytest>=9.1.1; extra == "test"
Requires-Dist: pytest-cov>=7.1.0; extra == "test"
Provides-Extra: notebooks
Requires-Dist: jupyter>=1.1.1; extra == "notebooks"
Requires-Dist: nbconvert>=7.17.1; extra == "notebooks"
Requires-Dist: ipykernel>=7.3.0; extra == "notebooks"
Provides-Extra: complete
Requires-Dist: tqdm>=4.66; extra == "complete"
Requires-Dist: numpy>=2.1; extra == "complete"
Requires-Dist: pandas>=2.2.3; extra == "complete"
Requires-Dist: plotly>=5.24; extra == "complete"
Requires-Dist: matplotlib>=3.9; extra == "complete"
Requires-Dist: scipy>=1.14.1; extra == "complete"
Requires-Dist: statsmodels>=0.14.4; extra == "complete"
Requires-Dist: mkdocs>=1.6.1; extra == "complete"
Requires-Dist: mkdocs-material>=9.7.7; extra == "complete"
Requires-Dist: mkdocstrings[python]>=1.0.6; extra == "complete"
Requires-Dist: dask[complete]>=2026.8.0; extra == "complete"
Requires-Dist: distributed>=2026.8.0; extra == "complete"
Requires-Dist: pyspark>=4.2.0; extra == "complete"
Provides-Extra: dev
Requires-Dist: tqdm>=4.66; extra == "dev"
Requires-Dist: numpy>=2.1; extra == "dev"
Requires-Dist: pandas>=2.2.3; extra == "dev"
Requires-Dist: plotly>=5.24; extra == "dev"
Requires-Dist: matplotlib>=3.9; extra == "dev"
Requires-Dist: scipy>=1.14.1; extra == "dev"
Requires-Dist: statsmodels>=0.14.4; extra == "dev"
Requires-Dist: mockito>=2.0.4; extra == "dev"
Requires-Dist: moocore>=0.1.9; extra == "dev"
Requires-Dist: pytest>=9.1.1; extra == "dev"
Requires-Dist: pytest-cov>=7.1.0; extra == "dev"
Requires-Dist: ruff>=0.16.7; extra == "dev"
Requires-Dist: build>=1.6.1; extra == "dev"
Requires-Dist: twine>=7.0.0; extra == "dev"
Dynamic: license-file

![jMetalPy](docs/assets/jmetalpy.png)

[![Lint](https://github.com/jMetal/jMetalPy/actions/workflows/lint.yml/badge.svg)](https://github.com/jMetal/jMetalPy/actions/workflows/lint.yml)
[![Test](https://github.com/jMetal/jMetalPy/actions/workflows/test.yml/badge.svg)](https://github.com/jMetal/jMetalPy/actions/workflows/test.yml)
[![Build](https://github.com/jMetal/jMetalPy/actions/workflows/build.yml/badge.svg)](https://github.com/jMetal/jMetalPy/actions/workflows/build.yml)
[![Docs](https://github.com/jMetal/jMetalPy/actions/workflows/docs.yml/badge.svg)](https://github.com/jMetal/jMetalPy/actions/workflows/docs.yml)
[![Python Version](https://img.shields.io/badge/python-3.11%20%7C%203.12-blue)](https://www.python.org/downloads/)
[![PyPI Version](https://img.shields.io/pypi/v/jMetalPy.svg)](https://pypi.org/project/jMetalPy/)
[![DOI](https://img.shields.io/badge/DOI-10.1016%2Fj.swevo.2019.100598-blue)](https://doi.org/10.1016/j.swevo.2019.100598)
[![PyPI License](https://img.shields.io/pypi/l/jMetalPy.svg)](https://pypi.org/project/jMetalPy/)

A paper introducing jMetalPy is available at: https://doi.org/10.1016/j.swevo.2019.100598

### Table of Contents
- [Installation](#installation)
- [Usage](#hello-world-)

- [Agents](#agents)
- [Features](#features)
- [Changelog](#changelog)
- [License](#license)

## Installation

You can install the latest version of jMetalPy with `pip`, 

```console
pip install jmetalpy  # or "jmetalpy[distributed]"
```

<details><summary><b>Notes on installing with <tt>pip</tt></b></summary>
<p>

jMetalPy includes features for parallel and distributed computing based on [pySpark](https://spark.apache.org/docs/latest/api/python/index.html) and [Dask](https://dask.org/).

These (extra) dependencies are *not* automatically installed when running `pip`, which only comprises the core functionality of the framework (enough for most users):

```console
pip install jmetalpy
```

This is the equivalent of running: 

```console
pip install "jmetalpy[core]"
```

Other supported commands are listed next:

```console
pip install "jmetalpy[dev]"  # Install requirements for development
pip install "jmetalpy[distributed]"  # Install requirements for parallel/distributed computing
pip install "jmetalpy[complete]"  # Install all requirements
```

</p>
</details>

## Hello, world! 👋

Examples of configuring and running all the included algorithms are located [in the documentation](https://jmetal.github.io/jMetalPy).

```python
from jmetal.algorithm.multiobjective import NSGAII
from jmetal.operator.crossover import SBXCrossover
from jmetal.operator.mutation import PolynomialMutation
from jmetal.problem import ZDT1
from jmetal.util.termination_criterion import StoppingByEvaluations

problem = ZDT1()

algorithm = NSGAII(
    problem=problem,
    population_size=100,
    offspring_population_size=100,
    mutation=PolynomialMutation(probability=1.0 / problem.number_of_variables(), distribution_index=20),
    crossover=SBXCrossover(probability=1.0, distribution_index=20),
    termination_criterion=StoppingByEvaluations(max_evaluations=25000)
)

algorithm.run()
```

We can then proceed to explore the results:

```python
from jmetal.util.solution import get_non_dominated_solutions, print_function_values_to_file, print_variables_to_file

front = get_non_dominated_solutions(algorithm.result())

# save to files
print_function_values_to_file(front, 'FUN.NSGAII.ZDT1')
print_variables_to_file(front, 'VAR.NSGAII.ZDT1')
```

Or visualize the Pareto front approximation produced by the algorithm:

```python
from jmetal.lab.visualization import Plot

plot_front = Plot(title='Pareto front approximation', axis_labels=['x', 'y'])
plot_front.plot(front, label='NSGAII-ZDT1', filename='NSGAII-ZDT1', format='png')
```

<img src=docs/assets/NSGAII-ZDT1.png width=450 alt="Pareto front approximation">


## Agents

If you use AI assistants (e.g., Copilot, Codex) while working on this project, please follow the guidelines in [AGENTS.md](AGENTS.md).


## Features
The current release of jMetalPy (v1.10.0) contains the following components:

* Algorithms: local search, genetic algorithm, evolution strategy, simulated annealing, random search, NSGA-II, NSGA-III, SMPSO, OMOPSO, MOEA/D, SMS-EMOA, MOEA/D-DRA, MOEA/D-IEpsilon, GDE3, SPEA2, HYPE, IBEA, MOCell. Preference articulation-based algorithms (G-NSGA-II, G-GDE3, G-SPEA2, SMPSO/RP); Dynamic versions of NSGA-II, SMPSO, and GDE3.
* Parallel computing based on Apache Spark and Dask.
* Benchmark problems: ZDT1-6, DTLZ1-7, WFG1-9, ZCAT1-20, eqDTLZ, FDA, LZ09, UF (CEC'09), LIR-CMOP, RWA, RE, a multi-objective TSP, unconstrained (Kursawe, Fonseca, Schaffer, Viennet2, and the CONV/DENT/SYM-PART/SSW/TWO-ON-ONE/OMNI-TEST family in misc.py), constrained (Srinivas, Tanaka, Osyczka2, Binh2).
* Encodings: real, integer, binary, permutations.
* Operators: selection (binary tournament, ranking and crowding distance, random, nary random, best solution), crossover (single-point, SBX, PMX, CX, BLX-Alpha, BLX-Alpha-Beta, arithmetic, UNDX, differential evolution), mutation (bit-flip, polynomial, uniform, random, non-uniform, Levy flight, power-law).
* Quality indicators: hypervolume, normalized hypervolume, additive epsilon, GD, IGD, IGD+, average Hausdorff distance.
* Pareto front approximation plotting in real-time, static or interactive.
* Experiment class for performing studies either alone or alongside [jMetal](https://github.com/jMetal/jMetal).
* Pairwise and multiple hypothesis testing for statistical analysis, including several frequentist and Bayesian testing methods, critical distance plots and posterior diagrams.

| ![Scatter plot 2D](docs/assets/2D.gif) | ![Scatter plot 3D](docs/assets/3D.gif) |
|-------------- | ----------------  |
| ![Parallel coordinates](docs/assets/p-c.gif) | ![Interactive chord plot](docs/assets/chordplot.gif) |

## Changelog

See [CHANGELOG.md](CHANGELOG.md).

## License

This project is licensed under the terms of the MIT - see the [LICENSE](LICENSE) file for details.
