Exemplo n.º 1
0
        } // end of RemoveScheduledEvent

        #endregion

        #region RunSimulationModel

        /// <summary>
        /// Runs the entire simulation model, start and endtime are specified by the model
        /// </summary>
        /// <param name="simModel">The simulation model to be ran</param>
        /// <returns></returns>
        public void RunSimulationModel(SimulationModel simModel)
        {
            DateTime currentTime = simModel.StartTime;

            while (!SimulationModel.StopSimulation(currentTime))
            {
                DateTime newTime;
                bool     modelRunning = RunSingleStepSimulationModel(currentTime, out newTime);

                if (modelRunning)
                {
                    currentTime = newTime;
                } // end if
            }     // end while

            SimulationModel.CreateSimulationResultsAfterStop();
        } // end of RunSimulationModel