McdaToolkit 4.0.1-rc3

This is a prerelease version of McdaToolkit.
There is a newer version of this package available.
See the version list below for details.
dotnet add package McdaToolkit --version 4.0.1-rc3
                    
NuGet\Install-Package McdaToolkit -Version 4.0.1-rc3
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="McdaToolkit" Version="4.0.1-rc3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="McdaToolkit" Version="4.0.1-rc3" />
                    
Directory.Packages.props
<PackageReference Include="McdaToolkit" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add McdaToolkit --version 4.0.1-rc3
                    
#r "nuget: McdaToolkit, 4.0.1-rc3"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package McdaToolkit@4.0.1-rc3
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=McdaToolkit&version=4.0.1-rc3&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=McdaToolkit&version=4.0.1-rc3&prerelease
                    
Install as a Cake Tool

MCDA Toolkit

alternate text is missing from this package README image alternate text is missing from this package README image License

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.

🚀 Key Features

.NET 6 and .NET Standard 2.0 Support Compatible with both .NET 6 and .NET Standard 2.0, making it suitable for modern applications as well as legacy or cross-platform projects.

⚡ Easy to Use

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.

Documentation

<<<<<<< HEAD <<<<<<< HEAD Make sure to read the docs

Make sure to read the docs

c9396c4 (fix(README.md): updated docs path) ======= Make sure to read the docs 99d5ee3 (fix(README.MD): remove /docs/ part from docs path)

Dependencies

Quick Example

Here's a simple example to show how to prepare and structure your data for an MCDA calculation using the MCDA Toolkit.

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 = DataBuilder
    .Create()
    .AddWeights(weights)
    .AddDecisionCriteria(types)
    .AddDecisionMatrix(matrix)
    .Build();                    

5️⃣ Create MCDA method

var vikor = VikorBuilder
    .Create()
    .WithNormalizationMethod(NormalizationMethod.Vector)
    .WithVParameter(0.5)
    .Build();

6️⃣ Run

var result = vikor.Run(data);

Outcome

The result of the calculation is returned as an object of type Result<Ranking<T>>, provided by the LightResults library. It encapsulates both the Ranking<T> and information about whether the operation succeeded or failed.

Example returned success result:

This approach follows the principles of Railway Oriented Programming, a functional programming pattern that models the flow of data along two possible tracks — one for success and one for failure.

More about Result type can be readed on official LightResult documentation

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
        }
    }
};
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.1.0 113 7/20/2025
4.0.1-rc3 113 7/19/2025
4.0.0-rc2 91 7/12/2025
4.0.0-rc1 145 5/7/2025
3.0.1 121 2/13/2025
3.0.0 124 12/14/2024
3.0.0-rc1 93 11/21/2024
2.2.0 140 8/15/2024
2.1.0 142 6/16/2024
2.0.1 126 6/12/2024
1.0.1 117 6/9/2024

RC3 hotfix