From 4287637e81637dbc220351ad1726ed3d3c7125b3 Mon Sep 17 00:00:00 2001 From: "mhsatman@gmail.com" Date: Mon, 11 Dec 2023 20:11:53 +0300 Subject: [PATCH] more verbose aras edas waspas output with inner calculations --- CHANGELOG.md | 7 ++++++- Project.toml | 2 +- src/aras.jl | 5 +++++ src/edas.jl | 26 +++++++++++++++++++++++++- src/waspas.jl | 12 +++++++++++- 5 files changed, 48 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b2adb24..b6e0637 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ -### 0.7.11 (Upcoming release) +### 0.7.12 (Upcoming release) + +### 0.7.11 + +- ARAS, EDAS, and WASPAS results are now holding more inner-calculation results. + ### 0.7.10 - Add LMAW (Logarithm Methodology of Additive Weights) as a new MCDM tool. diff --git a/Project.toml b/Project.toml index aecbce9..f3c25ab 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "JMcDM" uuid = "358108f5-d052-4d0a-8344-d5384e00c0e5" authors = ["Mehmet Hakan Satman (jbytecode) ", "Bahadir Fatih Yildirim ", "Ersagun Kuruca"] -version = "0.7.10" +version = "0.7.11" [deps] Requires = "ae029012-a4dd-5104-9daa-d747884805df" diff --git a/src/aras.jl b/src/aras.jl index e4e6ea5..9342b84 100755 --- a/src/aras.jl +++ b/src/aras.jl @@ -4,6 +4,8 @@ module ARAS import ..MCDMMethod, ..MCDMResult, ..MCDMSetting import ..Normalizations +import ..Utilities: weightise + using ..Utilities @@ -18,6 +20,7 @@ struct ARASResult <: MCDMResult referenceRow::Vector extendMat::Matrix normalizedMat::Matrix + weightedNormalizedMat::Matrix optimalitydegrees::Vector scores::Vector orderings::Array{Int64,1} @@ -100,6 +103,7 @@ function aras( end normalizedMat = normalization(extendMat, fs) + weightednormalizedmatrix = weightise(normalizedMat, w) optimality_degrees = Vector(undef, nrows + 1) @@ -119,6 +123,7 @@ function aras( referenceRow, extendMat, normalizedMat, + weightednormalizedmatrix, optimality_degrees, utility_degrees, orderings, diff --git a/src/edas.jl b/src/edas.jl index e552df2..eb0c51a 100644 --- a/src/edas.jl +++ b/src/edas.jl @@ -3,6 +3,9 @@ module EDAS export edas, EdasMethod, EDASResult import ..MCDMMethod, ..MCDMResult, ..MCDMSetting + +import ..Utilities: weightise + using ..Utilities @@ -12,6 +15,12 @@ struct EdasMethod <: MCDMMethod end struct EDASResult <: MCDMResult decisionMatrix::Matrix weights::Array{Float64,1} + NDAMatrix::Matrix + PDAMatrix::Matrix + weightedNDAMatrix::Matrix + weightedPDAMatrix::Matrix + SN::Vector + SP::Vector scores::Vector ranking::Array{Int64,1} bestIndex::Int64 @@ -116,6 +125,10 @@ function edas( end end + weightedPDAMatrix = weightise(PDAMatrix, w) + weightedNDAMatrix = weightise(NDAMatrix, w) + + SP = zeros(eltype(df), row) SN = zeros(eltype(df), row) @@ -133,7 +146,18 @@ function edas( bestIndex = rankings |> last - result = EDASResult(decisionMat, w, scores, rankings, bestIndex) + result = EDASResult( + decisionMat, + w, + NDAMatrix, + PDAMatrix, + weightedNDAMatrix, + weightedPDAMatrix, + SN, + SP, + scores, + rankings, + bestIndex) return result end diff --git a/src/waspas.jl b/src/waspas.jl index 0e224c0..e124350 100644 --- a/src/waspas.jl +++ b/src/waspas.jl @@ -12,6 +12,8 @@ struct WASPASResult <: MCDMResult decisionMatrix::Matrix normalizedDecisionMatrix::Matrix weights::Array{Float64,1} + scoresWPM::Vector + scoresWSM::Vector scores::Vector ranking::Array{Int64,1} bestIndex::Int64 @@ -132,7 +134,15 @@ function waspas( bestIndex = rankings |> last result = - WASPASResult(decisionMat, normalizedDecisionMat, w, scores, rankings, bestIndex) + WASPASResult( + decisionMat, + normalizedDecisionMat, + w, + scoresWPM, + scoresWSM, + scores, + rankings, + bestIndex) return result end