You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Set weight_source="ahp" + an ahp_matrix (Saaty 1-9, (1+criteria) square,
ordered [financial, ...criteria]) to derive MCDA weights from pairwise
comparisons instead of entering them directly. The tool mirrors the add-in's
AhpCalculator (power-iteration eigenvector + Saaty consistency ratio) to show
the derived weights + CR in the preview, validates the matrix (square, sized,
positive), and forwards weightSource/ahpMatrix to MC_ApplyMcda_Auto, which
recomputes them authoritatively.
- schemas: McdaSpec.weight_source + ahp_matrix; McdaBuildResult.weight_source
+ weights + consistency_ratio (KeyValue moved above the MCDA models so the
forward ref resolves).
- tools: _ahp_weights + _validate_ahp_matrix helpers; build_mcda branches on
weight_source; 4 unit tests (consistent 3x3 -> [4/7,2/7,1/7], CR~0; commit
forwards the matrix; missing/bad-size raise). README + CHANGELOG.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: README.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,14 +4,14 @@
4
4
5
5
A sibling to [`modelrisk-mcp`](https://github.com/vosesoftware/modelrisk-mcp): where that server brings Monte Carlo risk modelling into a conversation, this one brings **decision analysis** — building, reading, rolling back, and analysing decision trees in Excel.
6
6
7
-
> **Status: `0.0.24` — Phase 3 (build + drive).** 22 tools: build_tree / build_mcda / edit_tree (incl. add/remove options & outcomes) / set_input_distribution (put a Vose distribution on an input) / build_control_panel / export_tree_json / import_tree_json / import_precisiontree, read + roll + verify, run_scenarios (what-if comparison), plus run_evpi / run_evii / run_risk_profile / run_robustness / run_sensitivity / run_decision_report (strategy/policy/brief/mcda/force-to-outcome/two-way) / run_analysis / read_sheet over ModelChoice's headless commands.
7
+
> **Status: `0.0.25` — Phase 3 (build + drive).** 22 tools: build_tree / build_mcda / edit_tree (incl. add/remove options & outcomes) / set_input_distribution (put a Vose distribution on an input) / build_control_panel / export_tree_json / import_tree_json / import_precisiontree, read + roll + verify, run_scenarios (what-if comparison), plus run_evpi / run_evii / run_risk_profile / run_robustness / run_sensitivity / run_decision_report (strategy/policy/brief/mcda/force-to-outcome/two-way) / run_analysis / read_sheet over ModelChoice's headless commands.
8
8
9
9
## Tools
10
10
11
11
| Tool | What it does |
12
12
|---|---|
13
13
|`build_tree`|**Build a tree from a structured description** and write it into Excel (dry-run by default). Validates + rolls it back so you confirm the recommendation before writing. The build-from-a-prompt path. |
14
-
|`build_mcda`|**Build a multi-criteria (MCDA) model** — for choices that aren't pure money. Give the tree + criteria (ordinal options, weights, direction), aggregation, and each terminal's option per criterion; the add-in computes the composite scores. Drives `MC_ApplyMcda_Auto`. |
14
+
|`build_mcda`|**Build a multi-criteria (MCDA) model** — for choices that aren't pure money. Give the tree + criteria (ordinal options, weights, direction), aggregation, and each terminal's option per criterion; the add-in computes the composite scores. Weights can be entered directly or derived from an **AHP pairwise-comparison matrix** (`weight_source="ahp"` → eigenvector weights + consistency ratio). Drives `MC_ApplyMcda_Auto`. |
15
15
|`edit_tree`|**Tweak an existing tree** — change probabilities, payoffs, labels, or the objective, **add or remove whole options/outcomes** (`add_option` / `add_branch` / `remove_branch`), then re-roll it (dry-run by default). The "tweak it by talking" path. |
16
16
|`set_input_distribution`|**Make a tree input uncertain** — put a ModelRisk `Vose*` distribution on a branch's cash flow or probability (like typing a distribution into the cell in the UI). The decision-tree half of a Monte Carlo: once inputs are distributions, run the simulation with **modelrisk-mcp** to get the tree's outcome distribution. Pure store-edit + re-render — no add-in command. |
17
17
|`build_control_panel`|**Lift the tree's inputs into a control panel** at the top of the sheet — every probability and cash flow as a labelled cell, with the tree linked back to it, so you drive the whole model from one input block. Drives `MC_BuildControlPanel_Auto`. |
@@ -58,7 +58,7 @@ The Python roller is validated against ModelChoice's own authoritative C# test (
58
58
The original phased roadmap is delivered. Candidate next steps (not yet scheduled):
59
59
60
60
-**Simulation hand-off (cross-server):** the `decision-tree-monte-carlo` prompt guides assigning distributions → wrapping the root EV as a ModelRisk output → running the simulation in `modelrisk-mcp` → reading the EV's output distribution back. A thin orchestration tool could automate the hand-off end-to-end.
61
-
-**AHP weight elicitation for MCDA:**`build_mcda` v1 takes direct weights; the add-in's Core already ships an `AhpCalculator` (pairwise comparisons → eigenvector weights + consistency ratio). A future `build_mcda` could accept a pairwise matrix instead (tracked in ADO).
61
+
-~~**AHP weight elicitation for MCDA**~~ — *done (0.0.25, AB#2646):*`build_mcda` accepts a pairwise-comparison matrix (`weight_source="ahp"`) and derives the weights + consistency ratio via the add-in's `AhpCalculator`.
0 commit comments