{"id":15286744,"url":"https://github.com/jbytecode/jmcdm","last_synced_at":"2025-04-06T00:07:15.795Z","repository":{"id":37884801,"uuid":"335550542","full_name":"jbytecode/JMcDM","owner":"jbytecode","description":"A package for Multiple criteria decision-making techniques in Julia","archived":false,"fork":false,"pushed_at":"2025-04-04T19:17:20.000Z","size":3361,"stargazers_count":53,"open_issues_count":4,"forks_count":9,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-06T00:07:08.399Z","etag":null,"topics":["julia","mcdm","multiple-criteria-decision-making","optimization"],"latest_commit_sha":null,"homepage":"","language":"Julia","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/jbytecode.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":"CITATION.txt","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-02-03T08:04:21.000Z","updated_at":"2025-04-04T19:12:46.000Z","dependencies_parsed_at":"2023-02-08T16:15:52.559Z","dependency_job_id":"8534bc01-870e-41ac-88cc-9ef6ffe53f79","html_url":"https://github.com/jbytecode/JMcDM","commit_stats":{"total_commits":567,"total_committers":10,"mean_commits":56.7,"dds":"0.11992945326278659","last_synced_commit":"01fe93b69171e02dbfe61d3b071a30402d42220e"},"previous_names":[],"tags_count":62,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jbytecode%2FJMcDM","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jbytecode%2FJMcDM/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jbytecode%2FJMcDM/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jbytecode%2FJMcDM/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jbytecode","download_url":"https://codeload.github.com/jbytecode/JMcDM/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247415967,"owners_count":20935388,"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":["julia","mcdm","multiple-criteria-decision-making","optimization"],"created_at":"2024-09-30T15:18:24.451Z","updated_at":"2025-04-06T00:07:15.775Z","avatar_url":"https://github.com/jbytecode.png","language":"Julia","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![DOI](https://joss.theoj.org/papers/10.21105/joss.03430/status.svg)](https://doi.org/10.21105/joss.03430)\n[![Doc](https://img.shields.io/badge/docs-dev-blue.svg)](https://jbytecode.github.io/JMcDM/)\n[![codecov](https://codecov.io/gh/jbytecode/JMcDM/branch/main/graph/badge.svg?token=V06HNNWJ98)](https://codecov.io/gh/jbytecode/JMcDM)\n# JMcDM\nA package for Multiple-criteria decision-making techniques in Julia.\n\n## The problem\n\nSuppose a decision process has n alternatives and m criteria  which are either to be maximized or minimized. Each single criterion has a weight _0 ≤ wᵢ ≤ 1_ where sum of _wᵢ_ is 1. _fᵢ_ is either maximum or minimum. _gⱼ(.)_ is the evolution function and it is choosen as _gⱼ(x) = x_ in many methods. A multiple criteria decision problem can be represented using the decision table \n\n\u003cimg src=\"https://github.com/jbytecode/JMcDM/blob/gh-pages/dev/images/generalformula.png\" width = \"50%\"/\u003e\n\n\u003c!--\n   | **Criteria**  |   C_1    |   C_2    |  ...  |   C_m    |\n   | :-----------: | :------: | :------: | :---: | :------: |\n   |  **Weights**  |   w_1    |   w_2    |  ...  |   w_m    |\n   | **Functions** |   f_1    |   f_2    |  ...  |   f_m    |\n   |      A_1      | g_1(A_1) | g_2(A_1) |  ...  | g_m(S_A) |\n   |      A_2      | g_1(A_2) | g_2(A_2) |  ...  | g_m(A_2) |\n   |       ⋮       |    ⋮     |    ⋮     |  ...  |    ⋮     |\n   |      A_n      | g_1(A_n) | g_2(A_n) |  ...  | g_m(A_n) |\n--\u003e\n\nwithout loss of generality. When _A₁, A₂, ..., Aₙ_ are alternatives and _C₁, C₂, ..., Cₙ_ are different situations of a single criterion then the decision problem is said to be single criterion decision problem. If _Cⱼ_ are strategies of two game players then _gⱼ(Aᵢ)_ is the gain of the row player when she selects the strategy _i_ and the column player selects the strategy _Cⱼ_.\n\n\nThe package mainly focuses on solving these kinds of decision problems.\n\n## For whom?\n\nMultiple-criteria decision-making is an inter-discipline subject and there is a vast amount of research in the literature in this area. However, the existing software packages in this area are generally focused on a small subset of tools. JMcDM is a developer and researcher-friendly Julia package that combines the developed methods, utility functions for implementing new ones, and serves an environment for comparing results of multiple analyses.  \n\n## Installation\n\nPlease type \n\n```julia\njulia\u003e ]\n(@v1.10) pkg\u003e add JMcDM\n```\n\nor\n\n```julia\njulia\u003e using Pkg\njulia\u003e Pkg.add(\"JMcDM\")\n```\n\nin Julia REPL to install package in the standard way, otherwise, you can clone the repository\nand type \n\n```julia\njulia\u003e ]\n(@v1.10) pkg\u003e develop .\n``` \n\nto start developing new methods.\n\n\n## Package Dependencies\n\nSince the Julia package manager installs all of the dependencies automatically, a standard user doesn't need to\ninstall them manually. The package dependencies are listed below:\n\n- Requires.jl\n  \n\nfor the main functionality. You can also install the \n\n- JuMP\n- Ipopt\n\nfor zero-sum game problem solving, data envelopment analysis, and the SECA method. You can also import\n\n- DataFrames\n\nmanually for user-friendly interactions. All of the methods require a decision matrix in type of Matrix which\ncan be converted from a DataFrame using the code\n\n```julia\nMatrix(df)\n```\n\nbefore calling any method.\n\n\n\n## Documentation\n\nPlease check out the reference manual [here](https://jbytecode.github.io/JMcDM/).\n\n\n## Implemented methods\n\n### MCDM Tools\n\n- AHP (Analytic Hierarchy Process)\n- ARAS (Additive Ratio Assessment)\n- CoCoSo (Combined Compromise Solution)\n- CODAS (COmbinative Distance-based ASsessment)\n- Copeland (For combining multiple ordering results)\n- COPRAS (COmplex PRoportional ASsessment)\n- CRITIC (CRiteria Importance Through Intercriteria Correlation)\n- DEA (Data Envelopment Analysis)\n- DEMATEL (The Decision Making Trial and Evaluation Laboratory)\n- EDAS (Evaluation based on Distance from Average Solution)\n- ELECTRE (Elimination and Choice Translating Reality)\n- Entropy\n- GRA (Grey Relational Analysis)\n- LMAW (Logarithm Methodology of Additive Weights)\n- LOPCOW (LOgarithmic Percentage Change-driven Objective Weighting)\n- MABAC (Multi-Attributive Border Approximation area Comparison)\n- MAIRCA (Multi Attributive Ideal-Real Comparative Analysis)\n- MARCOS (Measurement Alternatives and Ranking according to COmpromise Solution)\n- MEREC (MEthod based on the Removal Effects of Criteria) for determining weights\n- MOORA Ratio\n- MOORA Reference (Multi-Objective Optimization By Ratio Analysis)\n- MOOSRA (Multi-Objective Optimization on the basis of Simple Ratio Analysis) Method\n- Non-dominated Sorting\n- OCRA (Operational Competitiveness RAting) \n- PIV (Proximity Indexed Value) method\n- PROMETHEE (Preference Ranking Organization METHod for Enrichment of Evaluations)\n- PSI (Preference Selection Index) Method\n- ROV (Range of Value) Method\n- SAW (Simple Additive Weighting) (aka WSM)\n- SD Method for determining weights of criteria\n- SECA (Simultaneous Evaluation of Criteria and Alternatives)\n- TOPSIS (Technique for Order Preference by Similarity to Ideal Solutions)\n- VIKOR (VlseKriterijumska Optimizcija I Kaompromisno Resenje in Serbian)\n- WASPAS (Weighted Aggregated Sum Product ASsessment)\n- WPM (Weighted Product Model)\n- TODIM (the Portuguese acronym for multicriteria, interactive decision-making)\n- CILOS (The Criterion Impact Loss Method)\n- IDOCRIW (Integrated Determination of Objective Criteria Weights)\n- Best-Worst Method\n- RAM (Root Assessment Method)\n\n\n### SCDM Tools\n\n- minimax\n- maximin\n- minimin\n- maximax\n- Savage\n- Hurwicz\n- MLE\n- Laplace\n- Expected Regret\n\n### Game\n\n- Game solver for zero sum games\n\n## Unimplemented methods\n- ANP (Analytical Network Process)\n- COMET\n- Goal Programming\n- MACBETH\n- MAUT\n- ORESTE\n- PAPRIKA\n- SMAA\n- STEM\n- SWARA\n- UTA\n\n- will be updated soon. \n\n## Example\n\n```julia\njulia\u003e using JMcDM\njulia\u003e using DataFrames\njulia\u003e df = DataFrame(\n:age        =\u003e [6.0, 4, 12],\n:size       =\u003e [140.0, 90, 140],\n:price      =\u003e [150000.0, 100000, 75000],\n:distance   =\u003e [950.0, 1500, 550],\n:population =\u003e [1500.0, 2000, 1100]);\n```\n\n\n```julia\njulia\u003e df\n3×5 DataFrame\n Row │ age      size     price     distance  population \n     │ Float64  Float64  Float64   Float64   Float64    \n─────┼──────────────────────────────────────────────────\n   1 │     6.0    140.0  150000.0     950.0      1500.0\n   2 │     4.0     90.0  100000.0    1500.0      2000.0\n   3 │    12.0    140.0   75000.0     550.0      1100.0\n```\n\n\n```julia\njulia\u003e w  = [0.35, 0.15, 0.25, 0.20, 0.05];\njulia\u003e fns = [minimum, maximum, minimum, minimum, maximum];\njulia\u003e result = topsis(Matrix(df), w, fns);\njulia\u003e result.scores\n3-element Array{Float64,1}:\n0.5854753145549456\n0.6517997936899308\n0.41850223305822903\n\njulia\u003e result.bestIndex\n2\n```\n\nalternatively\n\n```julia\njulia\u003e result = mcdm(Matrix(df), w, fns, TopsisMethod())\n```\n\nor \n\n```julia\njulia\u003e setting = MCDMSetting(Matrix(df), w, fns)\njulia\u003e result = topsis(setting)\n```\n\nor\n\n```julia\njulia\u003e setting = MCDMSetting(Matrix(df), w, fns)\njulia\u003e result = mcdm(setting, TopsisMethod())\n```\n\n### Jupyter Notebook\n\nHere is a Jupyter Notebook for basic usage: \n\nhttps://github.com/jbytecode/JMcDM/blob/main/notebook/basic-usage.ipynb\n\n\n## Community guidelines\n\n### How to cite \n\nPlease use the BibTeX entry:\n\n```bibtex\n@article{Satman2021,\n  doi = {10.21105/joss.03430},\n  url = {https://doi.org/10.21105/joss.03430},\n  year = {2021},\n  publisher = {The Open Journal},\n  volume = {6},\n  number = {65},\n  pages = {3430},\n  author = {Mehmet Hakan Satman and Bahadır Fatih Yıldırım and Ersagun Kuruca},\n  title = {JMcDM: A Julia package for multiple-criteria decision-making tools},\n  journal = {Journal of Open Source Software}\n}\n```\n\nor citation string\n\nSatman et al., (2021). JMcDM: A Julia package for multiple-criteria decision-making tools. Journal of Open Source Software, 6(65), 3430, https://doi.org/10.21105/joss.03430\n\nto cite this software.\n\n### Contribute to software\nDo you want to contribute?\n\n- Please create an issue first. In this issue, please specify the idea.\n- Let the community discuss the new contribution in our Slack channel or the created issue.\n\nIf the community decision is yes, please\n\n- Fork the repository\n- Add the new code to this forked repository\n- Make sure the tests are passed \n- Send a pull request with a good description of functionality.\n\n### Where to start?\nThe TOPSIS method, defined in [topsis.jl](https://github.com/jbytecode/JMcDM/blob/main/src/topsis.jl), is a basis for many methods and it can be followed before implementing a new one. \n\n### The design pattern\n- ```topsis()``` takes the decision matrix, weights, and vector of directions of optimization as arguments. This function is defined in ```topsis.jl```.\n\n   ```julia\n   function topsis(decisionMat::Matrix, weights::Array{Float64,1}, fns::Array{Function,1})::TopsisResult\n   ```\n\n- ```topsis()``` method has a return type of ```TopsisResult```. This ```struct``` is defined in ```types.jl```\n\n   ```julia\n   struct TopsisResult \u003c: MCDMResult\n      decisionMatrix::Matrix\n      weights::Array{Float64,1}\n      normalizedDecisionMatrix::DataFrame\n      normalizedWeightedDecisionMatrix::DataFrame \n      bestIndex::Int64 \n      scores::Array{Float64,1}\n   end\n   ```\n\n- Optionally, a ```show``` function can be derived for pretty-printing the result. These functions are defined in ```print.jl```\n\n   ```julia\n   function Base.show(io::IO, result::TopsisResult)\n      println(io, \"Scores:\")\n      println(io, result.scores)\n      println(io, \"Best indices:\")\n      println(io, result.bestIndex)\n   end\n   ```\n\nPlease read the issue [Welcome to newcomers!](https://github.com/jbytecode/JMcDM/issues/3) for other implementation details.\n\n### Report Issues\n\nIf you find a bug or error, first report the problem in a new issue. If the problem is already addressed\nin an existing issue please follow the existing one.\n\n### Seek Support\nOur Slack channel is [JMcDM Slack Channel](https://julialang.slack.com/archives/C01MJ0VF1U3). Please feel free to ask about any problem using our Slack channel or issues. [Julia Discourse](https://discourse.julialang.org/t/jmcdm-a-julia-package-for-multiple-criteria-decision-making-tools/54942) is the JMcDM entry in Julia Discourse site and any thoughts, problems, and issues can also be discussed there.\n\n\nWelcome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjbytecode%2Fjmcdm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjbytecode%2Fjmcdm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjbytecode%2Fjmcdm/lists"}