Presentation is loading. Please wait.

Presentation is loading. Please wait.

Simulation Basics (模擬基本概念)

Similar presentations


Presentation on theme: "Simulation Basics (模擬基本概念)"— Presentation transcript:

1 Simulation Basics (模擬基本概念)
By C. L. Hsieh Department of Industrial Management Aletheia University

2 Questions What types of simulation are there? (模擬類型有些?)
How is random behavior simulated? (隨機行為如何模擬?) How does discrete event simulation work? (離散事件型模擬之運作過程為何?) How is simulation software used? (如何使用模擬軟體?) What is the future of simulation technology? (模擬技術之未來發展?)

3 Types of Simulation (模擬之類型)
Static v.s. Dynamic Simulation (固定性與動態性模擬) Static is not based on time: Monte Carlo Simulation (固定性模擬與時間無關,如蒙地卡羅模擬) Dynamic includes the passage of time. (動態性模擬紀錄時間之變化) States are changed over time. (系統中之狀態隨時間之改變而變化) Clock mechanism moves forward in time (系統時鐘紀錄狀態隨時間之改變之任何事件)

4 Types of Simulation (模擬之類型)
Deterministic (確定性) v.s. Stochastic Simulation (隨機性) One run is enough Several Runs require

5 Types of Simulation (模擬之類型)
Discrete-Event v.s. Continuous Simulation (離散事件 v.s. 連續型模擬) A discrete-event simulation is one in which state (狀態) changes at discrete time as triggered by events (離散事件模擬由事件所驅動,紀錄不同時間不同事件之狀態)

6 Types of Simulation (模擬之類型)
In continuous simulation, state variables changes continuously w.r.t. time (e.g. temperature of a building controlled by a heating system) (連續型模擬中,狀態變數隨時間以連續方式改變,如加熱系統中溫度之變化)

7 Simulating Random Bahavior (模擬亂數之行為)
Random number Generation (亂數產生方式) Simulation uses a random number generator (RNG) (模擬過程中使用亂數產生程式). RNG is a deterministic algorithm used to create uniformly & independently distribution between [0,1] (亂數產生程式RNG昰一種定性演算法,能產生介於[0,1]均勻、獨立的分配) The most popular RNG is called Linear Congruential Generators (LCGs) (最有名之RNG稱為LCGs)

8 Examples of LCGs (LCGs範例)

9 Generating Random Variates (隨機變異值)
“Generating a random variate”: the activity of obtaining an observation of a random variable from desired distribution (產生隨機變異值:昰一種產生某種特殊隨機變數之機率分配的觀察值之方法) A Random number (from LCGs) is plugged into a transform equation (原理昰將由LCGs程式產生之隨機變數置於一轉置方程式中作運算 (See Law, 1991)

10 DES Simulation (離散事件模擬)
Discrete-event simulation uses process flow by a sequence of events (離散事件模擬藉由一系列之事件產生過程流程) Scheduled(事先決定DES):determined beforehand by the passage of time Conditioned (條件式DES):triggered by a condition (e.g. multiple entities waiting for resources when it is available) (由某些條件驅動)

11 DES Simulation (離散事件模擬)
After events being processed, a clock advances to the next scheduled events & the process continues. (某事件處理後,一個模擬時鐘會移動至下一個排定之事件使整個程序繼續進行) When a termination event occurs, the simulation ends and statistical reports are generated (終止事件停止所有模擬動作,之後會產生一個統計報表)

12 Diagram of Discrete-Event Simulation

13 A Manual Simulation Example (一個人工模擬範例)
Model Assumption (模型假設) No parts in the system initially (系統起初沒有任何零件) No operators included in the system (系統無任何作業員) Move time from queue to the package station is negligible (由等候線至包裝站之移動時間可忽略) Queue priority rule (等候線以FIFO方式控制) Package station never fail down (包裝站在模擬過程不會故障)

14 A Manual Simulation Example (一個人工模擬範例)
結果計算 有幾件事件到達? 有幾台機器曾在等候線上? 模擬結束時,仍有幾台在系統中? 等候線平均等候時間為何? 系統平均等候時間為何? 系統平均使用率為何?

15 範例模型的模擬流程圖

16 A Manual Simulation Example (一個人工模擬範例)
Types of Scheduled Events (排定事件之類型) Arrivals, Package Done & Termination (到達事件,包裝完成事件,模擬終止事件) Number in Queue (在等候線上之實體數) 某事件處理完後在等候線上等候之螢幕個數 Cumulative time in Queue(等候線累計時間) 等候線上數量乘以下次事件發生的時間減掉本次時間的差,再加上原有累計時間

17 Commercial Simulation Software (商用模擬軟體)

18 Simulation Using Promodel (以Promodel 模擬)
Building A Model (建立一個模式) Entities (實體) (items being processed) Locations (位址) (the places where processing occurs) Resources (資源) (agents used to process entities) Paths (路徑) (pathways along which entities & resources traverse)

19 Simulation Using Promodel (以Promodel 模擬)
Running the Simulation (執行模擬) Model database (模式資料庫) simulation DB (模擬資料庫) Animation graphics (動畫圖形) Output Analysis (輸出報告分析) Summary Reports (總報表) Time-Series Plots & Histograms (時間序列圖與值方圖)

20 Future of Simulation (模擬未來發展)
Input data analysis for distribution fitting (資料分析、分配配對) Graphical User Interface (圖形使用者介面) Reusable Components (元件回收) 2-D, 3-D Animation (2-D, 3-D動畫) Online helps & tutorials (線上教學、求救) Interactive debugging (互動式偵錯) Automatic model generation (自動化模式產生) Output analysis tool (輸出分析工具) Optimization (最佳化) Database connectivity (資料庫連結)

21 Summary (總結) Most manufacturing & service system are dynamic, stochastic & DES (多數製造與服務系統為動態、隨機、DES型系統) Random number generator (亂數產生器) DES based on events & consequent reactions (DES以事件與相關之反應為基礎) Events are time or conditioned triggered (事件昰被時間或條件所驅動) Simulation models can be defined by commercial simulation software (e.g. Promodel) (模擬模式可以在商用模擬軟體中定義,如Promodel)


Download ppt "Simulation Basics (模擬基本概念)"

Similar presentations


Ads by Google