Skip to content

Latest commit

 

History

History
321 lines (236 loc) · 10.2 KB

README.md

File metadata and controls

321 lines (236 loc) · 10.2 KB

DOI Doc codecov

JMcDM

A package for Multiple-criteria decision-making techniques in Julia.

The problem

Suppose 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

without 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ⱼ.

The package mainly focuses on solving these kinds of decision problems.

For whom?

Multiple-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.

Installation

Please type

julia> ]
(@v1.10) pkg> add JMcDM

or

julia> using Pkg
julia> Pkg.add("JMcDM")

in Julia REPL to install package in the standard way, otherwise, you can clone the repository and type

julia> ]
(@v1.10) pkg> develop .

to start developing new methods.

Package Dependencies

Since the Julia package manager installs all of the dependencies automatically, a standard user doesn't need to install them manually. The package dependencies are listed below:

  • Requires.jl

for the main functionality. You can also install the

  • JuMP
  • Ipopt

for zero-sum game problem solving, data envelopment analysis, and the SECA method. You can also import

  • DataFrames

manually for user-friendly interactions. All of the methods require a decision matrix in type of Matrix which can be converted from a DataFrame using the code

Matrix(df)

before calling any method.

Documentation

Please check out the reference manual here.

Implemented methods

MCDM Tools

  • AHP (Analytic Hierarchy Process)
  • ARAS (Additive Ratio Assessment)
  • CoCoSo (Combined Compromise Solution)
  • CODAS (COmbinative Distance-based ASsessment)
  • Copeland (For combining multiple ordering results)
  • COPRAS (COmplex PRoportional ASsessment)
  • CRITIC (CRiteria Importance Through Intercriteria Correlation)
  • DEA (Data Envelopment Analysis)
  • DEMATEL (The Decision Making Trial and Evaluation Laboratory)
  • EDAS (Evaluation based on Distance from Average Solution)
  • ELECTRE (Elimination and Choice Translating Reality)
  • Entropy
  • GRA (Grey Relational Analysis)
  • LMAW (Logarithm Methodology of Additive Weights)
  • LOPCOW (LOgarithmic Percentage Change-driven Objective Weighting)
  • MABAC (Multi-Attributive Border Approximation area Comparison)
  • MAIRCA (Multi Attributive Ideal-Real Comparative Analysis)
  • MARCOS (Measurement Alternatives and Ranking according to COmpromise Solution)
  • MEREC (MEthod based on the Removal Effects of Criteria) for determining weights
  • MOORA Ratio
  • MOORA Reference (Multi-Objective Optimization By Ratio Analysis)
  • MOOSRA (Multi-Objective Optimization on the basis of Simple Ratio Analysis) Method
  • Non-dominated Sorting
  • OCRA (Operational Competitiveness RAting)
  • PIV (Proximity Indexed Value) method
  • PROMETHEE (Preference Ranking Organization METHod for Enrichment of Evaluations)
  • PSI (Preference Selection Index) Method
  • ROV (Range of Value) Method
  • SAW (Simple Additive Weighting) (aka WSM)
  • SD Method for determining weights of criteria
  • SECA (Simultaneous Evaluation of Criteria and Alternatives)
  • TOPSIS (Technique for Order Preference by Similarity to Ideal Solutions)
  • VIKOR (VlseKriterijumska Optimizcija I Kaompromisno Resenje in Serbian)
  • WASPAS (Weighted Aggregated Sum Product ASsessment)
  • WPM (Weighted Product Model)
  • TODIM (the Portuguese acronym for multicriteria, interactive decision-making)
  • CILOS (The Criterion Impact Loss Method)
  • IDOCRIW (Integrated Determination of Objective Criteria Weights)
  • Best-Worst Method

SCDM Tools

  • minimax
  • maximin
  • minimin
  • maximax
  • Savage
  • Hurwicz
  • MLE
  • Laplace
  • Expected Regret

Game

  • Game solver for zero sum games

Unimplemented methods

  • ANP (Analytical Network Process)

  • COMET

  • Goal Programming

  • MACBETH

  • MAUT

  • ORESTE

  • PAPRIKA

  • SMAA

  • STEM

  • SWARA

  • UTA

  • will be updated soon.

Example

julia> using JMcDM
julia> using DataFrames
julia> df = DataFrame(
:age        => [6.0, 4, 12],
:size       => [140.0, 90, 140],
:price      => [150000.0, 100000, 75000],
:distance   => [950.0, 1500, 550],
:population => [1500.0, 2000, 1100]);
julia> df
3×5 DataFrame
 Row │ age      size     price     distance  population 
     │ Float64  Float64  Float64   Float64   Float64    
─────┼──────────────────────────────────────────────────
   16.0    140.0  150000.0     950.0      1500.0
   24.0     90.0  100000.0    1500.0      2000.0
   312.0    140.0   75000.0     550.0      1100.0
julia> w  = [0.35, 0.15, 0.25, 0.20, 0.05];
julia> fns = [minimum, maximum, minimum, minimum, maximum];
julia> result = topsis(Matrix(df), w, fns);
julia> result.scores
3-element Array{Float64,1}:
0.5854753145549456
0.6517997936899308
0.41850223305822903

julia> result.bestIndex
2

alternatively

julia> result = mcdm(Matrix(df), w, fns, TopsisMethod())

or

julia> setting = MCDMSetting(Matrix(df), w, fns)
julia> result = topsis(setting)

or

julia> setting = MCDMSetting(Matrix(df), w, fns)
julia> result = mcdm(setting, TopsisMethod())

Jupyter Notebook

Here is a Jupyter Notebook for basic usage:

https://github.com/jbytecode/JMcDM/blob/main/notebook/basic-usage.ipynb

Community guidelines

How to cite

Please use the BibTeX entry:

@article{Satman2021,
  doi = {10.21105/joss.03430},
  url = {https://doi.org/10.21105/joss.03430},
  year = {2021},
  publisher = {The Open Journal},
  volume = {6},
  number = {65},
  pages = {3430},
  author = {Mehmet Hakan Satman and Bahadır Fatih Yıldırım and Ersagun Kuruca},
  title = {JMcDM: A Julia package for multiple-criteria decision-making tools},
  journal = {Journal of Open Source Software}
}

or citation string

Satman 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

to cite this software.

Contribute to software

Do you want to contribute?

  • Please create an issue first. In this issue, please specify the idea.
  • Let the community discuss the new contribution in our Slack channel or the created issue.

If the community decision is yes, please

  • Fork the repository
  • Add the new code to this forked repository
  • Make sure the tests are passed
  • Send a pull request with a good description of functionality.

Where to start?

The TOPSIS method, defined in topsis.jl, is a basis for many methods and it can be followed before implementing a new one.

The design pattern

  • topsis() takes the decision matrix, weights, and vector of directions of optimization as arguments. This function is defined in topsis.jl.

    function topsis(decisionMat::Matrix, weights::Array{Float64,1}, fns::Array{Function,1})::TopsisResult
  • topsis() method has a return type of TopsisResult. This struct is defined in types.jl

    struct TopsisResult <: MCDMResult
       decisionMatrix::Matrix
       weights::Array{Float64,1}
       normalizedDecisionMatrix::DataFrame
       normalizedWeightedDecisionMatrix::DataFrame 
       bestIndex::Int64 
       scores::Array{Float64,1}
    end
  • Optionally, a show function can be derived for pretty-printing the result. These functions are defined in print.jl

    function Base.show(io::IO, result::TopsisResult)
       println(io, "Scores:")
       println(io, result.scores)
       println(io, "Best indices:")
       println(io, result.bestIndex)
    end

Please read the issue Welcome to newcomers! for other implementation details.

Report Issues

If you find a bug or error, first report the problem in a new issue. If the problem is already addressed in an existing issue please follow the existing one.

Seek Support

Our Slack channel is JMcDM Slack Channel. Please feel free to ask about any problem using our Slack channel or issues. Julia Discourse is the JMcDM entry in Julia Discourse site and any thoughts, problems, and issues can also be discussed there.

Welcome!