{"id":22399982,"url":"https://github.com/krproject-tech/fp_nsgaii","last_synced_at":"2026-01-05T03:33:29.772Z","repository":{"id":74020873,"uuid":"542917369","full_name":"KRproject-tech/FP_NSGAII","owner":"KRproject-tech","description":"NSGA-II with Floating point representation.","archived":false,"fork":false,"pushed_at":"2024-09-16T11:07:06.000Z","size":37845,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-09-16T19:07:19.301Z","etag":null,"topics":["genetic-algorithm","matlab","multi-objective-optimization","optimization"],"latest_commit_sha":null,"homepage":"","language":"MATLAB","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KRproject-tech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-29T04:31:28.000Z","updated_at":"2024-09-16T11:07:09.000Z","dependencies_parsed_at":"2023-12-23T16:30:19.293Z","dependency_job_id":"bef835e8-92d7-4ce2-b065-e502d4f35024","html_url":"https://github.com/KRproject-tech/FP_NSGAII","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KRproject-tech%2FFP_NSGAII","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KRproject-tech%2FFP_NSGAII/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KRproject-tech%2FFP_NSGAII/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KRproject-tech%2FFP_NSGAII/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KRproject-tech","download_url":"https://codeload.github.com/KRproject-tech/FP_NSGAII/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228257696,"owners_count":17892652,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["genetic-algorithm","matlab","multi-objective-optimization","optimization"],"created_at":"2024-12-05T08:10:49.469Z","updated_at":"2026-01-05T03:33:29.732Z","avatar_url":"https://github.com/KRproject-tech.png","language":"MATLAB","funding_links":[],"categories":[],"sub_categories":[],"readme":"![図1](https://user-images.githubusercontent.com/114337358/219954099-4fb00380-c782-446b-ada5-273ca26eb07b.png)\n\n# \u003cp align=center\u003eFP_NSGAII\u003c/p\u003e\n\n![License](https://img.shields.io/github/license/yuki-koyama/elasty)\n\u003cimg src=\"https://img.shields.io/badge/Matlab-%3E%3D%202007b%20-blue.svg\" alt=\"Matlab\"\u003e\n\u003cimg src=\"https://img.shields.io/badge/Windows-Pass-brightgreen.svg\" alt=\"Windows\"\u003e\n\n\n**Communication**\n\n\u003ca style=\"text-decoration: none\" href=\"https://twitter.com/hogelungfish_\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/twitter-%40hogelungfish_-1da1f2.svg\" alt=\"Twitter\"\u003e\n\u003c/a\u003e\n\u003cp\u003e\n\n**Language**\n\u003cp\u003e\n\u003cimg src=\"https://cdn.jsdelivr.net/gh/devicons/devicon/icons/matlab/matlab-original.svg\" width=\"60\"/\u003e\n\u003cp\u003e\n\n\n__Multi-objective optimization analysis by Non-dominated Sorting Genetic Algorithm (NSGA-II) [^1] with Floating Point representation [^2][^4] (MATLAB R2007b - ).__\n\n__This code is validated with MATLAB R2007b or later versions. However, the PlatEMO library (https://github.com/BIMK/PlatEMO), which can operate MATLAB 2018a or later versions, is more convenient and performs faster.__\n\n    \n## Directory\n\u003cpre\u003e\n└─NSGA_2_ver3\n    ├─Bench_mark\n    │  └─進化計算パラメータ\n    │      └─html\n    ├─cores\n    │  └─functions\n    │      └─NSGA_2_functions\n    └─save\n        └─fig\n\u003c/pre\u003e\n\n\u003c!---\n## Publications\n\nIf you use this work in an academic context, please cite the following publication(s):\n\n* Reducing the Power Consumption of a Shape Memory Alloy Wire Actuator Drive by Numerical Analysis and Experiment, IEEE/ASME Transactions on Mechatronics, Vol. 23, No. 4 (2018).  \nhttps://doi.org/10.1109/TMECH.2018.2836352\n\n````\n@ARTICLE{8358981,\n  author={Yamano, Akio and Shintani, Atsuhiko and Ito, Tomohiro and Nakagawa, Chihiro},\n  journal={IEEE/ASME Transactions on Mechatronics}, \n  title={Reducing the Power Consumption of a Shape Memory Alloy Wire Actuator Drive by Numerical Analysis and Experiment}, \n  year={2018},\n  volume={23},\n  number={4},\n  pages={1854-1865},\n  doi={10.1109/TMECH.2018.2836352}\n}\n````\n--\u003e    \n    \n## Usage\n\n\n__[Step 1] Start GUI form__\n\nOpen the “GUI.fig” from MATLAB.\n\n![image](https://github.com/KRproject-tech/FreeSurface_Vortex_Sheet_Model/assets/114337358/1ec9b2fd-6ca4-4a68-bffa-2ccf86901921)\n\n\n__[Step 2] Pre-setting__\n\nEdit the code for evaluation functions in \"./cores/functions/NSGA_2_functions/evaluation_func.m\".\n\n````\nfunction f_vec = evaluation_func(pop_vec)\n%% 評価関数 (pop_vecの行が個体番号，列が個体パラメータ)\n\nx_vec = pop_vec;\n\n%% SCH問題：パレート解 -\u003e x in [0,2]\n% f_vec = [x_vec(:,1).^2 ...\n%          (x_vec(:,1) - 2).^2 ]; \n\n%% FON問題：パレート解 -\u003e x1 = x2 = x3 in [-1/√3,1/√3] \n% f_k = @(k, x_vec)( 1 - exp( -sum( (x_vec + (-1).^k/sqrt(3)).^2 , 2) ) );\n% f_vec = [f_k(1, x_vec) ...\n%          f_k(2, x_vec)];\n     \n%% テスト問題2\na = 49;b = 4; c = 0.5;\nf_1 = @(x_vec)( 0.5*(x_vec(:,1).^2 + x_vec(:,2).^2) + sin(x_vec(:,1).^2 + x_vec(:,2).^2) );\nf_2 = @(x_vec)( -exp( -a*(cos( b*(x_vec(:,1) + x_vec(:,2)) ) - ((x_vec(:,1) - x_vec(:,2))) ).^2 - c*(x_vec(:,1) + x_vec(:,2) + 1).^2  ));\nf_3 = @(x_vec)( 1./(x_vec(:,1).^2 + x_vec(:,2).^2 + 1) - 1.1*exp(-(x_vec(:,1).^2 + x_vec(:,2).^2)) );\n\nf_vec = [f_1(x_vec) ...\n         f_2(x_vec) ...\n         f_3(x_vec)];\n\n%% MOP3\n% f_1 = @(x_vec)( 0.5*(x_vec(:,1).^2 + x_vec(:,2).^2) + sin(x_vec(:,1).^2 + x_vec(:,2).^2) );\n% f_2 = @(x_vec)( ( 3*x_vec(:,1) - 2*x_vec(:,2) + 4 ).^2/8 + ( x_vec(:,1) - x_vec(:,2) + 1 ).^2/27 + 15 );\n% f_3 = @(x_vec)( 1./(x_vec(:,1).^2 + x_vec(:,2).^2 + 1) - 1.1*exp(-(x_vec(:,1).^2 + x_vec(:,2).^2)) );\n% \n% f_vec = [f_1(x_vec) ...\n%          f_2(x_vec) ...\n%          f_3(x_vec)];\n\n%% テスト問題 (最適解：部分球面)\n% g_func = @(x3)( sin(x3) + 1 );\n% f_1 = @(x_vec)( (1 + g_func(x_vec(:,3))).*( abs(cos(x_vec(:,1)).*cos(x_vec(:,2)) ) + 1e-3) );\n% f_2 = @(x_vec)( (1 + g_func(x_vec(:,3))).*( abs(cos(x_vec(:,1)).*sin(x_vec(:,2)) ) + 1e-3) );\n% f_3 = @(x_vec)( (1 + g_func(x_vec(:,3))).*(abs(sin(x_vec(:,1)) ) + 1e-3) );\n% \n% f_vec = [f_1(x_vec) ...\n%          f_2(x_vec) ...\n%          f_3(x_vec)];\n````\n\nNext, push the \"Parameters\" button and edit parameters, or edit the code for parameters in \"./save/param_setting.m\".\n\n````\n%% parameter for NSGA-2\n\n%----------------------- 解析パラメータ ------------------------------------\nGENERATION = 200; %% GENERATION[-]\nTOURNAMENT_RATE = 0.5; %% TOURNAMENT_RATE[-]\nCROSSOVER_RATE = 1.0; %% CROSSOVER_RATE[-]\nMUTATION_RATE = 0.4; %% 突然変異個体選択率[-]\nMUTATION_RATE_1 = 0.8; %% 突然変異率[-]\n\n%----------------------- 個体パラメータ ------------------------------------\nMAX_POP_NUM = 500; %% the number of Populations[-]\nPOP_LGT = 3; %% Length of variable[-]\n% Initial value of populations [-]\npop_weight = 0.1*ones(1,POP_LGT); \n% Mutation change width\npop_mutation_width = 10*pop_weight;\n````\n\n__[Step 3] Start optimization__\n\nPush the “exe” button or execute the code in \"./cores/exe.m\", and wait until the finish of the analysis.\n\n__[Step 4] Restart optimization (if solutions do not converge at [Step 3])__\n\nExecute the code in \"./cores/exe_func_restart.m\".\n\n__[Step 5] Plot results__\n\nPush the “plot” button.\n    \n__[Step 6] View plotted results__\n\nResults (figures and movie) plotted by [Step 4] are in \"./save\" directory.\n\n\n\n## Optimal results\n\nOptimal solutions are in `h_pop_vec{end}(pop_rank{1},:)`.\n\nPareto-front is plotted by `plot3(f_vec(pop_rank{1},1),f_vec(pop_rank{1},2),f_vec(pop_rank{1},3),'ro')`\n\n## Gallery\n\n\n__MOP3__ bench problem [^3]\n\n$$\n\\min_{x \\in \\mathbb{R}^2} f_1, f_2, f_3, \n$$\n\nwhere,\n\n$$ \n\\left.\n\\begin{eqnarray}\n\u0026\u0026 f_1(x_1,x_2) = 0.5(x_1^2 + x_2^2) + \\sin(x_1^2 + x_2^2) \\\\\n\u0026\u0026 f_2(x_1,x_2) = \\frac{1}{8}(3 x_1^2 - 2 x_2^2 + 4)^2 + \\frac{1}{27}(x_1^2 - x_2^2 + 1)^2 + 15 \\\\\n\u0026\u0026 f_3(x_1,x_2) = \\frac{1}{x_1^2 + x_2^2 + 1} - 1.1 \\exp( -x_1^2 - x_2^2 )\n\\end{eqnarray}\n\\right).\n$$\n\n![untitled](https://user-images.githubusercontent.com/114337358/192941614-b21db790-023d-4ea5-b123-1c01fb182c7b.png)\n\n__ZDT3__ bench problem [^5]\n\n$$\n\\min_{x \\in \\mathbb{R}^N} f_1, f_2, \n$$\n\nwhere, $x_i := 2^{-1} \\left(\\frac{2}{\\pi} \\tan^{-1}{ x^*_i} + 1\\right), i \\in \\\\{1, \\ldots, N \\\\}, N=30$ and,\n\n$$ \n\\left.\n\\begin{eqnarray}\n\u0026\u0026 f_1(x_i) = x_1 \\\\\n\u0026\u0026 f_2(x_i) = g(x_i) h( f_1(x_i), g(x_i)) \\\\\n\u0026\u0026 g(x_i) := 1 + \\frac{9}{N-1} \\sum_{k=2}^N x_k \\\\\n\u0026\u0026 h(f_1, g) := 1 - \\sqrt{ \\frac{f_1}{g} } - \\frac{f_1}{g} \\sin{ 10 \\pi f_1 } \\\\\n\\end{eqnarray}\n\\right).\n$$\n\nThe red solid line includes the analytical solution of the Pareto front for the ZDT3 problem,\n\n$$ \n\\left.\n\\begin{eqnarray}\n\u0026\u0026 x_i = 0,  i \\in \\\\{2, \\ldots, N \\\\} \\\\\n\u0026\u0026 x_1 \\in [0, 1] \\\\\n\\end{eqnarray}\n\\right).\n$$\n\nNamely, \n\n$$ \n\\left.\n\\begin{eqnarray}\n\u0026\u0026 g(x_i) = 1 \\\\\n\u0026\u0026 f_2(x_i) = g(x_i) \\cdot h( f_1(x_i), g(x_i)) = 1 \\cdot h( f_1(x_i), 1) = 1 - \\sqrt{ f_1 } - f_1 \\sin{ 10 \\pi f_1 } \\\\\n\\end{eqnarray}\n\\right).\n$$\n\n![GXatie2bwAQvkk0](https://github.com/user-attachments/assets/5fb7714f-f632-41bd-a15e-70a70f8a1bc9)\n\n\n\n__DTLZ7__ bench problem [^6]\n\n$$\n\\min_{x \\in \\mathbb{R}^N} f_1, f_2, f_3, \n$$\n\nwhere, $x_i := 2^{-1} \\left(\\frac{2}{\\pi} \\tan^{-1}{ x^*_i} + 1\\right), i \\in \\\\{1, \\ldots, N \\\\}, N=20$ and,\n\n$$ \n\\left.\n\\begin{eqnarray}\n\u0026\u0026 f_1(x_i) = x_1 \\\\\n\u0026\u0026 f_2(x_i) = x_2 \\\\\n\u0026\u0026 f_3(x_i) = (1 + g(x_i)) h( f_1(x_i), f_2(x_i), g(x_i)) \\\\\n\u0026\u0026 g(x_i) := 1 + \\frac{9}{N} \\sum_{k=2}^N x_k \\\\\n\u0026\u0026 h(f_1, f_2, g) := 3 - \\sum_{k=1}^{2} \\frac{f_k}{1 + g} (1 + \\sin{ 3 \\pi f_k }) \\\\\n\\end{eqnarray}\n\\right).\n$$\n\n![image](https://github.com/user-attachments/assets/640095a8-088c-435e-a891-a189f515a132)\n\n\n### References\n[^1]: K. Deb, A. Pratap, S. Agarwal, T. Meyarivan, A fast and elitist multiobjective genetic algorithm: NSGA-II, IEEE Transactions on Evolutionary Computation 6 (2) (2002) 182–197. doi:10.1109/4235.996017.\n\n[^2]: C. Su, A genetic algorithm approach employing floating point representation for economic dispatch of electric power, in: The International Congress on Modelling and Simulation 1997, Vol. 204, 1997, pp. 1444–1449.\n\n[^3]: Veldhuizen, D.A.V. and Lamont, G.B., Multiobjective evolutionary algorithm test suites, Proceedings of the 1999 ACM symposium on Applied computing, February 1999.\n\n[^4]: Reducing the Power Consumption of a Shape Memory Alloy Wire Actuator Drive by Numerical Analysis and Experiment, IEEE/ASME Transactions on Mechatronics, Vol. 23, No. 4 (2018).  \nhttps://doi.org/10.1109/TMECH.2018.2836352\n\n[^5]: Zitzler, E., Thiele, L., Laumanns, M., Fonseca, C., and Fonseca, da V., Performance assessment of multiobjective optimizers: an analysis and review, IEEE Transactions on Evolutionary Computation, Vol. 7, No. 2, pp. 117–132 (2003).\n\n[^6]: K. Deb et al, Scalable Test Problems for Evolutionary Multi-Objective Optimization, TIK-Technical Report No. 112, 2001.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrproject-tech%2Ffp_nsgaii","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkrproject-tech%2Ffp_nsgaii","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrproject-tech%2Ffp_nsgaii/lists"}