/// <summary> /// Setup the behavior for the specified simulation. /// </summary> /// <param name="simulation">The simulation.</param> /// <param name="provider">The provider.</param> /// <exception cref="ArgumentNullException">provider</exception> public override void Setup(Simulation simulation, SetupDataProvider provider) { provider.ThrowIfNull(nameof(provider)); // Get behaviors _loadBehavior = provider.GetBehavior <VoltageSourceBehaviors.BiasingBehavior>("control"); }
/// <summary> /// Setup behavior /// </summary> /// <param name="simulation">Simulation</param> /// <param name="provider">Data provider</param> public override void Setup(Simulation simulation, SetupDataProvider provider) { provider.ThrowIfNull(nameof(provider)); // Get parameters BaseParameters = provider.GetParameterSet <BaseParameters>(); }
/// <summary> /// Setup the behavior /// </summary> /// <param name="simulation">Simulation</param> /// <param name="provider">Data provider</param> public override void Setup(Simulation simulation, SetupDataProvider provider) { base.Setup(simulation, provider); provider.ThrowIfNull(nameof(provider)); // Get parameters _bp = provider.GetParameterSet <CommonBehaviors.IndependentSourceParameters>(); }
/// <summary> /// Setup behavior /// </summary> /// <param name="simulation">Simulation</param> /// <param name="provider">Data provider</param> public override void Setup(Simulation simulation, SetupDataProvider provider) { base.Setup(simulation, provider); provider.ThrowIfNull(nameof(provider)); // Get configurations BaseConfiguration = simulation.Configurations.Get <BaseConfiguration>(); }
/// <summary> /// Setup behavior /// </summary> /// <param name="simulation">Simulation</param> /// <param name="provider">Data provider</param> public override void Setup(Simulation simulation, SetupDataProvider provider) { base.Setup(simulation, provider); provider.ThrowIfNull(nameof(provider)); // Get parameters NoiseParameters = provider.GetParameterSet <ModelNoiseParameters>("model"); }
/// <summary> /// Setup the behavior /// </summary> /// <param name="simulation">The simulation</param> /// <param name="provider">The setup data provider</param> public override void Setup(Simulation simulation, SetupDataProvider provider) { provider.ThrowIfNull(nameof(provider)); // Get parameters BaseParameters = provider.GetParameterSet <BaseParameters>(); provider.TryGetParameterSet("model", out ModelBaseParameters mbp); ModelParameters = mbp; }
/// <summary> /// Setup the behavior for the specified simulation. /// </summary> /// <param name="simulation">The simulation.</param> /// <param name="provider">The provider.</param> /// <exception cref="ArgumentNullException">provider</exception> public override void Setup(Simulation simulation, SetupDataProvider provider) { provider.ThrowIfNull(nameof(provider)); // Get parameters BaseParameters = provider.GetParameterSet <BaseParameters>(); BaseParameters1 = provider.GetParameterSet <InductorBehaviors.BaseParameters>("inductor1"); BaseParameters2 = provider.GetParameterSet <InductorBehaviors.BaseParameters>("inductor2"); }
/// <summary> /// Setup behavior /// </summary> /// <param name="simulation">Simulation</param> /// <param name="provider">Data provider</param> public override void Setup(Simulation simulation, SetupDataProvider provider) { base.Setup(simulation, provider); provider.ThrowIfNull(nameof(provider)); // Get behaviors Bias1 = provider.GetBehavior <BiasingBehavior>("inductor1"); Bias2 = provider.GetBehavior <BiasingBehavior>("inductor2"); }
/// <summary> /// Setup behavior /// </summary> /// <param name="simulation">Simulation</param> /// <param name="provider">Data provider</param> public override void Setup(Simulation simulation, SetupDataProvider provider) { provider.ThrowIfNull(nameof(provider)); // Get parameters BaseParameters = provider.GetParameterSet <BaseParameters>(); // Get behaviors (0 = CCCS behaviors, 1 = VSRC behaviors) VoltageLoad = provider.GetBehavior <VoltageSourceBehaviors.BiasingBehavior>("control"); }
/// <summary> /// Setup behavior /// </summary> /// <param name="simulation">Simulation</param> /// <param name="provider">Data provider</param> public override void Setup(Simulation simulation, SetupDataProvider provider) { provider.ThrowIfNull(nameof(provider)); // Get parameters BaseParameters = provider.GetParameterSet <BaseParameters>(); ModelParameters = provider.GetParameterSet <ModelBaseParameters>("model"); // Get behaviors ModelTemperature = provider.GetBehavior <ModelTemperatureBehavior>("model"); }
/// <summary> /// Setup behavior /// </summary> /// <param name="simulation">Simulation</param> /// <param name="provider">Data provider</param> public override void Setup(Simulation simulation, SetupDataProvider provider) { base.Setup(simulation, provider); provider.ThrowIfNull(nameof(provider)); // Get parameters _bp = provider.GetParameterSet <BaseParameters>(); // Get behaviors _base = provider.GetBehavior <BiasingBehavior>(); }
/// <summary> /// Setup the behavior for the specified simulation. /// </summary> /// <param name="simulation">The simulation.</param> /// <param name="provider">The provider.</param> /// <exception cref="NotImplementedException"></exception> public override void Setup(Simulation simulation, SetupDataProvider provider) { provider.ThrowIfNull(nameof(provider)); // Get parameters BaseParameters = provider.GetParameterSet <BaseParameters>(); ModelParameters = provider.GetParameterSet <ModelBaseParameters>("model"); // Allow the controling method to set up Method.Setup(simulation, provider); }
/// <summary> /// Setup behavior /// </summary> /// <param name="simulation">Simulation</param> /// <param name="provider">Data provider</param> public override void Setup(Simulation simulation, SetupDataProvider provider) { base.Setup(simulation, provider); provider.ThrowIfNull(nameof(provider)); // Get behaviors Load1 = provider.GetBehavior <InductorBehaviors.TransientBehavior>("inductor1"); Load2 = provider.GetBehavior <InductorBehaviors.TransientBehavior>("inductor2"); // Register events for modifying the flux through the inductors Load1.UpdateFlux += UpdateFlux1; Load2.UpdateFlux += UpdateFlux2; }
/// <summary> /// Setup behavior /// </summary> /// <param name="simulation">Simulation</param> /// <param name="provider">Data provider</param> public override void Setup(Simulation simulation, SetupDataProvider provider) { base.Setup(simulation, provider); provider.ThrowIfNull(nameof(provider)); // Get conigurations BaseConfiguration = simulation.Configurations.Get <BaseConfiguration>(); // Reset SaturationVoltageDs = 0; Von = 0; Mode = 1; }
/// <summary> /// Setup behavior /// </summary> /// <param name="simulation">Simulation</param> /// <param name="provider">Data provider</param> public override void Setup(Simulation simulation, SetupDataProvider provider) { base.Setup(simulation, provider); provider.ThrowIfNull(nameof(provider)); // Get parameters _bp = provider.GetParameterSet <BaseParameters>(); _mnp = provider.GetParameterSet <ModelNoiseParameters>("model"); // Get behaviors _load = provider.GetBehavior <BiasingBehavior>(); _modeltemp = provider.GetBehavior <ModelTemperatureBehavior>("model"); }
/// <summary> /// Setup behavior /// </summary> /// <param name="simulation">Simulation</param> /// <param name="provider">Data provider</param> public override void Setup(Simulation simulation, SetupDataProvider provider) { provider.ThrowIfNull(nameof(provider)); // Get parameters BaseParameters = provider.GetParameterSet <CommonBehaviors.IndependentSourceParameters>(); // Setup the waveform BaseParameters.Waveform?.Setup(); // Give some warnings if no value is given if (!BaseParameters.DcValue.Given) { // no DC value - either have a transient value or none CircuitWarning.Warning(this, BaseParameters.Waveform != null ? "{0} has no DC value, transient time 0 value used".FormatString(Name) : "{0} has no value, DC 0 assumed".FormatString(Name)); } }
/// <summary> /// Setup the behavior /// </summary> /// <param name="simulation">Simulation</param> /// <param name="provider">Data provider</param> public override void Setup(Simulation simulation, SetupDataProvider provider) { provider.ThrowIfNull(nameof(provider)); // Get parameters BaseParameters = provider.GetParameterSet <CommonBehaviors.IndependentSourceParameters>(); // Setup the waveform BaseParameters.Waveform?.Setup(); if (!BaseParameters.DcValue.Given) { // No DC value: either have a transient value or none if (BaseParameters.Waveform != null) { CircuitWarning.Warning(this, "{0}: No DC value, transient time 0 value used".FormatString(Name)); BaseParameters.DcValue.RawValue = BaseParameters.Waveform.Value; } else { CircuitWarning.Warning(this, "{0}: No value, DC 0 assumed".FormatString(Name)); } } }