/// <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 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) { if (provider == null) { throw new ArgumentNullException(nameof(provider)); } // Get behaviors _loadBehavior = provider.GetBehavior <VoltageSourceBehaviors.BiasingBehavior>("control"); }
/// <summary> /// Bind the behavior. for the specified simulation. /// </summary> /// <param name="simulation">The simulation.</param> /// <param name="context">The context.</param> public override void Bind(Simulation simulation, BindingContext context) { // Get behaviors _loadBehavior = context.GetBehavior <VoltageSourceBehaviors.BiasingBehavior>("control"); }