-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
279 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
name = "JMcDM" | ||
uuid = "358108f5-d052-4d0a-8344-d5384e00c0e5" | ||
authors = ["Mehmet Hakan Satman (jbytecode) <[email protected]>", "Bahadir Fatih Yildirim <[email protected]>"] | ||
version = "0.3.3" | ||
version = "0.3.4" | ||
|
||
[deps] | ||
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,260 @@ | ||
@testset "Copeland" begin | ||
""" | ||
This example is interpreted from the results of | ||
Arslan, Rahim, and Hüdaverdi Bircan. "Çok Kriterli Karar Verme Teknikleriyle Elde Edilen | ||
Sonuçların Copeland Yöntemiyle Birleştirilmesi ve Karşılaştırılması." Yönetim ve Ekonomi: | ||
Celal Bayar Üniversitesi İktisadi ve İdari Bilimler Fakültesi Dergisi 27.1 (2020): 109-127. | ||
for testing the method. | ||
""" | ||
topsis_ord = | ||
[7, 17, 3, 14, 6, 18, 10, 19, 8, 15, 22, 12, 2, 9, 23, 11, 16, 20, 5, 13, 1, 21, 4] | ||
gia_ord = | ||
[9, 17, 3, 14, 6, 18, 7, 19, 8, 16, 22, 13, 1, 10, 23, 11, 15, 20, 5, 12, 2, 21, 4] | ||
vikor_ord = | ||
[7, 17, 3, 14, 5, 18, 10, 19, 8, 16, 22, 13, 1, 9, 23, 11, 15, 20, 6, 12, 2, 21, 4] | ||
mooraref_ord = | ||
[3, 14, 2, 15, 16, 21, 10, 23, 8, 9, 19, 6, 7, 5, 22, 17, 13, 18, 12, 11, 1, 20, 4] | ||
copras_ord = | ||
[7, 17, 3, 14, 6, 18, 11, 19, 8, 15, 22, 12, 1, 9, 23, 10, 16, 20, 5, 13, 2, 21, 4] | ||
moora_ord = | ||
[7, 17, 3, 14, 5, 18, 11, 19, 8, 15, 22, 12, 1, 9, 23, 10, 16, 20, 6, 13, 2, 21, 4] | ||
aras_ord = | ||
[7, 17, 3, 14, 6, 18, 11, 19, 8, 15, 22, 12, 1, 9, 23, 10, 16, 20, 5, 13, 2, 21, 4] | ||
|
||
mat = hcat(topsis_ord, gia_ord, vikor_ord, mooraref_ord) | ||
|
||
c = copeland(mat) | ||
|
||
d = c |> sortperm | ||
|
||
#show(d) | ||
#@info d | ||
|
||
@test d == [15, 11, 22, 18, 8, 6, 2, 10, 17, 4, 12, 20, 16, 7, 14, 9, 1, 5, 19, 23, 3, 13, 21] | ||
|
||
|
||
@testset "Copeland Example 1" begin | ||
""" | ||
This example is interpreted from the results of | ||
Arslan, Rahim, and Hüdaverdi Bircan. "Çok Kriterli Karar Verme Teknikleriyle Elde Edilen | ||
Sonuçların Copeland Yöntemiyle Birleştirilmesi ve Karşılaştırılması." Yönetim ve Ekonomi: | ||
Celal Bayar Üniversitesi İktisadi ve İdari Bilimler Fakültesi Dergisi 27.1 (2020): 109-127. | ||
for testing the method. | ||
""" | ||
topsis_ord = [ | ||
7, | ||
17, | ||
3, | ||
14, | ||
6, | ||
18, | ||
10, | ||
19, | ||
8, | ||
15, | ||
22, | ||
12, | ||
2, | ||
9, | ||
23, | ||
11, | ||
16, | ||
20, | ||
5, | ||
13, | ||
1, | ||
21, | ||
4, | ||
] | ||
gia_ord = [ | ||
9, | ||
17, | ||
3, | ||
14, | ||
6, | ||
18, | ||
7, | ||
19, | ||
8, | ||
16, | ||
22, | ||
13, | ||
1, | ||
10, | ||
23, | ||
11, | ||
15, | ||
20, | ||
5, | ||
12, | ||
2, | ||
21, | ||
4, | ||
] | ||
vikor_ord = [ | ||
7, | ||
17, | ||
3, | ||
14, | ||
5, | ||
18, | ||
10, | ||
19, | ||
8, | ||
16, | ||
22, | ||
13, | ||
1, | ||
9, | ||
23, | ||
11, | ||
15, | ||
20, | ||
6, | ||
12, | ||
2, | ||
21, | ||
4, | ||
] | ||
mooraref_ord = [ | ||
3, | ||
14, | ||
2, | ||
15, | ||
16, | ||
21, | ||
10, | ||
23, | ||
8, | ||
9, | ||
19, | ||
6, | ||
7, | ||
5, | ||
22, | ||
17, | ||
13, | ||
18, | ||
12, | ||
11, | ||
1, | ||
20, | ||
4, | ||
] | ||
copras_ord = [ | ||
7, | ||
17, | ||
3, | ||
14, | ||
6, | ||
18, | ||
11, | ||
19, | ||
8, | ||
15, | ||
22, | ||
12, | ||
1, | ||
9, | ||
23, | ||
10, | ||
16, | ||
20, | ||
5, | ||
13, | ||
2, | ||
21, | ||
4, | ||
] | ||
moora_ord = [ | ||
7, | ||
17, | ||
3, | ||
14, | ||
5, | ||
18, | ||
11, | ||
19, | ||
8, | ||
15, | ||
22, | ||
12, | ||
1, | ||
9, | ||
23, | ||
10, | ||
16, | ||
20, | ||
6, | ||
13, | ||
2, | ||
21, | ||
4, | ||
] | ||
aras_ord = [ | ||
7, | ||
17, | ||
3, | ||
14, | ||
6, | ||
18, | ||
11, | ||
19, | ||
8, | ||
15, | ||
22, | ||
12, | ||
1, | ||
9, | ||
23, | ||
10, | ||
16, | ||
20, | ||
5, | ||
13, | ||
2, | ||
21, | ||
4, | ||
] | ||
|
||
mat = hcat(topsis_ord, gia_ord, vikor_ord, mooraref_ord) | ||
|
||
c = copeland(mat) | ||
|
||
d = c |> sortperm | ||
|
||
#show(d) | ||
#@info d | ||
|
||
@test d == [ | ||
15, | ||
11, | ||
22, | ||
18, | ||
8, | ||
6, | ||
2, | ||
10, | ||
17, | ||
4, | ||
12, | ||
20, | ||
16, | ||
7, | ||
14, | ||
9, | ||
1, | ||
5, | ||
19, | ||
23, | ||
3, | ||
13, | ||
21, | ||
] | ||
|
||
end | ||
|
||
|
||
@testset "Copeland Example 2" begin | ||
""" | ||
This example is interpreted from the result of | ||
Özdağoğlu, Aşkın, et al. "Combining different MCDM methods with the Copeland method: | ||
An investigation on motorcycle selection." Journal of process management and new | ||
technologies 9.3-4 (2021): 13-27. | ||
in this test. | ||
""" | ||
mopa_rank = [1, 4, 2, 3] | ||
moosra_rank = [1, 2, 3, 4] | ||
copras_rank = [1, 3, 2, 4] | ||
saw_rank = [1, 3, 2, 4] | ||
wpm_rank = [1, 3, 2, 4] | ||
rov_rank = [4, 1, 2, 3] | ||
|
||
mopa_order = reverse(mopa_rank) | ||
moosra_order = reverse(moosra_rank) | ||
copras_order = reverse(copras_rank) | ||
saw_order = reverse(saw_rank) | ||
wpm_order = reverse(wpm_rank) | ||
rov_order = reverse(rov_rank) | ||
|
||
mat = hcat(mopa_order, moosra_order, copras_order, saw_order, wpm_order, rov_order) | ||
|
||
c = copeland(mat) | ||
|
||
d = c |> sortperm | ||
|
||
@test d == [1, 3, 2, 4] | ||
end | ||
|
||
end |