Ejemplo n.º 1
0
        /// <summary>
        /// Setup behavior
        /// </summary>
        /// <param name="simulation">Simulation</param>
        /// <param name="provider">Data provider</param>
        public override void Setup(Simulation simulation, SetupDataProvider provider)
        {
            if (provider == null)
            {
                throw new ArgumentNullException(nameof(provider));
            }

            // Get behaviors
            _load      = provider.GetBehavior <LoadBehavior>();
            _modelload = provider.GetBehavior <ModelLoadBehavior>("model");
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Setup the behavior
        /// </summary>
        /// <param name="simulation">Simulation</param>
        /// <param name="provider">Data provider</param>
        public override void Setup(Simulation simulation, SetupDataProvider provider)
        {
            if (provider == null)
            {
                throw new ArgumentNullException(nameof(provider));
            }

            // Get parameters
            _bp  = provider.GetParameterSet <BaseParameters>();
            _mbp = provider.GetParameterSet <ModelBaseParameters>("model");

            // Get behaviors
            _modelload = provider.GetBehavior <ModelLoadBehavior>("model");
            _vsrcload  = provider.GetBehavior <VoltageSourceBehaviors.LoadBehavior>("control");
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Setup the behavior
        /// </summary>
        /// <param name="provider">Data provider</param>
        public override void Setup(SetupDataProvider provider)
        {
            if (provider == null)
            {
                throw new ArgumentNullException(nameof(provider));
            }

            // Get parameters
            _bp  = provider.GetParameterSet <BaseParameters>("entity");
            _mbp = provider.GetParameterSet <ModelBaseParameters>("model");

            // TODO: This should be part of the parameter
            _mbp.Hysteresis.RawValue = Math.Abs(_mbp.Hysteresis.RawValue);

            // Get behaviors
            _modelload = provider.GetBehavior <ModelLoadBehavior>("model");
            _vsrcload  = provider.GetBehavior <VoltageSourceBehaviors.LoadBehavior>("control");
        }