removedInput schema / $defs
Removed value: -{
- "AggregationRequest": {
- "additionalProperties": false,
- "description": "A financial metric over one node's whole series (npv, irr, cumsum, prob and others). See run_monte_carlo_simulation for full details and recipes.",
- "properties": {
- "function": {
- "description": "npv, irr, mirr, payback, discounted_payback, cagr, cumsum, terminal_value or prob.",
- "type": "string"
- },
- "id": {
- "description": "Name for this metric in the result. Must be unique.",
- "type": "string"
- },
- "params": {
- "additionalProperties": true,
- "description": "The metric's settings, for example {\"rate\": 0.1} for npv. The rate is per period, so monthly periods need a monthly rate.",
- "type": "object"
- },
- "target_aggregation_id": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "For prob only: id of an earlier metric to test."
- },
- "target_node_id": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "Node the metric reads."
- }
- },
- "required": [
- "id",
- "function"
- ],
- "type": "object"
- },
- "CalcNode": {
- "additionalProperties": false,
- "description": "A formula node. See run_monte_carlo_simulation for the formula language.",
- "properties": {
- "formula": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "Expression over incoming edge ids, for example '{e1} * {e2}'. See run_monte_carlo_simulation for full syntax."
- },
- "id": {
- "description": "Unique id for this node within the model.",
- "type": "string"
- },
- "name": {
- "default": "",
- "description": "Readable label.",
- "type": "string"
- }
- },
- "required": [
- "id"
- ],
- "type": "object"
- },
- "Edge": {
- "additionalProperties": false,
- "description": "A link that carries a value from one node (source) to another (target).",
- "properties": {
- "delay": {
- "default": 0,
- "description": "How many periods later the value arrives. Default 0. A loop of edges, including an edge from a node to itself, is allowed only when at least one edge in it has delay 1 or more; that is how a running total carries last period's value forward.",
- "minimum": 0,
- "type": "integer"
- },
- "id": {
- "description": "Unique id for this edge. Formulas refer to it in braces, like {e1}.",
- "type": "string"
- },
- "name": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "Optional readable label."
- },
- "source": {
- "description": "Id of the node the value comes from.",
- "type": "string"
- },
- "target": {
- "description": "Id of the node the value goes to.",
- "type": "string"
- }
- },
- "required": [
- "id",
- "source",
- "target"
- ],
- "type": "object"
- },
- "OutputRequest": {
- "additionalProperties": false,
- "description": "Result filter and financial metrics. See run_monte_carlo_simulation for full details.",
- "properties": {
- "aggregations": {
- "description": "Financial metrics such as npv, irr, cumsum or prob.",
- "items": {
- "$ref": "#/$defs/AggregationRequest"
- },
- "type": "array"
- },
- "edges": {
- "description": "Edge ids to include. Empty means all edges.",
- "items": {
- "type": "string"
- },
- "type": "array"
- },
- "nodes": {
- "description": "Node ids to include. Empty means all nodes.",
- "items": {
- "type": "string"
- },
- "type": "array"
- },
- "time_periods": {
- "description": "Period indices to include, counting from 0. Empty means all.",
- "items": {
- "type": "integer"
- },
- "type": "array"
- }
- },
- "type": "object"
- },
- "PublicGraph": {
- "additionalProperties": false,
- "description": "A complete model. See run_monte_carlo_simulation for full details.",
- "properties": {
- "calc_nodes": {
- "description": "The formula nodes that combine values.",
- "items": {
- "$ref": "#/$defs/CalcNode"
- },
- "type": "array"
- },
- "contract_version": {
- "const": "1.0",
- "default": "1.0",
- "description": "Version of the model format. Always \"1.0\"; you can leave it out.",
- "type": "string"
- },
- "edges": {
- "description": "The links between nodes.",
- "items": {
- "$ref": "#/$defs/Edge"
- },
- "type": "array"
- },
- "root_nodes": {
- "description": "The uncertain inputs.",
- "items": {
- "$ref": "#/$defs/RootNode"
- },
- "type": "array"
- },
- "run_params": {
- "$ref": "#/$defs/RunParams"
- }
- },
- "required": [
- "run_params"
- ],
- "type": "object"
- },
- "RootNode": {
- "additionalProperties": false,
- "description": "An uncertain input that draws from a distribution each trial. See run_monte_carlo_simulation for full details.",
- "oneOf": [
- {
- "description": "A constant value that never changes",
- "properties": {
- "distribution_params": {
- "properties": {
- "value": {
- "type": "number"
- }
- },
- "required": [
- "value"
- ],
- "type": "object"
- },
- "distribution_type": {
- "const": "constant"
- }
- },
- "required": [
- "distribution_type",
- "distribution_params"
- ]
- },
- {
- "description": "Normal (Gaussian) distribution",
- "properties": {
- "distribution_params": {
- "properties": {
- "mean": {
- "type": "number"
- },
- "std": {
- "type": "number"
- }
- },
- "required": [
- "mean",
- "std"
- ],
- "type": "object"
- },
- "distribution_type": {
- "const": "normal"
- }
- },
- "required": [
- "distribution_type",
- "distribution_params"
- ]
- },
- {
- "description": "Uniform distribution between low and high values",
- "properties": {
- "distribution_params": {
- "properties": {
- "high": {
- "type": "number"
- },
- "low": {
- "type": "number"
- }
- },
- "required": [
- "low",
- "high"
- ],
- "type": "object"
- },
- "distribution_type": {
- "const": "uniform"
- }
- },
- "required": [
- "distribution_type",
- "distribution_params"
- ]
- },
- {
- "description": "Beta distribution for modeling probabilities and proportions",
- "properties": {
- "distribution_params": {
- "properties": {
- "alpha": {
- "type": "number"
- },
- "beta": {
- "type": "number"
- }
- },
- "required": [
- "alpha",
- "beta"
- ],
- "type": "object"
- },
- "distribution_type": {
- "const": "beta"
- }
- },
- "required": [
- "distribution_type",
- "distribution_params"
- ]
- },
- {
- "description": "Gamma distribution for modeling waiting times",
- "properties": {
- "distribution_params": {
- "properties": {
- "scale": {
- "type": "number"
- },
- "shape": {
- "type": "number"
- }
- },
- "required": [
- "shape",
- "scale"
- ],
- "type": "object"
- },
- "distribution_type": {
- "const": "gamma"
- }
- },
- "required": [
- "distribution_type",
- "distribution_params"
- ]
- },
- {
- "description": "Exponential distribution with scale parameter",
- "properties": {
- "distribution_params": {
- "properties": {
- "scale": {
- "type": "number"
- }
- },
- "required": [
- "scale"
- ],
- "type": "object"
- },
- "distribution_type": {
- "const": "exponential"
- }
- },
- "required": [
- "distribution_type",
- "distribution_params"
- ]
- },
- {
- "description": "Poisson distribution for modeling count data",
- "properties": {
- "distribution_params": {
- "properties": {
- "lambda_val": {
- "type": "number"
- }
- },
- "required": [
- "lambda_val"
- ],
- "type": "object"
- },
- "distribution_type": {
- "const": "poisson"
- }
- },
- "required": [
- "distribution_type",
- "distribution_params"
- ]
- },
- {
- "description": "Bernoulli distribution for binary outcomes",
- "properties": {
- "distribution_params": {
- "properties": {
- "p": {
- "type": "number"
- }
- },
- "required": [
- "p"
- ],
- "type": "object"
- },
- "distribution_type": {
- "const": "bernoulli"
- }
- },
- "required": [
- "distribution_type",
- "distribution_params"
- ]
- },
- {
- "description": "Triangle distribution with minimum, maximum, and mode parameters",
- "properties": {
- "distribution_params": {
- "properties": {
- "max_val": {
- "type": "number"
- },
- "min_val": {
- "type": "number"
- },
- "mode_val": {
- "type": "number"
- }
- },
- "required": [
- "min_val",
- "max_val",
- "mode_val"
- ],
- "type": "object"
- },
- "distribution_type": {
- "const": "triangle"
- }
- },
- "required": [
- "distribution_type",
- "distribution_params"
- ]
- },
- {
- "description": "Log-normal distribution for modeling skewed, positive-valued data",
- "properties": {
- "distribution_params": {
- "properties": {
- "mu": {
- "type": "number"
- },
- "sigma": {
- "type": "number"
- }
- },
- "required": [
- "mu",
- "sigma"
- ],
- "type": "object"
- },
- "distribution_type": {
- "const": "log_normal"
- }
- },
- "required": [
- "distribution_type",
- "distribution_params"
- ]
- },
- {
- "description": "Discrete log-normal: sample log-normal then round to nearest integer (zero allowed)",
- "properties": {
- "distribution_params": {
- "properties": {
- "mu": {
- "type": "number"
- },
- "sigma": {
- "type": "number"
- }
- },
- "required": [
- "mu",
- "sigma"
- ],
- "type": "object"
- },
- "distribution_type": {
- "const": "discrete_lognormal"
- }
- },
- "required": [
- "distribution_type",
- "distribution_params"
- ]
- },
- {
- "description": "Categorical distribution for discrete outcomes with custom probabilities",
- "properties": {
- "distribution_params": {
- "properties": {
- "probabilities": {
- "items": {
- "type": "number"
- },
- "type": "array"
- },
- "values": {
- "items": {
- "type": "number"
- },
- "type": "array"
- }
- },
- "required": [
- "values",
- "probabilities"
- ],
- "type": "object"
- },
- "distribution_type": {
- "const": "categorical"
- }
- },
- "required": [
- "distribution_type",
- "distribution_params"
- ]
- },
- {
- "description": "Discrete gamma: sample gamma then round to nearest integer (zero allowed)",
- "properties": {
- "distribution_params": {
- "properties": {
- "scale": {
- "type": "number"
- },
- "shape": {
- "type": "number"
- }
- },
- "required": [
- "shape",
- "scale"
- ],
- "type": "object"
- },
- "distribution_type": {
- "const": "discrete_gamma"
- }
- },
- "required": [
- "distribution_type",
- "distribution_params"
- ]
- },
- {
- "description": "Binomial distribution: the number of successes in n independent attempts",
- "properties": {
- "distribution_params": {
- "properties": {
- "n": {
- "type": "integer"
- },
- "p": {
- "type": "number"
- }
- },
- "required": [
- "n",
- "p"
- ],
- "type": "object"
- },
- "distribution_type": {
- "const": "binomial"
- }
- },
- "required": [
- "distribution_type",
- "distribution_params"
- ]
- },
- {
- "description": "Dirichlet distribution for modeling correlated probabilities that sum to 1",
- "properties": {
- "distribution_params": {
- "properties": {
- "alpha": {
- "items": {
- "type": "number"
- },
- "type": "array"
- }
- },
- "required": [
- "alpha"
- ],
- "type": "object"
- },
- "distribution_type": {
- "const": "dirichlet"
- }
- },
- "required": [
- "distribution_type",
- "distribution_params"
- ]
- },
- {
- "description": "A fixed list of values that never changes",
- "properties": {
- "distribution_params": {
- "properties": {
- "values": {
- "items": {
- "type": "number"
- },
- "type": "array"
- }
- },
- "required": [
- "values"
- ],
- "type": "object"
- },
- "distribution_type": {
- "const": "constant_array"
- }
- },
- "required": [
- "distribution_type",
- "distribution_params"
- ]
- },
- {
- "description": "Discrete normal distribution for integer-valued data with normal characteristics",
- "properties": {
- "distribution_params": {
- "properties": {
- "mean": {
- "type": "number"
- },
- "std": {
- "type": "number"
- }
- },
- "required": [
- "mean",
- "std"
- ],
- "type": "object"
- },
- "distribution_type": {
- "const": "discrete_normal"
- }
- },
- "required": [
- "distribution_type",
- "distribution_params"
- ]
- },
- {
- "description": "Multivariate normal (correlated inputs): draws a vector of correlated values per trial from a mean vector + correlation matrix + per-component standard deviations. Array-valued — feed multiple downstream calc nodes by INDEXing component k (1-based): INDEX({edge}, k).",
- "properties": {
- "distribution_params": {
- "properties": {
- "correlation": {
- "items": {
- "items": {
- "type": "number"
- },
- "type": "array"
- },
- "type": "array"
- },
- "mean": {
- "items": {
- "type": "number"
- },
- "type": "array"
- },
- "stds": {
- "items": {
- "type": "number"
- },
- "type": "array"
- }
- },
- "required": [
- "mean",
- "stds",
- "correlation"
- ],
- "type": "object"
- },
- "distribution_type": {
- "const": "multivariate_normal"
- }
- },
- "required": [
- "distribution_type",
- "distribution_params"
- ]
- }
- ],
- "properties": {
- "delay": {
- "default": 0,
- "description": "How many periods to wait before the first draw. Default 0.",
- "minimum": 0,
- "type": "integer"
- },
- "distribution_params": {
- "additionalProperties": true,
- "description": "Parameters for distribution_type, as listed in this schema's oneOf.",
- "type": "object"
- },
- "distribution_type": {
- "description": "Distribution name; allowed types and their parameters are in this schema's oneOf. See run_monte_carlo_simulation for which to pick.",
- "type": "string"
- },
- "id": {
- "description": "Unique id for this node within the model.",
- "type": "string"
- },
- "interval": {
- "default": 1,
- "description": "Draw a new value every N periods; in the periods between, this input is 0 (the value is not carried forward). 1 (the default) means every period. 0 means draw once, in the first period after any delay, and 0 afterwards. To keep one value in every period, use sampling_frequency once instead.",
- "minimum": 0,
- "type": "integer"
- },
- "name": {
- "default": "",
- "description": "Readable label.",
- "type": "string"
- },
- "sampling_frequency": {
- "default": "per_period",
- "description": "per_period (the default) draws a new value each period. once draws one value per trial and reuses it in every period.",
- "enum": [
- "per_period",
- "once"
- ],
- "type": "string"
- }
- },
- "required": [
- "id",
- "distribution_type",
- "distribution_params"
- ],
- "type": "object"
- },
- "RunParams": {
- "additionalProperties": false,
- "description": "How to run the model.",
- "properties": {
- "output_request": {
- "$ref": "#/$defs/OutputRequest",
- "description": "Optional result filter and financial metrics. See run_monte_carlo_simulation."
- },
- "time_periods": {
- "description": "Number of time periods (a count).",
- "exclusiveMinimum": 0,
- "type": "integer"
- },
- "trials": {
- "description": "Number of trials (random samples).",
- "exclusiveMinimum": 0,
- "type": "integer"
- }
- },
- "required": [
- "trials",
- "time_periods"
- ],
- "type": "object"
- }
-}