Decision OS uses a Weighted Sum Model (WSM) for multi-criteria decision analysis. This document specifies the exact formulas, rules, and examples.
| Symbol | Definition |
|---|---|
| Set of options |
|
| Set of criteria |
|
| Raw weight for criterion |
|
| Normalized weight for criterion |
|
| Raw score for option |
|
| Effective score (adjusted for criterion type) | |
| Total weighted score for option |
Raw weights can be any value 0–100. They are normalized to sum to 1.0:
Edge case: If all raw weights are 0, each normalized weight =
Edge case: Negative weights are treated as 0.
Each criterion has a type: benefit (higher is better) or cost (lower is better).
Scores are clamped to [0, 10] before the effective score is computed.
The maximum possible total score is 10.00 (if all effective scores are 10).
Options are sorted by
All displayed scores are rounded to 2 decimal places using JavaScript's Number.toFixed(2).
Decision: Which laptop to buy?
| Option | Price (cost, w=40) | Performance (benefit, w=35) | Portability (benefit, w=25) |
|---|---|---|---|
| MacBook Pro | 8 | 9 | 7 |
| ThinkPad X1 | 5 | 7 | 8 |
Total raw weight = 40 + 35 + 25 = 100
| Criterion | Raw Weight | Normalized |
|---|---|---|
| Price | 40 | 0.40 |
| Performance | 35 | 0.35 |
| Portability | 25 | 0.25 |
| Option | Price (cost: 10-s) | Performance | Portability |
|---|---|---|---|
| MacBook Pro | 10 - 8 = 2 | 9 | 7 |
| ThinkPad X1 | 10 - 5 = 5 | 7 | 8 |
MacBook Pro: (0.40 × 2) + (0.35 × 9) + (0.25 × 7) = 0.80 + 3.15 + 1.75 = 5.70
ThinkPad X1: (0.40 × 5) + (0.35 × 7) + (0.25 × 8) = 2.00 + 2.45 + 2.00 = 6.45
| Rank | Option | Score |
|---|---|---|
| 1 | ThinkPad X1 | 6.45 |
| 2 | MacBook Pro | 5.70 |
Winner: ThinkPad X1 — it scores higher primarily because of better value on Price (the highest-weighted criterion).
The weight-swing analysis tests robustness by adjusting each criterion's weight by ±N% and recomputing:
-
For each criterion
$c_i$ :- Compute
$w_i^{+} = w_i \times (1 + \text{swing}/100)$ - Compute
$w_i^{-} = \max(0, w_i \times (1 - \text{swing}/100))$ - Recompute results with modified weight
- Check if winner changes
- Compute
-
Report: "X out of Y swings change the winner"
A robust result means no reasonable weight adjustment flips the outcome.
The scoring engine is deterministic: identical inputs always produce identical outputs. There is no randomness, no floating-point-dependent branching, and all edge cases produce defined results. This is verified by unit tests.