# Define the dataset
dataset <- matrix(c(
180, 165, 160, 170, 185, 167, # Criterion 1
10.5, 9.2, 8.8, 9.5, 10, 8.9, # Criterion 2
15.5, 16.5, 14, 16, 14.5, 15.1, # Criterion 3
160, 131, 125, 135, 143, 140, # Criterion 4
3.7, 5, 4.5, 3.4, 4.3, 4.1 # Criterion 5
), nrow = 6, ncol = 5)
# Set the names of alternatives
rownames(dataset) <- c("A1", "A2", "A3", "A4", "A5", "A6")
# Define the weights and criterion types
weights <- c(0.35, 0.25, 0.15, 0.15, 0.10)
criterion_type <- c('max', 'max', 'min', 'min', 'max')
# Specify ideal and anti-ideal values
ideal <- c(200, 12, 10, 100, 8)
anti_ideal <- c(120, 6, 20, 200, 2)
# Set n_i and n_k values
n_i <- 1
n_k <- 6
# Apply the RAFSI method
result <- rafsi_method(dataset, weights, criterion_type, ideal, anti_ideal, n_i, n_k)
# View the result
print(result)
Run the code above in your browser using DataLab