JMcDM
JMcDM copied to clipboard
Welcome to newcomers!
The package implements the abstract type
abstract type MCDMResult end
for return types of the MCDM tools. For example, the method topsis returns a TopsisResult, which is defined as
struct TopsisResult <: MCDMResult
decisionMatrix::DataFrame
weights::Array{Float64,1}
normalizedDecisionMatrix::DataFrame
normalizedWeightedDecisionMatrix::DataFrame
bestIndex::Int64
scores::Array{Float64,1}
end
as a sub type of MCDMResult. The topsis method takes a DataFrame as input and returns multiple entities including the bestIndex and scores. bestIndex indicates the index of the best alternative which corresponds to the maximum score.
Each single method implemented is tested in the runtest.jl file. For instance, the code
@testset "TOPSIS" begin
tol = 0.00001
df = DataFrame()
df[:, :x] = Float64[9, 8, 7]
df[:, :y] = Float64[7, 7, 8]
df[:, :z] = Float64[6, 9, 6]
df[:, :q] = Float64[7, 6, 6]
w = Float64[4, 2, 6, 8]
result = topsis(df, w)
@test isa(result, TopsisResult)
@test result.bestIndex == 2
@test isapprox(result.scores, [0.3876870, 0.6503238, 0.0834767], atol=tol)
end
tests topsis for a single dataset. df is a dataset with criteria x, y, z, and q and three alternatives. It seems the method must return the alternative 2 as the best one with score of 0.6503238. These test results will be referenced soon.
If you want to implement new methods, please
- Open a new issue and please define which method you want to implement and give some details
- Please clarify the implementation details.
If the community decision is okay
- Please fork the repository
- Send you pull request
Documentation
- Please follow the src/topsis.jl file for the documentation format.
That's all!
@sahinyu @ersagunkuruca @bahadirfyildirim