MCDA Toolkit is a lightweight .NET library designed to support Multi-Criteria Decision Analysis (MCDA) tasks. It helps developers and analysts define and solve decision-making problems, from simple comparisons to more structured evaluation models.
.NET 6 and .NET Standard 2.0 Support: making it suitable for modern applications as well as legacy or cross-platform projects.
Designed to be simple and straightforward — no unnecessary setup, no configuration files. You can define and run a decision model with just a few lines of code.
Make sure to read the docs
Here's a simple example to show how to prepare and structure your data for an MCDA calculation using the MCDA Toolkit.
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 },
};
They must be double values between 0 and 1, and must sum to 1
double[] weights = new double[]
{
0.4, 0.25, 0.35
};
Each criterion is marked as either a cost (-1) or a benefit (1).
int[] types = new int[]
{
-1, -1, 1
};
var data = DataBuilder
.Create()
.AddWeights(weights)
.AddDecisionCriteria(types)
.AddDecisionMatrix(matrix)
.Build();
var vikor = VikorBuilder
.Create()
.WithNormalizationMethod(NormalizationMethod.Vector)
.WithVParameter(0.5)
.Build();
var result = vikor.Run(data);
The result of the calculation is returned as an object of type Result<Ranking>, provided by the LightResults library. It encapsulates both the Ranking and information about whether the operation succeeded or failed.
Example returned success result
Ranking<double>()
{
RankingItems = List<RankingRow<double>>()
{
RankingRow<double>
{
Alternative = 1,
Rank = 6,
Score = 0.417
},
RankingRow<double>
{
Alternative = 2,
Rank = 2,
Score = 0.552
},
RankingRow<double>
{
Alternative = 3,
Rank = 4,
Score = 0.54
},
RankingRow<double>
{
Alternative = 4,
Rank = 3,
Score = 0.54
},
RankingRow<double>
{
Alternative = 5,
Rank = 5,
Score = 0.429
},
RankingRow<double>
{
Alternative = 6,
Rank = 1,
Score = 0.568
}
}
};