# NSGA-II Python
Implementation of NSGA-II algorithm in form of a python library.
This implementation can be used to solve multivariate (more than one dimensions) multi-objective optimization problem. The number of objectives and dimensions are not limited. Some critical operators are chosen as: Binary Tournament Selection, Simulated Binary Crossover and Polynomial Mutation. Note that we didn't start everything from scratch but modified the source code from [wreszelewski/nsga2](https://github.com/wreszelewski/nsga2). We are very thankful to Wojciech Reszelewski and Kamil Mielnik - authors of this original version. The following items are modified:
* Fix the crowding distance formula.
* Modify some parts of the code to apply to any number of objectives and dimensions.
* Modify the selection operator to Tournament Selection.
* Change the crossover operator to Simulated Binary Crossover.
* Change the mutation operator to Polynomial Mutation.
## Usage
1. Class **Problem**
Defined in _problem.py_.
Using to define a multi-objective problem.
Arguments:
* `objectives`: A list of functions, representing the objective functions.
* `num_of_variables`: An integer, representing the number of variables.
* `variables_range`: A list of tuples of two elements, representing the lower and upper bound of each respective variables.
* `same_range`: A boolean argument, default = `False`. If true, the range of all variables are the same (this case `variables_range` has only one element), otherwise each variable has its own range.
* `expand`: A boolean argument, default = `True`. If true, input of functions are treated as list of respective variables (e.x. `f(x,y,z)`), otherwise they are treated as a vector (e.x. `f([x1, x2, x3])`).
2. Class **Evolution**
Defined in _evolution.py_.
Using to run NSGA-II.
1. Arguments:
* `problem`: An object of class Problem.
* `num_of_generations`: An integer, default = 1000, representing the number of generations.
* `num_of_individuals`: An integer, default = 100, representing the number of individuals, a.k.a the population size.
* `num_of_tour_particips`: An integer, default = 2, representing the number of participants in tournament selection operator.
* `tournament_prob`: A real number, default = 0.9, representing the probability used in tournament selection.
* `crossover_param`: An integer, default = 2, representing the parameter used in simulated binary crossover.
* `mutation_param`: An integer, default = 2, representing the paramenter used in polynomial mutation.
2. Methods:
* `evolve`:
* Arguments: None.
* Return: List of the best individuals in the last generation.
## Example
Examples about SCH problem and KUR problem are showed in _sch.py_ and _kur.py_.
In addition, the results of some popular multi-objective problems is demonstrated as belows:
* SCH ![SCH](pictures/SCH.png)
* KUR ![KUR](pictures/KUR.png)
* ZDT1 ![ZDT1](pictures/ZDT1.png)
* ZDT4 ![ZDT4](pictures/ZDT4.png)
* VIENNET ![VIENNET](pictures/VIENNET.png)
## Authors
* Pham Ngo Gia Bao, Ho Chi Minh University of Technology
* Tram Loi Quan, Ho Chi Minh University of Technology
* A/Prof. Quan Thanh Tho, Ho Chi Minh University of Technology (advisor)
* A/Prof. Akhil Garg, Shantou University (advisor)
We are very thankful to A/Prof. Tho and A/Prof. Akhil for helping and guiding us to finish this work.
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
NSGA-II-master-one.zip (18个子文件)
NSGA-II-master
pictures
ZDT1.png 8KB
ZDT4.png 8KB
VIENNET.png 31KB
SCH.png 9KB
KUR.png 8KB
setup.py 746B
LISENCE.txt 1KB
nsga2
utils.py 6KB
__init__.py 0B
evolution.py 2KB
individual.py 749B
problem.py 1007B
population.py 398B
.gitignore 53B
setup.cfg 40B
example
sch.py 531B
kur.py 772B
README.md 3KB
共 18 条
- 1
资源评论
snackpdd
- 粉丝: 9
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 2022NOC软件创意编程赛项真题python小学高年级-决赛(有解析)
- mathml转换latex需要的xsl文件
- 2022NOC软件创意编程赛项真题图形化小学高年级-决赛赛(有解析)
- gbase驱动下载gbase-connector-java-8.3.81.53驱动下载
- 2022NOC软件创意编程赛项真题图形化小学低年级-决赛赛(有解析)
- InsightFace从青铜到王者,超大规模人脸识别的优雅解法
- python后端开发spider框架详解
- 基于 STM32 与 ESP8266 的智能家居系统源码.zip
- 毕业设计:基于SSM的mysql-个性化点餐配送系统(源码 + 数据库 + 说明文档)
- 基于matlab的鱼苗计数识别(GUI界面).zip代码57
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功