Skip to main content

MOEA/D Framework

status Python application codecov PyPI GitHub build status

This python package moead-framework is a modular framework for multi-objective evolutionary algorithms by decomposition. The goal is to provide a modular framework for scientists and researchers interested in experimenting with MOEA/D and its numerous variants.

The documentation is available here: https://moead-framework.github.io/framework/ and can be edited in the folder docs of this repository.

Installation instructions

Create a virtual environment with conda or virtualenv

The package is available in pypi with a linux environment for python 3.6, 3.7, 3.8 and 3.9, you can install it with:

pip install moead-framework

Example

The example requires two files :

from moead_framework.aggregation import Tchebycheff   
from moead_framework.algorithm.combinatorial import Moead   
from moead_framework.problem.combinatorial import Rmnk  
from moead_framework.tool.result import save_population
    
    
###############################
#   Initialize the problem    #
###############################
# The file is available here : https://github.com/moead-framework/data/blob/master/problem/RMNK/Instances/rmnk_0_2_100_1_0.dat
# Others instances are available here : https://github.com/moead-framework/data/tree/master/problem/RMNK/Instances
instance_file = "rmnk_0_2_100_1_0.dat"
rmnk = Rmnk(instance_file=instance_file)
    
    
#####################################
#      Initialize the algorithm     #
#####################################
number_of_weight = 10
number_of_weight_neighborhood = 2
number_of_evaluations = 1000
# The file is available here : https://github.com/moead-framework/data/blob/master/weights/SOBOL-2objs-10wei.ws
# Others weights files are available here : https://github.com/moead-framework/data/tree/master/weights
weight_file = "SOBOL-" + str(rmnk.number_of_objective) + "objs-" + str(number_of_weight) + "wei.ws"
    
    
###############################
#    Execute the algorithm    #
###############################
moead = Moead(problem=rmnk,
                max_evaluation=number_of_evaluations,
                number_of_weight_neighborhood=number_of_weight_neighborhood,
                weight_file=weight_file,
                aggregation_function=Tchebycheff,
                )
    
population = moead.run()
    
    
###############################
#       Save the result       #
###############################
save_file = "moead-rmnk" + str(rmnk.number_of_objective) \
                + "-N" + str(number_of_weight) \
                + "-T" + str(number_of_weight_neighborhood) \
                + "-iter" + str(number_of_evaluations) \
                + ".txt"
    
save_population(save_file, population)

How to contribute

A guide is available to explain the process of contributing to the project. The contribution can be the report of a bug, the request for a new feature or modifying the code of the framework to improve it.

We have a code of conduct, please follow it in all your interactions with the project.

Support

If you have any questions about the project, don't hesitate to create a new discussion with GitHub Discussions. It is the space for our community to have conversations, ask questions and post answers without opening issues.

For developers

Requirements for developers

These requirements must be installed to use the commands in the following sections (unit test, documentation, package) :

pip install -r requirements.txt

pip install -r requirements-dev.txt

Tests:

You can execute unit tests with the following command in the git repository:

python3 -m unittest 

Generate the documentation locally

The documentation can be generated locally if you want check changes. The documentation is generated with sphinx 2.4.4 (see the section 'Requirements for developers').

You can generate the documentation with the following commands :

cd docs/

make html

Build the package

The package is built with a github action. If you want to create manually a new package:

python3 setup.py sdist bdist_wheel

python3 -m twine upload dist/*

Metadata

Release files for moead-framework 1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for moead-framework 1.0
File Size Uploaded
moead-framework-1.0.tar.gz 48.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for moead-framework 1.0
File Interpreter ABI Platform
moead_framework-1.0-py3-none-any.whl Python 3 none any Details

Total release size: 129.5 kB

Release files / moead-framework-1.0.tar.gz

Download URL moead-framework-1.0.tar.gz
Size 48.9 kB
Tags Source
SHA-256 checksum
How to use checksums
9da577c0c66594e0612ca67588087387222feaf20bc718b5680c6a38fb64d1a8
BLAKE2b-256 checksum
How to use checksums
d5849f35c3fe7d98f0bb1bc603ce8bfbf20f763fe2f8d951f01ec69eb3158718
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.7

Release files / moead_framework-1.0-py3-none-any.whl

Download URL moead_framework-1.0-py3-none-any.whl
Size 80.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
84d19139bd952fcdcc71deb79bee5b761b6b5740e9bcefa0959673a7639564ce
BLAKE2b-256 checksum
How to use checksums
c71c071784d91e3a43800c90d1476dc72f68e7ea3564e80abd9589a81d2a4522
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.7

Release history Release notifications | RSS feed

This release

1.0 This release

2 release files

0.5.8

2 release files

0.5.7

2 release files

0.5.6

2 release files

0.5.5

2 release files

0.5.4

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page