Show / Hide Table of Contents

Class SubcircuitSimulation

A subcircuit simulation that captures created behaviors in a local container.

Inheritance
object
SimulationWrapper
SubcircuitSimulation
Implements
ISimulation
IStateful
IBehavioral
IParameterSetCollection
IParameterSet
Inherited Members
SimulationWrapper.Parent
SimulationWrapper.CurrentRun
SimulationWrapper.Repeat
SimulationWrapper.LocalStates
SimulationWrapper.States
SimulationWrapper.Behaviors
SimulationWrapper.Name
SimulationWrapper.Status
SimulationWrapper.EntityBehaviors
SimulationWrapper.ParameterSets
SimulationWrapper.Run(IEntityCollection, int)
SimulationWrapper.Rerun(int)
SimulationWrapper.TryGetState<S>(out S)
SimulationWrapper.GetParentState<S>()
SimulationWrapper.TryGetParentState<S>(out S)
SimulationWrapper.UsesState<S>()
SimulationWrapper.UsesBehaviors<B>()
SimulationWrapper.UsesBehavior(Type)
SimulationWrapper.GetParameterSet<P>()
SimulationWrapper.TryGetParameterSet<P>(out P)
SimulationWrapper.SetParameter<P>(string, P)
SimulationWrapper.TrySetParameter<P>(string, P)
SimulationWrapper.GetProperty<P>(string)
SimulationWrapper.TryGetProperty<P>(string, out P)
SimulationWrapper.CreateParameterSetter<P>(string)
SimulationWrapper.CreatePropertyGetter<P>(string)
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: SpiceSharp.Components.Subcircuits
Assembly: SpiceSharp.dll
Syntax
public class SubcircuitSimulation : SimulationWrapper, ISimulation, IStateful, IBehavioral, IParameterSetCollection, IParameterSet

Constructors

SubcircuitSimulation(string, ISimulation, ISubcircuitDefinition, IReadOnlyList<Bridge<string>>)

Initializes a new instance of the SubcircuitSimulation class.

Declaration
public SubcircuitSimulation(string name, ISimulation parent, ISubcircuitDefinition definition, IReadOnlyList<Bridge<string>> nodes)
Parameters
Type Name Description
string name

The name of the subcircuit.

ISimulation parent

The parent simulation.

ISubcircuitDefinition definition

The subcircuit definition.

IReadOnlyList<Bridge<string>> nodes

The node bridges.

Exceptions
Type Condition
ArgumentNullException

Thrown if name, parent, definition or nodes is null.

Properties

Definition

Gets the subcircuit.

Declaration
protected ISubcircuitDefinition Definition { get; }
Property Value
Type Description
ISubcircuitDefinition

The subcircuit.

InstanceName

Gets the name of the subcircuit instance.

Declaration
public string InstanceName { get; }
Property Value
Type Description
string

The name of the instance.

Nodes

Gets a dictionary that maps internal nodes to nodes external to the subcircuit. Any node that isn't part of this map, is considered a local node.

Declaration
public IReadOnlyList<Bridge<string>> Nodes { get; }
Property Value
Type Description
IReadOnlyList<Bridge<string>>

The node map.

Methods

GetState<S>()

Gets the state of the specified type.

Declaration
public override S GetState<S>() where S : ISimulationState
Returns
Type Description
S

The type, or null if the state isn't used.

Type Parameters
Name Description
S

The simulation state type.

Overrides
SimulationWrapper.GetState<S>()
Exceptions
Type Condition
TypeNotFoundException

Thrown if the simulation state is not defined on this instance.

Implements

ISimulation
IStateful
IBehavioral
IParameterSetCollection
IParameterSet

Extension Methods

Utility.ThrowIfNull<T>(T, string)
Documentation.ParameterValues<T>(IParameterSet, bool)
Documentation.Parameters(IParameterSet)
Documentation.ParameterValues<T>(IParameterSetCollection, bool)
Documentation.Parameters(IParameterSetCollection)
SimulationHelper.GetComplexCurrent(ISimulation, Reference)
SimulationHelper.GetComplexProperty(ISimulation, Reference, string)
SimulationHelper.GetComplexVoltage(ISimulation, Reference)
SimulationHelper.GetComplexVoltage(ISimulation, Reference, Reference)
SimulationHelper.GetCurrent(ISimulation, Reference)
SimulationHelper.GetProperty(ISimulation, Reference, string)
SimulationHelper.GetVoltage(ISimulation, Reference)
SimulationHelper.GetVoltage(ISimulation, Reference, Reference)
SimulationHelper.RunToEnd(ISimulation, IEntityCollection, IDictionary<int, Action>)
SimulationHelper.TryGetComplexCurrent(ISimulation, Reference, out Complex)
SimulationHelper.TryGetComplexProperty(ISimulation, Reference, string, out Complex)
SimulationHelper.TryGetComplexVoltage(ISimulation, Reference, Reference, out Complex)
SimulationHelper.TryGetComplexVoltage(ISimulation, Reference, out Complex)
SimulationHelper.TryGetCurrent(ISimulation, Reference, out double)
SimulationHelper.TryGetProperty(ISimulation, Reference, string, out double)
SimulationHelper.TryGetVoltage(ISimulation, Reference, Reference, out double)
SimulationHelper.TryGetVoltage(ISimulation, Reference, out double)

See Also

ISimulation
In this article
Back to top Generated by DocFX