Skip to content

Getting Started

Marcus Ackre Medina edited this page Sep 13, 2026 · 1 revision

Getting Started

Installation

dotnet add package MarcusMedina.Fluent.Decision

Targets net8.0.

Your first decision

using MarcusMedina.Fluent.Decision.Enums;
using MarcusMedina.Fluent.Decision.Extensions;

var decision = Decision.Create("Choose hosting platform")
    .WithCriterion("Performance", 0.4, NormalizationType.Linear)
    .WithCriterion("Cost", 0.3, NormalizationType.InverseLinear)
    .WithCriterion("Reliability", 0.3, NormalizationType.Linear)
    .WithOption("Option A")
        .WithScore("Performance", 8.5)
        .WithScore("Cost", 7.0)
        .WithScore("Reliability", 9.0)
    .WithOption("Option B")
        .WithScore("Performance", 8.0)
        .WithScore("Cost", 8.5)
        .WithScore("Reliability", 8.0)
    .BuildAndCompute();

var recommendation = decision.GetRecommendation();
Console.WriteLine($"{recommendation?.Name}: {recommendation?.TotalScore:F3}");

The core idea: each criterion gets a weight (how much it matters) and a normalization strategy (whether higher or lower raw scores are better). Each option gets a score per criterion. The library normalizes, weights, and aggregates those scores to rank the options.

Next steps

  • API Overview for the full fluent surface
  • Advanced Usage for aggregation strategies and sensitivity analysis
  • The demo project (csharp/samples/Decision.Demo.csproj in the repo) has six worked examples, including a runnable console app

Clone this wiki locally