From 61ea9e448dee57c252b195058418ab2f22f5322a Mon Sep 17 00:00:00 2001 From: Milan Rother Date: Fri, 13 Nov 2026 19:52:48 +0100 Subject: [PATCH] Regenerate the block registry for pathsim 0.31 --- pathview/data/registry.json | 3 +-- scripts/generated/registry.json | 3 +-- src/lib/constants/dependencies.ts | 2 +- src/lib/nodes/generated/blocks.ts | 7 +------ src/lib/simulation/generated/simulation.ts | 4 ++-- 5 files changed, 6 insertions(+), 13 deletions(-) diff --git a/pathview/data/registry.json b/pathview/data/registry.json index f364f618..b5a054b2 100644 --- a/pathview/data/registry.json +++ b/pathview/data/registry.json @@ -641,8 +641,7 @@ "blockClass": "Splitter", "importPath": "pathsim.blocks", "params": [ - "fractions", - "carrier" + "fractions" ], "inputs": [ "in" diff --git a/scripts/generated/registry.json b/scripts/generated/registry.json index f364f618..b5a054b2 100644 --- a/scripts/generated/registry.json +++ b/scripts/generated/registry.json @@ -641,8 +641,7 @@ "blockClass": "Splitter", "importPath": "pathsim.blocks", "params": [ - "fractions", - "carrier" + "fractions" ], "inputs": [ "in" diff --git a/src/lib/constants/dependencies.ts b/src/lib/constants/dependencies.ts index 01581528..36b6da9a 100644 --- a/src/lib/constants/dependencies.ts +++ b/src/lib/constants/dependencies.ts @@ -1,7 +1,7 @@ // Auto-generated by scripts/extract.py - DO NOT EDIT // Source: scripts/config/requirements-pyodide.txt, scripts/config/pyodide.json -export const PATHVIEW_VERSION = '0.20.0'; +export const PATHVIEW_VERSION = '0.21.0'; export const PYODIDE_VERSION = '0.29.4'; export const PYODIDE_CDN_URL = `https://cdn.jsdelivr.net/pyodide/v${PYODIDE_VERSION}/full/pyodide.mjs`; diff --git a/src/lib/nodes/generated/blocks.ts b/src/lib/nodes/generated/blocks.ts index 85499c2a..209a0282 100644 --- a/src/lib/nodes/generated/blocks.ts +++ b/src/lib/nodes/generated/blocks.ts @@ -1232,17 +1232,12 @@ export const extractedBlocks: Record = "Splitter": { "blockClass": "Splitter", "description": "Splits the input into multiple outputs, weighted with fractions (SIMO).", - "docstringHtml": "

Splits the input into multiple outputs, weighted with fractions (SIMO).

\n
\n\\begin{equation*}\ny_i(t) = f_i \\cdot u(t)\n\\end{equation*}\n
\n

The fractions have to sum up to one, so the splitter conserves what flows\nthrough it, for example a mass or molar flow.

\n

With a carrier, the input is a stream of multiple channels, for example\nthe flows of multiple species. Every output is a stream with the same\nlayout and each channel is split with the same fractions.

\n
\n

Example

\n

Split a flow into two outputs with 90 and 10 percent:

\n
\nS = Splitter([0.9, 0.1])\n
\n

Split a stream of species flows, the ports 'in', 'out_0' and 'out_1'\nhave the layout of the carrier:

\n
\nclass Species(Carrier):\n    keys = ("H", "D", "T")\n\nS = Splitter([0.9, 0.1], carrier=Species())\n\nC = Connection(S["out_1"], B["in"])\n
\n
\n
\n

Note

\n

This block is purely algebraic and its operation (op_alg) will be called\nmultiple times per timestep, each time when Simulation._update(t) is\ncalled in the global simulation loop.

\n
\n
\n

Parameters

\n
\n
fractions : array_like
\n
fractions of the input for each output, must sum up to one
\n
carrier : Carrier | None
\n
layout of the input and output streams, single channel if 'None'
\n
\n
\n
\n

Attributes

\n
\n
op_alg : Operator
\n
internal algebraic operator
\n
\n
\n", + "docstringHtml": "

Splits the input into multiple outputs, weighted with fractions (SIMO).

\n
\n\\begin{equation*}\ny_i(t) = f_i \\cdot u(t)\n\\end{equation*}\n
\n

The fractions have to sum up to one, so the splitter conserves what flows\nthrough it, for example a mass or molar flow.

\n
\n

Example

\n

Split a flow into two outputs with 90 and 10 percent:

\n
\nS = Splitter([0.9, 0.1])\n\nC = Connection(S["out_1"], B)\n
\n
\n
\n

Note

\n

This block is purely algebraic and its operation (op_alg) will be called\nmultiple times per timestep, each time when Simulation._update(t) is\ncalled in the global simulation loop.

\n
\n
\n

Parameters

\n
\n
fractions : array_like
\n
fractions of the input for each output, must sum up to one
\n
\n
\n
\n

Attributes

\n
\n
op_alg : Operator
\n
internal algebraic operator
\n
\n
\n", "params": { "fractions": { "type": "any", "default": null, "description": "fractions of the input for each output, must sum up to one" - }, - "carrier": { - "type": "any", - "default": null, - "description": "layout of the input and output streams, single channel if 'None'" } }, "inputs": [ diff --git a/src/lib/simulation/generated/simulation.ts b/src/lib/simulation/generated/simulation.ts index 0578df4c..a9599b46 100644 --- a/src/lib/simulation/generated/simulation.ts +++ b/src/lib/simulation/generated/simulation.ts @@ -14,7 +14,7 @@ export interface ExtractedSimulationParam { export const simulationDescription = "Class that performs transient analysis of the dynamical system, defined by the"; -export const simulationDocstringHtml = "

Class that performs transient analysis of the dynamical system, defined by the\nblocks and connecions. It manages all the blocks and connections and the timestep update.

\n

The global system equation is evaluated by fixed point iteration, so the information from\neach timestep gets distributed within the entire system and is available for all blocks at\nall times.

\n

The minimum number of fixed-point iterations 'iterations_min' is set to 'None' by default\nand then the length of the longest internal signal path (with passthrough) is used as the\nestimate for minimum number of iterations needed for the information to reach all instant\ntime blocks in each timestep. Dont change this unless you know that the actual path is\nshorter or something similar that prohibits instant time information flow.

\n

Convergence check for the fixed-point iteration loop with 'tolerance_fpi' is based on\nmax absolute error (max-norm) to previous iteration and should not be touched.

\n

Multiple numerical integrators are implemented in the 'pathsim.solvers' module.\nThe default solver is a fixed timestep 2nd order Strong Stability Preserving Runge Kutta\n(SSPRK22) method which is quite fast and has ok accuracy, especially if you are forced to\ntake small steps to cover the behaviour of forcing functions. Adaptive timestepping and\nimplicit integrators are also available.

\n

Manages an event handling system based on zero crossing detection. Uses 'Event' objects\nto monitor solver states of stateful blocks and applys transformations on the state in\ncase an event is detected.

\n
\n

Example

\n

This is how to setup a simple system simulation using the 'Simulation' class:

\n
\nimport numpy as np\n\nfrom pathsim import Simulation, Connection\nfrom pathsim.blocks import Source, Integrator, Scope\n\nsrc = Source(lambda t: np.cos(2*np.pi*t))\nitg = Integrator()\nsco = Scope(labels=["source", "integrator"])\n\nsim = Simulation(\n    blocks=[src, itg, sco],\n    connections=[\n        Connection(src[0], itg[0], sco[0]),\n        Connection(itg[0], sco[1])\n        ],\n    dt=0.01\n    )\n\nsim.run(4)\nsim.plot()\n
\n
\n
\n

Parameters

\n
\n
blocks : list[Block]
\n
blocks that define the system
\n
connections : list[Connection]
\n
connections that connect the blocks
\n
events : list[Event]
\n
list of event trackers (zero crossing detection, schedule, etc.)
\n
dt : float
\n
transient simulation timestep in time units,\ndefault see \u00b4SIM_TIMESTEP\u00b4 in \u00b4_constants.py\u00b4
\n
dt_min : float
\n
lower bound for transient simulation timestep,\ndefault see \u00b4SIM_TIMESTEP_MIN\u00b4 in \u00b4_constants.py\u00b4
\n
dt_max : float
\n
upper bound for transient simulation timestep,\ndefault see \u00b4SIM_TIMESTEP_MAX\u00b4 in \u00b4_constants.py\u00b4
\n
Solver : Solver
\n
ODE solver class for numerical integration from \u00b4pathsim.solvers\u00b4,\ndefault is \u00b4pathsim.solvers.ssprk22.SSPRK22\u00b4 (2nd order expl. Runge Kutta)
\n
tolerance_fpi : float
\n
absolute tolerance for convergence of algebraic loops\nand internal optimizers of implicit ODE solvers,\ndefault see \u00b4SIM_TOLERANCE_FPI\u00b4 in \u00b4_constants.py\u00b4
\n
iterations_max : int
\n
maximum allowed number of iterations for implicit ODE\nsolver optimizers and algebraic loop solver,\ndefault see \u00b4SIM_ITERATIONS_MAX\u00b4 in \u00b4_constants.py\u00b4
\n
log : bool | string
\n
flag to enable logging, default see \u00b4LOG_ENABLE\u00b4 in \u00b4_constants.py\u00b4\n(alternatively a path to a log file can be specified)
\n
solver_kwargs : dict
\n
additional parameters for numerical solvers such as absolute\n(\u00b4tolerance_lte_abs\u00b4) and relative (\u00b4tolerance_lte_rel\u00b4) tolerance,\ndefaults are defined in \u00b4_constants.py\u00b4
\n
\n
\n
\n

Attributes

\n
\n
time : float
\n
global simulation time, starting at \u00b40.0\u00b4
\n
graph : Graph
\n
internal graph representation for fast system funcion evluations\nusing DAG with algebraic depths
\n
boosters : None | list[ConnectionBooster]
\n
list of boosters (fixed point accelerators) that wrap algebraic\nloop closing connections assembled from the system graph
\n
engine : Solver
\n
global integrator (ODE solver) instance serving as a dummy to\nget attributes and access to intermediate evaluation stages
\n
logger : logging.Logger
\n
global simulation logger
\n
_blocks_dyn : list[Block]
\n
blocks with internal \u00b4Solver\u00b4 instances (stateful)
\n
_blocks_evt : list[Block]
\n
blocks with internal events (discrete time, eventful)
\n
_active : bool
\n
flag for setting the simulation as active, used for interrupts
\n
\n
\n"; +export const simulationDocstringHtml = "

Class that performs transient analysis of the dynamical system, defined by the\nblocks and connecions. It manages all the blocks and connections and the timestep update.

\n

The global system equation is evaluated by fixed point iteration, so the information from\neach timestep gets distributed within the entire system and is available for all blocks at\nall times.

\n

The minimum number of fixed-point iterations 'iterations_min' is set to 'None' by default\nand then the length of the longest internal signal path (with passthrough) is used as the\nestimate for minimum number of iterations needed for the information to reach all instant\ntime blocks in each timestep. Dont change this unless you know that the actual path is\nshorter or something similar that prohibits instant time information flow.

\n

Convergence check for the fixed-point iteration loop with 'tolerance_fpi' is based on\nmax absolute error (max-norm) to previous iteration and should not be touched.

\n

Multiple numerical integrators are implemented in the 'pathsim.solvers' module.\nThe default solver is a fixed timestep 2nd order Strong Stability Preserving Runge Kutta\n(SSPRK22) method which is quite fast and has ok accuracy, especially if you are forced to\ntake small steps to cover the behaviour of forcing functions. Adaptive timestepping and\nimplicit integrators are also available.

\n

Manages an event handling system based on zero crossing detection. Uses 'Event' objects\nto monitor solver states of stateful blocks and applys transformations on the state in\ncase an event is detected.

\n
\n

Example

\n

This is how to setup a simple system simulation using the 'Simulation' class:

\n
\nimport numpy as np\n\nfrom pathsim import Simulation, Connection\nfrom pathsim.blocks import Source, Integrator, Scope\n\nsrc = Source(lambda t: np.cos(2*np.pi*t))\nitg = Integrator()\nsco = Scope(labels=["source", "integrator"])\n\nsim = Simulation(\n    blocks=[src, itg, sco],\n    connections=[\n        Connection(src[0], itg[0], sco[0]),\n        Connection(itg[0], sco[1])\n        ],\n    dt=0.01\n    )\n\nsim.run(4)\nsim.plot()\n
\n
\n
\n

Parameters

\n
\n
blocks : list[Block]
\n
blocks that define the system
\n
connections : list[Connection]
\n
connections that connect the blocks
\n
events : list[Event]
\n
list of event trackers (zero crossing detection, schedule, etc.)
\n
dt : float
\n
transient simulation timestep in time units,\ndefault see \u00b4SIM_TIMESTEP\u00b4 in \u00b4_constants.py\u00b4
\n
dt_min : float
\n
lower bound for transient simulation timestep,\ndefault see \u00b4SIM_TIMESTEP_MIN\u00b4 in \u00b4_constants.py\u00b4
\n
dt_max : float
\n
upper bound for transient simulation timestep,\ndefault see \u00b4SIM_TIMESTEP_MAX\u00b4 in \u00b4_constants.py\u00b4
\n
Solver : Solver
\n
ODE solver class for numerical integration from \u00b4pathsim.solvers\u00b4,\ndefault is \u00b4pathsim.solvers.ssprk22.SSPRK22\u00b4 (2nd order expl. Runge Kutta)
\n
tolerance_fpi : float
\n
absolute tolerance for convergence of algebraic loops\nand internal optimizers of implicit ODE solvers,\ndefault see \u00b4SIM_TOLERANCE_FPI\u00b4 in \u00b4_constants.py\u00b4
\n
iterations_max : int
\n
maximum allowed number of iterations for implicit ODE\nsolver optimizers and algebraic loop solver,\ndefault see \u00b4SIM_ITERATIONS_MAX\u00b4 in \u00b4_constants.py\u00b4
\n
log : bool | string
\n
flag to enable logging, default see \u00b4LOG_ENABLE\u00b4 in \u00b4_constants.py\u00b4\n(alternatively a path to a log file can be specified)
\n
diagnostics : bool | str
\n
convergence diagnostics of the loop solver, the implicit solver and\nthe step error control; \u00b4True\u00b4 keeps a snapshot of the last successful\ntimestep in \u00b4diagnostics\u00b4, \u00b4"history"\u00b4 in addition keeps the snapshots\nof all timesteps, see \u00b4diagnostics_history\u00b4
\n
solver_kwargs : dict
\n
additional parameters for numerical solvers such as absolute\n(\u00b4tolerance_lte_abs\u00b4) and relative (\u00b4tolerance_lte_rel\u00b4) tolerance,\ndefaults are defined in \u00b4_constants.py\u00b4
\n
\n
\n
\n

Attributes

\n
\n
time : float
\n
global simulation time, starting at \u00b40.0\u00b4
\n
graph : Graph
\n
internal graph representation for fast system funcion evluations\nusing DAG with algebraic depths
\n
boosters : None | list[ConnectionBooster]
\n
list of boosters (fixed point accelerators) that wrap algebraic\nloop closing connections assembled from the system graph
\n
engine : Solver
\n
global integrator (ODE solver) instance serving as a dummy to\nget attributes and access to intermediate evaluation stages
\n
logger : logging.Logger
\n
global simulation logger
\n
_blocks_dyn : list[Block]
\n
blocks with internal \u00b4Solver\u00b4 instances (stateful)
\n
_blocks_evt : list[Block]
\n
blocks with internal events (discrete time, eventful)
\n
_active : bool
\n
flag for setting the simulation as active, used for interrupts
\n
\n
\n"; export const extractedSimulationParams: Record = { @@ -64,7 +64,7 @@ export const extractedSimulationParams: Record "pathsim_name": "diagnostics", "type": "boolean", "default": "False", - "description": "" + "description": "convergence diagnostics of the loop solver, the implicit solver and the step error control; \u00b4True\u00b4 keeps a snapshot of the last successful timestep in \u00b4diagnostics\u00b4, \u00b4\"history\"\u00b4 in addition keeps the snapshots of all timesteps, see \u00b4diagnostics_history\u00b4" }, "rtol": { "pathsim_name": "tolerance_lte_rel",