FuzzyNumbers (version 0.4-6)

maximum: Maximum of fuzzy nubmers

Description

Determines maximum fuzzy number based on two inputs.

Usage

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

Arguments

e1

a PiecewiseLinearFuzzyNumber

e2

a PiecewiseLinearFuzzyNumber

Value

Returns a PiecewiseLinearFuzzyNumber representing maximal value of the inputs.

Details

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

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

Other PiecewiseLinearFuzzyNumber-method: Arithmetic, PiecewiseLinearFuzzyNumber-class, PiecewiseLinearFuzzyNumber, ^,PiecewiseLinearFuzzyNumber,numeric-method, alphaInterval, arctan2, as.PiecewiseLinearFuzzyNumber, as.PowerFuzzyNumber, as.TrapezoidalFuzzyNumber, as.character, expectedInterval, fapply, minimum, necessityExceedance, necessityStrictExceedance, necessityStrictUndervaluation, necessityUndervaluation, plot, possibilityExceedance, possibilityStrictExceedance, possibilityStrictUndervaluation, possibilityUndervaluation

Examples

Run this code
# NOT RUN {
# 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)
# }

Run the code above in your browser using DataCamp Workspace