funman.scenario package¶
Submodules¶
funman.scenario.consistency module¶
This submodule defines a consistency scenario. Consistency scenarios specify an existentially quantified model. If consistent, the solution assigns any unassigned variable, subject to their bounds and other constraints.
- pydantic model funman.scenario.consistency.ConsistencyScenario¶
Bases:
AnalysisScenario
,BaseModel
The ConsistencyScenario class is an Analysis Scenario that analyzes a Model to find assignments to all variables, if consistent.
- Parameters:
model (FunmanModel) – model to check
query (Query) – model query
smt_encoder (Encoder, optional) – method to encode the scenario, by default None
Show JSON schema
{ "title": "ConsistencyScenario", "description": "The ConsistencyScenario class is an Analysis Scenario that analyzes a Model to find assignments to all variables, if consistent.\n\nParameters\n----------\nmodel : FunmanModel\n model to check\nquery : Query\n model query\nsmt_encoder : Encoder, optional\n method to encode the scenario, by default None", "type": "object", "properties": { "parameters": { "items": { "anyOf": [ { "$ref": "#/$defs/funman__model__generated_models__petrinet__Parameter" }, { "$ref": "#/$defs/ModelParameter" }, { "$ref": "#/$defs/StructureParameter" } ] }, "title": "Parameters", "type": "array" }, "normalization_constant": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Normalization Constant" }, "constraints": { "anyOf": [ { "items": { "anyOf": [ { "$ref": "#/$defs/StateVariableConstraint" }, { "$ref": "#/$defs/LinearConstraint" } ] }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Constraints" }, "empty_volume_ok": { "default": true, "title": "Empty Volume Ok", "type": "boolean" }, "model": { "anyOf": [ { "$ref": "#/$defs/GeneratedPetriNetModel" }, { "$ref": "#/$defs/GeneratedRegnetModel" }, { "$ref": "#/$defs/RegnetModel" }, { "$ref": "#/$defs/PetrinetModel" }, { "$ref": "#/$defs/DecapodeModel" }, { "$ref": "#/$defs/BilayerModel" }, { "$ref": "#/$defs/EncodedModel" }, { "$ref": "#/$defs/EnsembleModel" } ], "title": "Model" }, "query": { "anyOf": [ { "$ref": "#/$defs/QueryAnd" }, { "$ref": "#/$defs/QueryGE" }, { "$ref": "#/$defs/QueryLE" }, { "$ref": "#/$defs/QueryEncoded" }, { "$ref": "#/$defs/QueryFunction" }, { "$ref": "#/$defs/QueryTrue" } ], "default": { "model": null }, "title": "Query" } }, "$defs": { "BaseProperties": { "properties": { "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Name" }, "grounding": { "anyOf": [ { "$ref": "#/$defs/funman__model__generated_models__regnet__Grounding" }, { "type": "null" } ], "default": null }, "rate_constant": { "anyOf": [ { "$ref": "#/$defs/ParamOrNumber" }, { "type": "null" } ], "default": null } }, "title": "BaseProperties", "type": "object" }, "BilayerDynamics": { "description": "The BilayerDynamics class represents a state update (dynamics) model for a set of variables. The graph consists of:\n\n* state nodes (current state),\n\n* tangent nodes (next state), and\n\n* flux nodes (causal relationships).", "properties": { "json_graph": { "title": "Json Graph", "type": "object" } }, "required": [ "json_graph" ], "title": "BilayerDynamics", "type": "object" }, "BilayerEdge": { "properties": { "src": { "$ref": "#/$defs/BilayerNode" }, "tgt": { "$ref": "#/$defs/BilayerNode" } }, "required": [ "src", "tgt" ], "title": "BilayerEdge", "type": "object" }, "BilayerFluxNode": { "description": "BilayerNode representing a flux.", "properties": { "index": { "title": "Index", "type": "integer" }, "parameter": { "title": "Parameter", "type": "string" }, "metadata": { "anyOf": [ { "$ref": "#/$defs/BilayerMetadata" }, { "type": "null" } ], "default": null } }, "required": [ "index", "parameter" ], "title": "BilayerFluxNode", "type": "object" }, "BilayerMeasurement": { "description": "The BilayerMeasurement class represents measurements taken on the BilayerNode state nodes of a BilayerDynamics object. The graph consists of:\n\n* state nodes (current state),\n\n* observation nodes, and\n\n* flux nodes (causal relationships).", "properties": { "json_graph": { "title": "Json Graph", "type": "object" }, "state": { "additionalProperties": { "$ref": "#/$defs/BilayerStateNode" }, "default": {}, "title": "State", "type": "object" }, "flux": { "additionalProperties": { "$ref": "#/$defs/BilayerFluxNode" }, "default": {}, "title": "Flux", "type": "object" }, "observable": { "additionalProperties": { "$ref": "#/$defs/BilayerStateNode" }, "default": {}, "title": "Observable", "type": "object" }, "input_edges": { "$ref": "#/$defs/BilayerEdge", "default": [] }, "output_edges": { "$ref": "#/$defs/BilayerEdge", "default": [] } }, "required": [ "json_graph" ], "title": "BilayerMeasurement", "type": "object" }, "BilayerMetadata": { "description": "Metadata for a BilayerNode", "properties": { "ref": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Ref" }, "type": { "anyOf": [ { "enum": [ "float", "int" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "Type" }, "initial_value": { "anyOf": [ { "type": "number" }, { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Initial Value" }, "lb": { "anyOf": [ { "type": "number" }, { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Lb" }, "ub": { "anyOf": [ { "type": "number" }, { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Ub" } }, "title": "BilayerMetadata", "type": "object" }, "BilayerModel": { "description": "A BilayerModel is a complete specification of a Model that uses a BilayerDynamics graph to represent dynamics. It includes the attributes:\n\n* bilayer: the BilayerDynamics graph\n\n* measurements: the BilayerMeasurement graph (used to derive additional variables from the state nodes)\n\n* init_values: a dict mapping from state variables and flux parameters to initial value\n\n* identical_parameters: a list of lists of flux parameters that have identical values\n\n* parameter_bounds: a list of lower and upper bounds on parameters", "properties": { "name": { "default": "model_a6f04917-34c0-45e0-a42c-128947736090", "title": "Name", "type": "string" }, "init_values": { "additionalProperties": { "type": "number" }, "default": {}, "title": "Init Values", "type": "object" }, "parameter_bounds": { "additionalProperties": { "items": { "type": "number" }, "type": "array" }, "default": {}, "title": "Parameter Bounds", "type": "object" }, "bilayer": { "$ref": "#/$defs/BilayerDynamics" }, "measurements": { "$ref": "#/$defs/BilayerMeasurement", "default": null }, "identical_parameters": { "default": [], "items": { "items": { "type": "string" }, "type": "array" }, "title": "Identical Parameters", "type": "array" } }, "required": [ "bilayer" ], "title": "BilayerModel", "type": "object" }, "BilayerNode": { "description": "Node in a BilayerGraph.", "properties": { "index": { "title": "Index", "type": "integer" }, "parameter": { "title": "Parameter", "type": "string" }, "metadata": { "anyOf": [ { "$ref": "#/$defs/BilayerMetadata" }, { "type": "null" } ], "default": null } }, "required": [ "index", "parameter" ], "title": "BilayerNode", "type": "object" }, "BilayerStateNode": { "description": "BilayerNode representing a state variable.", "properties": { "index": { "title": "Index", "type": "integer" }, "parameter": { "title": "Parameter", "type": "string" }, "metadata": { "anyOf": [ { "$ref": "#/$defs/BilayerMetadata" }, { "type": "null" } ], "default": null } }, "required": [ "index", "parameter" ], "title": "BilayerStateNode", "type": "object" }, "DecapodeDynamics": { "properties": { "json_graph": { "additionalProperties": { "items": { "additionalProperties": { "anyOf": [ { "type": "integer" }, { "type": "string" } ] }, "type": "object" }, "type": "array" }, "title": "Json Graph", "type": "object" } }, "required": [ "json_graph" ], "title": "DecapodeDynamics", "type": "object" }, "DecapodeModel": { "properties": { "name": { "default": "model_a6f04917-34c0-45e0-a42c-128947736090", "title": "Name", "type": "string" }, "init_values": { "additionalProperties": { "type": "number" }, "default": {}, "title": "Init Values", "type": "object" }, "parameter_bounds": { "additionalProperties": { "items": { "type": "number" }, "type": "array" }, "default": {}, "title": "Parameter Bounds", "type": "object" }, "decapode": { "$ref": "#/$defs/DecapodeDynamics" } }, "required": [ "decapode" ], "title": "DecapodeModel", "type": "object" }, "Edge": { "properties": { "id": { "title": "Id", "type": "string" }, "sign": { "title": "Sign", "type": "boolean" }, "source": { "title": "Source", "type": "string" }, "target": { "title": "Target", "type": "string" }, "properties": { "anyOf": [ { "$ref": "#/$defs/BaseProperties" }, { "type": "null" } ], "default": null } }, "required": [ "id", "sign", "source", "target" ], "title": "Edge", "type": "object" }, "EncodedModel": { "description": "Model that holds an SMT formula encoding a model. This class is meant to wrap hand-coded SMT formulas.", "properties": { "name": { "default": "model_a6f04917-34c0-45e0-a42c-128947736090", "title": "Name", "type": "string" }, "init_values": { "additionalProperties": { "type": "number" }, "default": {}, "title": "Init Values", "type": "object" }, "parameter_bounds": { "additionalProperties": { "items": { "type": "number" }, "type": "array" }, "default": {}, "title": "Parameter Bounds", "type": "object" }, "parameters": { "anyOf": [ { "items": { "$ref": "#/$defs/ModelParameter" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Parameters" } }, "title": "EncodedModel", "type": "object" }, "EnsembleModel": { "properties": { "name": { "default": "model_a6f04917-34c0-45e0-a42c-128947736090", "title": "Name", "type": "string" }, "init_values": { "additionalProperties": { "type": "number" }, "default": {}, "title": "Init Values", "type": "object" }, "parameter_bounds": { "additionalProperties": { "items": { "type": "number" }, "type": "array" }, "default": {}, "title": "Parameter Bounds", "type": "object" }, "models": { "items": { "$ref": "#/$defs/FunmanModel" }, "title": "Models", "type": "array" } }, "required": [ "models" ], "title": "EnsembleModel", "type": "object" }, "FunmanModel": { "description": "The abstract base class for Models.", "properties": { "name": { "default": "model_a6f04917-34c0-45e0-a42c-128947736090", "title": "Name", "type": "string" }, "init_values": { "additionalProperties": { "type": "number" }, "default": {}, "title": "Init Values", "type": "object" }, "parameter_bounds": { "additionalProperties": { "items": { "type": "number" }, "type": "array" }, "default": {}, "title": "Parameter Bounds", "type": "object" } }, "title": "FunmanModel", "type": "object" }, "GeneratedPetriNetModel": { "properties": { "name": { "default": "model_a6f04917-34c0-45e0-a42c-128947736090", "title": "Name", "type": "string" }, "init_values": { "additionalProperties": { "type": "number" }, "default": {}, "title": "Init Values", "type": "object" }, "parameter_bounds": { "additionalProperties": { "items": { "type": "number" }, "type": "array" }, "default": {}, "title": "Parameter Bounds", "type": "object" }, "petrinet": { "$ref": "#/$defs/funman__model__generated_models__petrinet__Model" } }, "required": [ "petrinet" ], "title": "GeneratedPetriNetModel", "type": "object" }, "GeneratedRegnetModel": { "properties": { "name": { "default": "model_a6f04917-34c0-45e0-a42c-128947736090", "title": "Name", "type": "string" }, "init_values": { "additionalProperties": { "type": "number" }, "default": {}, "title": "Init Values", "type": "object" }, "parameter_bounds": { "additionalProperties": { "items": { "type": "number" }, "type": "array" }, "default": {}, "title": "Parameter Bounds", "type": "object" }, "regnet": { "$ref": "#/$defs/funman__model__generated_models__regnet__Model" } }, "required": [ "regnet" ], "title": "GeneratedRegnetModel", "type": "object" }, "Header": { "properties": { "name": { "title": "Name", "type": "string" }, "schema": { "format": "uri", "minLength": 1, "title": "Schema", "type": "string" }, "schema_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Schema Name" }, "description": { "title": "Description", "type": "string" }, "model_version": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Model Version" } }, "required": [ "name", "schema", "description" ], "title": "Header", "type": "object" }, "Initial": { "properties": { "target": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Target" }, "expression": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expression" }, "expression_mathml": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expression Mathml" } }, "title": "Initial", "type": "object" }, "Interval": { "description": "An interval is a pair [lb, ub) that is open (i.e., an interval specifies all points x where lb <= x and ub < x).", "properties": { "lb": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": -1.7976931348623157e+308, "title": "Lb" }, "ub": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": 1.7976931348623157e+308, "title": "Ub" }, "closed_upper_bound": { "default": false, "title": "Closed Upper Bound", "type": "boolean" }, "original_width": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Original Width" }, "normalized": { "default": false, "title": "Normalized", "type": "boolean" }, "unnormalized_lb": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Unnormalized Lb" }, "unnormalized_ub": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Unnormalized Ub" } }, "title": "Interval", "type": "object" }, "LinearConstraint": { "additionalProperties": false, "properties": { "soft": { "default": true, "title": "Soft", "type": "boolean" }, "name": { "title": "Name", "type": "string" }, "timepoints": { "anyOf": [ { "$ref": "#/$defs/Interval" }, { "type": "null" } ], "default": null }, "additive_bounds": { "$ref": "#/$defs/Interval" }, "variables": { "items": { "type": "string" }, "title": "Variables", "type": "array" }, "weights": { "anyOf": [ { "items": { "anyOf": [ { "type": "integer" }, { "type": "number" } ] }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Weights" }, "derivative": { "default": false, "title": "Derivative", "type": "boolean" } }, "required": [ "name", "additive_bounds", "variables" ], "title": "LinearConstraint", "type": "object" }, "ModelParameter": { "additionalProperties": false, "description": "A parameter is a free variable for a Model. It has the following attributes:\n\n* lb: lower bound\n\n* ub: upper bound\n\n* symbol: a pysmt FNode corresponding to the parameter variable", "properties": { "name": { "anyOf": [ { "type": "string" }, { "$ref": "#/$defs/ModelSymbol" } ], "title": "Name" }, "interval": { "$ref": "#/$defs/Interval", "default": { "lb": -1.7976931348623157e+308, "ub": 1.7976931348623157e+308, "closed_upper_bound": false, "original_width": Infinity, "normalized": false, "unnormalized_lb": null, "unnormalized_ub": null } }, "label": { "default": "any", "enum": [ "any", "all" ], "title": "Label", "type": "string" } }, "required": [ "name" ], "title": "ModelParameter", "type": "object" }, "ModelSymbol": { "properties": { "name": { "title": "Name", "type": "string" }, "model": { "title": "Model", "type": "string" } }, "required": [ "name", "model" ], "title": "ModelSymbol", "type": "object" }, "Observable": { "properties": { "id": { "title": "Id", "type": "string" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Name" }, "expression": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expression" }, "expression_mathml": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expression Mathml" } }, "required": [ "id" ], "title": "Observable", "type": "object" }, "OdeSemantics": { "properties": { "rates": { "anyOf": [ { "items": { "$ref": "#/$defs/Rate" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Rates" }, "initials": { "anyOf": [ { "items": { "$ref": "#/$defs/Initial" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Initials" }, "parameters": { "anyOf": [ { "items": { "$ref": "#/$defs/funman__model__generated_models__petrinet__Parameter" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Parameters" }, "observables": { "anyOf": [ { "items": { "$ref": "#/$defs/Observable" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Observables" }, "time": { "anyOf": [ { "$ref": "#/$defs/Time" }, { "type": "null" } ], "default": null } }, "title": "OdeSemantics", "type": "object" }, "ParamOrNumber": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "ParamOrNumber" }, "PetrinetDynamics": { "properties": { "json_graph": { "additionalProperties": { "items": { "additionalProperties": { "anyOf": [ { "additionalProperties": { "anyOf": [ { "type": "string" }, { "type": "boolean" }, { "type": "number" }, { "type": "null" } ] }, "type": "object" }, { "type": "integer" }, { "type": "string" }, { "type": "number" }, { "type": "null" } ] }, "type": "object" }, "type": "array" }, "title": "Json Graph", "type": "object" } }, "required": [ "json_graph" ], "title": "PetrinetDynamics", "type": "object" }, "PetrinetModel": { "properties": { "name": { "default": "model_a6f04917-34c0-45e0-a42c-128947736090", "title": "Name", "type": "string" }, "init_values": { "additionalProperties": { "type": "number" }, "default": {}, "title": "Init Values", "type": "object" }, "parameter_bounds": { "additionalProperties": { "items": { "type": "number" }, "type": "array" }, "default": {}, "title": "Parameter Bounds", "type": "object" }, "petrinet": { "$ref": "#/$defs/PetrinetDynamics" } }, "required": [ "petrinet" ], "title": "PetrinetModel", "type": "object" }, "Properties": { "additionalProperties": true, "properties": { "name": { "title": "Name", "type": "string" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Description" }, "grounding": { "anyOf": [ { "$ref": "#/$defs/funman__model__generated_models__petrinet__Grounding" }, { "type": "null" } ], "default": null } }, "required": [ "name" ], "title": "Properties", "type": "object" }, "Query": { "description": "Abstract base class for queries.", "properties": { "model": { "anyOf": [ { "$ref": "#/$defs/FunmanModel" }, { "type": "null" } ], "default": null } }, "title": "Query", "type": "object" }, "QueryAnd": { "description": "Conjunction of queries.\n\nParameters\n----------\nqueries : List[Query]\n queries to conjoin.", "properties": { "model": { "anyOf": [ { "$ref": "#/$defs/FunmanModel" }, { "type": "null" } ], "default": null }, "queries": { "items": { "anyOf": [ { "$ref": "#/$defs/QueryLE" }, { "$ref": "#/$defs/QueryGE" }, { "$ref": "#/$defs/QueryEquals" }, { "$ref": "#/$defs/Query" } ] }, "title": "Queries", "type": "array" } }, "required": [ "queries" ], "title": "QueryAnd", "type": "object" }, "QueryEncoded": { "description": "Class to contain a formula that is already encoded by a pysmt FNode.", "properties": { "model": { "anyOf": [ { "$ref": "#/$defs/FunmanModel" }, { "type": "null" } ], "default": null } }, "title": "QueryEncoded", "type": "object" }, "QueryEquals": { "description": "Class to represent a query of the form: var == value, where var is a variable, and value is a constant.\n\nParameters\n----------\nvariable : str\n model variable name\nvalue : float\n value\nat_end : bool, optional\n apply the constraint to the last timepoint of a scenario only, by default False", "properties": { "model": { "anyOf": [ { "$ref": "#/$defs/FunmanModel" }, { "type": "null" } ], "default": null }, "variable": { "anyOf": [ { "type": "string" }, { "$ref": "#/$defs/ModelSymbol" } ], "title": "Variable" }, "value": { "title": "Value", "type": "number" }, "at_end": { "default": false, "title": "At End", "type": "boolean" } }, "required": [ "variable", "value" ], "title": "QueryEquals", "type": "object" }, "QueryFunction": { "description": "This query uses a Python function passed to the constructor to evaluate a query on the results of a scenario.", "properties": { "model": { "anyOf": [ { "$ref": "#/$defs/FunmanModel" }, { "type": "null" } ], "default": null }, "function": { "title": "Function", "type": "string" } }, "required": [ "function" ], "title": "QueryFunction", "type": "object" }, "QueryGE": { "description": "Class to represent a query of the form: var >= lb, where var is a variable, and lb is a constant lower bound.\n\nParameters\n----------\nvariable : str\n model variable name\nlb : float\n lower bound constant\nat_end : bool, optional\n apply the constraint to the last timepoint of a scenario only, by default False", "properties": { "model": { "anyOf": [ { "$ref": "#/$defs/FunmanModel" }, { "type": "null" } ], "default": null }, "variable": { "anyOf": [ { "type": "string" }, { "$ref": "#/$defs/ModelSymbol" } ], "title": "Variable" }, "lb": { "title": "Lb", "type": "number" }, "at_end": { "default": false, "title": "At End", "type": "boolean" } }, "required": [ "variable", "lb" ], "title": "QueryGE", "type": "object" }, "QueryLE": { "description": "Class to represent a query of the form: var <= ub, where var is a variable, and ub is a constant upper bound.\n\nParameters\n----------\nvariable : str\n model variable name\nub : float\n upper bound constant\nat_end : bool, optional\n apply the constraint to the last timepoint of a scenario only, by default False", "properties": { "model": { "anyOf": [ { "$ref": "#/$defs/FunmanModel" }, { "type": "null" } ], "default": null }, "variable": { "anyOf": [ { "type": "string" }, { "$ref": "#/$defs/ModelSymbol" } ], "title": "Variable" }, "ub": { "title": "Ub", "type": "number" }, "at_end": { "default": false, "title": "At End", "type": "boolean" } }, "required": [ "variable", "ub" ], "title": "QueryLE", "type": "object" }, "QueryTrue": { "additionalProperties": false, "description": "Query that represents logical true. I.e., this query does not place any additional constraints upon a model.", "properties": { "model": { "anyOf": [ { "$ref": "#/$defs/FunmanModel" }, { "type": "null" } ], "default": null } }, "title": "QueryTrue", "type": "object" }, "Rate": { "properties": { "target": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Target" }, "expression": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expression" }, "expression_mathml": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expression Mathml" } }, "title": "Rate", "type": "object" }, "RegnetDynamics": { "properties": { "json_graph": { "additionalProperties": { "anyOf": [ { "type": "string" }, { "additionalProperties": { "items": { "type": "object" }, "type": "array" }, "type": "object" } ] }, "title": "Json Graph", "type": "object" } }, "required": [ "json_graph" ], "title": "RegnetDynamics", "type": "object" }, "RegnetModel": { "properties": { "name": { "default": "model_a6f04917-34c0-45e0-a42c-128947736090", "title": "Name", "type": "string" }, "init_values": { "additionalProperties": { "type": "number" }, "default": {}, "title": "Init Values", "type": "object" }, "parameter_bounds": { "additionalProperties": { "items": { "type": "number" }, "type": "array" }, "default": {}, "title": "Parameter Bounds", "type": "object" }, "regnet": { "$ref": "#/$defs/RegnetDynamics" } }, "required": [ "regnet" ], "title": "RegnetModel", "type": "object" }, "Semantics": { "properties": { "ode": { "anyOf": [ { "$ref": "#/$defs/OdeSemantics" }, { "type": "null" } ], "default": null }, "typing": { "anyOf": [ { "$ref": "#/$defs/TypingSemantics" }, { "type": "null" } ], "default": null, "description": "(Optional) Information for aligning models for stratification" }, "span": { "anyOf": [ { "items": { "$ref": "#/$defs/TypingSemantics" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "(Optional) Legs of a span, each of which are a full ASKEM Petri Net", "title": "Span" } }, "title": "Semantics", "type": "object" }, "State": { "properties": { "id": { "title": "Id", "type": "string" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Description" }, "grounding": { "anyOf": [ { "$ref": "#/$defs/funman__model__generated_models__petrinet__Grounding" }, { "type": "null" } ], "default": null }, "units": { "anyOf": [ { "$ref": "#/$defs/Unit" }, { "type": "null" } ], "default": null } }, "required": [ "id" ], "title": "State", "type": "object" }, "StateVariableConstraint": { "additionalProperties": false, "properties": { "soft": { "default": true, "title": "Soft", "type": "boolean" }, "name": { "title": "Name", "type": "string" }, "timepoints": { "anyOf": [ { "$ref": "#/$defs/Interval" }, { "type": "null" } ], "default": null }, "variable": { "title": "Variable", "type": "string" }, "interval": { "$ref": "#/$defs/Interval", "default": null } }, "required": [ "name", "variable" ], "title": "StateVariableConstraint", "type": "object" }, "States": { "items": { "$ref": "#/$defs/State" }, "title": "States", "type": "array" }, "StructureParameter": { "properties": { "name": { "anyOf": [ { "type": "string" }, { "$ref": "#/$defs/ModelSymbol" } ], "title": "Name" }, "interval": { "$ref": "#/$defs/Interval", "default": { "lb": -1.7976931348623157e+308, "ub": 1.7976931348623157e+308, "closed_upper_bound": false, "original_width": Infinity, "normalized": false, "unnormalized_lb": null, "unnormalized_ub": null } }, "label": { "default": "any", "enum": [ "any", "all" ], "title": "Label", "type": "string" } }, "required": [ "name" ], "title": "StructureParameter", "type": "object" }, "Time": { "properties": { "id": { "title": "Id", "type": "string" }, "units": { "anyOf": [ { "$ref": "#/$defs/Unit" }, { "type": "null" } ], "default": null } }, "required": [ "id" ], "title": "Time", "type": "object" }, "Transition": { "properties": { "id": { "title": "Id", "type": "string" }, "input": { "items": { "type": "string" }, "title": "Input", "type": "array" }, "output": { "items": { "type": "string" }, "title": "Output", "type": "array" }, "grounding": { "anyOf": [ { "$ref": "#/$defs/funman__model__generated_models__petrinet__Grounding" }, { "type": "null" } ], "default": null }, "properties": { "anyOf": [ { "$ref": "#/$defs/Properties" }, { "type": "null" } ], "default": null } }, "required": [ "id", "input", "output" ], "title": "Transition", "type": "object" }, "Transitions": { "items": { "$ref": "#/$defs/Transition" }, "title": "Transitions", "type": "array" }, "TypingSemantics": { "properties": { "system": { "$ref": "#/$defs/funman__model__generated_models__petrinet__Model", "description": "A Petri net representing the 'type system' that is necessary to align states and transitions across different models during stratification." }, "map": { "description": "A map between the (state and transition) nodes of the model and the (state and transition) nodes of the type system", "items": { "items": { "type": "string" }, "type": "array" }, "title": "Map", "type": "array" } }, "required": [ "system", "map" ], "title": "TypingSemantics", "type": "object" }, "Unit": { "additionalProperties": true, "properties": { "expression": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expression" }, "expression_mathml": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expression Mathml" } }, "title": "Unit", "type": "object" }, "Vertice": { "properties": { "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Name" }, "grounding": { "anyOf": [ { "$ref": "#/$defs/funman__model__generated_models__regnet__Grounding" }, { "type": "null" } ], "default": null }, "rate_constant": { "anyOf": [ { "$ref": "#/$defs/ParamOrNumber" }, { "type": "null" } ], "default": null }, "id": { "title": "Id", "type": "string" }, "sign": { "title": "Sign", "type": "boolean" }, "initial": { "anyOf": [ { "$ref": "#/$defs/ParamOrNumber" }, { "type": "null" } ], "default": null } }, "required": [ "id", "sign" ], "title": "Vertice", "type": "object" }, "funman__model__generated_models__petrinet__Distribution": { "additionalProperties": true, "properties": { "type": { "title": "Type", "type": "string" }, "parameters": { "title": "Parameters", "type": "object" } }, "required": [ "type", "parameters" ], "title": "Distribution", "type": "object" }, "funman__model__generated_models__petrinet__Grounding": { "additionalProperties": false, "properties": { "identifiers": { "title": "Identifiers", "type": "object" }, "modifiers": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Modifiers" } }, "required": [ "identifiers" ], "title": "Grounding", "type": "object" }, "funman__model__generated_models__petrinet__Model": { "additionalProperties": true, "properties": { "header": { "$ref": "#/$defs/Header" }, "properties": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Properties" }, "model": { "$ref": "#/$defs/funman__model__generated_models__petrinet__Model1" }, "semantics": { "anyOf": [ { "$ref": "#/$defs/Semantics" }, { "type": "null" } ], "default": null, "description": "Information specific to a given semantics (e.g., ODEs) associated with a model." }, "metadata": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "description": "(Optional) Information not useful for execution of the model, but that may be useful to some consumer in the future. E.g. creation timestamp or source paper's author.", "title": "Metadata" } }, "required": [ "header", "model" ], "title": "Model", "type": "object" }, "funman__model__generated_models__petrinet__Model1": { "additionalProperties": false, "properties": { "states": { "$ref": "#/$defs/States" }, "transitions": { "$ref": "#/$defs/Transitions" } }, "required": [ "states", "transitions" ], "title": "Model1", "type": "object" }, "funman__model__generated_models__petrinet__Parameter": { "properties": { "id": { "title": "Id", "type": "string" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Description" }, "value": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Value" }, "grounding": { "anyOf": [ { "$ref": "#/$defs/funman__model__generated_models__petrinet__Grounding" }, { "type": "null" } ], "default": null }, "distribution": { "anyOf": [ { "$ref": "#/$defs/funman__model__generated_models__petrinet__Distribution" }, { "type": "null" } ], "default": null }, "units": { "anyOf": [ { "$ref": "#/$defs/Unit" }, { "type": "null" } ], "default": null } }, "required": [ "id" ], "title": "Parameter", "type": "object" }, "funman__model__generated_models__regnet__Distribution": { "properties": { "type": { "title": "Type", "type": "string" }, "parameters": { "title": "Parameters", "type": "object" } }, "required": [ "type", "parameters" ], "title": "Distribution", "type": "object" }, "funman__model__generated_models__regnet__Grounding": { "additionalProperties": false, "properties": { "identifiers": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Identifiers" }, "modifiers": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Modifiers" } }, "title": "Grounding", "type": "object" }, "funman__model__generated_models__regnet__Model": { "properties": { "header": { "$ref": "#/$defs/Header" }, "properties": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Properties" }, "model": { "$ref": "#/$defs/funman__model__generated_models__regnet__Model1" }, "metadata": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "description": "(Optional) Information not useful for execution of the model, but that may be useful to some consumer in the future. E.g. creation timestamp or source paper's author.", "title": "Metadata" } }, "required": [ "header", "model" ], "title": "Model", "type": "object" }, "funman__model__generated_models__regnet__Model1": { "additionalProperties": false, "properties": { "vertices": { "items": { "$ref": "#/$defs/Vertice" }, "title": "Vertices", "type": "array" }, "edges": { "items": { "$ref": "#/$defs/Edge" }, "title": "Edges", "type": "array" }, "parameters": { "anyOf": [ { "items": { "$ref": "#/$defs/funman__model__generated_models__regnet__Parameter" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Parameters" } }, "required": [ "vertices", "edges" ], "title": "Model1", "type": "object" }, "funman__model__generated_models__regnet__Parameter": { "properties": { "id": { "title": "Id", "type": "string" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Description" }, "value": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Value" }, "grounding": { "anyOf": [ { "$ref": "#/$defs/funman__model__generated_models__regnet__Grounding" }, { "type": "null" } ], "default": null }, "distribution": { "anyOf": [ { "$ref": "#/$defs/funman__model__generated_models__regnet__Distribution" }, { "type": "null" } ], "default": null } }, "required": [ "id" ], "title": "Parameter", "type": "object" } }, "additionalProperties": false, "required": [ "parameters", "model" ] }
- Config:
extra: str = forbid
- Fields:
- field empty_volume_ok: bool = True¶
- classmethod get_kind() str ¶
- get_search(config: FUNMANConfig) Search ¶
- model_post_init(context: Any, /) None ¶
We need to both initialize private attributes and call the user-defined model_post_init method.
- solve(config: FUNMANConfig, haltEvent: Event | None = None, resultsCallback: Callable[[ParameterSpace], None] | None = None) AnalysisScenarioResult ¶
Check model consistency.
- Parameters:
config (SearchConfig) – Options for the Search algorithm.
- Returns:
ConsistencyScenarioResult indicating whether the model is consistent.
- Return type:
result
- pydantic model funman.scenario.consistency.ConsistencyScenarioResult¶
Bases:
AnalysisScenarioResult
,BaseModel
ConsistencyScenarioResult result, which includes the consistency flag and search statistics.
Show JSON schema
{ "title": "ConsistencyScenarioResult", "description": "ConsistencyScenarioResult result, which includes the consistency flag and\nsearch statistics.", "type": "object", "properties": { "scenario": { "$ref": "#/$defs/ConsistencyScenario" }, "parameter_space": { "$ref": "#/$defs/ParameterSpace" }, "consistent": { "additionalProperties": { "additionalProperties": { "type": "number" }, "type": "object" }, "default": null, "title": "Consistent", "type": "object" } }, "$defs": { "Assumption": { "properties": { "constraint": { "anyOf": [ { "$ref": "#/$defs/ModelConstraint" }, { "$ref": "#/$defs/ParameterConstraint" }, { "$ref": "#/$defs/StateVariableConstraint" }, { "$ref": "#/$defs/LinearConstraint" }, { "$ref": "#/$defs/QueryConstraint" } ], "title": "Constraint" } }, "required": [ "constraint" ], "title": "Assumption", "type": "object" }, "BaseProperties": { "properties": { "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Name" }, "grounding": { "anyOf": [ { "$ref": "#/$defs/funman__model__generated_models__regnet__Grounding" }, { "type": "null" } ], "default": null }, "rate_constant": { "anyOf": [ { "$ref": "#/$defs/ParamOrNumber" }, { "type": "null" } ], "default": null } }, "title": "BaseProperties", "type": "object" }, "BilayerDynamics": { "description": "The BilayerDynamics class represents a state update (dynamics) model for a set of variables. The graph consists of:\n\n* state nodes (current state),\n\n* tangent nodes (next state), and\n\n* flux nodes (causal relationships).", "properties": { "json_graph": { "title": "Json Graph", "type": "object" } }, "required": [ "json_graph" ], "title": "BilayerDynamics", "type": "object" }, "BilayerEdge": { "properties": { "src": { "$ref": "#/$defs/BilayerNode" }, "tgt": { "$ref": "#/$defs/BilayerNode" } }, "required": [ "src", "tgt" ], "title": "BilayerEdge", "type": "object" }, "BilayerFluxNode": { "description": "BilayerNode representing a flux.", "properties": { "index": { "title": "Index", "type": "integer" }, "parameter": { "title": "Parameter", "type": "string" }, "metadata": { "anyOf": [ { "$ref": "#/$defs/BilayerMetadata" }, { "type": "null" } ], "default": null } }, "required": [ "index", "parameter" ], "title": "BilayerFluxNode", "type": "object" }, "BilayerMeasurement": { "description": "The BilayerMeasurement class represents measurements taken on the BilayerNode state nodes of a BilayerDynamics object. The graph consists of:\n\n* state nodes (current state),\n\n* observation nodes, and\n\n* flux nodes (causal relationships).", "properties": { "json_graph": { "title": "Json Graph", "type": "object" }, "state": { "additionalProperties": { "$ref": "#/$defs/BilayerStateNode" }, "default": {}, "title": "State", "type": "object" }, "flux": { "additionalProperties": { "$ref": "#/$defs/BilayerFluxNode" }, "default": {}, "title": "Flux", "type": "object" }, "observable": { "additionalProperties": { "$ref": "#/$defs/BilayerStateNode" }, "default": {}, "title": "Observable", "type": "object" }, "input_edges": { "$ref": "#/$defs/BilayerEdge", "default": [] }, "output_edges": { "$ref": "#/$defs/BilayerEdge", "default": [] } }, "required": [ "json_graph" ], "title": "BilayerMeasurement", "type": "object" }, "BilayerMetadata": { "description": "Metadata for a BilayerNode", "properties": { "ref": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Ref" }, "type": { "anyOf": [ { "enum": [ "float", "int" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "Type" }, "initial_value": { "anyOf": [ { "type": "number" }, { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Initial Value" }, "lb": { "anyOf": [ { "type": "number" }, { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Lb" }, "ub": { "anyOf": [ { "type": "number" }, { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Ub" } }, "title": "BilayerMetadata", "type": "object" }, "BilayerModel": { "description": "A BilayerModel is a complete specification of a Model that uses a BilayerDynamics graph to represent dynamics. It includes the attributes:\n\n* bilayer: the BilayerDynamics graph\n\n* measurements: the BilayerMeasurement graph (used to derive additional variables from the state nodes)\n\n* init_values: a dict mapping from state variables and flux parameters to initial value\n\n* identical_parameters: a list of lists of flux parameters that have identical values\n\n* parameter_bounds: a list of lower and upper bounds on parameters", "properties": { "name": { "default": "model_a6f04917-34c0-45e0-a42c-128947736090", "title": "Name", "type": "string" }, "init_values": { "additionalProperties": { "type": "number" }, "default": {}, "title": "Init Values", "type": "object" }, "parameter_bounds": { "additionalProperties": { "items": { "type": "number" }, "type": "array" }, "default": {}, "title": "Parameter Bounds", "type": "object" }, "bilayer": { "$ref": "#/$defs/BilayerDynamics" }, "measurements": { "$ref": "#/$defs/BilayerMeasurement", "default": null }, "identical_parameters": { "default": [], "items": { "items": { "type": "string" }, "type": "array" }, "title": "Identical Parameters", "type": "array" } }, "required": [ "bilayer" ], "title": "BilayerModel", "type": "object" }, "BilayerNode": { "description": "Node in a BilayerGraph.", "properties": { "index": { "title": "Index", "type": "integer" }, "parameter": { "title": "Parameter", "type": "string" }, "metadata": { "anyOf": [ { "$ref": "#/$defs/BilayerMetadata" }, { "type": "null" } ], "default": null } }, "required": [ "index", "parameter" ], "title": "BilayerNode", "type": "object" }, "BilayerStateNode": { "description": "BilayerNode representing a state variable.", "properties": { "index": { "title": "Index", "type": "integer" }, "parameter": { "title": "Parameter", "type": "string" }, "metadata": { "anyOf": [ { "$ref": "#/$defs/BilayerMetadata" }, { "type": "null" } ], "default": null } }, "required": [ "index", "parameter" ], "title": "BilayerStateNode", "type": "object" }, "Box": { "description": "A Box maps n parameters to intervals, representing an n-dimensional connected open subset of R^n.", "properties": { "type": { "const": "box", "default": "box", "enum": [ "box" ], "title": "Type", "type": "string" }, "label": { "default": "unknown", "enum": [ "true", "false", "unknown", "dropped" ], "title": "Label", "type": "string" }, "bounds": { "additionalProperties": { "$ref": "#/$defs/Interval" }, "default": {}, "title": "Bounds", "type": "object" }, "explanation": { "anyOf": [ { "$ref": "#/$defs/BoxExplanation" }, { "type": "null" } ], "default": null }, "schedule": { "anyOf": [ { "$ref": "#/$defs/EncodingSchedule" }, { "type": "null" } ], "default": null }, "corner_points": { "default": [], "items": { "$ref": "#/$defs/Point" }, "title": "Corner Points", "type": "array" }, "points": { "default": [], "items": { "$ref": "#/$defs/Point" }, "title": "Points", "type": "array" } }, "title": "Box", "type": "object" }, "BoxExplanation": { "properties": { "expression": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expression" }, "symbols": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Symbols" }, "relevant_assumptions": { "default": [], "items": { "$ref": "#/$defs/Assumption" }, "title": "Relevant Assumptions", "type": "array" } }, "title": "BoxExplanation", "type": "object" }, "ConsistencyScenario": { "additionalProperties": false, "description": "The ConsistencyScenario class is an Analysis Scenario that analyzes a Model to find assignments to all variables, if consistent.\n\nParameters\n----------\nmodel : FunmanModel\n model to check\nquery : Query\n model query\nsmt_encoder : Encoder, optional\n method to encode the scenario, by default None", "properties": { "parameters": { "items": { "anyOf": [ { "$ref": "#/$defs/funman__model__generated_models__petrinet__Parameter" }, { "$ref": "#/$defs/ModelParameter" }, { "$ref": "#/$defs/StructureParameter" } ] }, "title": "Parameters", "type": "array" }, "normalization_constant": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Normalization Constant" }, "constraints": { "anyOf": [ { "items": { "anyOf": [ { "$ref": "#/$defs/StateVariableConstraint" }, { "$ref": "#/$defs/LinearConstraint" } ] }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Constraints" }, "empty_volume_ok": { "default": true, "title": "Empty Volume Ok", "type": "boolean" }, "model": { "anyOf": [ { "$ref": "#/$defs/GeneratedPetriNetModel" }, { "$ref": "#/$defs/GeneratedRegnetModel" }, { "$ref": "#/$defs/RegnetModel" }, { "$ref": "#/$defs/PetrinetModel" }, { "$ref": "#/$defs/DecapodeModel" }, { "$ref": "#/$defs/BilayerModel" }, { "$ref": "#/$defs/EncodedModel" }, { "$ref": "#/$defs/EnsembleModel" } ], "title": "Model" }, "query": { "anyOf": [ { "$ref": "#/$defs/QueryAnd" }, { "$ref": "#/$defs/QueryGE" }, { "$ref": "#/$defs/QueryLE" }, { "$ref": "#/$defs/QueryEncoded" }, { "$ref": "#/$defs/QueryFunction" }, { "$ref": "#/$defs/QueryTrue" } ], "default": { "model": null }, "title": "Query" } }, "required": [ "parameters", "model" ], "title": "ConsistencyScenario", "type": "object" }, "DecapodeDynamics": { "properties": { "json_graph": { "additionalProperties": { "items": { "additionalProperties": { "anyOf": [ { "type": "integer" }, { "type": "string" } ] }, "type": "object" }, "type": "array" }, "title": "Json Graph", "type": "object" } }, "required": [ "json_graph" ], "title": "DecapodeDynamics", "type": "object" }, "DecapodeModel": { "properties": { "name": { "default": "model_a6f04917-34c0-45e0-a42c-128947736090", "title": "Name", "type": "string" }, "init_values": { "additionalProperties": { "type": "number" }, "default": {}, "title": "Init Values", "type": "object" }, "parameter_bounds": { "additionalProperties": { "items": { "type": "number" }, "type": "array" }, "default": {}, "title": "Parameter Bounds", "type": "object" }, "decapode": { "$ref": "#/$defs/DecapodeDynamics" } }, "required": [ "decapode" ], "title": "DecapodeModel", "type": "object" }, "Edge": { "properties": { "id": { "title": "Id", "type": "string" }, "sign": { "title": "Sign", "type": "boolean" }, "source": { "title": "Source", "type": "string" }, "target": { "title": "Target", "type": "string" }, "properties": { "anyOf": [ { "$ref": "#/$defs/BaseProperties" }, { "type": "null" } ], "default": null } }, "required": [ "id", "sign", "source", "target" ], "title": "Edge", "type": "object" }, "EncodedModel": { "description": "Model that holds an SMT formula encoding a model. This class is meant to wrap hand-coded SMT formulas.", "properties": { "name": { "default": "model_a6f04917-34c0-45e0-a42c-128947736090", "title": "Name", "type": "string" }, "init_values": { "additionalProperties": { "type": "number" }, "default": {}, "title": "Init Values", "type": "object" }, "parameter_bounds": { "additionalProperties": { "items": { "type": "number" }, "type": "array" }, "default": {}, "title": "Parameter Bounds", "type": "object" }, "parameters": { "anyOf": [ { "items": { "$ref": "#/$defs/ModelParameter" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Parameters" } }, "title": "EncodedModel", "type": "object" }, "EncodingSchedule": { "properties": { "timepoints": { "items": { "anyOf": [ { "type": "integer" }, { "type": "number" } ] }, "title": "Timepoints", "type": "array" } }, "required": [ "timepoints" ], "title": "EncodingSchedule", "type": "object" }, "EnsembleModel": { "properties": { "name": { "default": "model_a6f04917-34c0-45e0-a42c-128947736090", "title": "Name", "type": "string" }, "init_values": { "additionalProperties": { "type": "number" }, "default": {}, "title": "Init Values", "type": "object" }, "parameter_bounds": { "additionalProperties": { "items": { "type": "number" }, "type": "array" }, "default": {}, "title": "Parameter Bounds", "type": "object" }, "models": { "items": { "$ref": "#/$defs/FunmanModel" }, "title": "Models", "type": "array" } }, "required": [ "models" ], "title": "EnsembleModel", "type": "object" }, "FunmanModel": { "description": "The abstract base class for Models.", "properties": { "name": { "default": "model_a6f04917-34c0-45e0-a42c-128947736090", "title": "Name", "type": "string" }, "init_values": { "additionalProperties": { "type": "number" }, "default": {}, "title": "Init Values", "type": "object" }, "parameter_bounds": { "additionalProperties": { "items": { "type": "number" }, "type": "array" }, "default": {}, "title": "Parameter Bounds", "type": "object" } }, "title": "FunmanModel", "type": "object" }, "GeneratedPetriNetModel": { "properties": { "name": { "default": "model_a6f04917-34c0-45e0-a42c-128947736090", "title": "Name", "type": "string" }, "init_values": { "additionalProperties": { "type": "number" }, "default": {}, "title": "Init Values", "type": "object" }, "parameter_bounds": { "additionalProperties": { "items": { "type": "number" }, "type": "array" }, "default": {}, "title": "Parameter Bounds", "type": "object" }, "petrinet": { "$ref": "#/$defs/funman__model__generated_models__petrinet__Model" } }, "required": [ "petrinet" ], "title": "GeneratedPetriNetModel", "type": "object" }, "GeneratedRegnetModel": { "properties": { "name": { "default": "model_a6f04917-34c0-45e0-a42c-128947736090", "title": "Name", "type": "string" }, "init_values": { "additionalProperties": { "type": "number" }, "default": {}, "title": "Init Values", "type": "object" }, "parameter_bounds": { "additionalProperties": { "items": { "type": "number" }, "type": "array" }, "default": {}, "title": "Parameter Bounds", "type": "object" }, "regnet": { "$ref": "#/$defs/funman__model__generated_models__regnet__Model" } }, "required": [ "regnet" ], "title": "GeneratedRegnetModel", "type": "object" }, "Header": { "properties": { "name": { "title": "Name", "type": "string" }, "schema": { "format": "uri", "minLength": 1, "title": "Schema", "type": "string" }, "schema_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Schema Name" }, "description": { "title": "Description", "type": "string" }, "model_version": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Model Version" } }, "required": [ "name", "schema", "description" ], "title": "Header", "type": "object" }, "Initial": { "properties": { "target": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Target" }, "expression": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expression" }, "expression_mathml": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expression Mathml" } }, "title": "Initial", "type": "object" }, "Interval": { "description": "An interval is a pair [lb, ub) that is open (i.e., an interval specifies all points x where lb <= x and ub < x).", "properties": { "lb": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": -1.7976931348623157e+308, "title": "Lb" }, "ub": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": 1.7976931348623157e+308, "title": "Ub" }, "closed_upper_bound": { "default": false, "title": "Closed Upper Bound", "type": "boolean" }, "original_width": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Original Width" }, "normalized": { "default": false, "title": "Normalized", "type": "boolean" }, "unnormalized_lb": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Unnormalized Lb" }, "unnormalized_ub": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Unnormalized Ub" } }, "title": "Interval", "type": "object" }, "LinearConstraint": { "additionalProperties": false, "properties": { "soft": { "default": true, "title": "Soft", "type": "boolean" }, "name": { "title": "Name", "type": "string" }, "timepoints": { "anyOf": [ { "$ref": "#/$defs/Interval" }, { "type": "null" } ], "default": null }, "additive_bounds": { "$ref": "#/$defs/Interval" }, "variables": { "items": { "type": "string" }, "title": "Variables", "type": "array" }, "weights": { "anyOf": [ { "items": { "anyOf": [ { "type": "integer" }, { "type": "number" } ] }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Weights" }, "derivative": { "default": false, "title": "Derivative", "type": "boolean" } }, "required": [ "name", "additive_bounds", "variables" ], "title": "LinearConstraint", "type": "object" }, "ModelConstraint": { "additionalProperties": false, "properties": { "soft": { "default": false, "title": "Soft", "type": "boolean" }, "name": { "title": "Name", "type": "string" }, "model": { "$ref": "#/$defs/FunmanModel" } }, "required": [ "name", "model" ], "title": "ModelConstraint", "type": "object" }, "ModelParameter": { "additionalProperties": false, "description": "A parameter is a free variable for a Model. It has the following attributes:\n\n* lb: lower bound\n\n* ub: upper bound\n\n* symbol: a pysmt FNode corresponding to the parameter variable", "properties": { "name": { "anyOf": [ { "type": "string" }, { "$ref": "#/$defs/ModelSymbol" } ], "title": "Name" }, "interval": { "$ref": "#/$defs/Interval", "default": { "lb": -1.7976931348623157e+308, "ub": 1.7976931348623157e+308, "closed_upper_bound": false, "original_width": Infinity, "normalized": false, "unnormalized_lb": null, "unnormalized_ub": null } }, "label": { "default": "any", "enum": [ "any", "all" ], "title": "Label", "type": "string" } }, "required": [ "name" ], "title": "ModelParameter", "type": "object" }, "ModelSymbol": { "properties": { "name": { "title": "Name", "type": "string" }, "model": { "title": "Model", "type": "string" } }, "required": [ "name", "model" ], "title": "ModelSymbol", "type": "object" }, "Observable": { "properties": { "id": { "title": "Id", "type": "string" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Name" }, "expression": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expression" }, "expression_mathml": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expression Mathml" } }, "required": [ "id" ], "title": "Observable", "type": "object" }, "OdeSemantics": { "properties": { "rates": { "anyOf": [ { "items": { "$ref": "#/$defs/Rate" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Rates" }, "initials": { "anyOf": [ { "items": { "$ref": "#/$defs/Initial" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Initials" }, "parameters": { "anyOf": [ { "items": { "$ref": "#/$defs/funman__model__generated_models__petrinet__Parameter" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Parameters" }, "observables": { "anyOf": [ { "items": { "$ref": "#/$defs/Observable" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Observables" }, "time": { "anyOf": [ { "$ref": "#/$defs/Time" }, { "type": "null" } ], "default": null } }, "title": "OdeSemantics", "type": "object" }, "ParamOrNumber": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "ParamOrNumber" }, "ParameterConstraint": { "additionalProperties": false, "properties": { "soft": { "default": false, "title": "Soft", "type": "boolean" }, "name": { "title": "Name", "type": "string" }, "parameter": { "anyOf": [ { "$ref": "#/$defs/ModelParameter" }, { "$ref": "#/$defs/StructureParameter" } ], "title": "Parameter" } }, "required": [ "name", "parameter" ], "title": "ParameterConstraint", "type": "object" }, "ParameterSpace": { "description": "This class defines the representation of the parameter space that can be\nreturned by the parameter synthesis feature of FUNMAN. These parameter spaces\nare represented as a collection of boxes that are either known to be true or\nknown to be false.", "properties": { "num_dimensions": { "default": null, "title": "Num Dimensions", "type": "integer" }, "true_boxes": { "default": [], "items": { "$ref": "#/$defs/Box" }, "title": "True Boxes", "type": "array" }, "false_boxes": { "default": [], "items": { "$ref": "#/$defs/Box" }, "title": "False Boxes", "type": "array" }, "unknown_points": { "default": [], "items": { "$ref": "#/$defs/Point" }, "title": "Unknown Points", "type": "array" } }, "title": "ParameterSpace", "type": "object" }, "PetrinetDynamics": { "properties": { "json_graph": { "additionalProperties": { "items": { "additionalProperties": { "anyOf": [ { "additionalProperties": { "anyOf": [ { "type": "string" }, { "type": "boolean" }, { "type": "number" }, { "type": "null" } ] }, "type": "object" }, { "type": "integer" }, { "type": "string" }, { "type": "number" }, { "type": "null" } ] }, "type": "object" }, "type": "array" }, "title": "Json Graph", "type": "object" } }, "required": [ "json_graph" ], "title": "PetrinetDynamics", "type": "object" }, "PetrinetModel": { "properties": { "name": { "default": "model_a6f04917-34c0-45e0-a42c-128947736090", "title": "Name", "type": "string" }, "init_values": { "additionalProperties": { "type": "number" }, "default": {}, "title": "Init Values", "type": "object" }, "parameter_bounds": { "additionalProperties": { "items": { "type": "number" }, "type": "array" }, "default": {}, "title": "Parameter Bounds", "type": "object" }, "petrinet": { "$ref": "#/$defs/PetrinetDynamics" } }, "required": [ "petrinet" ], "title": "PetrinetModel", "type": "object" }, "Point": { "properties": { "type": { "const": "point", "default": "point", "enum": [ "point" ], "title": "Type", "type": "string" }, "label": { "default": "unknown", "enum": [ "true", "false", "unknown", "dropped" ], "title": "Label", "type": "string" }, "values": { "additionalProperties": { "anyOf": [ { "type": "number" }, { "type": "integer" }, { "$ref": "#/$defs/EncodingSchedule" }, { "type": "null" } ] }, "title": "Values", "type": "object" }, "normalized_values": { "anyOf": [ { "additionalProperties": { "type": "number" }, "type": "object" }, { "type": "null" } ], "default": null, "title": "Normalized Values" }, "schedule": { "anyOf": [ { "$ref": "#/$defs/EncodingSchedule" }, { "type": "null" } ], "default": null }, "simulation": { "anyOf": [ { "$ref": "#/$defs/Timeseries" }, { "type": "null" } ], "default": null } }, "required": [ "values" ], "title": "Point", "type": "object" }, "Properties": { "additionalProperties": true, "properties": { "name": { "title": "Name", "type": "string" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Description" }, "grounding": { "anyOf": [ { "$ref": "#/$defs/funman__model__generated_models__petrinet__Grounding" }, { "type": "null" } ], "default": null } }, "required": [ "name" ], "title": "Properties", "type": "object" }, "Query": { "description": "Abstract base class for queries.", "properties": { "model": { "anyOf": [ { "$ref": "#/$defs/FunmanModel" }, { "type": "null" } ], "default": null } }, "title": "Query", "type": "object" }, "QueryAnd": { "description": "Conjunction of queries.\n\nParameters\n----------\nqueries : List[Query]\n queries to conjoin.", "properties": { "model": { "anyOf": [ { "$ref": "#/$defs/FunmanModel" }, { "type": "null" } ], "default": null }, "queries": { "items": { "anyOf": [ { "$ref": "#/$defs/QueryLE" }, { "$ref": "#/$defs/QueryGE" }, { "$ref": "#/$defs/QueryEquals" }, { "$ref": "#/$defs/Query" } ] }, "title": "Queries", "type": "array" } }, "required": [ "queries" ], "title": "QueryAnd", "type": "object" }, "QueryConstraint": { "additionalProperties": false, "properties": { "soft": { "default": true, "title": "Soft", "type": "boolean" }, "name": { "title": "Name", "type": "string" }, "timepoints": { "anyOf": [ { "$ref": "#/$defs/Interval" }, { "type": "null" } ], "default": null }, "query": { "$ref": "#/$defs/Query" } }, "required": [ "name", "query" ], "title": "QueryConstraint", "type": "object" }, "QueryEncoded": { "description": "Class to contain a formula that is already encoded by a pysmt FNode.", "properties": { "model": { "anyOf": [ { "$ref": "#/$defs/FunmanModel" }, { "type": "null" } ], "default": null } }, "title": "QueryEncoded", "type": "object" }, "QueryEquals": { "description": "Class to represent a query of the form: var == value, where var is a variable, and value is a constant.\n\nParameters\n----------\nvariable : str\n model variable name\nvalue : float\n value\nat_end : bool, optional\n apply the constraint to the last timepoint of a scenario only, by default False", "properties": { "model": { "anyOf": [ { "$ref": "#/$defs/FunmanModel" }, { "type": "null" } ], "default": null }, "variable": { "anyOf": [ { "type": "string" }, { "$ref": "#/$defs/ModelSymbol" } ], "title": "Variable" }, "value": { "title": "Value", "type": "number" }, "at_end": { "default": false, "title": "At End", "type": "boolean" } }, "required": [ "variable", "value" ], "title": "QueryEquals", "type": "object" }, "QueryFunction": { "description": "This query uses a Python function passed to the constructor to evaluate a query on the results of a scenario.", "properties": { "model": { "anyOf": [ { "$ref": "#/$defs/FunmanModel" }, { "type": "null" } ], "default": null }, "function": { "title": "Function", "type": "string" } }, "required": [ "function" ], "title": "QueryFunction", "type": "object" }, "QueryGE": { "description": "Class to represent a query of the form: var >= lb, where var is a variable, and lb is a constant lower bound.\n\nParameters\n----------\nvariable : str\n model variable name\nlb : float\n lower bound constant\nat_end : bool, optional\n apply the constraint to the last timepoint of a scenario only, by default False", "properties": { "model": { "anyOf": [ { "$ref": "#/$defs/FunmanModel" }, { "type": "null" } ], "default": null }, "variable": { "anyOf": [ { "type": "string" }, { "$ref": "#/$defs/ModelSymbol" } ], "title": "Variable" }, "lb": { "title": "Lb", "type": "number" }, "at_end": { "default": false, "title": "At End", "type": "boolean" } }, "required": [ "variable", "lb" ], "title": "QueryGE", "type": "object" }, "QueryLE": { "description": "Class to represent a query of the form: var <= ub, where var is a variable, and ub is a constant upper bound.\n\nParameters\n----------\nvariable : str\n model variable name\nub : float\n upper bound constant\nat_end : bool, optional\n apply the constraint to the last timepoint of a scenario only, by default False", "properties": { "model": { "anyOf": [ { "$ref": "#/$defs/FunmanModel" }, { "type": "null" } ], "default": null }, "variable": { "anyOf": [ { "type": "string" }, { "$ref": "#/$defs/ModelSymbol" } ], "title": "Variable" }, "ub": { "title": "Ub", "type": "number" }, "at_end": { "default": false, "title": "At End", "type": "boolean" } }, "required": [ "variable", "ub" ], "title": "QueryLE", "type": "object" }, "QueryTrue": { "additionalProperties": false, "description": "Query that represents logical true. I.e., this query does not place any additional constraints upon a model.", "properties": { "model": { "anyOf": [ { "$ref": "#/$defs/FunmanModel" }, { "type": "null" } ], "default": null } }, "title": "QueryTrue", "type": "object" }, "Rate": { "properties": { "target": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Target" }, "expression": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expression" }, "expression_mathml": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expression Mathml" } }, "title": "Rate", "type": "object" }, "RegnetDynamics": { "properties": { "json_graph": { "additionalProperties": { "anyOf": [ { "type": "string" }, { "additionalProperties": { "items": { "type": "object" }, "type": "array" }, "type": "object" } ] }, "title": "Json Graph", "type": "object" } }, "required": [ "json_graph" ], "title": "RegnetDynamics", "type": "object" }, "RegnetModel": { "properties": { "name": { "default": "model_a6f04917-34c0-45e0-a42c-128947736090", "title": "Name", "type": "string" }, "init_values": { "additionalProperties": { "type": "number" }, "default": {}, "title": "Init Values", "type": "object" }, "parameter_bounds": { "additionalProperties": { "items": { "type": "number" }, "type": "array" }, "default": {}, "title": "Parameter Bounds", "type": "object" }, "regnet": { "$ref": "#/$defs/RegnetDynamics" } }, "required": [ "regnet" ], "title": "RegnetModel", "type": "object" }, "Semantics": { "properties": { "ode": { "anyOf": [ { "$ref": "#/$defs/OdeSemantics" }, { "type": "null" } ], "default": null }, "typing": { "anyOf": [ { "$ref": "#/$defs/TypingSemantics" }, { "type": "null" } ], "default": null, "description": "(Optional) Information for aligning models for stratification" }, "span": { "anyOf": [ { "items": { "$ref": "#/$defs/TypingSemantics" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "(Optional) Legs of a span, each of which are a full ASKEM Petri Net", "title": "Span" } }, "title": "Semantics", "type": "object" }, "State": { "properties": { "id": { "title": "Id", "type": "string" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Description" }, "grounding": { "anyOf": [ { "$ref": "#/$defs/funman__model__generated_models__petrinet__Grounding" }, { "type": "null" } ], "default": null }, "units": { "anyOf": [ { "$ref": "#/$defs/Unit" }, { "type": "null" } ], "default": null } }, "required": [ "id" ], "title": "State", "type": "object" }, "StateVariableConstraint": { "additionalProperties": false, "properties": { "soft": { "default": true, "title": "Soft", "type": "boolean" }, "name": { "title": "Name", "type": "string" }, "timepoints": { "anyOf": [ { "$ref": "#/$defs/Interval" }, { "type": "null" } ], "default": null }, "variable": { "title": "Variable", "type": "string" }, "interval": { "$ref": "#/$defs/Interval", "default": null } }, "required": [ "name", "variable" ], "title": "StateVariableConstraint", "type": "object" }, "States": { "items": { "$ref": "#/$defs/State" }, "title": "States", "type": "array" }, "StructureParameter": { "properties": { "name": { "anyOf": [ { "type": "string" }, { "$ref": "#/$defs/ModelSymbol" } ], "title": "Name" }, "interval": { "$ref": "#/$defs/Interval", "default": { "lb": -1.7976931348623157e+308, "ub": 1.7976931348623157e+308, "closed_upper_bound": false, "original_width": Infinity, "normalized": false, "unnormalized_lb": null, "unnormalized_ub": null } }, "label": { "default": "any", "enum": [ "any", "all" ], "title": "Label", "type": "string" } }, "required": [ "name" ], "title": "StructureParameter", "type": "object" }, "Time": { "properties": { "id": { "title": "Id", "type": "string" }, "units": { "anyOf": [ { "$ref": "#/$defs/Unit" }, { "type": "null" } ], "default": null } }, "required": [ "id" ], "title": "Time", "type": "object" }, "Timeseries": { "properties": { "data": { "items": { "anyOf": [ { "type": "number" }, { "items": { "type": "number" }, "type": "array" } ] }, "title": "Data", "type": "array" }, "columns": { "items": { "type": "string" }, "title": "Columns", "type": "array" } }, "required": [ "data", "columns" ], "title": "Timeseries", "type": "object" }, "Transition": { "properties": { "id": { "title": "Id", "type": "string" }, "input": { "items": { "type": "string" }, "title": "Input", "type": "array" }, "output": { "items": { "type": "string" }, "title": "Output", "type": "array" }, "grounding": { "anyOf": [ { "$ref": "#/$defs/funman__model__generated_models__petrinet__Grounding" }, { "type": "null" } ], "default": null }, "properties": { "anyOf": [ { "$ref": "#/$defs/Properties" }, { "type": "null" } ], "default": null } }, "required": [ "id", "input", "output" ], "title": "Transition", "type": "object" }, "Transitions": { "items": { "$ref": "#/$defs/Transition" }, "title": "Transitions", "type": "array" }, "TypingSemantics": { "properties": { "system": { "$ref": "#/$defs/funman__model__generated_models__petrinet__Model", "description": "A Petri net representing the 'type system' that is necessary to align states and transitions across different models during stratification." }, "map": { "description": "A map between the (state and transition) nodes of the model and the (state and transition) nodes of the type system", "items": { "items": { "type": "string" }, "type": "array" }, "title": "Map", "type": "array" } }, "required": [ "system", "map" ], "title": "TypingSemantics", "type": "object" }, "Unit": { "additionalProperties": true, "properties": { "expression": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expression" }, "expression_mathml": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expression Mathml" } }, "title": "Unit", "type": "object" }, "Vertice": { "properties": { "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Name" }, "grounding": { "anyOf": [ { "$ref": "#/$defs/funman__model__generated_models__regnet__Grounding" }, { "type": "null" } ], "default": null }, "rate_constant": { "anyOf": [ { "$ref": "#/$defs/ParamOrNumber" }, { "type": "null" } ], "default": null }, "id": { "title": "Id", "type": "string" }, "sign": { "title": "Sign", "type": "boolean" }, "initial": { "anyOf": [ { "$ref": "#/$defs/ParamOrNumber" }, { "type": "null" } ], "default": null } }, "required": [ "id", "sign" ], "title": "Vertice", "type": "object" }, "funman__model__generated_models__petrinet__Distribution": { "additionalProperties": true, "properties": { "type": { "title": "Type", "type": "string" }, "parameters": { "title": "Parameters", "type": "object" } }, "required": [ "type", "parameters" ], "title": "Distribution", "type": "object" }, "funman__model__generated_models__petrinet__Grounding": { "additionalProperties": false, "properties": { "identifiers": { "title": "Identifiers", "type": "object" }, "modifiers": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Modifiers" } }, "required": [ "identifiers" ], "title": "Grounding", "type": "object" }, "funman__model__generated_models__petrinet__Model": { "additionalProperties": true, "properties": { "header": { "$ref": "#/$defs/Header" }, "properties": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Properties" }, "model": { "$ref": "#/$defs/funman__model__generated_models__petrinet__Model1" }, "semantics": { "anyOf": [ { "$ref": "#/$defs/Semantics" }, { "type": "null" } ], "default": null, "description": "Information specific to a given semantics (e.g., ODEs) associated with a model." }, "metadata": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "description": "(Optional) Information not useful for execution of the model, but that may be useful to some consumer in the future. E.g. creation timestamp or source paper's author.", "title": "Metadata" } }, "required": [ "header", "model" ], "title": "Model", "type": "object" }, "funman__model__generated_models__petrinet__Model1": { "additionalProperties": false, "properties": { "states": { "$ref": "#/$defs/States" }, "transitions": { "$ref": "#/$defs/Transitions" } }, "required": [ "states", "transitions" ], "title": "Model1", "type": "object" }, "funman__model__generated_models__petrinet__Parameter": { "properties": { "id": { "title": "Id", "type": "string" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Description" }, "value": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Value" }, "grounding": { "anyOf": [ { "$ref": "#/$defs/funman__model__generated_models__petrinet__Grounding" }, { "type": "null" } ], "default": null }, "distribution": { "anyOf": [ { "$ref": "#/$defs/funman__model__generated_models__petrinet__Distribution" }, { "type": "null" } ], "default": null }, "units": { "anyOf": [ { "$ref": "#/$defs/Unit" }, { "type": "null" } ], "default": null } }, "required": [ "id" ], "title": "Parameter", "type": "object" }, "funman__model__generated_models__regnet__Distribution": { "properties": { "type": { "title": "Type", "type": "string" }, "parameters": { "title": "Parameters", "type": "object" } }, "required": [ "type", "parameters" ], "title": "Distribution", "type": "object" }, "funman__model__generated_models__regnet__Grounding": { "additionalProperties": false, "properties": { "identifiers": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Identifiers" }, "modifiers": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Modifiers" } }, "title": "Grounding", "type": "object" }, "funman__model__generated_models__regnet__Model": { "properties": { "header": { "$ref": "#/$defs/Header" }, "properties": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Properties" }, "model": { "$ref": "#/$defs/funman__model__generated_models__regnet__Model1" }, "metadata": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "description": "(Optional) Information not useful for execution of the model, but that may be useful to some consumer in the future. E.g. creation timestamp or source paper's author.", "title": "Metadata" } }, "required": [ "header", "model" ], "title": "Model", "type": "object" }, "funman__model__generated_models__regnet__Model1": { "additionalProperties": false, "properties": { "vertices": { "items": { "$ref": "#/$defs/Vertice" }, "title": "Vertices", "type": "array" }, "edges": { "items": { "$ref": "#/$defs/Edge" }, "title": "Edges", "type": "array" }, "parameters": { "anyOf": [ { "items": { "$ref": "#/$defs/funman__model__generated_models__regnet__Parameter" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Parameters" } }, "required": [ "vertices", "edges" ], "title": "Model1", "type": "object" }, "funman__model__generated_models__regnet__Parameter": { "properties": { "id": { "title": "Id", "type": "string" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Description" }, "value": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Value" }, "grounding": { "anyOf": [ { "$ref": "#/$defs/funman__model__generated_models__regnet__Grounding" }, { "type": "null" } ], "default": null }, "distribution": { "anyOf": [ { "$ref": "#/$defs/funman__model__generated_models__regnet__Distribution" }, { "type": "null" } ], "default": null } }, "required": [ "id" ], "title": "Parameter", "type": "object" } }, "required": [ "scenario", "parameter_space" ] }
- Config:
arbitrary_types_allowed: bool = True
- Fields:
- field parameter_space: ParameterSpace [Required]¶
- field scenario: ConsistencyScenario [Required]¶
- dataframe(point: Point, interpolate='linear')¶
Extract a timeseries as a Pandas dataframe.
- Parameters:
interpolate (str, optional) – interpolate between time points, by default “linear”
- Returns:
the timeseries
- Return type:
pandas.DataFrame
- Raises:
Exception – fails if scenario is not consistent
- model_post_init(context: Any, /) None ¶
This function is meant to behave like a BaseModel method to initialise private attributes.
It takes context as an argument since that’s what pydantic-core passes when calling it.
- Parameters:
self – The BaseModel instance.
context – The context.
funman.scenario.parameter_synthesis module¶
This module defines the Parameter Synthesis scenario.
- pydantic model funman.scenario.parameter_synthesis.ParameterSynthesisScenario¶
Bases:
AnalysisScenario
,BaseModel
Parameter synthesis problem description that identifies the parameters to synthesize for a particular model. The general problem is to identify multi-dimensional (one dimension per parameter) regions where either all points in the region are valid (true) parameters for the model or invalid (false) parameters.
Show JSON schema
{ "title": "ParameterSynthesisScenario", "description": "Parameter synthesis problem description that identifies the parameters to\nsynthesize for a particular model. The general problem is to identify\nmulti-dimensional (one dimension per parameter) regions where either all\npoints in the region are valid (true) parameters for the model or invalid\n(false) parameters.", "type": "object", "properties": { "parameters": { "items": { "anyOf": [ { "$ref": "#/$defs/funman__model__generated_models__petrinet__Parameter" }, { "$ref": "#/$defs/ModelParameter" }, { "$ref": "#/$defs/StructureParameter" } ] }, "title": "Parameters", "type": "array" }, "normalization_constant": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Normalization Constant" }, "constraints": { "anyOf": [ { "items": { "anyOf": [ { "$ref": "#/$defs/StateVariableConstraint" }, { "$ref": "#/$defs/LinearConstraint" } ] }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Constraints" }, "empty_volume_ok": { "default": false, "title": "Empty Volume Ok", "type": "boolean" }, "model": { "anyOf": [ { "$ref": "#/$defs/GeneratedPetriNetModel" }, { "$ref": "#/$defs/GeneratedRegnetModel" }, { "$ref": "#/$defs/RegnetModel" }, { "$ref": "#/$defs/PetrinetModel" }, { "$ref": "#/$defs/DecapodeModel" }, { "$ref": "#/$defs/BilayerModel" }, { "$ref": "#/$defs/EncodedModel" }, { "$ref": "#/$defs/EnsembleModel" } ], "title": "Model" }, "query": { "anyOf": [ { "$ref": "#/$defs/QueryAnd" }, { "$ref": "#/$defs/QueryGE" }, { "$ref": "#/$defs/QueryLE" }, { "$ref": "#/$defs/QueryEncoded" }, { "$ref": "#/$defs/QueryFunction" }, { "$ref": "#/$defs/QueryTrue" } ], "default": { "model": null }, "title": "Query" } }, "$defs": { "BaseProperties": { "properties": { "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Name" }, "grounding": { "anyOf": [ { "$ref": "#/$defs/funman__model__generated_models__regnet__Grounding" }, { "type": "null" } ], "default": null }, "rate_constant": { "anyOf": [ { "$ref": "#/$defs/ParamOrNumber" }, { "type": "null" } ], "default": null } }, "title": "BaseProperties", "type": "object" }, "BilayerDynamics": { "description": "The BilayerDynamics class represents a state update (dynamics) model for a set of variables. The graph consists of:\n\n* state nodes (current state),\n\n* tangent nodes (next state), and\n\n* flux nodes (causal relationships).", "properties": { "json_graph": { "title": "Json Graph", "type": "object" } }, "required": [ "json_graph" ], "title": "BilayerDynamics", "type": "object" }, "BilayerEdge": { "properties": { "src": { "$ref": "#/$defs/BilayerNode" }, "tgt": { "$ref": "#/$defs/BilayerNode" } }, "required": [ "src", "tgt" ], "title": "BilayerEdge", "type": "object" }, "BilayerFluxNode": { "description": "BilayerNode representing a flux.", "properties": { "index": { "title": "Index", "type": "integer" }, "parameter": { "title": "Parameter", "type": "string" }, "metadata": { "anyOf": [ { "$ref": "#/$defs/BilayerMetadata" }, { "type": "null" } ], "default": null } }, "required": [ "index", "parameter" ], "title": "BilayerFluxNode", "type": "object" }, "BilayerMeasurement": { "description": "The BilayerMeasurement class represents measurements taken on the BilayerNode state nodes of a BilayerDynamics object. The graph consists of:\n\n* state nodes (current state),\n\n* observation nodes, and\n\n* flux nodes (causal relationships).", "properties": { "json_graph": { "title": "Json Graph", "type": "object" }, "state": { "additionalProperties": { "$ref": "#/$defs/BilayerStateNode" }, "default": {}, "title": "State", "type": "object" }, "flux": { "additionalProperties": { "$ref": "#/$defs/BilayerFluxNode" }, "default": {}, "title": "Flux", "type": "object" }, "observable": { "additionalProperties": { "$ref": "#/$defs/BilayerStateNode" }, "default": {}, "title": "Observable", "type": "object" }, "input_edges": { "$ref": "#/$defs/BilayerEdge", "default": [] }, "output_edges": { "$ref": "#/$defs/BilayerEdge", "default": [] } }, "required": [ "json_graph" ], "title": "BilayerMeasurement", "type": "object" }, "BilayerMetadata": { "description": "Metadata for a BilayerNode", "properties": { "ref": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Ref" }, "type": { "anyOf": [ { "enum": [ "float", "int" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "Type" }, "initial_value": { "anyOf": [ { "type": "number" }, { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Initial Value" }, "lb": { "anyOf": [ { "type": "number" }, { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Lb" }, "ub": { "anyOf": [ { "type": "number" }, { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Ub" } }, "title": "BilayerMetadata", "type": "object" }, "BilayerModel": { "description": "A BilayerModel is a complete specification of a Model that uses a BilayerDynamics graph to represent dynamics. It includes the attributes:\n\n* bilayer: the BilayerDynamics graph\n\n* measurements: the BilayerMeasurement graph (used to derive additional variables from the state nodes)\n\n* init_values: a dict mapping from state variables and flux parameters to initial value\n\n* identical_parameters: a list of lists of flux parameters that have identical values\n\n* parameter_bounds: a list of lower and upper bounds on parameters", "properties": { "name": { "default": "model_a6f04917-34c0-45e0-a42c-128947736090", "title": "Name", "type": "string" }, "init_values": { "additionalProperties": { "type": "number" }, "default": {}, "title": "Init Values", "type": "object" }, "parameter_bounds": { "additionalProperties": { "items": { "type": "number" }, "type": "array" }, "default": {}, "title": "Parameter Bounds", "type": "object" }, "bilayer": { "$ref": "#/$defs/BilayerDynamics" }, "measurements": { "$ref": "#/$defs/BilayerMeasurement", "default": null }, "identical_parameters": { "default": [], "items": { "items": { "type": "string" }, "type": "array" }, "title": "Identical Parameters", "type": "array" } }, "required": [ "bilayer" ], "title": "BilayerModel", "type": "object" }, "BilayerNode": { "description": "Node in a BilayerGraph.", "properties": { "index": { "title": "Index", "type": "integer" }, "parameter": { "title": "Parameter", "type": "string" }, "metadata": { "anyOf": [ { "$ref": "#/$defs/BilayerMetadata" }, { "type": "null" } ], "default": null } }, "required": [ "index", "parameter" ], "title": "BilayerNode", "type": "object" }, "BilayerStateNode": { "description": "BilayerNode representing a state variable.", "properties": { "index": { "title": "Index", "type": "integer" }, "parameter": { "title": "Parameter", "type": "string" }, "metadata": { "anyOf": [ { "$ref": "#/$defs/BilayerMetadata" }, { "type": "null" } ], "default": null } }, "required": [ "index", "parameter" ], "title": "BilayerStateNode", "type": "object" }, "DecapodeDynamics": { "properties": { "json_graph": { "additionalProperties": { "items": { "additionalProperties": { "anyOf": [ { "type": "integer" }, { "type": "string" } ] }, "type": "object" }, "type": "array" }, "title": "Json Graph", "type": "object" } }, "required": [ "json_graph" ], "title": "DecapodeDynamics", "type": "object" }, "DecapodeModel": { "properties": { "name": { "default": "model_a6f04917-34c0-45e0-a42c-128947736090", "title": "Name", "type": "string" }, "init_values": { "additionalProperties": { "type": "number" }, "default": {}, "title": "Init Values", "type": "object" }, "parameter_bounds": { "additionalProperties": { "items": { "type": "number" }, "type": "array" }, "default": {}, "title": "Parameter Bounds", "type": "object" }, "decapode": { "$ref": "#/$defs/DecapodeDynamics" } }, "required": [ "decapode" ], "title": "DecapodeModel", "type": "object" }, "Edge": { "properties": { "id": { "title": "Id", "type": "string" }, "sign": { "title": "Sign", "type": "boolean" }, "source": { "title": "Source", "type": "string" }, "target": { "title": "Target", "type": "string" }, "properties": { "anyOf": [ { "$ref": "#/$defs/BaseProperties" }, { "type": "null" } ], "default": null } }, "required": [ "id", "sign", "source", "target" ], "title": "Edge", "type": "object" }, "EncodedModel": { "description": "Model that holds an SMT formula encoding a model. This class is meant to wrap hand-coded SMT formulas.", "properties": { "name": { "default": "model_a6f04917-34c0-45e0-a42c-128947736090", "title": "Name", "type": "string" }, "init_values": { "additionalProperties": { "type": "number" }, "default": {}, "title": "Init Values", "type": "object" }, "parameter_bounds": { "additionalProperties": { "items": { "type": "number" }, "type": "array" }, "default": {}, "title": "Parameter Bounds", "type": "object" }, "parameters": { "anyOf": [ { "items": { "$ref": "#/$defs/ModelParameter" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Parameters" } }, "title": "EncodedModel", "type": "object" }, "EnsembleModel": { "properties": { "name": { "default": "model_a6f04917-34c0-45e0-a42c-128947736090", "title": "Name", "type": "string" }, "init_values": { "additionalProperties": { "type": "number" }, "default": {}, "title": "Init Values", "type": "object" }, "parameter_bounds": { "additionalProperties": { "items": { "type": "number" }, "type": "array" }, "default": {}, "title": "Parameter Bounds", "type": "object" }, "models": { "items": { "$ref": "#/$defs/FunmanModel" }, "title": "Models", "type": "array" } }, "required": [ "models" ], "title": "EnsembleModel", "type": "object" }, "FunmanModel": { "description": "The abstract base class for Models.", "properties": { "name": { "default": "model_a6f04917-34c0-45e0-a42c-128947736090", "title": "Name", "type": "string" }, "init_values": { "additionalProperties": { "type": "number" }, "default": {}, "title": "Init Values", "type": "object" }, "parameter_bounds": { "additionalProperties": { "items": { "type": "number" }, "type": "array" }, "default": {}, "title": "Parameter Bounds", "type": "object" } }, "title": "FunmanModel", "type": "object" }, "GeneratedPetriNetModel": { "properties": { "name": { "default": "model_a6f04917-34c0-45e0-a42c-128947736090", "title": "Name", "type": "string" }, "init_values": { "additionalProperties": { "type": "number" }, "default": {}, "title": "Init Values", "type": "object" }, "parameter_bounds": { "additionalProperties": { "items": { "type": "number" }, "type": "array" }, "default": {}, "title": "Parameter Bounds", "type": "object" }, "petrinet": { "$ref": "#/$defs/funman__model__generated_models__petrinet__Model" } }, "required": [ "petrinet" ], "title": "GeneratedPetriNetModel", "type": "object" }, "GeneratedRegnetModel": { "properties": { "name": { "default": "model_a6f04917-34c0-45e0-a42c-128947736090", "title": "Name", "type": "string" }, "init_values": { "additionalProperties": { "type": "number" }, "default": {}, "title": "Init Values", "type": "object" }, "parameter_bounds": { "additionalProperties": { "items": { "type": "number" }, "type": "array" }, "default": {}, "title": "Parameter Bounds", "type": "object" }, "regnet": { "$ref": "#/$defs/funman__model__generated_models__regnet__Model" } }, "required": [ "regnet" ], "title": "GeneratedRegnetModel", "type": "object" }, "Header": { "properties": { "name": { "title": "Name", "type": "string" }, "schema": { "format": "uri", "minLength": 1, "title": "Schema", "type": "string" }, "schema_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Schema Name" }, "description": { "title": "Description", "type": "string" }, "model_version": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Model Version" } }, "required": [ "name", "schema", "description" ], "title": "Header", "type": "object" }, "Initial": { "properties": { "target": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Target" }, "expression": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expression" }, "expression_mathml": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expression Mathml" } }, "title": "Initial", "type": "object" }, "Interval": { "description": "An interval is a pair [lb, ub) that is open (i.e., an interval specifies all points x where lb <= x and ub < x).", "properties": { "lb": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": -1.7976931348623157e+308, "title": "Lb" }, "ub": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": 1.7976931348623157e+308, "title": "Ub" }, "closed_upper_bound": { "default": false, "title": "Closed Upper Bound", "type": "boolean" }, "original_width": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Original Width" }, "normalized": { "default": false, "title": "Normalized", "type": "boolean" }, "unnormalized_lb": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Unnormalized Lb" }, "unnormalized_ub": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Unnormalized Ub" } }, "title": "Interval", "type": "object" }, "LinearConstraint": { "additionalProperties": false, "properties": { "soft": { "default": true, "title": "Soft", "type": "boolean" }, "name": { "title": "Name", "type": "string" }, "timepoints": { "anyOf": [ { "$ref": "#/$defs/Interval" }, { "type": "null" } ], "default": null }, "additive_bounds": { "$ref": "#/$defs/Interval" }, "variables": { "items": { "type": "string" }, "title": "Variables", "type": "array" }, "weights": { "anyOf": [ { "items": { "anyOf": [ { "type": "integer" }, { "type": "number" } ] }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Weights" }, "derivative": { "default": false, "title": "Derivative", "type": "boolean" } }, "required": [ "name", "additive_bounds", "variables" ], "title": "LinearConstraint", "type": "object" }, "ModelParameter": { "additionalProperties": false, "description": "A parameter is a free variable for a Model. It has the following attributes:\n\n* lb: lower bound\n\n* ub: upper bound\n\n* symbol: a pysmt FNode corresponding to the parameter variable", "properties": { "name": { "anyOf": [ { "type": "string" }, { "$ref": "#/$defs/ModelSymbol" } ], "title": "Name" }, "interval": { "$ref": "#/$defs/Interval", "default": { "lb": -1.7976931348623157e+308, "ub": 1.7976931348623157e+308, "closed_upper_bound": false, "original_width": Infinity, "normalized": false, "unnormalized_lb": null, "unnormalized_ub": null } }, "label": { "default": "any", "enum": [ "any", "all" ], "title": "Label", "type": "string" } }, "required": [ "name" ], "title": "ModelParameter", "type": "object" }, "ModelSymbol": { "properties": { "name": { "title": "Name", "type": "string" }, "model": { "title": "Model", "type": "string" } }, "required": [ "name", "model" ], "title": "ModelSymbol", "type": "object" }, "Observable": { "properties": { "id": { "title": "Id", "type": "string" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Name" }, "expression": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expression" }, "expression_mathml": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expression Mathml" } }, "required": [ "id" ], "title": "Observable", "type": "object" }, "OdeSemantics": { "properties": { "rates": { "anyOf": [ { "items": { "$ref": "#/$defs/Rate" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Rates" }, "initials": { "anyOf": [ { "items": { "$ref": "#/$defs/Initial" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Initials" }, "parameters": { "anyOf": [ { "items": { "$ref": "#/$defs/funman__model__generated_models__petrinet__Parameter" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Parameters" }, "observables": { "anyOf": [ { "items": { "$ref": "#/$defs/Observable" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Observables" }, "time": { "anyOf": [ { "$ref": "#/$defs/Time" }, { "type": "null" } ], "default": null } }, "title": "OdeSemantics", "type": "object" }, "ParamOrNumber": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "ParamOrNumber" }, "PetrinetDynamics": { "properties": { "json_graph": { "additionalProperties": { "items": { "additionalProperties": { "anyOf": [ { "additionalProperties": { "anyOf": [ { "type": "string" }, { "type": "boolean" }, { "type": "number" }, { "type": "null" } ] }, "type": "object" }, { "type": "integer" }, { "type": "string" }, { "type": "number" }, { "type": "null" } ] }, "type": "object" }, "type": "array" }, "title": "Json Graph", "type": "object" } }, "required": [ "json_graph" ], "title": "PetrinetDynamics", "type": "object" }, "PetrinetModel": { "properties": { "name": { "default": "model_a6f04917-34c0-45e0-a42c-128947736090", "title": "Name", "type": "string" }, "init_values": { "additionalProperties": { "type": "number" }, "default": {}, "title": "Init Values", "type": "object" }, "parameter_bounds": { "additionalProperties": { "items": { "type": "number" }, "type": "array" }, "default": {}, "title": "Parameter Bounds", "type": "object" }, "petrinet": { "$ref": "#/$defs/PetrinetDynamics" } }, "required": [ "petrinet" ], "title": "PetrinetModel", "type": "object" }, "Properties": { "additionalProperties": true, "properties": { "name": { "title": "Name", "type": "string" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Description" }, "grounding": { "anyOf": [ { "$ref": "#/$defs/funman__model__generated_models__petrinet__Grounding" }, { "type": "null" } ], "default": null } }, "required": [ "name" ], "title": "Properties", "type": "object" }, "Query": { "description": "Abstract base class for queries.", "properties": { "model": { "anyOf": [ { "$ref": "#/$defs/FunmanModel" }, { "type": "null" } ], "default": null } }, "title": "Query", "type": "object" }, "QueryAnd": { "description": "Conjunction of queries.\n\nParameters\n----------\nqueries : List[Query]\n queries to conjoin.", "properties": { "model": { "anyOf": [ { "$ref": "#/$defs/FunmanModel" }, { "type": "null" } ], "default": null }, "queries": { "items": { "anyOf": [ { "$ref": "#/$defs/QueryLE" }, { "$ref": "#/$defs/QueryGE" }, { "$ref": "#/$defs/QueryEquals" }, { "$ref": "#/$defs/Query" } ] }, "title": "Queries", "type": "array" } }, "required": [ "queries" ], "title": "QueryAnd", "type": "object" }, "QueryEncoded": { "description": "Class to contain a formula that is already encoded by a pysmt FNode.", "properties": { "model": { "anyOf": [ { "$ref": "#/$defs/FunmanModel" }, { "type": "null" } ], "default": null } }, "title": "QueryEncoded", "type": "object" }, "QueryEquals": { "description": "Class to represent a query of the form: var == value, where var is a variable, and value is a constant.\n\nParameters\n----------\nvariable : str\n model variable name\nvalue : float\n value\nat_end : bool, optional\n apply the constraint to the last timepoint of a scenario only, by default False", "properties": { "model": { "anyOf": [ { "$ref": "#/$defs/FunmanModel" }, { "type": "null" } ], "default": null }, "variable": { "anyOf": [ { "type": "string" }, { "$ref": "#/$defs/ModelSymbol" } ], "title": "Variable" }, "value": { "title": "Value", "type": "number" }, "at_end": { "default": false, "title": "At End", "type": "boolean" } }, "required": [ "variable", "value" ], "title": "QueryEquals", "type": "object" }, "QueryFunction": { "description": "This query uses a Python function passed to the constructor to evaluate a query on the results of a scenario.", "properties": { "model": { "anyOf": [ { "$ref": "#/$defs/FunmanModel" }, { "type": "null" } ], "default": null }, "function": { "title": "Function", "type": "string" } }, "required": [ "function" ], "title": "QueryFunction", "type": "object" }, "QueryGE": { "description": "Class to represent a query of the form: var >= lb, where var is a variable, and lb is a constant lower bound.\n\nParameters\n----------\nvariable : str\n model variable name\nlb : float\n lower bound constant\nat_end : bool, optional\n apply the constraint to the last timepoint of a scenario only, by default False", "properties": { "model": { "anyOf": [ { "$ref": "#/$defs/FunmanModel" }, { "type": "null" } ], "default": null }, "variable": { "anyOf": [ { "type": "string" }, { "$ref": "#/$defs/ModelSymbol" } ], "title": "Variable" }, "lb": { "title": "Lb", "type": "number" }, "at_end": { "default": false, "title": "At End", "type": "boolean" } }, "required": [ "variable", "lb" ], "title": "QueryGE", "type": "object" }, "QueryLE": { "description": "Class to represent a query of the form: var <= ub, where var is a variable, and ub is a constant upper bound.\n\nParameters\n----------\nvariable : str\n model variable name\nub : float\n upper bound constant\nat_end : bool, optional\n apply the constraint to the last timepoint of a scenario only, by default False", "properties": { "model": { "anyOf": [ { "$ref": "#/$defs/FunmanModel" }, { "type": "null" } ], "default": null }, "variable": { "anyOf": [ { "type": "string" }, { "$ref": "#/$defs/ModelSymbol" } ], "title": "Variable" }, "ub": { "title": "Ub", "type": "number" }, "at_end": { "default": false, "title": "At End", "type": "boolean" } }, "required": [ "variable", "ub" ], "title": "QueryLE", "type": "object" }, "QueryTrue": { "additionalProperties": false, "description": "Query that represents logical true. I.e., this query does not place any additional constraints upon a model.", "properties": { "model": { "anyOf": [ { "$ref": "#/$defs/FunmanModel" }, { "type": "null" } ], "default": null } }, "title": "QueryTrue", "type": "object" }, "Rate": { "properties": { "target": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Target" }, "expression": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expression" }, "expression_mathml": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expression Mathml" } }, "title": "Rate", "type": "object" }, "RegnetDynamics": { "properties": { "json_graph": { "additionalProperties": { "anyOf": [ { "type": "string" }, { "additionalProperties": { "items": { "type": "object" }, "type": "array" }, "type": "object" } ] }, "title": "Json Graph", "type": "object" } }, "required": [ "json_graph" ], "title": "RegnetDynamics", "type": "object" }, "RegnetModel": { "properties": { "name": { "default": "model_a6f04917-34c0-45e0-a42c-128947736090", "title": "Name", "type": "string" }, "init_values": { "additionalProperties": { "type": "number" }, "default": {}, "title": "Init Values", "type": "object" }, "parameter_bounds": { "additionalProperties": { "items": { "type": "number" }, "type": "array" }, "default": {}, "title": "Parameter Bounds", "type": "object" }, "regnet": { "$ref": "#/$defs/RegnetDynamics" } }, "required": [ "regnet" ], "title": "RegnetModel", "type": "object" }, "Semantics": { "properties": { "ode": { "anyOf": [ { "$ref": "#/$defs/OdeSemantics" }, { "type": "null" } ], "default": null }, "typing": { "anyOf": [ { "$ref": "#/$defs/TypingSemantics" }, { "type": "null" } ], "default": null, "description": "(Optional) Information for aligning models for stratification" }, "span": { "anyOf": [ { "items": { "$ref": "#/$defs/TypingSemantics" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "(Optional) Legs of a span, each of which are a full ASKEM Petri Net", "title": "Span" } }, "title": "Semantics", "type": "object" }, "State": { "properties": { "id": { "title": "Id", "type": "string" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Description" }, "grounding": { "anyOf": [ { "$ref": "#/$defs/funman__model__generated_models__petrinet__Grounding" }, { "type": "null" } ], "default": null }, "units": { "anyOf": [ { "$ref": "#/$defs/Unit" }, { "type": "null" } ], "default": null } }, "required": [ "id" ], "title": "State", "type": "object" }, "StateVariableConstraint": { "additionalProperties": false, "properties": { "soft": { "default": true, "title": "Soft", "type": "boolean" }, "name": { "title": "Name", "type": "string" }, "timepoints": { "anyOf": [ { "$ref": "#/$defs/Interval" }, { "type": "null" } ], "default": null }, "variable": { "title": "Variable", "type": "string" }, "interval": { "$ref": "#/$defs/Interval", "default": null } }, "required": [ "name", "variable" ], "title": "StateVariableConstraint", "type": "object" }, "States": { "items": { "$ref": "#/$defs/State" }, "title": "States", "type": "array" }, "StructureParameter": { "properties": { "name": { "anyOf": [ { "type": "string" }, { "$ref": "#/$defs/ModelSymbol" } ], "title": "Name" }, "interval": { "$ref": "#/$defs/Interval", "default": { "lb": -1.7976931348623157e+308, "ub": 1.7976931348623157e+308, "closed_upper_bound": false, "original_width": Infinity, "normalized": false, "unnormalized_lb": null, "unnormalized_ub": null } }, "label": { "default": "any", "enum": [ "any", "all" ], "title": "Label", "type": "string" } }, "required": [ "name" ], "title": "StructureParameter", "type": "object" }, "Time": { "properties": { "id": { "title": "Id", "type": "string" }, "units": { "anyOf": [ { "$ref": "#/$defs/Unit" }, { "type": "null" } ], "default": null } }, "required": [ "id" ], "title": "Time", "type": "object" }, "Transition": { "properties": { "id": { "title": "Id", "type": "string" }, "input": { "items": { "type": "string" }, "title": "Input", "type": "array" }, "output": { "items": { "type": "string" }, "title": "Output", "type": "array" }, "grounding": { "anyOf": [ { "$ref": "#/$defs/funman__model__generated_models__petrinet__Grounding" }, { "type": "null" } ], "default": null }, "properties": { "anyOf": [ { "$ref": "#/$defs/Properties" }, { "type": "null" } ], "default": null } }, "required": [ "id", "input", "output" ], "title": "Transition", "type": "object" }, "Transitions": { "items": { "$ref": "#/$defs/Transition" }, "title": "Transitions", "type": "array" }, "TypingSemantics": { "properties": { "system": { "$ref": "#/$defs/funman__model__generated_models__petrinet__Model", "description": "A Petri net representing the 'type system' that is necessary to align states and transitions across different models during stratification." }, "map": { "description": "A map between the (state and transition) nodes of the model and the (state and transition) nodes of the type system", "items": { "items": { "type": "string" }, "type": "array" }, "title": "Map", "type": "array" } }, "required": [ "system", "map" ], "title": "TypingSemantics", "type": "object" }, "Unit": { "additionalProperties": true, "properties": { "expression": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expression" }, "expression_mathml": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expression Mathml" } }, "title": "Unit", "type": "object" }, "Vertice": { "properties": { "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Name" }, "grounding": { "anyOf": [ { "$ref": "#/$defs/funman__model__generated_models__regnet__Grounding" }, { "type": "null" } ], "default": null }, "rate_constant": { "anyOf": [ { "$ref": "#/$defs/ParamOrNumber" }, { "type": "null" } ], "default": null }, "id": { "title": "Id", "type": "string" }, "sign": { "title": "Sign", "type": "boolean" }, "initial": { "anyOf": [ { "$ref": "#/$defs/ParamOrNumber" }, { "type": "null" } ], "default": null } }, "required": [ "id", "sign" ], "title": "Vertice", "type": "object" }, "funman__model__generated_models__petrinet__Distribution": { "additionalProperties": true, "properties": { "type": { "title": "Type", "type": "string" }, "parameters": { "title": "Parameters", "type": "object" } }, "required": [ "type", "parameters" ], "title": "Distribution", "type": "object" }, "funman__model__generated_models__petrinet__Grounding": { "additionalProperties": false, "properties": { "identifiers": { "title": "Identifiers", "type": "object" }, "modifiers": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Modifiers" } }, "required": [ "identifiers" ], "title": "Grounding", "type": "object" }, "funman__model__generated_models__petrinet__Model": { "additionalProperties": true, "properties": { "header": { "$ref": "#/$defs/Header" }, "properties": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Properties" }, "model": { "$ref": "#/$defs/funman__model__generated_models__petrinet__Model1" }, "semantics": { "anyOf": [ { "$ref": "#/$defs/Semantics" }, { "type": "null" } ], "default": null, "description": "Information specific to a given semantics (e.g., ODEs) associated with a model." }, "metadata": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "description": "(Optional) Information not useful for execution of the model, but that may be useful to some consumer in the future. E.g. creation timestamp or source paper's author.", "title": "Metadata" } }, "required": [ "header", "model" ], "title": "Model", "type": "object" }, "funman__model__generated_models__petrinet__Model1": { "additionalProperties": false, "properties": { "states": { "$ref": "#/$defs/States" }, "transitions": { "$ref": "#/$defs/Transitions" } }, "required": [ "states", "transitions" ], "title": "Model1", "type": "object" }, "funman__model__generated_models__petrinet__Parameter": { "properties": { "id": { "title": "Id", "type": "string" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Description" }, "value": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Value" }, "grounding": { "anyOf": [ { "$ref": "#/$defs/funman__model__generated_models__petrinet__Grounding" }, { "type": "null" } ], "default": null }, "distribution": { "anyOf": [ { "$ref": "#/$defs/funman__model__generated_models__petrinet__Distribution" }, { "type": "null" } ], "default": null }, "units": { "anyOf": [ { "$ref": "#/$defs/Unit" }, { "type": "null" } ], "default": null } }, "required": [ "id" ], "title": "Parameter", "type": "object" }, "funman__model__generated_models__regnet__Distribution": { "properties": { "type": { "title": "Type", "type": "string" }, "parameters": { "title": "Parameters", "type": "object" } }, "required": [ "type", "parameters" ], "title": "Distribution", "type": "object" }, "funman__model__generated_models__regnet__Grounding": { "additionalProperties": false, "properties": { "identifiers": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Identifiers" }, "modifiers": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Modifiers" } }, "title": "Grounding", "type": "object" }, "funman__model__generated_models__regnet__Model": { "properties": { "header": { "$ref": "#/$defs/Header" }, "properties": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Properties" }, "model": { "$ref": "#/$defs/funman__model__generated_models__regnet__Model1" }, "metadata": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "description": "(Optional) Information not useful for execution of the model, but that may be useful to some consumer in the future. E.g. creation timestamp or source paper's author.", "title": "Metadata" } }, "required": [ "header", "model" ], "title": "Model", "type": "object" }, "funman__model__generated_models__regnet__Model1": { "additionalProperties": false, "properties": { "vertices": { "items": { "$ref": "#/$defs/Vertice" }, "title": "Vertices", "type": "array" }, "edges": { "items": { "$ref": "#/$defs/Edge" }, "title": "Edges", "type": "array" }, "parameters": { "anyOf": [ { "items": { "$ref": "#/$defs/funman__model__generated_models__regnet__Parameter" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Parameters" } }, "required": [ "vertices", "edges" ], "title": "Model1", "type": "object" }, "funman__model__generated_models__regnet__Parameter": { "properties": { "id": { "title": "Id", "type": "string" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Description" }, "value": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Value" }, "grounding": { "anyOf": [ { "$ref": "#/$defs/funman__model__generated_models__regnet__Grounding" }, { "type": "null" } ], "default": null }, "distribution": { "anyOf": [ { "$ref": "#/$defs/funman__model__generated_models__regnet__Distribution" }, { "type": "null" } ], "default": null } }, "required": [ "id" ], "title": "Parameter", "type": "object" } }, "additionalProperties": false, "required": [ "parameters", "model" ] }
- Config:
extra: str = forbid
- Fields:
- classmethod get_kind() str ¶
- get_search(config: FUNMANConfig) Search ¶
- model_post_init(context: Any, /) None ¶
We need to both initialize private attributes and call the user-defined model_post_init method.
- solve(config: FUNMANConfig, haltEvent: Event | None = None, resultsCallback: Callable[[ParameterSpace], None] | None = None) ParameterSynthesisScenarioResult ¶
Synthesize parameters for a model. Use the BoxSearch algorithm to decompose the parameter space and identify the feasible and infeasible parameter values.
- Parameters:
config (SearchConfig) – Options for the Search algorithm.
- Returns:
The parameter space.
- Return type:
- pydantic model funman.scenario.parameter_synthesis.ParameterSynthesisScenarioResult¶
Bases:
AnalysisScenarioResult
,BaseModel
ParameterSynthesisScenario result, which includes the parameter space and search statistics.
Show JSON schema
{ "title": "ParameterSynthesisScenarioResult", "description": "ParameterSynthesisScenario result, which includes the parameter space and\nsearch statistics.", "type": "object", "properties": { "scenario": { "$ref": "#/$defs/ParameterSynthesisScenario" }, "parameter_space": { "$ref": "#/$defs/ParameterSpace" } }, "$defs": { "Assumption": { "properties": { "constraint": { "anyOf": [ { "$ref": "#/$defs/ModelConstraint" }, { "$ref": "#/$defs/ParameterConstraint" }, { "$ref": "#/$defs/StateVariableConstraint" }, { "$ref": "#/$defs/LinearConstraint" }, { "$ref": "#/$defs/QueryConstraint" } ], "title": "Constraint" } }, "required": [ "constraint" ], "title": "Assumption", "type": "object" }, "BaseProperties": { "properties": { "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Name" }, "grounding": { "anyOf": [ { "$ref": "#/$defs/funman__model__generated_models__regnet__Grounding" }, { "type": "null" } ], "default": null }, "rate_constant": { "anyOf": [ { "$ref": "#/$defs/ParamOrNumber" }, { "type": "null" } ], "default": null } }, "title": "BaseProperties", "type": "object" }, "BilayerDynamics": { "description": "The BilayerDynamics class represents a state update (dynamics) model for a set of variables. The graph consists of:\n\n* state nodes (current state),\n\n* tangent nodes (next state), and\n\n* flux nodes (causal relationships).", "properties": { "json_graph": { "title": "Json Graph", "type": "object" } }, "required": [ "json_graph" ], "title": "BilayerDynamics", "type": "object" }, "BilayerEdge": { "properties": { "src": { "$ref": "#/$defs/BilayerNode" }, "tgt": { "$ref": "#/$defs/BilayerNode" } }, "required": [ "src", "tgt" ], "title": "BilayerEdge", "type": "object" }, "BilayerFluxNode": { "description": "BilayerNode representing a flux.", "properties": { "index": { "title": "Index", "type": "integer" }, "parameter": { "title": "Parameter", "type": "string" }, "metadata": { "anyOf": [ { "$ref": "#/$defs/BilayerMetadata" }, { "type": "null" } ], "default": null } }, "required": [ "index", "parameter" ], "title": "BilayerFluxNode", "type": "object" }, "BilayerMeasurement": { "description": "The BilayerMeasurement class represents measurements taken on the BilayerNode state nodes of a BilayerDynamics object. The graph consists of:\n\n* state nodes (current state),\n\n* observation nodes, and\n\n* flux nodes (causal relationships).", "properties": { "json_graph": { "title": "Json Graph", "type": "object" }, "state": { "additionalProperties": { "$ref": "#/$defs/BilayerStateNode" }, "default": {}, "title": "State", "type": "object" }, "flux": { "additionalProperties": { "$ref": "#/$defs/BilayerFluxNode" }, "default": {}, "title": "Flux", "type": "object" }, "observable": { "additionalProperties": { "$ref": "#/$defs/BilayerStateNode" }, "default": {}, "title": "Observable", "type": "object" }, "input_edges": { "$ref": "#/$defs/BilayerEdge", "default": [] }, "output_edges": { "$ref": "#/$defs/BilayerEdge", "default": [] } }, "required": [ "json_graph" ], "title": "BilayerMeasurement", "type": "object" }, "BilayerMetadata": { "description": "Metadata for a BilayerNode", "properties": { "ref": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Ref" }, "type": { "anyOf": [ { "enum": [ "float", "int" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "Type" }, "initial_value": { "anyOf": [ { "type": "number" }, { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Initial Value" }, "lb": { "anyOf": [ { "type": "number" }, { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Lb" }, "ub": { "anyOf": [ { "type": "number" }, { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Ub" } }, "title": "BilayerMetadata", "type": "object" }, "BilayerModel": { "description": "A BilayerModel is a complete specification of a Model that uses a BilayerDynamics graph to represent dynamics. It includes the attributes:\n\n* bilayer: the BilayerDynamics graph\n\n* measurements: the BilayerMeasurement graph (used to derive additional variables from the state nodes)\n\n* init_values: a dict mapping from state variables and flux parameters to initial value\n\n* identical_parameters: a list of lists of flux parameters that have identical values\n\n* parameter_bounds: a list of lower and upper bounds on parameters", "properties": { "name": { "default": "model_a6f04917-34c0-45e0-a42c-128947736090", "title": "Name", "type": "string" }, "init_values": { "additionalProperties": { "type": "number" }, "default": {}, "title": "Init Values", "type": "object" }, "parameter_bounds": { "additionalProperties": { "items": { "type": "number" }, "type": "array" }, "default": {}, "title": "Parameter Bounds", "type": "object" }, "bilayer": { "$ref": "#/$defs/BilayerDynamics" }, "measurements": { "$ref": "#/$defs/BilayerMeasurement", "default": null }, "identical_parameters": { "default": [], "items": { "items": { "type": "string" }, "type": "array" }, "title": "Identical Parameters", "type": "array" } }, "required": [ "bilayer" ], "title": "BilayerModel", "type": "object" }, "BilayerNode": { "description": "Node in a BilayerGraph.", "properties": { "index": { "title": "Index", "type": "integer" }, "parameter": { "title": "Parameter", "type": "string" }, "metadata": { "anyOf": [ { "$ref": "#/$defs/BilayerMetadata" }, { "type": "null" } ], "default": null } }, "required": [ "index", "parameter" ], "title": "BilayerNode", "type": "object" }, "BilayerStateNode": { "description": "BilayerNode representing a state variable.", "properties": { "index": { "title": "Index", "type": "integer" }, "parameter": { "title": "Parameter", "type": "string" }, "metadata": { "anyOf": [ { "$ref": "#/$defs/BilayerMetadata" }, { "type": "null" } ], "default": null } }, "required": [ "index", "parameter" ], "title": "BilayerStateNode", "type": "object" }, "Box": { "description": "A Box maps n parameters to intervals, representing an n-dimensional connected open subset of R^n.", "properties": { "type": { "const": "box", "default": "box", "enum": [ "box" ], "title": "Type", "type": "string" }, "label": { "default": "unknown", "enum": [ "true", "false", "unknown", "dropped" ], "title": "Label", "type": "string" }, "bounds": { "additionalProperties": { "$ref": "#/$defs/Interval" }, "default": {}, "title": "Bounds", "type": "object" }, "explanation": { "anyOf": [ { "$ref": "#/$defs/BoxExplanation" }, { "type": "null" } ], "default": null }, "schedule": { "anyOf": [ { "$ref": "#/$defs/EncodingSchedule" }, { "type": "null" } ], "default": null }, "corner_points": { "default": [], "items": { "$ref": "#/$defs/Point" }, "title": "Corner Points", "type": "array" }, "points": { "default": [], "items": { "$ref": "#/$defs/Point" }, "title": "Points", "type": "array" } }, "title": "Box", "type": "object" }, "BoxExplanation": { "properties": { "expression": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expression" }, "symbols": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Symbols" }, "relevant_assumptions": { "default": [], "items": { "$ref": "#/$defs/Assumption" }, "title": "Relevant Assumptions", "type": "array" } }, "title": "BoxExplanation", "type": "object" }, "DecapodeDynamics": { "properties": { "json_graph": { "additionalProperties": { "items": { "additionalProperties": { "anyOf": [ { "type": "integer" }, { "type": "string" } ] }, "type": "object" }, "type": "array" }, "title": "Json Graph", "type": "object" } }, "required": [ "json_graph" ], "title": "DecapodeDynamics", "type": "object" }, "DecapodeModel": { "properties": { "name": { "default": "model_a6f04917-34c0-45e0-a42c-128947736090", "title": "Name", "type": "string" }, "init_values": { "additionalProperties": { "type": "number" }, "default": {}, "title": "Init Values", "type": "object" }, "parameter_bounds": { "additionalProperties": { "items": { "type": "number" }, "type": "array" }, "default": {}, "title": "Parameter Bounds", "type": "object" }, "decapode": { "$ref": "#/$defs/DecapodeDynamics" } }, "required": [ "decapode" ], "title": "DecapodeModel", "type": "object" }, "Edge": { "properties": { "id": { "title": "Id", "type": "string" }, "sign": { "title": "Sign", "type": "boolean" }, "source": { "title": "Source", "type": "string" }, "target": { "title": "Target", "type": "string" }, "properties": { "anyOf": [ { "$ref": "#/$defs/BaseProperties" }, { "type": "null" } ], "default": null } }, "required": [ "id", "sign", "source", "target" ], "title": "Edge", "type": "object" }, "EncodedModel": { "description": "Model that holds an SMT formula encoding a model. This class is meant to wrap hand-coded SMT formulas.", "properties": { "name": { "default": "model_a6f04917-34c0-45e0-a42c-128947736090", "title": "Name", "type": "string" }, "init_values": { "additionalProperties": { "type": "number" }, "default": {}, "title": "Init Values", "type": "object" }, "parameter_bounds": { "additionalProperties": { "items": { "type": "number" }, "type": "array" }, "default": {}, "title": "Parameter Bounds", "type": "object" }, "parameters": { "anyOf": [ { "items": { "$ref": "#/$defs/ModelParameter" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Parameters" } }, "title": "EncodedModel", "type": "object" }, "EncodingSchedule": { "properties": { "timepoints": { "items": { "anyOf": [ { "type": "integer" }, { "type": "number" } ] }, "title": "Timepoints", "type": "array" } }, "required": [ "timepoints" ], "title": "EncodingSchedule", "type": "object" }, "EnsembleModel": { "properties": { "name": { "default": "model_a6f04917-34c0-45e0-a42c-128947736090", "title": "Name", "type": "string" }, "init_values": { "additionalProperties": { "type": "number" }, "default": {}, "title": "Init Values", "type": "object" }, "parameter_bounds": { "additionalProperties": { "items": { "type": "number" }, "type": "array" }, "default": {}, "title": "Parameter Bounds", "type": "object" }, "models": { "items": { "$ref": "#/$defs/FunmanModel" }, "title": "Models", "type": "array" } }, "required": [ "models" ], "title": "EnsembleModel", "type": "object" }, "FunmanModel": { "description": "The abstract base class for Models.", "properties": { "name": { "default": "model_a6f04917-34c0-45e0-a42c-128947736090", "title": "Name", "type": "string" }, "init_values": { "additionalProperties": { "type": "number" }, "default": {}, "title": "Init Values", "type": "object" }, "parameter_bounds": { "additionalProperties": { "items": { "type": "number" }, "type": "array" }, "default": {}, "title": "Parameter Bounds", "type": "object" } }, "title": "FunmanModel", "type": "object" }, "GeneratedPetriNetModel": { "properties": { "name": { "default": "model_a6f04917-34c0-45e0-a42c-128947736090", "title": "Name", "type": "string" }, "init_values": { "additionalProperties": { "type": "number" }, "default": {}, "title": "Init Values", "type": "object" }, "parameter_bounds": { "additionalProperties": { "items": { "type": "number" }, "type": "array" }, "default": {}, "title": "Parameter Bounds", "type": "object" }, "petrinet": { "$ref": "#/$defs/funman__model__generated_models__petrinet__Model" } }, "required": [ "petrinet" ], "title": "GeneratedPetriNetModel", "type": "object" }, "GeneratedRegnetModel": { "properties": { "name": { "default": "model_a6f04917-34c0-45e0-a42c-128947736090", "title": "Name", "type": "string" }, "init_values": { "additionalProperties": { "type": "number" }, "default": {}, "title": "Init Values", "type": "object" }, "parameter_bounds": { "additionalProperties": { "items": { "type": "number" }, "type": "array" }, "default": {}, "title": "Parameter Bounds", "type": "object" }, "regnet": { "$ref": "#/$defs/funman__model__generated_models__regnet__Model" } }, "required": [ "regnet" ], "title": "GeneratedRegnetModel", "type": "object" }, "Header": { "properties": { "name": { "title": "Name", "type": "string" }, "schema": { "format": "uri", "minLength": 1, "title": "Schema", "type": "string" }, "schema_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Schema Name" }, "description": { "title": "Description", "type": "string" }, "model_version": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Model Version" } }, "required": [ "name", "schema", "description" ], "title": "Header", "type": "object" }, "Initial": { "properties": { "target": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Target" }, "expression": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expression" }, "expression_mathml": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expression Mathml" } }, "title": "Initial", "type": "object" }, "Interval": { "description": "An interval is a pair [lb, ub) that is open (i.e., an interval specifies all points x where lb <= x and ub < x).", "properties": { "lb": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": -1.7976931348623157e+308, "title": "Lb" }, "ub": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": 1.7976931348623157e+308, "title": "Ub" }, "closed_upper_bound": { "default": false, "title": "Closed Upper Bound", "type": "boolean" }, "original_width": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Original Width" }, "normalized": { "default": false, "title": "Normalized", "type": "boolean" }, "unnormalized_lb": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Unnormalized Lb" }, "unnormalized_ub": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Unnormalized Ub" } }, "title": "Interval", "type": "object" }, "LinearConstraint": { "additionalProperties": false, "properties": { "soft": { "default": true, "title": "Soft", "type": "boolean" }, "name": { "title": "Name", "type": "string" }, "timepoints": { "anyOf": [ { "$ref": "#/$defs/Interval" }, { "type": "null" } ], "default": null }, "additive_bounds": { "$ref": "#/$defs/Interval" }, "variables": { "items": { "type": "string" }, "title": "Variables", "type": "array" }, "weights": { "anyOf": [ { "items": { "anyOf": [ { "type": "integer" }, { "type": "number" } ] }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Weights" }, "derivative": { "default": false, "title": "Derivative", "type": "boolean" } }, "required": [ "name", "additive_bounds", "variables" ], "title": "LinearConstraint", "type": "object" }, "ModelConstraint": { "additionalProperties": false, "properties": { "soft": { "default": false, "title": "Soft", "type": "boolean" }, "name": { "title": "Name", "type": "string" }, "model": { "$ref": "#/$defs/FunmanModel" } }, "required": [ "name", "model" ], "title": "ModelConstraint", "type": "object" }, "ModelParameter": { "additionalProperties": false, "description": "A parameter is a free variable for a Model. It has the following attributes:\n\n* lb: lower bound\n\n* ub: upper bound\n\n* symbol: a pysmt FNode corresponding to the parameter variable", "properties": { "name": { "anyOf": [ { "type": "string" }, { "$ref": "#/$defs/ModelSymbol" } ], "title": "Name" }, "interval": { "$ref": "#/$defs/Interval", "default": { "lb": -1.7976931348623157e+308, "ub": 1.7976931348623157e+308, "closed_upper_bound": false, "original_width": Infinity, "normalized": false, "unnormalized_lb": null, "unnormalized_ub": null } }, "label": { "default": "any", "enum": [ "any", "all" ], "title": "Label", "type": "string" } }, "required": [ "name" ], "title": "ModelParameter", "type": "object" }, "ModelSymbol": { "properties": { "name": { "title": "Name", "type": "string" }, "model": { "title": "Model", "type": "string" } }, "required": [ "name", "model" ], "title": "ModelSymbol", "type": "object" }, "Observable": { "properties": { "id": { "title": "Id", "type": "string" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Name" }, "expression": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expression" }, "expression_mathml": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expression Mathml" } }, "required": [ "id" ], "title": "Observable", "type": "object" }, "OdeSemantics": { "properties": { "rates": { "anyOf": [ { "items": { "$ref": "#/$defs/Rate" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Rates" }, "initials": { "anyOf": [ { "items": { "$ref": "#/$defs/Initial" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Initials" }, "parameters": { "anyOf": [ { "items": { "$ref": "#/$defs/funman__model__generated_models__petrinet__Parameter" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Parameters" }, "observables": { "anyOf": [ { "items": { "$ref": "#/$defs/Observable" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Observables" }, "time": { "anyOf": [ { "$ref": "#/$defs/Time" }, { "type": "null" } ], "default": null } }, "title": "OdeSemantics", "type": "object" }, "ParamOrNumber": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "ParamOrNumber" }, "ParameterConstraint": { "additionalProperties": false, "properties": { "soft": { "default": false, "title": "Soft", "type": "boolean" }, "name": { "title": "Name", "type": "string" }, "parameter": { "anyOf": [ { "$ref": "#/$defs/ModelParameter" }, { "$ref": "#/$defs/StructureParameter" } ], "title": "Parameter" } }, "required": [ "name", "parameter" ], "title": "ParameterConstraint", "type": "object" }, "ParameterSpace": { "description": "This class defines the representation of the parameter space that can be\nreturned by the parameter synthesis feature of FUNMAN. These parameter spaces\nare represented as a collection of boxes that are either known to be true or\nknown to be false.", "properties": { "num_dimensions": { "default": null, "title": "Num Dimensions", "type": "integer" }, "true_boxes": { "default": [], "items": { "$ref": "#/$defs/Box" }, "title": "True Boxes", "type": "array" }, "false_boxes": { "default": [], "items": { "$ref": "#/$defs/Box" }, "title": "False Boxes", "type": "array" }, "unknown_points": { "default": [], "items": { "$ref": "#/$defs/Point" }, "title": "Unknown Points", "type": "array" } }, "title": "ParameterSpace", "type": "object" }, "ParameterSynthesisScenario": { "additionalProperties": false, "description": "Parameter synthesis problem description that identifies the parameters to\nsynthesize for a particular model. The general problem is to identify\nmulti-dimensional (one dimension per parameter) regions where either all\npoints in the region are valid (true) parameters for the model or invalid\n(false) parameters.", "properties": { "parameters": { "items": { "anyOf": [ { "$ref": "#/$defs/funman__model__generated_models__petrinet__Parameter" }, { "$ref": "#/$defs/ModelParameter" }, { "$ref": "#/$defs/StructureParameter" } ] }, "title": "Parameters", "type": "array" }, "normalization_constant": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Normalization Constant" }, "constraints": { "anyOf": [ { "items": { "anyOf": [ { "$ref": "#/$defs/StateVariableConstraint" }, { "$ref": "#/$defs/LinearConstraint" } ] }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Constraints" }, "empty_volume_ok": { "default": false, "title": "Empty Volume Ok", "type": "boolean" }, "model": { "anyOf": [ { "$ref": "#/$defs/GeneratedPetriNetModel" }, { "$ref": "#/$defs/GeneratedRegnetModel" }, { "$ref": "#/$defs/RegnetModel" }, { "$ref": "#/$defs/PetrinetModel" }, { "$ref": "#/$defs/DecapodeModel" }, { "$ref": "#/$defs/BilayerModel" }, { "$ref": "#/$defs/EncodedModel" }, { "$ref": "#/$defs/EnsembleModel" } ], "title": "Model" }, "query": { "anyOf": [ { "$ref": "#/$defs/QueryAnd" }, { "$ref": "#/$defs/QueryGE" }, { "$ref": "#/$defs/QueryLE" }, { "$ref": "#/$defs/QueryEncoded" }, { "$ref": "#/$defs/QueryFunction" }, { "$ref": "#/$defs/QueryTrue" } ], "default": { "model": null }, "title": "Query" } }, "required": [ "parameters", "model" ], "title": "ParameterSynthesisScenario", "type": "object" }, "PetrinetDynamics": { "properties": { "json_graph": { "additionalProperties": { "items": { "additionalProperties": { "anyOf": [ { "additionalProperties": { "anyOf": [ { "type": "string" }, { "type": "boolean" }, { "type": "number" }, { "type": "null" } ] }, "type": "object" }, { "type": "integer" }, { "type": "string" }, { "type": "number" }, { "type": "null" } ] }, "type": "object" }, "type": "array" }, "title": "Json Graph", "type": "object" } }, "required": [ "json_graph" ], "title": "PetrinetDynamics", "type": "object" }, "PetrinetModel": { "properties": { "name": { "default": "model_a6f04917-34c0-45e0-a42c-128947736090", "title": "Name", "type": "string" }, "init_values": { "additionalProperties": { "type": "number" }, "default": {}, "title": "Init Values", "type": "object" }, "parameter_bounds": { "additionalProperties": { "items": { "type": "number" }, "type": "array" }, "default": {}, "title": "Parameter Bounds", "type": "object" }, "petrinet": { "$ref": "#/$defs/PetrinetDynamics" } }, "required": [ "petrinet" ], "title": "PetrinetModel", "type": "object" }, "Point": { "properties": { "type": { "const": "point", "default": "point", "enum": [ "point" ], "title": "Type", "type": "string" }, "label": { "default": "unknown", "enum": [ "true", "false", "unknown", "dropped" ], "title": "Label", "type": "string" }, "values": { "additionalProperties": { "anyOf": [ { "type": "number" }, { "type": "integer" }, { "$ref": "#/$defs/EncodingSchedule" }, { "type": "null" } ] }, "title": "Values", "type": "object" }, "normalized_values": { "anyOf": [ { "additionalProperties": { "type": "number" }, "type": "object" }, { "type": "null" } ], "default": null, "title": "Normalized Values" }, "schedule": { "anyOf": [ { "$ref": "#/$defs/EncodingSchedule" }, { "type": "null" } ], "default": null }, "simulation": { "anyOf": [ { "$ref": "#/$defs/Timeseries" }, { "type": "null" } ], "default": null } }, "required": [ "values" ], "title": "Point", "type": "object" }, "Properties": { "additionalProperties": true, "properties": { "name": { "title": "Name", "type": "string" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Description" }, "grounding": { "anyOf": [ { "$ref": "#/$defs/funman__model__generated_models__petrinet__Grounding" }, { "type": "null" } ], "default": null } }, "required": [ "name" ], "title": "Properties", "type": "object" }, "Query": { "description": "Abstract base class for queries.", "properties": { "model": { "anyOf": [ { "$ref": "#/$defs/FunmanModel" }, { "type": "null" } ], "default": null } }, "title": "Query", "type": "object" }, "QueryAnd": { "description": "Conjunction of queries.\n\nParameters\n----------\nqueries : List[Query]\n queries to conjoin.", "properties": { "model": { "anyOf": [ { "$ref": "#/$defs/FunmanModel" }, { "type": "null" } ], "default": null }, "queries": { "items": { "anyOf": [ { "$ref": "#/$defs/QueryLE" }, { "$ref": "#/$defs/QueryGE" }, { "$ref": "#/$defs/QueryEquals" }, { "$ref": "#/$defs/Query" } ] }, "title": "Queries", "type": "array" } }, "required": [ "queries" ], "title": "QueryAnd", "type": "object" }, "QueryConstraint": { "additionalProperties": false, "properties": { "soft": { "default": true, "title": "Soft", "type": "boolean" }, "name": { "title": "Name", "type": "string" }, "timepoints": { "anyOf": [ { "$ref": "#/$defs/Interval" }, { "type": "null" } ], "default": null }, "query": { "$ref": "#/$defs/Query" } }, "required": [ "name", "query" ], "title": "QueryConstraint", "type": "object" }, "QueryEncoded": { "description": "Class to contain a formula that is already encoded by a pysmt FNode.", "properties": { "model": { "anyOf": [ { "$ref": "#/$defs/FunmanModel" }, { "type": "null" } ], "default": null } }, "title": "QueryEncoded", "type": "object" }, "QueryEquals": { "description": "Class to represent a query of the form: var == value, where var is a variable, and value is a constant.\n\nParameters\n----------\nvariable : str\n model variable name\nvalue : float\n value\nat_end : bool, optional\n apply the constraint to the last timepoint of a scenario only, by default False", "properties": { "model": { "anyOf": [ { "$ref": "#/$defs/FunmanModel" }, { "type": "null" } ], "default": null }, "variable": { "anyOf": [ { "type": "string" }, { "$ref": "#/$defs/ModelSymbol" } ], "title": "Variable" }, "value": { "title": "Value", "type": "number" }, "at_end": { "default": false, "title": "At End", "type": "boolean" } }, "required": [ "variable", "value" ], "title": "QueryEquals", "type": "object" }, "QueryFunction": { "description": "This query uses a Python function passed to the constructor to evaluate a query on the results of a scenario.", "properties": { "model": { "anyOf": [ { "$ref": "#/$defs/FunmanModel" }, { "type": "null" } ], "default": null }, "function": { "title": "Function", "type": "string" } }, "required": [ "function" ], "title": "QueryFunction", "type": "object" }, "QueryGE": { "description": "Class to represent a query of the form: var >= lb, where var is a variable, and lb is a constant lower bound.\n\nParameters\n----------\nvariable : str\n model variable name\nlb : float\n lower bound constant\nat_end : bool, optional\n apply the constraint to the last timepoint of a scenario only, by default False", "properties": { "model": { "anyOf": [ { "$ref": "#/$defs/FunmanModel" }, { "type": "null" } ], "default": null }, "variable": { "anyOf": [ { "type": "string" }, { "$ref": "#/$defs/ModelSymbol" } ], "title": "Variable" }, "lb": { "title": "Lb", "type": "number" }, "at_end": { "default": false, "title": "At End", "type": "boolean" } }, "required": [ "variable", "lb" ], "title": "QueryGE", "type": "object" }, "QueryLE": { "description": "Class to represent a query of the form: var <= ub, where var is a variable, and ub is a constant upper bound.\n\nParameters\n----------\nvariable : str\n model variable name\nub : float\n upper bound constant\nat_end : bool, optional\n apply the constraint to the last timepoint of a scenario only, by default False", "properties": { "model": { "anyOf": [ { "$ref": "#/$defs/FunmanModel" }, { "type": "null" } ], "default": null }, "variable": { "anyOf": [ { "type": "string" }, { "$ref": "#/$defs/ModelSymbol" } ], "title": "Variable" }, "ub": { "title": "Ub", "type": "number" }, "at_end": { "default": false, "title": "At End", "type": "boolean" } }, "required": [ "variable", "ub" ], "title": "QueryLE", "type": "object" }, "QueryTrue": { "additionalProperties": false, "description": "Query that represents logical true. I.e., this query does not place any additional constraints upon a model.", "properties": { "model": { "anyOf": [ { "$ref": "#/$defs/FunmanModel" }, { "type": "null" } ], "default": null } }, "title": "QueryTrue", "type": "object" }, "Rate": { "properties": { "target": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Target" }, "expression": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expression" }, "expression_mathml": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expression Mathml" } }, "title": "Rate", "type": "object" }, "RegnetDynamics": { "properties": { "json_graph": { "additionalProperties": { "anyOf": [ { "type": "string" }, { "additionalProperties": { "items": { "type": "object" }, "type": "array" }, "type": "object" } ] }, "title": "Json Graph", "type": "object" } }, "required": [ "json_graph" ], "title": "RegnetDynamics", "type": "object" }, "RegnetModel": { "properties": { "name": { "default": "model_a6f04917-34c0-45e0-a42c-128947736090", "title": "Name", "type": "string" }, "init_values": { "additionalProperties": { "type": "number" }, "default": {}, "title": "Init Values", "type": "object" }, "parameter_bounds": { "additionalProperties": { "items": { "type": "number" }, "type": "array" }, "default": {}, "title": "Parameter Bounds", "type": "object" }, "regnet": { "$ref": "#/$defs/RegnetDynamics" } }, "required": [ "regnet" ], "title": "RegnetModel", "type": "object" }, "Semantics": { "properties": { "ode": { "anyOf": [ { "$ref": "#/$defs/OdeSemantics" }, { "type": "null" } ], "default": null }, "typing": { "anyOf": [ { "$ref": "#/$defs/TypingSemantics" }, { "type": "null" } ], "default": null, "description": "(Optional) Information for aligning models for stratification" }, "span": { "anyOf": [ { "items": { "$ref": "#/$defs/TypingSemantics" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "(Optional) Legs of a span, each of which are a full ASKEM Petri Net", "title": "Span" } }, "title": "Semantics", "type": "object" }, "State": { "properties": { "id": { "title": "Id", "type": "string" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Description" }, "grounding": { "anyOf": [ { "$ref": "#/$defs/funman__model__generated_models__petrinet__Grounding" }, { "type": "null" } ], "default": null }, "units": { "anyOf": [ { "$ref": "#/$defs/Unit" }, { "type": "null" } ], "default": null } }, "required": [ "id" ], "title": "State", "type": "object" }, "StateVariableConstraint": { "additionalProperties": false, "properties": { "soft": { "default": true, "title": "Soft", "type": "boolean" }, "name": { "title": "Name", "type": "string" }, "timepoints": { "anyOf": [ { "$ref": "#/$defs/Interval" }, { "type": "null" } ], "default": null }, "variable": { "title": "Variable", "type": "string" }, "interval": { "$ref": "#/$defs/Interval", "default": null } }, "required": [ "name", "variable" ], "title": "StateVariableConstraint", "type": "object" }, "States": { "items": { "$ref": "#/$defs/State" }, "title": "States", "type": "array" }, "StructureParameter": { "properties": { "name": { "anyOf": [ { "type": "string" }, { "$ref": "#/$defs/ModelSymbol" } ], "title": "Name" }, "interval": { "$ref": "#/$defs/Interval", "default": { "lb": -1.7976931348623157e+308, "ub": 1.7976931348623157e+308, "closed_upper_bound": false, "original_width": Infinity, "normalized": false, "unnormalized_lb": null, "unnormalized_ub": null } }, "label": { "default": "any", "enum": [ "any", "all" ], "title": "Label", "type": "string" } }, "required": [ "name" ], "title": "StructureParameter", "type": "object" }, "Time": { "properties": { "id": { "title": "Id", "type": "string" }, "units": { "anyOf": [ { "$ref": "#/$defs/Unit" }, { "type": "null" } ], "default": null } }, "required": [ "id" ], "title": "Time", "type": "object" }, "Timeseries": { "properties": { "data": { "items": { "anyOf": [ { "type": "number" }, { "items": { "type": "number" }, "type": "array" } ] }, "title": "Data", "type": "array" }, "columns": { "items": { "type": "string" }, "title": "Columns", "type": "array" } }, "required": [ "data", "columns" ], "title": "Timeseries", "type": "object" }, "Transition": { "properties": { "id": { "title": "Id", "type": "string" }, "input": { "items": { "type": "string" }, "title": "Input", "type": "array" }, "output": { "items": { "type": "string" }, "title": "Output", "type": "array" }, "grounding": { "anyOf": [ { "$ref": "#/$defs/funman__model__generated_models__petrinet__Grounding" }, { "type": "null" } ], "default": null }, "properties": { "anyOf": [ { "$ref": "#/$defs/Properties" }, { "type": "null" } ], "default": null } }, "required": [ "id", "input", "output" ], "title": "Transition", "type": "object" }, "Transitions": { "items": { "$ref": "#/$defs/Transition" }, "title": "Transitions", "type": "array" }, "TypingSemantics": { "properties": { "system": { "$ref": "#/$defs/funman__model__generated_models__petrinet__Model", "description": "A Petri net representing the 'type system' that is necessary to align states and transitions across different models during stratification." }, "map": { "description": "A map between the (state and transition) nodes of the model and the (state and transition) nodes of the type system", "items": { "items": { "type": "string" }, "type": "array" }, "title": "Map", "type": "array" } }, "required": [ "system", "map" ], "title": "TypingSemantics", "type": "object" }, "Unit": { "additionalProperties": true, "properties": { "expression": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expression" }, "expression_mathml": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expression Mathml" } }, "title": "Unit", "type": "object" }, "Vertice": { "properties": { "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Name" }, "grounding": { "anyOf": [ { "$ref": "#/$defs/funman__model__generated_models__regnet__Grounding" }, { "type": "null" } ], "default": null }, "rate_constant": { "anyOf": [ { "$ref": "#/$defs/ParamOrNumber" }, { "type": "null" } ], "default": null }, "id": { "title": "Id", "type": "string" }, "sign": { "title": "Sign", "type": "boolean" }, "initial": { "anyOf": [ { "$ref": "#/$defs/ParamOrNumber" }, { "type": "null" } ], "default": null } }, "required": [ "id", "sign" ], "title": "Vertice", "type": "object" }, "funman__model__generated_models__petrinet__Distribution": { "additionalProperties": true, "properties": { "type": { "title": "Type", "type": "string" }, "parameters": { "title": "Parameters", "type": "object" } }, "required": [ "type", "parameters" ], "title": "Distribution", "type": "object" }, "funman__model__generated_models__petrinet__Grounding": { "additionalProperties": false, "properties": { "identifiers": { "title": "Identifiers", "type": "object" }, "modifiers": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Modifiers" } }, "required": [ "identifiers" ], "title": "Grounding", "type": "object" }, "funman__model__generated_models__petrinet__Model": { "additionalProperties": true, "properties": { "header": { "$ref": "#/$defs/Header" }, "properties": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Properties" }, "model": { "$ref": "#/$defs/funman__model__generated_models__petrinet__Model1" }, "semantics": { "anyOf": [ { "$ref": "#/$defs/Semantics" }, { "type": "null" } ], "default": null, "description": "Information specific to a given semantics (e.g., ODEs) associated with a model." }, "metadata": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "description": "(Optional) Information not useful for execution of the model, but that may be useful to some consumer in the future. E.g. creation timestamp or source paper's author.", "title": "Metadata" } }, "required": [ "header", "model" ], "title": "Model", "type": "object" }, "funman__model__generated_models__petrinet__Model1": { "additionalProperties": false, "properties": { "states": { "$ref": "#/$defs/States" }, "transitions": { "$ref": "#/$defs/Transitions" } }, "required": [ "states", "transitions" ], "title": "Model1", "type": "object" }, "funman__model__generated_models__petrinet__Parameter": { "properties": { "id": { "title": "Id", "type": "string" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Description" }, "value": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Value" }, "grounding": { "anyOf": [ { "$ref": "#/$defs/funman__model__generated_models__petrinet__Grounding" }, { "type": "null" } ], "default": null }, "distribution": { "anyOf": [ { "$ref": "#/$defs/funman__model__generated_models__petrinet__Distribution" }, { "type": "null" } ], "default": null }, "units": { "anyOf": [ { "$ref": "#/$defs/Unit" }, { "type": "null" } ], "default": null } }, "required": [ "id" ], "title": "Parameter", "type": "object" }, "funman__model__generated_models__regnet__Distribution": { "properties": { "type": { "title": "Type", "type": "string" }, "parameters": { "title": "Parameters", "type": "object" } }, "required": [ "type", "parameters" ], "title": "Distribution", "type": "object" }, "funman__model__generated_models__regnet__Grounding": { "additionalProperties": false, "properties": { "identifiers": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Identifiers" }, "modifiers": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Modifiers" } }, "title": "Grounding", "type": "object" }, "funman__model__generated_models__regnet__Model": { "properties": { "header": { "$ref": "#/$defs/Header" }, "properties": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Properties" }, "model": { "$ref": "#/$defs/funman__model__generated_models__regnet__Model1" }, "metadata": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "description": "(Optional) Information not useful for execution of the model, but that may be useful to some consumer in the future. E.g. creation timestamp or source paper's author.", "title": "Metadata" } }, "required": [ "header", "model" ], "title": "Model", "type": "object" }, "funman__model__generated_models__regnet__Model1": { "additionalProperties": false, "properties": { "vertices": { "items": { "$ref": "#/$defs/Vertice" }, "title": "Vertices", "type": "array" }, "edges": { "items": { "$ref": "#/$defs/Edge" }, "title": "Edges", "type": "array" }, "parameters": { "anyOf": [ { "items": { "$ref": "#/$defs/funman__model__generated_models__regnet__Parameter" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Parameters" } }, "required": [ "vertices", "edges" ], "title": "Model1", "type": "object" }, "funman__model__generated_models__regnet__Parameter": { "properties": { "id": { "title": "Id", "type": "string" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Description" }, "value": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Value" }, "grounding": { "anyOf": [ { "$ref": "#/$defs/funman__model__generated_models__regnet__Grounding" }, { "type": "null" } ], "default": null }, "distribution": { "anyOf": [ { "$ref": "#/$defs/funman__model__generated_models__regnet__Distribution" }, { "type": "null" } ], "default": null } }, "required": [ "id" ], "title": "Parameter", "type": "object" } }, "required": [ "scenario", "parameter_space" ] }
- Config:
arbitrary_types_allowed: bool = True
- Fields:
- field parameter_space: ParameterSpace [Required]¶
- field scenario: ParameterSynthesisScenario [Required]¶
- plot(**kwargs)¶
Plot the results
- Raises:
NotImplementedError – TODO
- true_point_timeseries(points: List[Point] | List[dict] = typing.List[pandas.core.frame.DataFrame])¶
Get a timeseries for each of the points, assuming that the points are in the parameter space.
- Parameters:
points (Union[List[Point], List[dict]], optional) – points to use to genrate a timeseries, by default None
- Returns:
a list of dataframes that list a timeseries of values for each model variable.
- Return type:
List[Dataframe]
- Raises:
Exception – malformed points
funman.scenario.scenario module¶
- pydantic model funman.scenario.scenario.AnalysisScenario¶
Bases:
ABC
,BaseModel
Abstract class for Analysis Scenarios.
Show JSON schema
{ "title": "AnalysisScenario", "description": "Abstract class for Analysis Scenarios.", "type": "object", "properties": { "parameters": { "items": { "anyOf": [ { "$ref": "#/$defs/funman__model__generated_models__petrinet__Parameter" }, { "$ref": "#/$defs/ModelParameter" }, { "$ref": "#/$defs/StructureParameter" } ] }, "title": "Parameters", "type": "array" }, "normalization_constant": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Normalization Constant" }, "constraints": { "anyOf": [ { "items": { "anyOf": [ { "$ref": "#/$defs/StateVariableConstraint" }, { "$ref": "#/$defs/LinearConstraint" } ] }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Constraints" }, "empty_volume_ok": { "default": false, "title": "Empty Volume Ok", "type": "boolean" }, "model": { "anyOf": [ { "$ref": "#/$defs/GeneratedPetriNetModel" }, { "$ref": "#/$defs/GeneratedRegnetModel" }, { "$ref": "#/$defs/RegnetModel" }, { "$ref": "#/$defs/PetrinetModel" }, { "$ref": "#/$defs/DecapodeModel" }, { "$ref": "#/$defs/BilayerModel" }, { "$ref": "#/$defs/EncodedModel" }, { "$ref": "#/$defs/EnsembleModel" } ], "title": "Model" }, "query": { "anyOf": [ { "$ref": "#/$defs/QueryAnd" }, { "$ref": "#/$defs/QueryGE" }, { "$ref": "#/$defs/QueryLE" }, { "$ref": "#/$defs/QueryEncoded" }, { "$ref": "#/$defs/QueryFunction" }, { "$ref": "#/$defs/QueryTrue" } ], "default": { "model": null }, "title": "Query" } }, "$defs": { "BaseProperties": { "properties": { "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Name" }, "grounding": { "anyOf": [ { "$ref": "#/$defs/funman__model__generated_models__regnet__Grounding" }, { "type": "null" } ], "default": null }, "rate_constant": { "anyOf": [ { "$ref": "#/$defs/ParamOrNumber" }, { "type": "null" } ], "default": null } }, "title": "BaseProperties", "type": "object" }, "BilayerDynamics": { "description": "The BilayerDynamics class represents a state update (dynamics) model for a set of variables. The graph consists of:\n\n* state nodes (current state),\n\n* tangent nodes (next state), and\n\n* flux nodes (causal relationships).", "properties": { "json_graph": { "title": "Json Graph", "type": "object" } }, "required": [ "json_graph" ], "title": "BilayerDynamics", "type": "object" }, "BilayerEdge": { "properties": { "src": { "$ref": "#/$defs/BilayerNode" }, "tgt": { "$ref": "#/$defs/BilayerNode" } }, "required": [ "src", "tgt" ], "title": "BilayerEdge", "type": "object" }, "BilayerFluxNode": { "description": "BilayerNode representing a flux.", "properties": { "index": { "title": "Index", "type": "integer" }, "parameter": { "title": "Parameter", "type": "string" }, "metadata": { "anyOf": [ { "$ref": "#/$defs/BilayerMetadata" }, { "type": "null" } ], "default": null } }, "required": [ "index", "parameter" ], "title": "BilayerFluxNode", "type": "object" }, "BilayerMeasurement": { "description": "The BilayerMeasurement class represents measurements taken on the BilayerNode state nodes of a BilayerDynamics object. The graph consists of:\n\n* state nodes (current state),\n\n* observation nodes, and\n\n* flux nodes (causal relationships).", "properties": { "json_graph": { "title": "Json Graph", "type": "object" }, "state": { "additionalProperties": { "$ref": "#/$defs/BilayerStateNode" }, "default": {}, "title": "State", "type": "object" }, "flux": { "additionalProperties": { "$ref": "#/$defs/BilayerFluxNode" }, "default": {}, "title": "Flux", "type": "object" }, "observable": { "additionalProperties": { "$ref": "#/$defs/BilayerStateNode" }, "default": {}, "title": "Observable", "type": "object" }, "input_edges": { "$ref": "#/$defs/BilayerEdge", "default": [] }, "output_edges": { "$ref": "#/$defs/BilayerEdge", "default": [] } }, "required": [ "json_graph" ], "title": "BilayerMeasurement", "type": "object" }, "BilayerMetadata": { "description": "Metadata for a BilayerNode", "properties": { "ref": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Ref" }, "type": { "anyOf": [ { "enum": [ "float", "int" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "Type" }, "initial_value": { "anyOf": [ { "type": "number" }, { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Initial Value" }, "lb": { "anyOf": [ { "type": "number" }, { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Lb" }, "ub": { "anyOf": [ { "type": "number" }, { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Ub" } }, "title": "BilayerMetadata", "type": "object" }, "BilayerModel": { "description": "A BilayerModel is a complete specification of a Model that uses a BilayerDynamics graph to represent dynamics. It includes the attributes:\n\n* bilayer: the BilayerDynamics graph\n\n* measurements: the BilayerMeasurement graph (used to derive additional variables from the state nodes)\n\n* init_values: a dict mapping from state variables and flux parameters to initial value\n\n* identical_parameters: a list of lists of flux parameters that have identical values\n\n* parameter_bounds: a list of lower and upper bounds on parameters", "properties": { "name": { "default": "model_a6f04917-34c0-45e0-a42c-128947736090", "title": "Name", "type": "string" }, "init_values": { "additionalProperties": { "type": "number" }, "default": {}, "title": "Init Values", "type": "object" }, "parameter_bounds": { "additionalProperties": { "items": { "type": "number" }, "type": "array" }, "default": {}, "title": "Parameter Bounds", "type": "object" }, "bilayer": { "$ref": "#/$defs/BilayerDynamics" }, "measurements": { "$ref": "#/$defs/BilayerMeasurement", "default": null }, "identical_parameters": { "default": [], "items": { "items": { "type": "string" }, "type": "array" }, "title": "Identical Parameters", "type": "array" } }, "required": [ "bilayer" ], "title": "BilayerModel", "type": "object" }, "BilayerNode": { "description": "Node in a BilayerGraph.", "properties": { "index": { "title": "Index", "type": "integer" }, "parameter": { "title": "Parameter", "type": "string" }, "metadata": { "anyOf": [ { "$ref": "#/$defs/BilayerMetadata" }, { "type": "null" } ], "default": null } }, "required": [ "index", "parameter" ], "title": "BilayerNode", "type": "object" }, "BilayerStateNode": { "description": "BilayerNode representing a state variable.", "properties": { "index": { "title": "Index", "type": "integer" }, "parameter": { "title": "Parameter", "type": "string" }, "metadata": { "anyOf": [ { "$ref": "#/$defs/BilayerMetadata" }, { "type": "null" } ], "default": null } }, "required": [ "index", "parameter" ], "title": "BilayerStateNode", "type": "object" }, "DecapodeDynamics": { "properties": { "json_graph": { "additionalProperties": { "items": { "additionalProperties": { "anyOf": [ { "type": "integer" }, { "type": "string" } ] }, "type": "object" }, "type": "array" }, "title": "Json Graph", "type": "object" } }, "required": [ "json_graph" ], "title": "DecapodeDynamics", "type": "object" }, "DecapodeModel": { "properties": { "name": { "default": "model_a6f04917-34c0-45e0-a42c-128947736090", "title": "Name", "type": "string" }, "init_values": { "additionalProperties": { "type": "number" }, "default": {}, "title": "Init Values", "type": "object" }, "parameter_bounds": { "additionalProperties": { "items": { "type": "number" }, "type": "array" }, "default": {}, "title": "Parameter Bounds", "type": "object" }, "decapode": { "$ref": "#/$defs/DecapodeDynamics" } }, "required": [ "decapode" ], "title": "DecapodeModel", "type": "object" }, "Edge": { "properties": { "id": { "title": "Id", "type": "string" }, "sign": { "title": "Sign", "type": "boolean" }, "source": { "title": "Source", "type": "string" }, "target": { "title": "Target", "type": "string" }, "properties": { "anyOf": [ { "$ref": "#/$defs/BaseProperties" }, { "type": "null" } ], "default": null } }, "required": [ "id", "sign", "source", "target" ], "title": "Edge", "type": "object" }, "EncodedModel": { "description": "Model that holds an SMT formula encoding a model. This class is meant to wrap hand-coded SMT formulas.", "properties": { "name": { "default": "model_a6f04917-34c0-45e0-a42c-128947736090", "title": "Name", "type": "string" }, "init_values": { "additionalProperties": { "type": "number" }, "default": {}, "title": "Init Values", "type": "object" }, "parameter_bounds": { "additionalProperties": { "items": { "type": "number" }, "type": "array" }, "default": {}, "title": "Parameter Bounds", "type": "object" }, "parameters": { "anyOf": [ { "items": { "$ref": "#/$defs/ModelParameter" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Parameters" } }, "title": "EncodedModel", "type": "object" }, "EnsembleModel": { "properties": { "name": { "default": "model_a6f04917-34c0-45e0-a42c-128947736090", "title": "Name", "type": "string" }, "init_values": { "additionalProperties": { "type": "number" }, "default": {}, "title": "Init Values", "type": "object" }, "parameter_bounds": { "additionalProperties": { "items": { "type": "number" }, "type": "array" }, "default": {}, "title": "Parameter Bounds", "type": "object" }, "models": { "items": { "$ref": "#/$defs/FunmanModel" }, "title": "Models", "type": "array" } }, "required": [ "models" ], "title": "EnsembleModel", "type": "object" }, "FunmanModel": { "description": "The abstract base class for Models.", "properties": { "name": { "default": "model_a6f04917-34c0-45e0-a42c-128947736090", "title": "Name", "type": "string" }, "init_values": { "additionalProperties": { "type": "number" }, "default": {}, "title": "Init Values", "type": "object" }, "parameter_bounds": { "additionalProperties": { "items": { "type": "number" }, "type": "array" }, "default": {}, "title": "Parameter Bounds", "type": "object" } }, "title": "FunmanModel", "type": "object" }, "GeneratedPetriNetModel": { "properties": { "name": { "default": "model_a6f04917-34c0-45e0-a42c-128947736090", "title": "Name", "type": "string" }, "init_values": { "additionalProperties": { "type": "number" }, "default": {}, "title": "Init Values", "type": "object" }, "parameter_bounds": { "additionalProperties": { "items": { "type": "number" }, "type": "array" }, "default": {}, "title": "Parameter Bounds", "type": "object" }, "petrinet": { "$ref": "#/$defs/funman__model__generated_models__petrinet__Model" } }, "required": [ "petrinet" ], "title": "GeneratedPetriNetModel", "type": "object" }, "GeneratedRegnetModel": { "properties": { "name": { "default": "model_a6f04917-34c0-45e0-a42c-128947736090", "title": "Name", "type": "string" }, "init_values": { "additionalProperties": { "type": "number" }, "default": {}, "title": "Init Values", "type": "object" }, "parameter_bounds": { "additionalProperties": { "items": { "type": "number" }, "type": "array" }, "default": {}, "title": "Parameter Bounds", "type": "object" }, "regnet": { "$ref": "#/$defs/funman__model__generated_models__regnet__Model" } }, "required": [ "regnet" ], "title": "GeneratedRegnetModel", "type": "object" }, "Header": { "properties": { "name": { "title": "Name", "type": "string" }, "schema": { "format": "uri", "minLength": 1, "title": "Schema", "type": "string" }, "schema_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Schema Name" }, "description": { "title": "Description", "type": "string" }, "model_version": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Model Version" } }, "required": [ "name", "schema", "description" ], "title": "Header", "type": "object" }, "Initial": { "properties": { "target": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Target" }, "expression": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expression" }, "expression_mathml": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expression Mathml" } }, "title": "Initial", "type": "object" }, "Interval": { "description": "An interval is a pair [lb, ub) that is open (i.e., an interval specifies all points x where lb <= x and ub < x).", "properties": { "lb": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": -1.7976931348623157e+308, "title": "Lb" }, "ub": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": 1.7976931348623157e+308, "title": "Ub" }, "closed_upper_bound": { "default": false, "title": "Closed Upper Bound", "type": "boolean" }, "original_width": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Original Width" }, "normalized": { "default": false, "title": "Normalized", "type": "boolean" }, "unnormalized_lb": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Unnormalized Lb" }, "unnormalized_ub": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Unnormalized Ub" } }, "title": "Interval", "type": "object" }, "LinearConstraint": { "additionalProperties": false, "properties": { "soft": { "default": true, "title": "Soft", "type": "boolean" }, "name": { "title": "Name", "type": "string" }, "timepoints": { "anyOf": [ { "$ref": "#/$defs/Interval" }, { "type": "null" } ], "default": null }, "additive_bounds": { "$ref": "#/$defs/Interval" }, "variables": { "items": { "type": "string" }, "title": "Variables", "type": "array" }, "weights": { "anyOf": [ { "items": { "anyOf": [ { "type": "integer" }, { "type": "number" } ] }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Weights" }, "derivative": { "default": false, "title": "Derivative", "type": "boolean" } }, "required": [ "name", "additive_bounds", "variables" ], "title": "LinearConstraint", "type": "object" }, "ModelParameter": { "additionalProperties": false, "description": "A parameter is a free variable for a Model. It has the following attributes:\n\n* lb: lower bound\n\n* ub: upper bound\n\n* symbol: a pysmt FNode corresponding to the parameter variable", "properties": { "name": { "anyOf": [ { "type": "string" }, { "$ref": "#/$defs/ModelSymbol" } ], "title": "Name" }, "interval": { "$ref": "#/$defs/Interval", "default": { "lb": -1.7976931348623157e+308, "ub": 1.7976931348623157e+308, "closed_upper_bound": false, "original_width": Infinity, "normalized": false, "unnormalized_lb": null, "unnormalized_ub": null } }, "label": { "default": "any", "enum": [ "any", "all" ], "title": "Label", "type": "string" } }, "required": [ "name" ], "title": "ModelParameter", "type": "object" }, "ModelSymbol": { "properties": { "name": { "title": "Name", "type": "string" }, "model": { "title": "Model", "type": "string" } }, "required": [ "name", "model" ], "title": "ModelSymbol", "type": "object" }, "Observable": { "properties": { "id": { "title": "Id", "type": "string" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Name" }, "expression": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expression" }, "expression_mathml": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expression Mathml" } }, "required": [ "id" ], "title": "Observable", "type": "object" }, "OdeSemantics": { "properties": { "rates": { "anyOf": [ { "items": { "$ref": "#/$defs/Rate" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Rates" }, "initials": { "anyOf": [ { "items": { "$ref": "#/$defs/Initial" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Initials" }, "parameters": { "anyOf": [ { "items": { "$ref": "#/$defs/funman__model__generated_models__petrinet__Parameter" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Parameters" }, "observables": { "anyOf": [ { "items": { "$ref": "#/$defs/Observable" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Observables" }, "time": { "anyOf": [ { "$ref": "#/$defs/Time" }, { "type": "null" } ], "default": null } }, "title": "OdeSemantics", "type": "object" }, "ParamOrNumber": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "ParamOrNumber" }, "PetrinetDynamics": { "properties": { "json_graph": { "additionalProperties": { "items": { "additionalProperties": { "anyOf": [ { "additionalProperties": { "anyOf": [ { "type": "string" }, { "type": "boolean" }, { "type": "number" }, { "type": "null" } ] }, "type": "object" }, { "type": "integer" }, { "type": "string" }, { "type": "number" }, { "type": "null" } ] }, "type": "object" }, "type": "array" }, "title": "Json Graph", "type": "object" } }, "required": [ "json_graph" ], "title": "PetrinetDynamics", "type": "object" }, "PetrinetModel": { "properties": { "name": { "default": "model_a6f04917-34c0-45e0-a42c-128947736090", "title": "Name", "type": "string" }, "init_values": { "additionalProperties": { "type": "number" }, "default": {}, "title": "Init Values", "type": "object" }, "parameter_bounds": { "additionalProperties": { "items": { "type": "number" }, "type": "array" }, "default": {}, "title": "Parameter Bounds", "type": "object" }, "petrinet": { "$ref": "#/$defs/PetrinetDynamics" } }, "required": [ "petrinet" ], "title": "PetrinetModel", "type": "object" }, "Properties": { "additionalProperties": true, "properties": { "name": { "title": "Name", "type": "string" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Description" }, "grounding": { "anyOf": [ { "$ref": "#/$defs/funman__model__generated_models__petrinet__Grounding" }, { "type": "null" } ], "default": null } }, "required": [ "name" ], "title": "Properties", "type": "object" }, "Query": { "description": "Abstract base class for queries.", "properties": { "model": { "anyOf": [ { "$ref": "#/$defs/FunmanModel" }, { "type": "null" } ], "default": null } }, "title": "Query", "type": "object" }, "QueryAnd": { "description": "Conjunction of queries.\n\nParameters\n----------\nqueries : List[Query]\n queries to conjoin.", "properties": { "model": { "anyOf": [ { "$ref": "#/$defs/FunmanModel" }, { "type": "null" } ], "default": null }, "queries": { "items": { "anyOf": [ { "$ref": "#/$defs/QueryLE" }, { "$ref": "#/$defs/QueryGE" }, { "$ref": "#/$defs/QueryEquals" }, { "$ref": "#/$defs/Query" } ] }, "title": "Queries", "type": "array" } }, "required": [ "queries" ], "title": "QueryAnd", "type": "object" }, "QueryEncoded": { "description": "Class to contain a formula that is already encoded by a pysmt FNode.", "properties": { "model": { "anyOf": [ { "$ref": "#/$defs/FunmanModel" }, { "type": "null" } ], "default": null } }, "title": "QueryEncoded", "type": "object" }, "QueryEquals": { "description": "Class to represent a query of the form: var == value, where var is a variable, and value is a constant.\n\nParameters\n----------\nvariable : str\n model variable name\nvalue : float\n value\nat_end : bool, optional\n apply the constraint to the last timepoint of a scenario only, by default False", "properties": { "model": { "anyOf": [ { "$ref": "#/$defs/FunmanModel" }, { "type": "null" } ], "default": null }, "variable": { "anyOf": [ { "type": "string" }, { "$ref": "#/$defs/ModelSymbol" } ], "title": "Variable" }, "value": { "title": "Value", "type": "number" }, "at_end": { "default": false, "title": "At End", "type": "boolean" } }, "required": [ "variable", "value" ], "title": "QueryEquals", "type": "object" }, "QueryFunction": { "description": "This query uses a Python function passed to the constructor to evaluate a query on the results of a scenario.", "properties": { "model": { "anyOf": [ { "$ref": "#/$defs/FunmanModel" }, { "type": "null" } ], "default": null }, "function": { "title": "Function", "type": "string" } }, "required": [ "function" ], "title": "QueryFunction", "type": "object" }, "QueryGE": { "description": "Class to represent a query of the form: var >= lb, where var is a variable, and lb is a constant lower bound.\n\nParameters\n----------\nvariable : str\n model variable name\nlb : float\n lower bound constant\nat_end : bool, optional\n apply the constraint to the last timepoint of a scenario only, by default False", "properties": { "model": { "anyOf": [ { "$ref": "#/$defs/FunmanModel" }, { "type": "null" } ], "default": null }, "variable": { "anyOf": [ { "type": "string" }, { "$ref": "#/$defs/ModelSymbol" } ], "title": "Variable" }, "lb": { "title": "Lb", "type": "number" }, "at_end": { "default": false, "title": "At End", "type": "boolean" } }, "required": [ "variable", "lb" ], "title": "QueryGE", "type": "object" }, "QueryLE": { "description": "Class to represent a query of the form: var <= ub, where var is a variable, and ub is a constant upper bound.\n\nParameters\n----------\nvariable : str\n model variable name\nub : float\n upper bound constant\nat_end : bool, optional\n apply the constraint to the last timepoint of a scenario only, by default False", "properties": { "model": { "anyOf": [ { "$ref": "#/$defs/FunmanModel" }, { "type": "null" } ], "default": null }, "variable": { "anyOf": [ { "type": "string" }, { "$ref": "#/$defs/ModelSymbol" } ], "title": "Variable" }, "ub": { "title": "Ub", "type": "number" }, "at_end": { "default": false, "title": "At End", "type": "boolean" } }, "required": [ "variable", "ub" ], "title": "QueryLE", "type": "object" }, "QueryTrue": { "additionalProperties": false, "description": "Query that represents logical true. I.e., this query does not place any additional constraints upon a model.", "properties": { "model": { "anyOf": [ { "$ref": "#/$defs/FunmanModel" }, { "type": "null" } ], "default": null } }, "title": "QueryTrue", "type": "object" }, "Rate": { "properties": { "target": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Target" }, "expression": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expression" }, "expression_mathml": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expression Mathml" } }, "title": "Rate", "type": "object" }, "RegnetDynamics": { "properties": { "json_graph": { "additionalProperties": { "anyOf": [ { "type": "string" }, { "additionalProperties": { "items": { "type": "object" }, "type": "array" }, "type": "object" } ] }, "title": "Json Graph", "type": "object" } }, "required": [ "json_graph" ], "title": "RegnetDynamics", "type": "object" }, "RegnetModel": { "properties": { "name": { "default": "model_a6f04917-34c0-45e0-a42c-128947736090", "title": "Name", "type": "string" }, "init_values": { "additionalProperties": { "type": "number" }, "default": {}, "title": "Init Values", "type": "object" }, "parameter_bounds": { "additionalProperties": { "items": { "type": "number" }, "type": "array" }, "default": {}, "title": "Parameter Bounds", "type": "object" }, "regnet": { "$ref": "#/$defs/RegnetDynamics" } }, "required": [ "regnet" ], "title": "RegnetModel", "type": "object" }, "Semantics": { "properties": { "ode": { "anyOf": [ { "$ref": "#/$defs/OdeSemantics" }, { "type": "null" } ], "default": null }, "typing": { "anyOf": [ { "$ref": "#/$defs/TypingSemantics" }, { "type": "null" } ], "default": null, "description": "(Optional) Information for aligning models for stratification" }, "span": { "anyOf": [ { "items": { "$ref": "#/$defs/TypingSemantics" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "(Optional) Legs of a span, each of which are a full ASKEM Petri Net", "title": "Span" } }, "title": "Semantics", "type": "object" }, "State": { "properties": { "id": { "title": "Id", "type": "string" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Description" }, "grounding": { "anyOf": [ { "$ref": "#/$defs/funman__model__generated_models__petrinet__Grounding" }, { "type": "null" } ], "default": null }, "units": { "anyOf": [ { "$ref": "#/$defs/Unit" }, { "type": "null" } ], "default": null } }, "required": [ "id" ], "title": "State", "type": "object" }, "StateVariableConstraint": { "additionalProperties": false, "properties": { "soft": { "default": true, "title": "Soft", "type": "boolean" }, "name": { "title": "Name", "type": "string" }, "timepoints": { "anyOf": [ { "$ref": "#/$defs/Interval" }, { "type": "null" } ], "default": null }, "variable": { "title": "Variable", "type": "string" }, "interval": { "$ref": "#/$defs/Interval", "default": null } }, "required": [ "name", "variable" ], "title": "StateVariableConstraint", "type": "object" }, "States": { "items": { "$ref": "#/$defs/State" }, "title": "States", "type": "array" }, "StructureParameter": { "properties": { "name": { "anyOf": [ { "type": "string" }, { "$ref": "#/$defs/ModelSymbol" } ], "title": "Name" }, "interval": { "$ref": "#/$defs/Interval", "default": { "lb": -1.7976931348623157e+308, "ub": 1.7976931348623157e+308, "closed_upper_bound": false, "original_width": Infinity, "normalized": false, "unnormalized_lb": null, "unnormalized_ub": null } }, "label": { "default": "any", "enum": [ "any", "all" ], "title": "Label", "type": "string" } }, "required": [ "name" ], "title": "StructureParameter", "type": "object" }, "Time": { "properties": { "id": { "title": "Id", "type": "string" }, "units": { "anyOf": [ { "$ref": "#/$defs/Unit" }, { "type": "null" } ], "default": null } }, "required": [ "id" ], "title": "Time", "type": "object" }, "Transition": { "properties": { "id": { "title": "Id", "type": "string" }, "input": { "items": { "type": "string" }, "title": "Input", "type": "array" }, "output": { "items": { "type": "string" }, "title": "Output", "type": "array" }, "grounding": { "anyOf": [ { "$ref": "#/$defs/funman__model__generated_models__petrinet__Grounding" }, { "type": "null" } ], "default": null }, "properties": { "anyOf": [ { "$ref": "#/$defs/Properties" }, { "type": "null" } ], "default": null } }, "required": [ "id", "input", "output" ], "title": "Transition", "type": "object" }, "Transitions": { "items": { "$ref": "#/$defs/Transition" }, "title": "Transitions", "type": "array" }, "TypingSemantics": { "properties": { "system": { "$ref": "#/$defs/funman__model__generated_models__petrinet__Model", "description": "A Petri net representing the 'type system' that is necessary to align states and transitions across different models during stratification." }, "map": { "description": "A map between the (state and transition) nodes of the model and the (state and transition) nodes of the type system", "items": { "items": { "type": "string" }, "type": "array" }, "title": "Map", "type": "array" } }, "required": [ "system", "map" ], "title": "TypingSemantics", "type": "object" }, "Unit": { "additionalProperties": true, "properties": { "expression": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expression" }, "expression_mathml": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expression Mathml" } }, "title": "Unit", "type": "object" }, "Vertice": { "properties": { "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Name" }, "grounding": { "anyOf": [ { "$ref": "#/$defs/funman__model__generated_models__regnet__Grounding" }, { "type": "null" } ], "default": null }, "rate_constant": { "anyOf": [ { "$ref": "#/$defs/ParamOrNumber" }, { "type": "null" } ], "default": null }, "id": { "title": "Id", "type": "string" }, "sign": { "title": "Sign", "type": "boolean" }, "initial": { "anyOf": [ { "$ref": "#/$defs/ParamOrNumber" }, { "type": "null" } ], "default": null } }, "required": [ "id", "sign" ], "title": "Vertice", "type": "object" }, "funman__model__generated_models__petrinet__Distribution": { "additionalProperties": true, "properties": { "type": { "title": "Type", "type": "string" }, "parameters": { "title": "Parameters", "type": "object" } }, "required": [ "type", "parameters" ], "title": "Distribution", "type": "object" }, "funman__model__generated_models__petrinet__Grounding": { "additionalProperties": false, "properties": { "identifiers": { "title": "Identifiers", "type": "object" }, "modifiers": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Modifiers" } }, "required": [ "identifiers" ], "title": "Grounding", "type": "object" }, "funman__model__generated_models__petrinet__Model": { "additionalProperties": true, "properties": { "header": { "$ref": "#/$defs/Header" }, "properties": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Properties" }, "model": { "$ref": "#/$defs/funman__model__generated_models__petrinet__Model1" }, "semantics": { "anyOf": [ { "$ref": "#/$defs/Semantics" }, { "type": "null" } ], "default": null, "description": "Information specific to a given semantics (e.g., ODEs) associated with a model." }, "metadata": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "description": "(Optional) Information not useful for execution of the model, but that may be useful to some consumer in the future. E.g. creation timestamp or source paper's author.", "title": "Metadata" } }, "required": [ "header", "model" ], "title": "Model", "type": "object" }, "funman__model__generated_models__petrinet__Model1": { "additionalProperties": false, "properties": { "states": { "$ref": "#/$defs/States" }, "transitions": { "$ref": "#/$defs/Transitions" } }, "required": [ "states", "transitions" ], "title": "Model1", "type": "object" }, "funman__model__generated_models__petrinet__Parameter": { "properties": { "id": { "title": "Id", "type": "string" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Description" }, "value": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Value" }, "grounding": { "anyOf": [ { "$ref": "#/$defs/funman__model__generated_models__petrinet__Grounding" }, { "type": "null" } ], "default": null }, "distribution": { "anyOf": [ { "$ref": "#/$defs/funman__model__generated_models__petrinet__Distribution" }, { "type": "null" } ], "default": null }, "units": { "anyOf": [ { "$ref": "#/$defs/Unit" }, { "type": "null" } ], "default": null } }, "required": [ "id" ], "title": "Parameter", "type": "object" }, "funman__model__generated_models__regnet__Distribution": { "properties": { "type": { "title": "Type", "type": "string" }, "parameters": { "title": "Parameters", "type": "object" } }, "required": [ "type", "parameters" ], "title": "Distribution", "type": "object" }, "funman__model__generated_models__regnet__Grounding": { "additionalProperties": false, "properties": { "identifiers": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Identifiers" }, "modifiers": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Modifiers" } }, "title": "Grounding", "type": "object" }, "funman__model__generated_models__regnet__Model": { "properties": { "header": { "$ref": "#/$defs/Header" }, "properties": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Properties" }, "model": { "$ref": "#/$defs/funman__model__generated_models__regnet__Model1" }, "metadata": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "description": "(Optional) Information not useful for execution of the model, but that may be useful to some consumer in the future. E.g. creation timestamp or source paper's author.", "title": "Metadata" } }, "required": [ "header", "model" ], "title": "Model", "type": "object" }, "funman__model__generated_models__regnet__Model1": { "additionalProperties": false, "properties": { "vertices": { "items": { "$ref": "#/$defs/Vertice" }, "title": "Vertices", "type": "array" }, "edges": { "items": { "$ref": "#/$defs/Edge" }, "title": "Edges", "type": "array" }, "parameters": { "anyOf": [ { "items": { "$ref": "#/$defs/funman__model__generated_models__regnet__Parameter" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Parameters" } }, "required": [ "vertices", "edges" ], "title": "Model1", "type": "object" }, "funman__model__generated_models__regnet__Parameter": { "properties": { "id": { "title": "Id", "type": "string" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Description" }, "value": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Value" }, "grounding": { "anyOf": [ { "$ref": "#/$defs/funman__model__generated_models__regnet__Grounding" }, { "type": "null" } ], "default": null }, "distribution": { "anyOf": [ { "$ref": "#/$defs/funman__model__generated_models__regnet__Distribution" }, { "type": "null" } ], "default": null } }, "required": [ "id" ], "title": "Parameter", "type": "object" } }, "additionalProperties": false, "required": [ "parameters", "model" ] }
- Config:
extra: str = forbid
- Fields:
- field constraints: List[StateVariableConstraint | LinearConstraint] | None = None¶
True if its okay when the volume of the search space is empty (e.g., when it is a point)
- field empty_volume_ok: bool = False¶
- field model: GeneratedPetriNetModel | GeneratedRegnetModel | RegnetModel | PetrinetModel | DecapodeModel | BilayerModel | EncodedModel | EnsembleModel [Required]¶
- field normalization_constant: float | None = None¶
- field parameters: List[Parameter | ModelParameter | StructureParameter] [Required]¶
- field query: QueryAnd | QueryGE | QueryLE | QueryEncoded | QueryFunction | QueryTrue = QueryTrue(model=None)¶
- check_simulation(config: FUNMANConfig, results: AnalysisScenarioResult)¶
- compute_observables(timeseries, parameters)¶
- encode_timeseries_verification(point: Point, timeseries: Timeseries)¶
- abstract classmethod get_kind() str ¶
- initialize(config: FUNMANConfig) Search ¶
- model_parameters()¶
- model_post_init(context: Any, /) None ¶
This function is meant to behave like a BaseModel method to initialise private attributes.
It takes context as an argument since that’s what pydantic-core passes when calling it.
- Parameters:
self – The BaseModel instance.
context – The context.
- num_dimensions()¶
Return the number of parameters (dimensions) that are synthesized. A parameter is synthesized if it has a domain with width greater than zero and it is either labeled as LABEL_ALL or is a structural parameter (which are LABEL_ALL by default).
- num_timepoints() int ¶
- representable_space_volume() Decimal ¶
- run_point_simulation(point: Point, tvect) Timeseries | None ¶
- run_scenario_simulation(init, parameters, tvect) Timeseries | None ¶
- search_space_volume(normalize: bool = False) Decimal ¶
- simulate_scenario(config: FUNMANConfig) Point ¶
- simulation_tvects(config) List[int | float] ¶
- abstract solve(config: FUNMANConfig, haltEvent: Event | None)¶
- structure_parameter(name: str) StructureParameter ¶
- structure_parameters()¶
- synthesized_model_parameters()¶
- synthesized_parameters()¶
- class funman.scenario.scenario.AnalysisScenarioResult¶
Bases:
ABC
Abstract class for AnalysisScenario result data.
- abstract plot(**kwargs)¶
- pydantic model funman.scenario.scenario.AnalysisScenarioResultException¶
Bases:
BaseModel
,AnalysisScenarioResult
Show JSON schema
{ "title": "AnalysisScenarioResultException", "type": "object", "properties": { "exception": { "title": "Exception", "type": "string" } }, "required": [ "exception" ] }
- Fields:
- field exception: str [Required]¶
- plot(**kwargs)¶
funman.scenario.simulation module¶
This module wraps a simulator invocation as a Scenario.
- pydantic model funman.scenario.simulation.SimulationScenario¶
Bases:
AnalysisScenario
,BaseModel
Show JSON schema
{ "title": "SimulationScenario", "type": "object", "properties": { "parameters": { "items": { "anyOf": [ { "$ref": "#/$defs/Parameter" }, { "$ref": "#/$defs/ModelParameter" }, { "$ref": "#/$defs/StructureParameter" } ] }, "title": "Parameters", "type": "array" }, "normalization_constant": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Normalization Constant" }, "constraints": { "anyOf": [ { "items": { "anyOf": [ { "$ref": "#/$defs/StateVariableConstraint" }, { "$ref": "#/$defs/LinearConstraint" } ] }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Constraints" }, "empty_volume_ok": { "default": false, "title": "Empty Volume Ok", "type": "boolean" }, "model": { "$ref": "#/$defs/SimulatorModel" }, "query": { "$ref": "#/$defs/Query" } }, "$defs": { "Distribution": { "additionalProperties": true, "properties": { "type": { "title": "Type", "type": "string" }, "parameters": { "title": "Parameters", "type": "object" } }, "required": [ "type", "parameters" ], "title": "Distribution", "type": "object" }, "FunmanModel": { "description": "The abstract base class for Models.", "properties": { "name": { "default": "model_a6f04917-34c0-45e0-a42c-128947736090", "title": "Name", "type": "string" }, "init_values": { "additionalProperties": { "type": "number" }, "default": {}, "title": "Init Values", "type": "object" }, "parameter_bounds": { "additionalProperties": { "items": { "type": "number" }, "type": "array" }, "default": {}, "title": "Parameter Bounds", "type": "object" } }, "title": "FunmanModel", "type": "object" }, "Grounding": { "additionalProperties": false, "properties": { "identifiers": { "title": "Identifiers", "type": "object" }, "modifiers": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Modifiers" } }, "required": [ "identifiers" ], "title": "Grounding", "type": "object" }, "Interval": { "description": "An interval is a pair [lb, ub) that is open (i.e., an interval specifies all points x where lb <= x and ub < x).", "properties": { "lb": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": -1.7976931348623157e+308, "title": "Lb" }, "ub": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": 1.7976931348623157e+308, "title": "Ub" }, "closed_upper_bound": { "default": false, "title": "Closed Upper Bound", "type": "boolean" }, "original_width": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Original Width" }, "normalized": { "default": false, "title": "Normalized", "type": "boolean" }, "unnormalized_lb": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Unnormalized Lb" }, "unnormalized_ub": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Unnormalized Ub" } }, "title": "Interval", "type": "object" }, "LinearConstraint": { "additionalProperties": false, "properties": { "soft": { "default": true, "title": "Soft", "type": "boolean" }, "name": { "title": "Name", "type": "string" }, "timepoints": { "anyOf": [ { "$ref": "#/$defs/Interval" }, { "type": "null" } ], "default": null }, "additive_bounds": { "$ref": "#/$defs/Interval" }, "variables": { "items": { "type": "string" }, "title": "Variables", "type": "array" }, "weights": { "anyOf": [ { "items": { "anyOf": [ { "type": "integer" }, { "type": "number" } ] }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Weights" }, "derivative": { "default": false, "title": "Derivative", "type": "boolean" } }, "required": [ "name", "additive_bounds", "variables" ], "title": "LinearConstraint", "type": "object" }, "ModelParameter": { "additionalProperties": false, "description": "A parameter is a free variable for a Model. It has the following attributes:\n\n* lb: lower bound\n\n* ub: upper bound\n\n* symbol: a pysmt FNode corresponding to the parameter variable", "properties": { "name": { "anyOf": [ { "type": "string" }, { "$ref": "#/$defs/ModelSymbol" } ], "title": "Name" }, "interval": { "$ref": "#/$defs/Interval", "default": { "lb": -1.7976931348623157e+308, "ub": 1.7976931348623157e+308, "closed_upper_bound": false, "original_width": Infinity, "normalized": false, "unnormalized_lb": null, "unnormalized_ub": null } }, "label": { "default": "any", "enum": [ "any", "all" ], "title": "Label", "type": "string" } }, "required": [ "name" ], "title": "ModelParameter", "type": "object" }, "ModelSymbol": { "properties": { "name": { "title": "Name", "type": "string" }, "model": { "title": "Model", "type": "string" } }, "required": [ "name", "model" ], "title": "ModelSymbol", "type": "object" }, "Parameter": { "properties": { "id": { "title": "Id", "type": "string" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Description" }, "value": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Value" }, "grounding": { "anyOf": [ { "$ref": "#/$defs/Grounding" }, { "type": "null" } ], "default": null }, "distribution": { "anyOf": [ { "$ref": "#/$defs/Distribution" }, { "type": "null" } ], "default": null }, "units": { "anyOf": [ { "$ref": "#/$defs/Unit" }, { "type": "null" } ], "default": null } }, "required": [ "id" ], "title": "Parameter", "type": "object" }, "Query": { "description": "Abstract base class for queries.", "properties": { "model": { "anyOf": [ { "$ref": "#/$defs/FunmanModel" }, { "type": "null" } ], "default": null } }, "title": "Query", "type": "object" }, "SimulatorModel": { "properties": { "name": { "default": "model_a6f04917-34c0-45e0-a42c-128947736090", "title": "Name", "type": "string" }, "init_values": { "additionalProperties": { "type": "number" }, "default": {}, "title": "Init Values", "type": "object" }, "parameter_bounds": { "additionalProperties": { "items": { "type": "number" }, "type": "array" }, "default": {}, "title": "Parameter Bounds", "type": "object" }, "main_fn": { "default": "", "title": "Main Fn", "type": "string" } }, "title": "SimulatorModel", "type": "object" }, "StateVariableConstraint": { "additionalProperties": false, "properties": { "soft": { "default": true, "title": "Soft", "type": "boolean" }, "name": { "title": "Name", "type": "string" }, "timepoints": { "anyOf": [ { "$ref": "#/$defs/Interval" }, { "type": "null" } ], "default": null }, "variable": { "title": "Variable", "type": "string" }, "interval": { "$ref": "#/$defs/Interval", "default": null } }, "required": [ "name", "variable" ], "title": "StateVariableConstraint", "type": "object" }, "StructureParameter": { "properties": { "name": { "anyOf": [ { "type": "string" }, { "$ref": "#/$defs/ModelSymbol" } ], "title": "Name" }, "interval": { "$ref": "#/$defs/Interval", "default": { "lb": -1.7976931348623157e+308, "ub": 1.7976931348623157e+308, "closed_upper_bound": false, "original_width": Infinity, "normalized": false, "unnormalized_lb": null, "unnormalized_ub": null } }, "label": { "default": "any", "enum": [ "any", "all" ], "title": "Label", "type": "string" } }, "required": [ "name" ], "title": "StructureParameter", "type": "object" }, "Unit": { "additionalProperties": true, "properties": { "expression": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expression" }, "expression_mathml": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expression Mathml" } }, "title": "Unit", "type": "object" } }, "additionalProperties": false, "required": [ "parameters", "model", "query" ] }
- Config:
extra: str = forbid
- Fields:
- field model: SimulatorModel [Required]¶
- classmethod get_kind() str ¶
- model_post_init(context: Any, /) None ¶
We need to both initialize private attributes and call the user-defined model_post_init method.
- solve(config: FUNMANConfig)¶
- pydantic model funman.scenario.simulation.SimulationScenarioResult¶
Bases:
AnalysisScenarioResult
,BaseModel
Show JSON schema
{ "title": "SimulationScenarioResult", "type": "object", "properties": { "scenario": { "$ref": "#/$defs/SimulationScenario" }, "results": { "default": null, "title": "Results" }, "query_satisfied": { "title": "Query Satisfied", "type": "boolean" } }, "$defs": { "Distribution": { "additionalProperties": true, "properties": { "type": { "title": "Type", "type": "string" }, "parameters": { "title": "Parameters", "type": "object" } }, "required": [ "type", "parameters" ], "title": "Distribution", "type": "object" }, "FunmanModel": { "description": "The abstract base class for Models.", "properties": { "name": { "default": "model_a6f04917-34c0-45e0-a42c-128947736090", "title": "Name", "type": "string" }, "init_values": { "additionalProperties": { "type": "number" }, "default": {}, "title": "Init Values", "type": "object" }, "parameter_bounds": { "additionalProperties": { "items": { "type": "number" }, "type": "array" }, "default": {}, "title": "Parameter Bounds", "type": "object" } }, "title": "FunmanModel", "type": "object" }, "Grounding": { "additionalProperties": false, "properties": { "identifiers": { "title": "Identifiers", "type": "object" }, "modifiers": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Modifiers" } }, "required": [ "identifiers" ], "title": "Grounding", "type": "object" }, "Interval": { "description": "An interval is a pair [lb, ub) that is open (i.e., an interval specifies all points x where lb <= x and ub < x).", "properties": { "lb": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": -1.7976931348623157e+308, "title": "Lb" }, "ub": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": 1.7976931348623157e+308, "title": "Ub" }, "closed_upper_bound": { "default": false, "title": "Closed Upper Bound", "type": "boolean" }, "original_width": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Original Width" }, "normalized": { "default": false, "title": "Normalized", "type": "boolean" }, "unnormalized_lb": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Unnormalized Lb" }, "unnormalized_ub": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Unnormalized Ub" } }, "title": "Interval", "type": "object" }, "LinearConstraint": { "additionalProperties": false, "properties": { "soft": { "default": true, "title": "Soft", "type": "boolean" }, "name": { "title": "Name", "type": "string" }, "timepoints": { "anyOf": [ { "$ref": "#/$defs/Interval" }, { "type": "null" } ], "default": null }, "additive_bounds": { "$ref": "#/$defs/Interval" }, "variables": { "items": { "type": "string" }, "title": "Variables", "type": "array" }, "weights": { "anyOf": [ { "items": { "anyOf": [ { "type": "integer" }, { "type": "number" } ] }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Weights" }, "derivative": { "default": false, "title": "Derivative", "type": "boolean" } }, "required": [ "name", "additive_bounds", "variables" ], "title": "LinearConstraint", "type": "object" }, "ModelParameter": { "additionalProperties": false, "description": "A parameter is a free variable for a Model. It has the following attributes:\n\n* lb: lower bound\n\n* ub: upper bound\n\n* symbol: a pysmt FNode corresponding to the parameter variable", "properties": { "name": { "anyOf": [ { "type": "string" }, { "$ref": "#/$defs/ModelSymbol" } ], "title": "Name" }, "interval": { "$ref": "#/$defs/Interval", "default": { "lb": -1.7976931348623157e+308, "ub": 1.7976931348623157e+308, "closed_upper_bound": false, "original_width": Infinity, "normalized": false, "unnormalized_lb": null, "unnormalized_ub": null } }, "label": { "default": "any", "enum": [ "any", "all" ], "title": "Label", "type": "string" } }, "required": [ "name" ], "title": "ModelParameter", "type": "object" }, "ModelSymbol": { "properties": { "name": { "title": "Name", "type": "string" }, "model": { "title": "Model", "type": "string" } }, "required": [ "name", "model" ], "title": "ModelSymbol", "type": "object" }, "Parameter": { "properties": { "id": { "title": "Id", "type": "string" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Description" }, "value": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Value" }, "grounding": { "anyOf": [ { "$ref": "#/$defs/Grounding" }, { "type": "null" } ], "default": null }, "distribution": { "anyOf": [ { "$ref": "#/$defs/Distribution" }, { "type": "null" } ], "default": null }, "units": { "anyOf": [ { "$ref": "#/$defs/Unit" }, { "type": "null" } ], "default": null } }, "required": [ "id" ], "title": "Parameter", "type": "object" }, "Query": { "description": "Abstract base class for queries.", "properties": { "model": { "anyOf": [ { "$ref": "#/$defs/FunmanModel" }, { "type": "null" } ], "default": null } }, "title": "Query", "type": "object" }, "SimulationScenario": { "additionalProperties": false, "properties": { "parameters": { "items": { "anyOf": [ { "$ref": "#/$defs/Parameter" }, { "$ref": "#/$defs/ModelParameter" }, { "$ref": "#/$defs/StructureParameter" } ] }, "title": "Parameters", "type": "array" }, "normalization_constant": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Normalization Constant" }, "constraints": { "anyOf": [ { "items": { "anyOf": [ { "$ref": "#/$defs/StateVariableConstraint" }, { "$ref": "#/$defs/LinearConstraint" } ] }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Constraints" }, "empty_volume_ok": { "default": false, "title": "Empty Volume Ok", "type": "boolean" }, "model": { "$ref": "#/$defs/SimulatorModel" }, "query": { "$ref": "#/$defs/Query" } }, "required": [ "parameters", "model", "query" ], "title": "SimulationScenario", "type": "object" }, "SimulatorModel": { "properties": { "name": { "default": "model_a6f04917-34c0-45e0-a42c-128947736090", "title": "Name", "type": "string" }, "init_values": { "additionalProperties": { "type": "number" }, "default": {}, "title": "Init Values", "type": "object" }, "parameter_bounds": { "additionalProperties": { "items": { "type": "number" }, "type": "array" }, "default": {}, "title": "Parameter Bounds", "type": "object" }, "main_fn": { "default": "", "title": "Main Fn", "type": "string" } }, "title": "SimulatorModel", "type": "object" }, "StateVariableConstraint": { "additionalProperties": false, "properties": { "soft": { "default": true, "title": "Soft", "type": "boolean" }, "name": { "title": "Name", "type": "string" }, "timepoints": { "anyOf": [ { "$ref": "#/$defs/Interval" }, { "type": "null" } ], "default": null }, "variable": { "title": "Variable", "type": "string" }, "interval": { "$ref": "#/$defs/Interval", "default": null } }, "required": [ "name", "variable" ], "title": "StateVariableConstraint", "type": "object" }, "StructureParameter": { "properties": { "name": { "anyOf": [ { "type": "string" }, { "$ref": "#/$defs/ModelSymbol" } ], "title": "Name" }, "interval": { "$ref": "#/$defs/Interval", "default": { "lb": -1.7976931348623157e+308, "ub": 1.7976931348623157e+308, "closed_upper_bound": false, "original_width": Infinity, "normalized": false, "unnormalized_lb": null, "unnormalized_ub": null } }, "label": { "default": "any", "enum": [ "any", "all" ], "title": "Label", "type": "string" } }, "required": [ "name" ], "title": "StructureParameter", "type": "object" }, "Unit": { "additionalProperties": true, "properties": { "expression": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expression" }, "expression_mathml": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expression Mathml" } }, "title": "Unit", "type": "object" } }, "required": [ "scenario", "query_satisfied" ] }
- Fields:
- field query_satisfied: bool [Required]¶
- field results: Any = None¶
- field scenario: SimulationScenario [Required]¶
- plot(**kwargs)¶
Module contents¶
This subpackage contains definitions of scenarios that FUNMAN is capable of solving.