System Accessors
Accessor functions query the information stored in a system. For each field x, has_x checks whether the system contains the field and get_x obtains its value.
ModelingToolkitBase.has_eqs — Function
has_eqs(sys::ModelingToolkitBase.AbstractSystem) -> Bool
Returns whether the system sys has the internal field eqs.
See also get_eqs.
ModelingToolkitBase.get_eqs — Function
get_eqs(sys::ModelingToolkitBase.AbstractSystem) -> Any
Get the internal field eqs of a system sys. It only includes eqs local to sys; not those of its subsystems, like unknowns(sys), parameters(sys) and equations(sys) does.
See also has_eqs.
ModelingToolkitBase.equations — Function
equations(sys::AbstractSystem)Get the flattened equations of the system sys and its subsystems. It may include some abbreviations and aliases of observables. It is often the most useful way to inspect the equations of a system.
See also full_equations and ModelingToolkitBase.get_eqs.
ModelingToolkitBase.equations_toplevel — Function
equations_toplevel(sys::AbstractSystem)Replicates the behaviour of equations, but ignores equations of subsystems.
Notes:
- Cannot be applied to non-complete systems.
ModelingToolkitBase.full_equations — Function
full_equations(
sys::ModelingToolkitBase.AbstractSystem;
simplify
) -> Any
Like equations(sys), but also substitutes the observed equations eliminated from the equations during mtkcompile. These equations matches generated numerical code.
See also equations and ModelingToolkitBase.get_eqs.
ModelingToolkitBase.has_noise_eqs — Function
has_noise_eqs(
sys::ModelingToolkitBase.AbstractSystem
) -> Bool
Returns whether the system sys has the internal field noise_eqs.
See also get_noise_eqs.
ModelingToolkitBase.get_noise_eqs — Function
get_noise_eqs(
sys::ModelingToolkitBase.AbstractSystem
) -> Any
Get the internal field noise_eqs of a system sys. It only includes noise_eqs local to sys; not those of its subsystems, like unknowns(sys), parameters(sys) and equations(sys) does.
See also has_noise_eqs.
ModelingToolkitBase.has_jumps — Function
has_jumps(sys::ModelingToolkitBase.AbstractSystem) -> Bool
Returns whether the system sys has the internal field jumps.
See also get_jumps.
ModelingToolkitBase.get_jumps — Function
get_jumps(sys::ModelingToolkitBase.AbstractSystem) -> Any
Get the internal field jumps of a system sys. It only includes jumps local to sys; not those of its subsystems, like unknowns(sys), parameters(sys) and equations(sys) does.
See also has_jumps.
ModelingToolkitBase.jumps — Function
jumps(sys::ModelingToolkitBase.AbstractSystem) -> Any
Get the flattened jumps of the system. In other words, obtain all of the jumps in sys and all the subsystems of sys (appropriately namespaced).
ModelingToolkitBase.has_constraints — Function
has_constraints(
sys::ModelingToolkitBase.AbstractSystem
) -> Bool
Returns whether the system sys has the internal field constraints.
See also get_constraints.
ModelingToolkitBase.get_constraints — Function
get_constraints(
sys::ModelingToolkitBase.AbstractSystem
) -> Any
Get the internal field constraints of a system sys. It only includes constraints local to sys; not those of its subsystems, like unknowns(sys), parameters(sys) and equations(sys) does.
See also has_constraints.
ModelingToolkitBase.constraints — Function
constraints(sys::ModelingToolkitBase.AbstractSystem) -> Any
Get all constraints in the system sys and all of its subsystems, appropriately namespaced.
ModelingToolkitBase.has_costs — Function
has_costs(sys::ModelingToolkitBase.AbstractSystem) -> Bool
Returns whether the system sys has the internal field costs.
See also get_costs.
ModelingToolkitBase.get_costs — Function
get_costs(sys::ModelingToolkitBase.AbstractSystem) -> Any
Get the internal field costs of a system sys. It only includes costs local to sys; not those of its subsystems, like unknowns(sys), parameters(sys) and equations(sys) does.
See also has_costs.
ModelingToolkitBase.cost — Function
cost(
sys::ModelingToolkitBase.AbstractSystem
) -> SymbolicUtils.BasicSymbolicImpl.var"typeof(BasicSymbolicImpl)"{SymReal}
Recursively consolidate the cost vector of sys and all subsystems of sys, returning the final scalar cost function.
ModelingToolkitBase.has_consolidate — Function
has_consolidate(
sys::ModelingToolkitBase.AbstractSystem
) -> Bool
Returns whether the system sys has the internal field consolidate.
See also get_consolidate.
ModelingToolkitBase.get_consolidate — Function
get_consolidate(
sys::ModelingToolkitBase.AbstractSystem
) -> Any
Get the internal field consolidate of a system sys. It only includes consolidate local to sys; not those of its subsystems, like unknowns(sys), parameters(sys) and equations(sys) does.
See also has_consolidate.
ModelingToolkitBase.has_unknowns — Function
has_unknowns(
sys::ModelingToolkitBase.AbstractSystem
) -> Bool
Returns whether the system sys has the internal field unknowns.
See also get_unknowns.
ModelingToolkitBase.get_unknowns — Function
get_unknowns(sys::ModelingToolkitBase.AbstractSystem) -> Any
Get the internal field unknowns of a system sys. It only includes unknowns local to sys; not those of its subsystems, like unknowns(sys), parameters(sys) and equations(sys) does.
See also has_unknowns.
ModelingToolkitBase.unknowns — Function
unknowns(sys::ModelingToolkitBase.AbstractSystem) -> Any
Get the unknown variables of the system sys and its subsystems. These must be explicitly solved for, unlike observables(sys).
See also ModelingToolkitBase.get_unknowns.
ModelingToolkitBase.unknowns_toplevel — Function
unknowns_toplevel(sys::AbstractSystem)Replicates the behaviour of unknowns, but ignores unknowns of subsystems.
ModelingToolkitBase.has_irreducibles — Function
has_irreducibles(
sys::ModelingToolkitBase.AbstractSystem
) -> Bool
Returns whether the system sys has the internal field irreducibles.
See also get_irreducibles.
ModelingToolkitBase.get_irreducibles — Function
get_irreducibles(
sys::ModelingToolkitBase.AbstractSystem
) -> Any
Get the internal field irreducibles of a system sys. It only includes irreducibles local to sys; not those of its subsystems, like unknowns(sys), parameters(sys) and equations(sys) does.
See also has_irreducibles.
ModelingToolkitBase.irreducibles — Function
irreducibles(sys::AbstractSystem)Return the variables in sys and its subsystems that are marked as irreducible.
Irreducible variables are preserved as unknowns during simplification instead of being eliminated as observed variables when possible.
Arguments
sys: system to inspect recursively.
Returns
An atomic set of symbolic variables, with subsystem variables namespaced into sys.
Examples
using ModelingToolkitBase
using ModelingToolkitBase: t_nounits as t, D_nounits as D
@variables x(t) [irreducible = true]
@named sys = System([D(x) ~ -x], t)
irreducibles(sys)ModelingToolkitBase.has_maybe_zeros — Function
has_maybe_zeros(
sys::ModelingToolkitBase.AbstractSystem
) -> Bool
Returns whether the system sys has the internal field maybe_zeros.
See also get_maybe_zeros.
ModelingToolkitBase.get_maybe_zeros — Function
get_maybe_zeros(
sys::ModelingToolkitBase.AbstractSystem
) -> Any
Get the internal field maybe_zeros of a system sys. It only includes maybe_zeros local to sys; not those of its subsystems, like unknowns(sys), parameters(sys) and equations(sys) does.
See also has_maybe_zeros.
ModelingToolkitBase.maybe_zeros — Function
maybe_zeros(sys::AbstractSystem)Return variables in sys and its subsystems that simplification may constrain to zero.
This is primarily used by structural simplification to track variables introduced or retained while handling alias equations.
Arguments
sys: system to inspect recursively.
Returns
An atomic set of symbolic variables, with subsystem variables namespaced into sys.
ModelingToolkitBase.has_state_priorities — Function
has_state_priorities(
sys::ModelingToolkitBase.AbstractSystem
) -> Bool
Returns whether the system sys has the internal field state_priorities.
See also get_state_priorities.
ModelingToolkitBase.get_state_priorities — Function
get_state_priorities(
sys::ModelingToolkitBase.AbstractSystem
) -> Any
Get the internal field state_priorities of a system sys. It only includes state_priorities local to sys; not those of its subsystems, like unknowns(sys), parameters(sys) and equations(sys) does.
See also has_state_priorities.
ModelingToolkitBase.state_priorities — Function
state_priorities(
sys::ModelingToolkitBase.AbstractSystem
) -> Any
Get the state priorities of a system sys and its subsystems.
ModelingToolkitBase.has_ps — Function
has_ps(sys::ModelingToolkitBase.AbstractSystem) -> Bool
Returns whether the system sys has the internal field ps.
See also get_ps.
ModelingToolkitBase.get_ps — Function
get_ps(sys::ModelingToolkitBase.AbstractSystem) -> Any
Get the internal field ps of a system sys. It only includes ps local to sys; not those of its subsystems, like unknowns(sys), parameters(sys) and equations(sys) does.
See also has_ps.
ModelingToolkitBase.parameters — Function
parameters(
sys::ModelingToolkitBase.AbstractSystem;
initial_parameters
) -> Any
Get the parameters of the system sys and its subsystems.
See also @parameters and ModelingToolkitBase.get_ps.
ModelingToolkitBase.parameters_toplevel — Function
parameters_toplevel(sys::AbstractSystem)Replicates the behaviour of parameters, but ignores parameters of subsystems.
ModelingToolkitBase.tunable_parameters — Function
tunable_parameters(sys, p = parameters(sys; initial_parameters = true); default=true)Get all parameters of sys that are marked as tunable.
Keyword argument default indicates whether variables without tunable metadata are to be considered tunable or not.
Create a tunable parameter by
@parameters u [tunable=true]For systems created with split = true (the default) and default = true passed to this function, the order of parameters returned is the order in which they are stored in the tunables portion of MTKParameters. Note that array variables will not be scalarized. To obtain the flattened representation of the tunables portion, call Symbolics.scalarize(tunable_parameters(sys)) and concatenate the resulting arrays.
See also getbounds, istunable, MTKParameters, complete
ModelingToolkitBase.bound_parameters — Function
bound_parameters(
sys::ModelingToolkitBase.AbstractSystem
) -> ModelingToolkitBase.AtomicArraySet{OrderedCollections.OrderedDict{SymbolicUtils.BasicSymbolicImpl.var"typeof(BasicSymbolicImpl)"{SymReal}, Nothing}}
Return the bound parameters of a system. Currently requires that the system is marked complete.
ModelingToolkitBase.has_brownians — Function
has_brownians(
sys::ModelingToolkitBase.AbstractSystem
) -> Bool
Returns whether the system sys has the internal field brownians.
See also get_brownians.
ModelingToolkitBase.get_brownians — Function
get_brownians(
sys::ModelingToolkitBase.AbstractSystem
) -> Any
Get the internal field brownians of a system sys. It only includes brownians local to sys; not those of its subsystems, like unknowns(sys), parameters(sys) and equations(sys) does.
See also has_brownians.
ModelingToolkitBase.brownians — Function
brownians(sys::ModelingToolkitBase.AbstractSystem) -> Any
Get all of the brownian variables involved in the system sys and all subsystems, appropriately namespaced.
ModelingToolkitBase.has_poissonians — Function
has_poissonians(
sys::ModelingToolkitBase.AbstractSystem
) -> Bool
Returns whether the system sys has the internal field poissonians.
See also get_poissonians.
ModelingToolkitBase.get_poissonians — Function
get_poissonians(
sys::ModelingToolkitBase.AbstractSystem
) -> Any
Get the internal field poissonians of a system sys. It only includes poissonians local to sys; not those of its subsystems, like unknowns(sys), parameters(sys) and equations(sys) does.
See also has_poissonians.
ModelingToolkitBase.has_iv — Function
has_iv(sys::ModelingToolkitBase.AbstractSystem) -> Bool
Returns whether the system sys has the internal field iv.
See also get_iv.
ModelingToolkitBase.get_iv — Function
get_iv(sys::ModelingToolkitBase.AbstractSystem) -> Any
Get the internal field iv of a system sys. It only includes iv local to sys; not those of its subsystems, like unknowns(sys), parameters(sys) and equations(sys) does.
See also has_iv.
ModelingToolkitBase.independent_variable — Function
independent_variable(sys)Return the scalar independent variable of sys, or nothing when sys has no scalar independent variable.
Most users should call independent_variables, which always returns a vector. This is the scalar extension point for packages that define custom AbstractSystem subtypes; external packages should extend independent_variable only. The generic independent_variables accessor wraps that scalar value and should not be extended.
Arguments
sys: A system-like object with a scalar independent variable.
Returns
- The scalar independent variable of
sys, ornothing.
Examples
struct ScalarIVSystem <: ModelingToolkitBase.AbstractSystem
iv
end
ModelingToolkitBase.independent_variable(sys::ScalarIVSystem) = getfield(sys, :iv)ModelingToolkitBase.independent_variables — Function
independent_variables(sys::AbstractSystem) -> Vector{SymbolicT}Return the independent variables of sys as a vector. This is the user-facing accessor, including for systems with one independent variable.
External packages defining custom AbstractSystem subtypes should extend the scalar independent_variable interface rather than adding methods to this accessor. For systems with a scalar independent variable, this generic accessor wraps that value in a vector.
Arguments
sys::AbstractSystem: System whose independent variables are requested.
Returns
Vector{SymbolicT}: The independent variables, or an empty vector for a time-independent system.
Examples
using ModelingToolkitBase
@independent_variables t
@named sys = System(Equation[], t)
independent_variables(sys)ModelingToolkitBase.has_ivs — Function
has_ivs(sys::ModelingToolkitBase.AbstractSystem) -> Bool
Returns whether the system sys has the internal field ivs.
See also get_ivs.
ModelingToolkitBase.get_ivs — Function
get_ivs(sys::ModelingToolkitBase.AbstractSystem) -> Any
Get the internal field ivs of a system sys. It only includes ivs local to sys; not those of its subsystems, like unknowns(sys), parameters(sys) and equations(sys) does.
See also has_ivs.
ModelingToolkitBase.has_dvs — Function
has_dvs(sys::ModelingToolkitBase.AbstractSystem) -> Bool
Returns whether the system sys has the internal field dvs.
See also get_dvs.
ModelingToolkitBase.get_dvs — Function
get_dvs(sys::ModelingToolkitBase.AbstractSystem) -> Any
Get the internal field dvs of a system sys. It only includes dvs local to sys; not those of its subsystems, like unknowns(sys), parameters(sys) and equations(sys) does.
See also has_dvs.
ModelingToolkitBase.has_tspan — Function
has_tspan(sys::ModelingToolkitBase.AbstractSystem) -> Bool
Returns whether the system sys has the internal field tspan.
See also get_tspan.
ModelingToolkitBase.get_tspan — Function
get_tspan(sys::ModelingToolkitBase.AbstractSystem) -> Any
Get the internal field tspan of a system sys. It only includes tspan local to sys; not those of its subsystems, like unknowns(sys), parameters(sys) and equations(sys) does.
See also has_tspan.
ModelingToolkitBase.has_observed — Function
has_observed(
sys::ModelingToolkitBase.AbstractSystem
) -> Bool
Returns whether the system sys has the internal field observed.
See also get_observed.
ModelingToolkitBase.get_observed — Function
get_observed(sys::ModelingToolkitBase.AbstractSystem) -> Any
Get the internal field observed of a system sys. It only includes observed local to sys; not those of its subsystems, like unknowns(sys), parameters(sys) and equations(sys) does.
See also has_observed.
ModelingToolkitBase.observed — Function
observed(sys::ModelingToolkitBase.AbstractSystem) -> Any
Get the observed equations of the system sys and its subsystems. These can be expressed in terms of unknowns(sys), and do not have to be explicitly solved for.
See also observables and ModelingToolkitBase.get_observed().
ModelingToolkitBase.observables — Function
observables(sys::ModelingToolkitBase.AbstractSystem) -> Any
Get the observed variables of the system sys and its subsystems. These can be expressed in terms of unknowns(sys), and do not have to be explicitly solved for. It is equivalent to all left hand sides of observed(sys).
See also observed.
ModelingToolkitBase.has_name — Function
has_name(sys::ModelingToolkitBase.AbstractSystem) -> Bool
Returns whether the system sys has the internal field name.
See also get_name.
ModelingToolkitBase.get_name — Function
get_name(sys::ModelingToolkitBase.AbstractSystem) -> Any
Get the internal field name of a system sys. It only includes name local to sys; not those of its subsystems, like unknowns(sys), parameters(sys) and equations(sys) does.
See also has_name.
Base.nameof — Function
nameof(sys::ModelingToolkitBase.AbstractSystem) -> Any
Obtain the name of sys.
ModelingToolkitBase.has_description — Function
has_description(
sys::ModelingToolkitBase.AbstractSystem
) -> Bool
Returns whether the system sys has the internal field description.
See also get_description.
ModelingToolkitBase.get_description — Function
get_description(
sys::ModelingToolkitBase.AbstractSystem
) -> Any
Get the internal field description of a system sys. It only includes description local to sys; not those of its subsystems, like unknowns(sys), parameters(sys) and equations(sys) does.
See also has_description.
ModelingToolkitBase.description — Function
description(sys::ModelingToolkitBase.AbstractSystem) -> Any
Obtain the description associated with sys if present, and an empty string otherwise.
ModelingToolkitBase.has_bindings — Function
has_bindings(
sys::ModelingToolkitBase.AbstractSystem
) -> Bool
Returns whether the system sys has the internal field bindings.
See also get_bindings.
ModelingToolkitBase.get_bindings — Function
get_bindings(sys::ModelingToolkitBase.AbstractSystem) -> Any
Get the internal field bindings of a system sys. It only includes bindings local to sys; not those of its subsystems, like unknowns(sys), parameters(sys) and equations(sys) does.
See also has_bindings.
ModelingToolkitBase.bindings — Function
bindings(sys::ModelingToolkitBase.AbstractSystem) -> Any
Get the bindings of a system sys and its subsystems.
ModelingToolkitBase.has_initial_conditions — Function
has_initial_conditions(
sys::ModelingToolkitBase.AbstractSystem
) -> Bool
Returns whether the system sys has the internal field initial_conditions.
See also get_initial_conditions.
ModelingToolkitBase.get_initial_conditions — Function
get_initial_conditions(
sys::ModelingToolkitBase.AbstractSystem
) -> Any
Get the internal field initial_conditions of a system sys. It only includes initial_conditions local to sys; not those of its subsystems, like unknowns(sys), parameters(sys) and equations(sys) does.
See also has_initial_conditions.
ModelingToolkitBase.initial_conditions — Function
initial_conditions(
sys::ModelingToolkitBase.AbstractSystem
) -> Any
Get the initial conditions of a system sys and its subsystems.
ModelingToolkitBase.has_guesses — Function
has_guesses(sys::ModelingToolkitBase.AbstractSystem) -> Bool
Returns whether the system sys has the internal field guesses.
See also get_guesses.
ModelingToolkitBase.get_guesses — Function
get_guesses(sys::ModelingToolkitBase.AbstractSystem) -> Any
Get the internal field guesses of a system sys. It only includes guesses local to sys; not those of its subsystems, like unknowns(sys), parameters(sys) and equations(sys) does.
See also has_guesses.
ModelingToolkitBase.guesses — Function
guesses(sys::ModelingToolkitBase.AbstractSystem) -> Any
Get the guesses for variables in the initialization system of the system sys and its subsystems.
See also initialization_equations and ModelingToolkitBase.get_guesses.
ModelingToolkitBase.has_systems — Function
has_systems(sys::ModelingToolkitBase.AbstractSystem) -> Bool
Returns whether the system sys has the internal field systems.
See also get_systems.
ModelingToolkitBase.get_systems — Function
get_systems(sys::ModelingToolkitBase.AbstractSystem) -> Any
Get the internal field systems of a system sys. It only includes systems local to sys; not those of its subsystems, like unknowns(sys), parameters(sys) and equations(sys) does.
See also has_systems.
ModelingToolkitBase.has_initialization_eqs — Function
has_initialization_eqs(
sys::ModelingToolkitBase.AbstractSystem
) -> Bool
Returns whether the system sys has the internal field initialization_eqs.
See also get_initialization_eqs.
ModelingToolkitBase.get_initialization_eqs — Function
get_initialization_eqs(
sys::ModelingToolkitBase.AbstractSystem
) -> Any
Get the internal field initialization_eqs of a system sys. It only includes initialization_eqs local to sys; not those of its subsystems, like unknowns(sys), parameters(sys) and equations(sys) does.
See also has_initialization_eqs.
ModelingToolkitBase.initialization_equations — Function
initialization_equations(
sys::ModelingToolkitBase.AbstractSystem
) -> Any
Get the initialization equations of the system sys and its subsystems.
See also guesses, initial_conditions and ModelingToolkitBase.get_initialization_eqs.
ModelingToolkitBase.has_continuous_events — Function
has_continuous_events(
sys::ModelingToolkitBase.AbstractSystem
) -> Bool
Returns whether the system sys has the internal field continuous_events.
See also get_continuous_events.
ModelingToolkitBase.get_continuous_events — Function
get_continuous_events(
sys::ModelingToolkitBase.AbstractSystem
) -> Any
Get the internal field continuous_events of a system sys. It only includes continuous_events local to sys; not those of its subsystems, like unknowns(sys), parameters(sys) and equations(sys) does.
See also has_continuous_events.
ModelingToolkitBase.continuous_events — Function
continuous_events(sys::AbstractSystem)::Vector{SymbolicContinuousCallback}Returns a vector of all the continuous_events in an abstract system and its component subsystems. The SymbolicContinuousCallbacks in the returned vector are structs with two fields: eqs and affect which correspond to the first and second elements of a Pair used to define an event, i.e. eqs => affect.
See also get_continuous_events, which only returns the events of the top-level system.
ModelingToolkitBase.continuous_events_toplevel — Function
continuous_events_toplevel(sys::AbstractSystem)Replicates the behaviour of continuous_events, but ignores events of subsystems.
Notes:
- Cannot be applied to non-complete systems.
ModelingToolkitBase.has_discrete_events — Function
has_discrete_events(
sys::ModelingToolkitBase.AbstractSystem
) -> Bool
Returns whether the system sys has the internal field discrete_events.
See also get_discrete_events.
ModelingToolkitBase.get_discrete_events — Function
get_discrete_events(
sys::ModelingToolkitBase.AbstractSystem
) -> Any
Get the internal field discrete_events of a system sys. It only includes discrete_events local to sys; not those of its subsystems, like unknowns(sys), parameters(sys) and equations(sys) does.
See also has_discrete_events.
ModelingToolkitBase.discrete_events — Function
discrete_events(sys::AbstractSystem) :: Vector{SymbolicDiscreteCallback}Returns a vector of all the discrete_events in an abstract system and its component subsystems. The SymbolicDiscreteCallbacks in the returned vector are structs with two fields: condition and affect which correspond to the first and second elements of a Pair used to define an event, i.e. condition => affect.
See also get_discrete_events, which only returns the events of the top-level system.
ModelingToolkitBase.discrete_events_toplevel — Function
discrete_events_toplevel(sys::AbstractSystem)Replicates the behaviour of discrete_events, but ignores events of subsystems.
Notes:
- Cannot be applied to non-complete systems.
ModelingToolkitBase.has_assertions — Function
has_assertions(
sys::ModelingToolkitBase.AbstractSystem
) -> Bool
Returns whether the system sys has the internal field assertions.
See also get_assertions.
ModelingToolkitBase.get_assertions — Function
get_assertions(
sys::ModelingToolkitBase.AbstractSystem
) -> Any
Get the internal field assertions of a system sys. It only includes assertions local to sys; not those of its subsystems, like unknowns(sys), parameters(sys) and equations(sys) does.
See also has_assertions.
ModelingToolkitBase.assertions — Function
assertions(sys::ModelingToolkitBase.AbstractSystem) -> Any
Get the assertions for a system sys and its subsystems.
ModelingToolkitBase.has_metadata — Function
has_metadata(
sys::ModelingToolkitBase.AbstractSystem
) -> Bool
Returns whether the system sys has the internal field metadata.
See also get_metadata.
ModelingToolkitBase.get_metadata — Function
get_metadata(sys::ModelingToolkitBase.AbstractSystem) -> Any
Get the internal field metadata of a system sys. It only includes metadata local to sys; not those of its subsystems, like unknowns(sys), parameters(sys) and equations(sys) does.
See also has_metadata.
SymbolicUtils.getmetadata — Method
getmetadata(
sys::ModelingToolkitBase.AbstractSystem,
k::DataType,
default
) -> Any
Get the metadata associated with key k in system sys or default if it does not exist.
SymbolicUtils.setmetadata — Method
setmetadata(
sys::ModelingToolkitBase.AbstractSystem,
k::DataType,
v
) -> Any
Set the metadata associated with key k in system sys to value v. This is an out-of-place operation, and will return a shallow copy of sys with the appropriate metadata values.
ModelingToolkitBase.MiscSystemData — Type
abstract type MiscSystemDataUtility metadata key for adding miscellaneous/one-off metadata to systems.
sys = setmetadata(sys, MiscSystemData, mydata)
getmetadata(sys, MiscSystemData, nothing)ModelingToolkitBase.has_is_dde — Function
has_is_dde(sys::ModelingToolkitBase.AbstractSystem) -> Bool
Returns whether the system sys has the internal field is_dde.
See also get_is_dde.
ModelingToolkitBase.get_is_dde — Function
get_is_dde(sys::ModelingToolkitBase.AbstractSystem) -> Any
Get the internal field is_dde of a system sys. It only includes is_dde local to sys; not those of its subsystems, like unknowns(sys), parameters(sys) and equations(sys) does.
See also has_is_dde.
ModelingToolkitBase.is_dde — Function
is_dde(sys::AbstractSystem)Return a boolean indicating whether a system represents a set of delay differential equations.
ModelingToolkitBase.has_tstops — Function
has_tstops(sys::ModelingToolkitBase.AbstractSystem) -> Bool
Returns whether the system sys has the internal field tstops.
See also get_tstops.
ModelingToolkitBase.get_tstops — Function
get_tstops(sys::ModelingToolkitBase.AbstractSystem) -> Any
Get the internal field tstops of a system sys. It only includes tstops local to sys; not those of its subsystems, like unknowns(sys), parameters(sys) and equations(sys) does.
See also has_tstops.
ModelingToolkitBase.symbolic_tstops — Function
symbolic_tstops(
sys::ModelingToolkitBase.AbstractSystem
) -> Any
Get the tstops present in sys and its subsystems, appropriately namespaced.
ModelingToolkitBase.has_tearing_state — Function
has_tearing_state(
sys::ModelingToolkitBase.AbstractSystem
) -> Bool
Returns whether the system sys has the internal field tearing_state.
See also get_tearing_state.
ModelingToolkitBase.get_tearing_state — Function
get_tearing_state(
sys::ModelingToolkitBase.AbstractSystem
) -> Any
Get the internal field tearing_state of a system sys. It only includes tearing_state local to sys; not those of its subsystems, like unknowns(sys), parameters(sys) and equations(sys) does.
See also has_tearing_state.
ModelingToolkitBase.has_schedule — Function
has_schedule(
sys::ModelingToolkitBase.AbstractSystem
) -> Bool
Returns whether the system sys has the internal field schedule.
See also get_schedule.
ModelingToolkitBase.get_schedule — Function
get_schedule(sys::ModelingToolkitBase.AbstractSystem) -> Any
Get the internal field schedule of a system sys. It only includes schedule local to sys; not those of its subsystems, like unknowns(sys), parameters(sys) and equations(sys) does.
See also has_schedule.
ModelingToolkitBase.has_isscheduled — Function
has_isscheduled(
sys::ModelingToolkitBase.AbstractSystem
) -> Bool
Returns whether the system sys has the internal field isscheduled.
See also get_isscheduled.
ModelingToolkitBase.get_isscheduled — Function
get_isscheduled(
sys::ModelingToolkitBase.AbstractSystem
) -> Any
Get the internal field isscheduled of a system sys. It only includes isscheduled local to sys; not those of its subsystems, like unknowns(sys), parameters(sys) and equations(sys) does.
See also has_isscheduled.
ModelingToolkitBase.has_index_cache — Function
has_index_cache(
sys::ModelingToolkitBase.AbstractSystem
) -> Bool
Returns whether the system sys has the internal field index_cache.
See also get_index_cache.
ModelingToolkitBase.get_index_cache — Function
get_index_cache(
sys::ModelingToolkitBase.AbstractSystem
) -> Any
Get the internal field index_cache of a system sys. It only includes index_cache local to sys; not those of its subsystems, like unknowns(sys), parameters(sys) and equations(sys) does.
See also has_index_cache.
ModelingToolkitBase.has_irstructure_tlv — Function
has_irstructure_tlv(
sys::ModelingToolkitBase.AbstractSystem
) -> Bool
Returns whether the system sys has the internal field irstructure_tlv.
See also get_irstructure_tlv.
ModelingToolkitBase.get_irstructure_tlv — Function
get_irstructure_tlv(
sys::ModelingToolkitBase.AbstractSystem
) -> Any
Get the internal field irstructure_tlv of a system sys. It only includes irstructure_tlv local to sys; not those of its subsystems, like unknowns(sys), parameters(sys) and equations(sys) does.
See also has_irstructure_tlv.
ModelingToolkitBase.has_parameter_bindings_graph — Function
has_parameter_bindings_graph(
sys::ModelingToolkitBase.AbstractSystem
) -> Bool
Returns whether the system sys has the internal field parameter_bindings_graph.
See also get_parameter_bindings_graph.
ModelingToolkitBase.get_parameter_bindings_graph — Function
get_parameter_bindings_graph(
sys::ModelingToolkitBase.AbstractSystem
) -> Any
Get the internal field parameter_bindings_graph of a system sys. It only includes parameter_bindings_graph local to sys; not those of its subsystems, like unknowns(sys), parameters(sys) and equations(sys) does.
See also has_parameter_bindings_graph.
ModelingToolkitBase.does_namespacing — Function
does_namespacing(
sys::ModelingToolkitBase.AbstractSystem
) -> Any
Check whether a system performs namespacing.
ModelingToolkitBase.toggle_namespacing — Function
toggle_namespacing(
sys::ModelingToolkitBase.AbstractSystem,
value::Bool;
safe
) -> Any
Return a new sys with namespacing enabled or disabled, depending on value. The keyword argument safe denotes whether systems that do not support such a toggle should error or be ignored.
ModelingToolkitBase.iscomplete — Function
iscomplete(sys::ModelingToolkitBase.AbstractSystem) -> Any
Check whether a system is marked as complete.
ModelingToolkitBase.has_preface — Function
has_preface(sys::ModelingToolkitBase.AbstractSystem) -> Bool
Returns whether the system sys has the internal field preface.
See also get_preface.
ModelingToolkitBase.get_preface — Function
get_preface(sys::ModelingToolkitBase.AbstractSystem) -> Any
Get the internal field preface of a system sys. It only includes preface local to sys; not those of its subsystems, like unknowns(sys), parameters(sys) and equations(sys) does.
See also has_preface.
ModelingToolkitBase.preface — Function
preface(sys::ModelingToolkitBase.AbstractSystem) -> Any
Obtain the preface associated with sys and all of its subsystems, appropriately namespaced.
ModelingToolkitBase.has_parent — Function
has_parent(sys::ModelingToolkitBase.AbstractSystem) -> Bool
Returns whether the system sys has the internal field parent.
See also get_parent.
ModelingToolkitBase.get_parent — Function
get_parent(sys::ModelingToolkitBase.AbstractSystem) -> Any
Get the internal field parent of a system sys. It only includes parent local to sys; not those of its subsystems, like unknowns(sys), parameters(sys) and equations(sys) does.
See also has_parent.
ModelingToolkitBase.has_initializesystem — Function
has_initializesystem(
sys::ModelingToolkitBase.AbstractSystem
) -> Bool
Returns whether the system sys has the internal field initializesystem.
See also get_initializesystem.
ModelingToolkitBase.get_initializesystem — Function
get_initializesystem(
sys::ModelingToolkitBase.AbstractSystem
) -> Any
Get the internal field initializesystem of a system sys. It only includes initializesystem local to sys; not those of its subsystems, like unknowns(sys), parameters(sys) and equations(sys) does.
See also has_initializesystem.
ModelingToolkitBase.has_is_initializesystem — Function
has_is_initializesystem(
sys::ModelingToolkitBase.AbstractSystem
) -> Bool
Returns whether the system sys has the internal field is_initializesystem.
See also get_is_initializesystem.
ModelingToolkitBase.get_is_initializesystem — Function
get_is_initializesystem(
sys::ModelingToolkitBase.AbstractSystem
) -> Any
Get the internal field is_initializesystem of a system sys. It only includes is_initializesystem local to sys; not those of its subsystems, like unknowns(sys), parameters(sys) and equations(sys) does.
See also has_is_initializesystem.
ModelingToolkitBase.is_initializesystem — Function
is_initializesystem(
sys::ModelingToolkitBase.AbstractSystem
) -> Any
Check if the given system is an initialization system.
ModelingToolkitBase.has_analytically_integrated — Function
has_analytically_integrated(
sys::ModelingToolkitBase.AbstractSystem
) -> Bool
Returns whether the system sys has the internal field analytically_integrated.
See also get_analytically_integrated.
ModelingToolkitBase.get_analytically_integrated — Function
get_analytically_integrated(
sys::ModelingToolkitBase.AbstractSystem
) -> Any
Get the internal field analytically_integrated of a system sys. It only includes analytically_integrated local to sys; not those of its subsystems, like unknowns(sys), parameters(sys) and equations(sys) does.
See also has_analytically_integrated.
ModelingToolkitBase.analytically_integrated — Function
analytically_integrated(
sys::ModelingToolkitBase.AbstractSystem
) -> Any
Return the list of analytically integrated variables in sys. Requires that sys is flattened, since analytically integrated variables cannot be specified for unflattened systems.
ModelingToolkitBase.has_connector_type — Function
has_connector_type(
sys::ModelingToolkitBase.AbstractSystem
) -> Bool
Returns whether the system sys has the internal field connector_type.
See also get_connector_type.
ModelingToolkitBase.get_connector_type — Function
get_connector_type(
sys::ModelingToolkitBase.AbstractSystem
) -> Any
Get the internal field connector_type of a system sys. It only includes connector_type local to sys; not those of its subsystems, like unknowns(sys), parameters(sys) and equations(sys) does.
See also has_connector_type.
ModelingToolkitBase.has_ignored_connections — Function
has_ignored_connections(
sys::ModelingToolkitBase.AbstractSystem
) -> Bool
Returns whether the system sys has the internal field ignored_connections.
See also get_ignored_connections.
ModelingToolkitBase.get_ignored_connections — Function
get_ignored_connections(
sys::ModelingToolkitBase.AbstractSystem
) -> Any
Get the internal field ignored_connections of a system sys. It only includes ignored_connections local to sys; not those of its subsystems, like unknowns(sys), parameters(sys) and equations(sys) does.
See also has_ignored_connections.
ModelingToolkitBase.has_is_discrete — Function
has_is_discrete(
sys::ModelingToolkitBase.AbstractSystem
) -> Bool
Returns whether the system sys has the internal field is_discrete.
See also get_is_discrete.
ModelingToolkitBase.get_is_discrete — Function
get_is_discrete(
sys::ModelingToolkitBase.AbstractSystem
) -> Any
Get the internal field is_discrete of a system sys. It only includes is_discrete local to sys; not those of its subsystems, like unknowns(sys), parameters(sys) and equations(sys) does.
See also has_is_discrete.
ModelingToolkitBase.has_bcs — Function
has_bcs(sys::ModelingToolkitBase.AbstractSystem) -> Bool
Returns whether the system sys has the internal field bcs.
See also get_bcs.
ModelingToolkitBase.get_bcs — Function
get_bcs(sys::ModelingToolkitBase.AbstractSystem) -> Any
Get the internal field bcs of a system sys. It only includes bcs local to sys; not those of its subsystems, like unknowns(sys), parameters(sys) and equations(sys) does.
See also has_bcs.
ModelingToolkitBase.has_domain — Function
has_domain(sys::ModelingToolkitBase.AbstractSystem) -> Bool
Returns whether the system sys has the internal field domain.
See also get_domain.
ModelingToolkitBase.get_domain — Function
get_domain(sys::ModelingToolkitBase.AbstractSystem) -> Any
Get the internal field domain of a system sys. It only includes domain local to sys; not those of its subsystems, like unknowns(sys), parameters(sys) and equations(sys) does.
See also has_domain.
ModelingToolkitBase.has_var_to_name — Function
has_var_to_name(
sys::ModelingToolkitBase.AbstractSystem
) -> Bool
Returns whether the system sys has the internal field var_to_name.
See also get_var_to_name.
ModelingToolkitBase.get_var_to_name — Function
get_var_to_name(
sys::ModelingToolkitBase.AbstractSystem
) -> Any
Get the internal field var_to_name of a system sys. It only includes var_to_name local to sys; not those of its subsystems, like unknowns(sys), parameters(sys) and equations(sys) does.
See also has_var_to_name.
ModelingToolkitBase.has_gui_metadata — Function
has_gui_metadata(
sys::ModelingToolkitBase.AbstractSystem
) -> Bool
Returns whether the system sys has the internal field gui_metadata.
See also get_gui_metadata.
ModelingToolkitBase.get_gui_metadata — Function
get_gui_metadata(
sys::ModelingToolkitBase.AbstractSystem
) -> Any
Get the internal field gui_metadata of a system sys. It only includes gui_metadata local to sys; not those of its subsystems, like unknowns(sys), parameters(sys) and equations(sys) does.
See also has_gui_metadata.
ModelingToolkitBase.has_tag — Function
has_tag(sys::ModelingToolkitBase.AbstractSystem) -> Bool
Returns whether the system sys has the internal field tag.
See also get_tag.
ModelingToolkitBase.get_tag — Function
get_tag(sys::ModelingToolkitBase.AbstractSystem) -> Any
Get the internal field tag of a system sys. It only includes tag local to sys; not those of its subsystems, like unknowns(sys), parameters(sys) and equations(sys) does.
See also has_tag.