Skip to main content

Quick example

1️⃣ Define the Decision Matrix

Each row represents an alternative, and each column corresponds to a criterion.

double[,] matrix = new double[,]
{
{ 66, 56, 95 },
{ 61, 55, 166 },
{ 65, 49, 113 },
{ 95, 56, 99 },
{ 63, 43, 178 },
{ 74, 59, 140 },
};

2️⃣ Prepare Weights

They must be double values between 0 and 1, and must sum to 1

double[] weights = new double[]
{
0.4, 0.25, 0.35
};

3️⃣ Define Criteria Types

Each criterion is marked as either a cost (-1) or a benefit (1).

int[] types = new int[]
{
-1, -1, 1
};

4️⃣ Build the Data Object

var data = new DataProviderBuilder()
.AddWeights(weights)
.AddDecisionCriteria(types)
.AddDecisionMatrix(matrix)
.Build();

5️⃣ Create MCDA method

var vikor = MethodFactory
.CreateVikor(new VikorOptions())

6️⃣ Run

var result = vikor.Run(data);