simulate
Run Monte Carlo simulations to quantify decision risk and receive a structured recommendation with expected value, probability of loss, and confidence percentiles.
Instructions
Run a Monte Carlo simulation and get a structured decision recommendation. Use for: quantifying risk in a decision, comparing expected outcomes, getting probability-weighted recommendations. Synchronous deterministic compute governed by the plan's per-minute rate limit and monthly quota (429 on excess); the run is recorded asynchronously and appears in list_runs. Returns the decision envelope: recommended_action, expected_value, probability_of_loss, confidence, percentiles, and run metadata (run_id, execution_ms, scenarios_run). Which to use: the full decision-envelope analysis on ONE scenario; use compare for named scenario bake-offs, recommend for a ranked pick among actions, score for a single weighted number, plan_decision for just the plan summary, or product_decision for plain-English inputs.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | auto = minimal setup; expert = full distribution control | auto |
| objective | No | Auto-mode objective. For expert mode, use objective_function. | maximize_net_value |
| variables | Yes | Input variables as triangular distributions (low, most-likely, high) | |
| n_simulations | No | Monte Carlo iteration count. Auto mode accepts 100–100,000; expert mode accepts 100–1,000,000. | |
| objective_function | No | Expert-mode expression, for example 'revenue - cost'. Required when mode='expert'. |