Coder Social home page Coder Social logo

paulritsche / framework Goto Github PK

View Code? Open in Web Editor NEW

This project forked from moead-framework/framework

0.0 0.0 0.0 11.44 MB

MOEA/D is a general-purpose algorithm framework. It decomposes a multi-objective optimization problem into a number of single-objective optimization sub-problems and then uses a search heuristic to optimize these sub-problems simultaneously and cooperatively.

Home Page: https://moead-framework.github.io/framework/

License: GNU General Public License v3.0

Python 84.02% TeX 2.53% Witcher Script 13.45%

framework's Introduction

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/*

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.