示例#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)
        {
            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");
        }
示例#2
0
        /// <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);
            if (provider == null)
            {
                throw new ArgumentNullException(nameof(provider));
            }

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

            // Get behaviors
            _load      = provider.GetBehavior <BiasingBehavior>();
            _modeltemp = provider.GetBehavior <ModelTemperatureBehavior>("model");
        }