Version: dev

coupling_entry

Stable type · Document types

Tier: stable · Kind: type · Topic: Document types

JuliaTypeScriptPythonRustGo
CouplingEntrynot exportedCouplingEntryCouplingEntryCouplingEntry

Julia

abstract type CouplingEntry
abstract type CouplingEntry end

Abstract base type for coupling entries that connect model components.

Source

TypeScript

TypeScript does not export this type.

Python

CouplingEntry = Union[OperatorComposeCoupling, CouplingCouple, VariableMapCoupling, OperatorApplyCoupling, CallbackCoupling, EventCoupling, CouplingImport]

One entry of a document’s coupling list (esm-spec §10): any of the coupling dataclasses, told apart by their coupling_type field (CouplingType), which is the wire type discriminator.

Source

Rust

pub enum CouplingEntry {
    OperatorCompose { systems: Vec<String>, translate: Option<Value>, lifting: Option<String>, require_match: Option<bool>, description: Option<String> },
    Couple { systems: Vec<String>, connector: Value, lifting: Option<String>, description: Option<String> },
    VariableMap { from: String, to: String, transform: VariableMapTransform, factor: Option<f64>, lifting: Option<String>, description: Option<String> },
    OperatorApply { operator: String, description: Option<String> },
    Callback { callback_id: String, config: Option<Value>, description: Option<String> },
    Event { event_type: String, name: Option<String>, conditions: Option<Vec<Expr>>, trigger: Option<DiscreteEventTrigger>, affects: Option<Vec<AffectEquation>>, affect_neg: Option<Vec<AffectEquation>>, root_find: Option<RootFindDirection>, reinitialize: Option<bool>, description: Option<String> },
    CouplingImport { reference: String, bind: Option<HashMap<String, String>>, description: Option<String> },
}

Coupling entry with discriminated union based on type field

Source · Rust docs

Go

type CouplingEntry interface {
	CouplingType() string
}

CouplingEntry represents different types of coupling rules This is a discriminated union based on the “type” field

Source · Go docs