{"id":34094360,"url":"https://github.com/pierlumanzu/nsma","last_synced_at":"2026-04-02T01:04:06.703Z","repository":{"id":62834816,"uuid":"562917525","full_name":"pierlumanzu/nsma","owner":"pierlumanzu","description":"A Memetic Procedure for Global Multi-Objective Optimization","archived":false,"fork":false,"pushed_at":"2023-11-10T15:40:03.000Z","size":184,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-16T18:42:01.901Z","etag":null,"topics":["descent-method","memetic-algorithm","multi-objective-optimization","nsga-ii","pareto-front"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pierlumanzu.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}},"created_at":"2022-11-07T14:28:27.000Z","updated_at":"2024-12-02T16:27:27.000Z","dependencies_parsed_at":"2023-02-09T15:31:24.782Z","dependency_job_id":null,"html_url":"https://github.com/pierlumanzu/nsma","commit_stats":{"total_commits":13,"total_committers":2,"mean_commits":6.5,"dds":0.07692307692307687,"last_synced_commit":"22610b3dbc308fe89309ac99204992feac048908"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/pierlumanzu/nsma","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pierlumanzu%2Fnsma","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pierlumanzu%2Fnsma/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pierlumanzu%2Fnsma/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pierlumanzu%2Fnsma/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pierlumanzu","download_url":"https://codeload.github.com/pierlumanzu/nsma/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pierlumanzu%2Fnsma/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31293631,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T21:15:39.731Z","status":"ssl_error","status_checked_at":"2026-04-01T21:15:34.046Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["descent-method","memetic-algorithm","multi-objective-optimization","nsga-ii","pareto-front"],"created_at":"2025-12-14T15:02:49.468Z","updated_at":"2026-04-02T01:04:06.675Z","avatar_url":"https://github.com/pierlumanzu.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Python 3.10](https://img.shields.io/badge/python-3.10-blue.svg)](https://www.python.org/downloads/release/python-3106/)\n[![license](https://img.shields.io/badge/license-apache_2.0-orange.svg)](https://opensource.org/licenses/Apache-2.0)\n[![DOI](https://zenodo.org/badge/562917525.svg)](https://zenodo.org/badge/latestdoi/562917525)\n\n![Alt Text](README_Front_Image.gif)\n## NSMA: A Memetic Procedure for Global Multi-Objective Optimization\n\nImplementation of the NSMA Algorithm proposed in\n\n[Lapucci, M., Mansueto, P. \u0026 Schoen, F. A memetic procedure for global multi-objective optimization. Math. Prog. Comp. (2022).](\nhttps://doi.org/10.1007/s12532-022-00231-3)\n\nIf you have used our code for research purposes, please cite the publication mentioned above.\nFor the sake of simplicity, we provide the Bibtex format:\n\n```\n@Article{Lapucci2022,\n    author={Lapucci, Matteo and Mansueto, Pierluigi and Schoen, Fabio},\n    title={A memetic procedure for global multi-objective optimization},\n    journal={Mathematical Programming Computation},\n    year={2022},\n    month={Nov},\n    day={22},\n    issn={1867-2957},\n    doi={10.1007/s12532-022-00231-3},\n    url={https://doi.org/10.1007/s12532-022-00231-3}\n}\n```\n\n### Installation\n\nIn order to execute the code, you need an [Anaconda](https://www.anaconda.com/) environment. We provide YAML file in order to facilitate the installation of the latter.\n\n##### For Windows user\n\nOpen an Anaconda Prompt in the project root folder and execute the following command.\n\n```\nconda env create -f Environment_Setups/Windows.yml\n```\n\n##### For Linux user\n\nOpen a terminal in the project root folder and execute the following command.\n\n```\nconda env create -f Environment_Setups/Linux.yml\n```\n\n##### For MacOSX user\n\nOpen a terminal in the project root folder and execute the following command.\n\n```\nconda env create -f Environment_Setups/MacOSX.yml\n```\n\n#### Main Packages\n\n* ```python v3.10.6```\n* ```pip v22.2.2```\n* ```numpy v1.22.3```\n* ```scipy v1.7.3```\n* ```matplotlib``` Windows: ```v3.5.3```, Linux: ```v3.5.2```, MacOSX: ```v3.6.1```\n* ```tensorflow``` Windows: ```v2.9.1```, Linux: ```v2.8.2```, MacOSX: ```v2.10.0```\n* ```gurobipy v9.5.2```\n* ```progressbar2 v4.2.0```\n\n#### Gurobi Optimizer\n\nIn order to run some parts of the code, the [Gurobi](https://www.gurobi.com/) Optimizer needs to be installed and, in addition, a valid Gurobi licence is required. \nHowever, the employment of the Gurobi Optimizer is not mandatory to execute the code. \nIndeed, we provide alternative scripts where the HiGHS dual simplex solver implementation by [SciPy](https://scipy.org/) is used. The latter is the default choice as can be seen in ```parser_management.py```. \nThe Gurobi optimizer can be only employed by activating an argument (```-g```, ```--gurobi```). \n\n### Usage\n\nWe refer to the code documentation for all the information. In particular, in ```parser_management.py``` you can find all the possible arguments.\nGiven a terminal (an Anaconda prompt, if you are a Windows user), an example of execution could be the following.\n\n```python main.py --algorithms NSMA --problems MAN --seeds 16007 --max_time 2 --verbose --plot_pareto_front --plot_pareto_solutions -g --general_export --general_export_pareto_solutions```\n\nThe execution results are saved in the ```Execution_Outputs``` folder. In ```general_utils/management_utils.py``` and ```general_utils/args_utils.py```, you can find all the documentation about how the outputs are stored.\n\n### Python Library\n\nThe code is also proposed as [Python package](https://pypi.org/project/nsma/). In order to use it, execute the following command under your conda environment:\n\n```\npip install nsma\n```\n\nNote that, for a successful installation, you need Python v3.9 or higher in your Conda environment.\n\nBelow, an example of library usage is proposed.\n\n```python\nimport tensorflow as tf\nfrom nsma.algorithms.memetic.nsma import NSMA\nfrom nsma.problems.man.man_instance import MAN1\nfrom nsma.general_utils.pareto_utils import points_initialization\n\ntf.compat.v1.disable_eager_execution()\n\nsession = tf.compat.v1.Session()\nwith session.as_default():\n    algorithm = NSMA(max_iter=None, \n                     max_time=2, \n                     max_f_evals=None, \n                     verbose=True, \n                     verbose_interspace=10, \n                     plot_pareto_front=True, \n                     plot_pareto_solutions=False, \n                     plot_dpi=100, \n                     pop_size=100, \n                     crossover_probability=0.9, \n                     crossover_eta=20, \n                     mutation_eta=20, \n                     shift=10, \n                     crowding_quantile=0.9, \n                     n_opt=5, \n                     FMOPG_max_iter=5, \n                     theta_for_stationarity=-1e-10, \n                     theta_tol=-1e-1, \n                     theta_dec_factor=10**(-0.5), \n                     gurobi=True, \n                     gurobi_method=1, \n                     gurobi_verbose=False, \n                     ALS_alpha_0=1, \n                     ALS_delta=0.5, \n                     ALS_beta=10**-4, \n                     ALS_min_alpha=1e-7)\n    problem = MAN1(n=5)\n    initial_p_list, initial_f_list, n_initial_points = points_initialization(problem, 'hyper', 5)\n    p_list, f_list, elapsed_time = algorithm.search(initial_p_list, initial_f_list, problem)\n```\n\n### Contact\n\nIf you have any question, feel free to contact me:\n\n[Pierluigi Mansueto](https://webgol.dinfo.unifi.it/pierluigi-mansueto/)\u003cbr\u003e\nGlobal Optimization Laboratory ([GOL](https://webgol.dinfo.unifi.it/))\u003cbr\u003e\nUniversity of Florence\u003cbr\u003e\nEmail: pierluigi dot mansueto at unifi dot it\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpierlumanzu%2Fnsma","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpierlumanzu%2Fnsma","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpierlumanzu%2Fnsma/lists"}