Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

maximum

Maximum of fuzzy nubmers


Description

Determines maximum fuzzy number based on two inputs.

Usage

## S4 method for signature 
## 'PiecewiseLinearFuzzyNumber,PiecewiseLinearFuzzyNumber'
maximum(e1, e2)

Arguments

e1

a PiecewiseLinearFuzzyNumber

e2

a PiecewiseLinearFuzzyNumber

Details

The resulting PiecewiseLinearFuzzyNumber is only an approximation of the result it might not be very precise for small number of knots (see examples).

Value

Returns a PiecewiseLinearFuzzyNumber representing maximal value of the inputs.

References

KAUFMANN, A., GUPTA, M. M. (1985) Introduction to Fuzzy Arithmetic. New York : Van Nostrand Reinhold Company. ISBN 044230079.

See Also

Other min_max-operators: minimum

Examples

# example with low number of knots, showing the approximate nature
# of the result
x = as.PiecewiseLinearFuzzyNumber(TriangularFuzzyNumber(-4.8, -3 , -1.5))
y = as.PiecewiseLinearFuzzyNumber(TriangularFuzzyNumber(-5.5, -2.5, -1.1))
maxFN = maximum(x,y)
min = min(alphacut(x,0)[1],alphacut(y,0)[1])
max = max(alphacut(x,0)[2],alphacut(y,0)[2])
plot(x, col="red", xlim=c(min,max))
plot(y, col="blue", add=TRUE)
plot(maxFN, col="green", add=TRUE)

# example with high number of knots, that does not suffer 
# from the approximate nature of the result
x = as.PiecewiseLinearFuzzyNumber(TriangularFuzzyNumber(-4.8, -3 , -1.5), knot.n = 9)
y = as.PiecewiseLinearFuzzyNumber(TriangularFuzzyNumber(-5.5, -2.5, -1.1), knot.n = 9)
maxFN = maximum(x,y)
min = min(alphacut(x,0)[1],alphacut(y,0)[1])
max = max(alphacut(x,0)[2],alphacut(y,0)[2])
plot(x, col="red", xlim=c(min,max))
plot(y, col="blue", add=TRUE)
plot(maxFN, col="green", add=TRUE)

FuzzyNumbers

Tools to Deal with Fuzzy Numbers

v0.4-6
LGPL (>= 3)
Authors
Marek Gagolewski [aut, cre], Jan Caha [ctb]
Initial release
2019-02-05

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.