Version: dev

substitute_in_equations

Stable function · Expressions

Tier: stable · Kind: function · Topic: Expressions

JuliaTypeScriptPythonRustGo
substitute_in_equationssubstituteInEquationsnot exportednot exportedSubstituteInEquations

Julia

substitute_in_equations(model::Model, bindings::Dict{String, ASTExpr})
substitute_in_equations(model::Model, bindings::Dict{String, ASTExpr}) -> Model

Apply substitutions across all equations in a model.

Replaces variables according to the bindings dictionary.

Source

TypeScript

function substituteInEquations(model: Model, bindings: Record<string, Expr>): Model

Deprecated. The name understates its blast radius; call substituteInModel (exported from substitute.js) directly. Retained as a public back-compat export (re-exported via index.ts and analysis/index.ts).

Apply substitutions across a model.

NOTE: despite its name, this does NOT touch only equations — it is a thin alias for substituteInModel and therefore also rewrites observed-variable expressions, event expression positions, and inline subsystems. See substituteInModel for the full list of rewritten sites.

Parameters

  • model — Model to apply substitutions to
  • bindings — Variable name to expression mappings

Returns

New model with substitutions applied

Source

Python

Python does not export this function.

Rust

Rust does not export this function.

Go

func SubstituteInEquations(model Model, bindings map[string]Expression) (Model, error)

SubstituteInEquations applies bindings across a model.

Despite the historical name — carried from the other bindings — this does NOT touch only equations: it is a thin alias for SubstituteInModel and therefore also rewrites every Expression position the model’s variables carry and every event expression position. Prefer calling SubstituteInModel directly; this exists so the §4.2 operation set is complete under the name the spec and the other bindings use.

Source · Go docs