Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f04c708

Browse files
committed
add documentation for fuzzy methods
1 parent 7a9e281 commit f04c708

5 files changed

Lines changed: 93 additions & 2 deletions

File tree

docs/src/fuzzy.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,26 @@
11
# Fuzzy Methods
22

3+
## Fuzzy Cocoso
4+
```@docs
5+
JMcDM.Fuzzy.fuzzycocoso
6+
```
7+
38
## Fuzzy Edas
49
```@docs
5-
JMcDM.Fuzzy.FuzzyEdas
10+
JMcDM.Fuzzy.fuzzyedas
11+
```
12+
13+
## Fuzzy SAW
14+
```@docs
15+
JMcDM.Fuzzy.fuzzysaw
16+
```
17+
18+
## Fuzzy Topsis
19+
```@docs
20+
JMcDM.Fuzzy.fuzzytopsis
21+
```
22+
23+
## Fuzzy VIKOR
24+
```@docs
25+
JMcDM.Fuzzy.fuzzyvikor
626
```

src/fuzzy/cocoso.jl

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,28 @@ end
7171

7272

7373

74-
74+
"""
75+
FuzzyCocoso(
76+
decmat::Matrix{FuzzyType},
77+
w::Vector{FuzzyType},
78+
fns;
79+
defuzzificationmethod::DefuzzificationMethod = WeightedMaximum(0.5),
80+
lambda::Float64 = 0.5,
81+
) -> FuzzyCocosoResult where {FuzzyType<:FuzzyNumber}
82+
83+
Perform the fuzzy COCOSO method.
84+
85+
# Arguments
86+
87+
- `decmat`: The decision matrix.
88+
- `w`: The weights of the criteria.
89+
- `fns`: The direction of the criteria (maximum or minimum).
90+
- `defuzzificationmethod`: The defuzzification method to use.
91+
- `lambda`: The lambda parameter for the method.
92+
93+
# Returns
94+
- `FuzzyCocosoResult`: A struct containing the results of the fuzzy COCOSO method.
95+
"""
7596
function fuzzycocoso(
7697
decmat::Matrix{FuzzyType},
7798
w::Vector{FuzzyType},

src/fuzzy/saw.jl

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,23 @@ struct FuzzySawResult
66
end
77

88

9+
10+
"""
11+
fuzzysaw(decmat::Matrix{FuzzyType}, w::Vector{FuzzyType}, fns; defuzzificationmethod::DefuzzificationMethod = WeightedMaximum(0.5))
12+
13+
# Description
14+
15+
Fuzzy SAW method for fuzzy decision making.
16+
17+
# Arguments
18+
- `decmat`: A matrix of fuzzy numbers.
19+
- `w`: A vector of weights.
20+
- `fns`: A vector of functions (either maximum or minimum).
21+
- `defuzzificationmethod`: The method used for defuzzification.
22+
23+
# Returns
24+
- A FuzzySawResult object containing the normalized decision matrix, weighted normalized decision matrix, and scores.
25+
"""
926
function fuzzysaw(
1027
decmat::Matrix{FuzzyType},
1128
w::Vector{FuzzyType},

src/fuzzy/topsis.jl

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,24 @@ struct FuzzyTopsisResult
1010
end
1111

1212

13+
14+
"""
15+
fuzzytopsis(
16+
decmat::Matrix{FuzzyType},
17+
w::Vector{FuzzyType},
18+
fns,
19+
)::FuzzyTopsisResult where {FuzzyType<:FuzzyNumber}
20+
21+
Fuzzy TOPSIS method for multi-criteria decision making.
22+
23+
# Arguments
24+
- `decmat`: The decision matrix.
25+
- `w`: The weights of the criteria.
26+
- `fns`: The direction of the criteria (maximum or minimum).
27+
28+
# Returns
29+
- `FuzzyTopsisResult`: A struct containing the results of the fuzzy TOPSIS method.
30+
"""
1331
function fuzzytopsis(
1432
decmat::Matrix{FuzzyType},
1533
w::Vector{FuzzyType},

src/fuzzy/vikor.jl

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,21 @@ struct FuzzyVikorResult
55
end
66

77

8+
"""
9+
fuzzyvikor(decmat::Matrix{Triangular}, w::Vector{Triangular}, fns::Vector{F}) -> FuzzyVikorResult
10+
11+
# Description
12+
13+
The fuzzy VIKOR method is a multi-criteria decision-making method that uses fuzzy logic to evaluate alternatives based on multiple criteria.
14+
15+
# Arguments
16+
- `decmat::Matrix{Triangular}`: A matrix of fuzzy numbers representing the decision matrix.
17+
- `w::Vector{Triangular}`: A vector of fuzzy numbers representing the weights of the criteria.
18+
- `fns::Vector{F}`: A vector of functions (either `maximum` or `minimum`) representing the type of each criterion.
19+
20+
# Returns
21+
- `FuzzyVikorResult`: A struct containing the results of the fuzzy VIKOR method, including the positive ideal solution, negative ideal solution, and the Si values for each alternative.
22+
"""
823
function fuzzyvikor(decmat::Matrix{Triangular},
924
w::Vector{Triangular},
1025
fns::Vector{F})::FuzzyVikorResult where {F<:Function}

0 commit comments

Comments
 (0)