Esempio n. 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="TimeSimulation"/> class.
        /// </summary>
        /// <param name="name">The identifier of the simulation.</param>
        protected TimeSimulation(string name) : base(name)
        {
            Configurations.Add(new TimeConfiguration());

            // Add the behavior in the order they are (usually) called
            BehaviorTypes.AddRange(new []
            {
                typeof(ITimeBehavior),
                typeof(IAcceptBehavior)
            });
        }
Esempio n. 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="BaseSimulation"/> class.
        /// </summary>
        /// <param name="name">The identifier of the simulation.</param>
        protected BaseSimulation(string name)
            : base(name)
        {
            Configurations.Add(new BaseConfiguration());

            // Add the necessary behaviors in the order that they are (usually) called
            BehaviorTypes.AddRange(new []
            {
                typeof(ITemperatureBehavior),
                typeof(IBiasingBehavior),
                typeof(IInitialConditionBehavior)
            });
        }
Esempio n. 3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="TimeSimulation"/> class.
        /// </summary>
        /// <param name="name">The identifier of the simulation.</param>
        /// <param name="step">The step size.</param>
        /// <param name="final">The final time.</param>
        /// <param name="maxStep">The maximum step.</param>
        protected TimeSimulation(string name, double step, double final, double maxStep)
            : base(name)
        {
            Configurations.Add(new TimeConfiguration(step, final, maxStep));
            TimeSimulationStatistics = new TimeSimulationStatistics();
            Statistics.Add(typeof(TimeSimulationStatistics), TimeSimulationStatistics);

            // Add the behavior in the order they are (usually) called
            BehaviorTypes.AddRange(new []
            {
                typeof(ITimeBehavior),
                typeof(IAcceptBehavior)
            });
        }