GFLP: Solves a maximization (minimization) problem having fuzzy...

Description Usage Arguments Value References Examples

View source: R/GenFuz.R

Description

The goal is to solve a linear programming problem having Trapezoidal Fuzzy Numbers as coefficients in the constraints, the objective function and/or the technological matrix.

Max f(x) or Min f(x)

s.t.: Ax<=b+(1-β)*t

This function uses different ordering functions for the objective function and for the constraints.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
GFLP(
  objective,
  A,
  dir,
  b,
  t,
  maximum = TRUE,
  ordf_obj = c("Yager1", "Yager3", "Adamo", "Average"),
  ordf_obj_param = NULL,
  ordf_res = c("Yager1", "Yager3", "Adamo", "Average"),
  ordf_res_param = NULL,
  min = 0,
  max = 1,
  step = 0.25
)

Arguments

objective

A vector (c1, c2, ..., cn) of Trapezoidal Fuzzy Numbers with the objective function coefficients f(x)=c1*x1+…+cn*xn. Note that any of the coefficients may also be Real Numbers.

A

Technological matrix containing Trapezoidal Fuzzy Numbers and/or Real Numbers.

dir

Vector of strings with the direction of the inequalities, of the same length as b and t. Each element of the vector must be one of "=", ">=", "<=", "<" or ">".

b

Vector with the right hand side of the constraints. b may contain Trapezoidal Fuzzy Numbers and/or Real Numbers.

t

Vector with the tolerance of each constraint. t may contain Trapezoidal Fuzzy Numbers and/or Real Numbers.

maximum

TRUE to maximize the objective function, FALSE to minimize the objective function.

ordf_obj

Ordering function to be used in the objective function, ordf_obj must be one of "Yager1", "Yager3", "Adamo" or "Average".

ordf_obj_param

Parameters need by ordf_obj function, if it needs more than one parameter, use a named vector. See FOLP.ordFun for more information about the ordering functions parameters.

ordf_res

Ordering function to be used in the constraints, ordf_res must be one of "Yager1", "Yager3", "Adamo" or "Average".

ordf_res_param

Parameters need by ordf_res function, if it needs more than one parameter, use a named vector. See FOLP.ordFun for more information about the ordering functions parameters.

min

The lower bound of the interval to take the sample.

max

The upper bound of the interval to take the sample.

step

The sampling step.

Value

GFLP returns the solutions for the sampled β's if the solver has found them. If the solver hasn't found solutions for any of the β's sampled, return NULL.

References

Gonzalez, A. A studing of the ranking function approach through mean values. Fuzzy Sets and Systems, 35:29-41, 1990.

Cadenas, J.M. and Verdegay, J.L. Using Fuzzy Numbers in Linear Programming. IEEE Transactions on Systems, Man, and Cybernetics-Part B: Cybernetics, vol. 27, No. 6, December 1997.

Tanaka, H., Ichihashi, H. and Asai, F. A formulation of fuzzy linear programming problems based a comparison of fuzzy numbers. Control and Cybernetics, 13:185-194, 1984.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
## maximize:   [1,3,4,5]*x1 + x2
## s.t.:         [0,2,3,3.5]*x1 +   [0,1,1,4]*x2 <= [2,2,2,3] + (1-beta)*[1,2,2,3]
##               [3,5,5,6]*x1   + [1.5,2,2,3]*x2 <= 12
##               x1, x2 are non-negative real numbers

obj <- c(FuzzyNumbers::TrapezoidalFuzzyNumber(1,3,4,5), 1)

a11 <- FuzzyNumbers::TrapezoidalFuzzyNumber(0,2,2,3.5)
a21 <- FuzzyNumbers::TrapezoidalFuzzyNumber(3,5,5,6)
a12 <- -FuzzyNumbers::TrapezoidalFuzzyNumber(0,1,1,4)
a22 <- FuzzyNumbers::TrapezoidalFuzzyNumber(1.5,2,2,3)
A <- matrix(c(a11, a21, a12, a22), nrow = 2)

dir <- c("<=", "<=")
b<-c(FuzzyNumbers::TrapezoidalFuzzyNumber(2,2,2,3), 12)
t<-c(FuzzyNumbers::TrapezoidalFuzzyNumber(1,2,2,3),0);
max <- TRUE

GFLP(obj, A, dir, b, t, maximum = max, ordf_obj="Yager1", ordf_res="Yager3")
GFLP(obj, A, dir, b, t, maximum = max, ordf_obj="Adamo", ordf_obj_param=0.5, ordf_res="Yager3")
GFLP(obj, A, dir, b, t, maximum = max, "Average", ordf_obj_param=c(t=3, lambda=0.5), 
ordf_res="Adamo", ordf_res_param = 0.5)
GFLP(obj, A, dir, b, t, maximum = max, ordf_obj="Average", ordf_obj_param=c(t=3, lambda=0.8), 
ordf_res="Yager3", min = 0, max = 1, step = 0.2)

Example output

     beta x1       x2        objective
[1,] 0    2.433193 0.2081575 ?        
[2,] 0.25 2.337553 0.4219409 ?        
[3,] 0.5  2.241913 0.6357243 ?        
[4,] 0.75 2.146273 0.8495077 ?        
[5,] 1    2.050633 1.063291  ?        
     beta x1       x2        objective
[1,] 0    2.433193 0.2081575 ?        
[2,] 0.25 2.337553 0.4219409 ?        
[3,] 0.5  2.241913 0.6357243 ?        
[4,] 0.75 2.146273 0.8495077 ?        
[5,] 1    2.050633 1.063291  ?        
     beta x1       x2        objective
[1,] 0    1.922078 0.5714286 ?        
[2,] 0.25 1.75974  0.9285714 ?        
[3,] 0.5  1.597403 1.285714  ?        
[4,] 0.75 1.435065 1.642857  ?        
[5,] 1    1.272727 2         ?        
     beta x1       x2        objective
[1,] 0    2.433193 0.2081575 ?        
[2,] 0.2  2.356681 0.3791842 ?        
[3,] 0.4  2.280169 0.550211  ?        
[4,] 0.6  2.203657 0.7212377 ?        
[5,] 0.8  2.127145 0.8922644 ?        
[6,] 1    2.050633 1.063291  ?        

FuzzyLP documentation built on April 11, 2021, 5:06 p.m.

Related to GFLP in FuzzyLP...