build_model_from_brief
Convert a deterministic workbook into a Monte Carlo model in one atomic pass. Wraps outputs with VoseOutput and replaces uncertain inputs with distributions from a brief, with validation and rollback.
Instructions
ModelRisk: Turn a deterministic workbook into a simulation-ready Monte Carlo model in one atomic, reversible pass. Given the output cells to track and the uncertain inputs to add (each with a Vose distribution family + parameters you choose from the brief), it wraps the outputs with VoseOutput, replaces the input cells with VoseInput-wrapped distributions, optionally runs a validating simulation, and returns the headline percentiles. Every write goes through the audit-logged safe-write path and is tracked in a change-set: if any step fails, the ENTIRE build is rolled back so the workbook is never left half-converted. Defaults to dry_run=True. This end-to-end build+simulate is exactly what an advisory agent cannot do.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| run | No | Run a validating simulation after building. Default True. | |
| seed | No | ||
| sheet | Yes | Sheet holding the cells. | |
| inputs | Yes | Uncertain inputs to create, each: {'cell': 'B4', 'input_name': 'Demand', 'function_name': 'VoseModPERT', 'parameters': [{'value': 100}, {'value': 150}, {'value': 250}]}. | |
| dry_run | No | Preview the planned build without writing. Default True. | |
| outputs | No | Output cells to wrap: [{'cell': 'B12', 'output_name': 'NPV'}]. Omit if outputs are already wrapped. | |
| samples | No | ||
| workbook | Yes | Workbook file name. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | Yes | ||
| steps | Yes | Ordered, human-readable log of the build. | |
| dry_run | Yes | ||
| headline | No | Per-output headline stats (mean/P10/P50/P90) from the validating run. | |
| workbook | Yes | ||
| simulated | No | ||
| correlated | No | ||
| rolled_back | No | ||
| inputs_built | No | ||
| change_set_size | Yes | Number of cells written (0 if dry_run). | |
| outputs_wrapped | No |