天天看點

億點知識 | Flexsim離散系統仿真時間推進機制

作者:LearningYard學苑
億點知識 | Flexsim離散系統仿真時間推進機制

分享興趣,傳播快樂,增長見聞,留下美好!親愛的您,這裡是LearningYard學苑。歡迎大家繼續通路學苑内容,今天小編為大家帶來有關Flexsim的知識。

Share interest, spread happiness, increase knowledge, leave a good! Dear you, here is the LearningYard Academy. Welcome to continue to visit the content of the academy, today xiaobian to bring you knowledge about warehousing management

離散系統仿真軟體要釆用某種機制來推進模型的仿真時間向前運作,以便在運作過程 中修改系統狀态,釆集性能統計資料。絕大多數通用離散系統仿真軟體采用的時間推進機 制是下次事件時間推進(next-event time advance)機制(Law,2009),其控制流程的僞代碼 如下所示。

Discrete system simulation software should adopt some mechanism to promote the model simulation time forward to the operation, so as to modify the system state during the operation process, and collect the performance statistical data. The time propulsion mechanism used by the most general simulation software is the next event time propulsion (next-event time advance) mechanism (Law, 2009), and the pseudo code of the control process is shown below.

//開始

初始化仿真鐘為0;

初始化系統狀态變量和統計計數器;

初始化事件清單;

//While 循環

While (仿真未結束)Do

設定仿真鐘為下次事件時間;

更新系統狀态和統計計數器;

生成未來事件并加入事件清單;

End While

//仿真結束時生成統計報表

生成統計報表;

//仿真結束

在上面的代碼中,仿真鐘(simulation clock)是一個記錄目前仿真時間的變量,與實際時 間不同,仿真鐘并不是連續推進、均勻取值的.而是從目前事件的發生時間跳躍到下一個事 件的發生時間(也就是仿真鐘變量的取值是跳躍變化的)。因為相繼兩個事件之間系統狀态 沒有發生變化,所有也就沒有必要讓仿真鐘周遊這兩個事件間的時間。

事件清單(event list)是一個記錄事件資訊的清單資料結構,它按時間順序記錄了未來 要發生的各種事件(包括事件發生時間、事件類型等資訊)。

In the above code, the simulation clock (simulation clock) is a variable that records the current simulation time. Unlike the actual time, the simulation clock is not continuously advanced and evenly valued. Instead, it jumps from the time of the current event to the time of the next event (that is, the value of the simulation clock variable is used for jumps to change). Because the system state does not change between two successive events, all of it is not necessary to let the simulation clock go through the time between the two events.

Event List (event list) is a list data structure that records event information, which records a variety of future events (including event time, event type, and so on).

仿真鐘和事件清單協同工作,在仿真初始化完成後,會從事件清單中移出頂端記錄(即 下一個要發生的事件),然後将仿真鐘推進到該事件的發生時間(該時間值是事件清單記錄 的資料項之一),所移出的記錄中的資訊(包括事件發生時間、事件類型等)則用于處理該事 件,如何處理取決于該事件的類型和系統當時所處的狀态,但一般來說可以包括更新狀态變 量和統計累加器、改變實體屬性,事件處理完後,生成新事件插入事件清單,開始新一輪 循環。

有時,有些事件會同時發生,但仿真軟體仍然要為它們的執行安排一個先後順序,這時, 模組化人員應該特别注意這種順序對結果有何影響。仿真軟體一般都提供事件檢視器檢視事 件清單資訊,可以觀察同時發生的事件被安排的順序。

在現代仿真軟體中(包括Flexsim),事件的生成和管理以及仿真鐘的推進都由仿真軟 件自動完成使用者不必手工處理,這就大大簡化了使用者的模組化工作。

Simulation clock and event lists work together, After the simulation initialization is complete, The top record (the next event) is removed from the event list, The simulation clock is then advanced to the occurrence time of the event (which is one of the data items recorded in the event list), The information in the removed record (including the event occurrence time, event type, etc.) is used to process the event, How this works depends on the type of event and the state of the system at the time, But generally, it can include updating state variables and statistical accumulators, changing entity properties, After the event is handled, Generate a new event insert event list, Start a new cycle.

Sometimes, some events occur simultaneously, but the simulation software still arranges a sequence for their execution, and the modeler should pay special attention to how this order affects the results. Simulation software generally provides the event viewer to view the event list information, which can observe the order of simultaneous events are arranged.

In modern simulation software (including Flexsim), the generation and management of events and the promotion of simulation clocks are automatically completed by the simulation software for the user without having to manually process, which greatly simplifies the user's modeling work.

今天的分享就到這兒了

如果您對今天的文章有獨特的想法

歡迎給我們留言

讓我們相約明天

祝您今天過得開心快樂!

That's all for today's sharing

If you have unique ideas about today's article

Feel free to leave us a comment

Let's meet for tomorrow

I wish you a happy life today!

參考資料:《實用系統仿真模組化與分析》

翻譯:金山詞霸

本文由Learning Yard新學苑原創,

如有侵權請聯系溝通~

文案 | 鄧粵慧

排版 | 鄧粵慧

稽核 | 百味

繼續閱讀