Custom Attrbuites TrainingModelMUsTabletop Tabletop Custom AttrbuitesInsert 4 Structure
客制化屬性:Custom Attrbuites • • 點選Training_Model下的MUs中的Tabletop,開啟 Tabletop的屬性分類頁 選擇Custom Attrbuites,並點選Insert功能,開啟客制化 屬性制定表 4
Structure of a Method (= Control) Method之名稱 變更 儲存 功能選項 Method body 程式指令執行或測試 Inherit Source 繼承選項 Opens the Debugger 7
Instruction The "instruction sequence" Instruction: - Method calls Print 3+4; Frame. delete. Movables; animation(TRUE); 1. 2. 3. 4. 5. 藍色字串為內定之關鍵字。 指令以分號(; )來作為指令之段落。 Frame. delete. Movable則指啟動 Frame中之delete. Movables的屬性 :=為等於之意, 如 I : = I+1 ; :為屬性指定之意,如 I : String ; - Allocation Single. Proc. name : = “WP“ ; variable : = Single. Proc. name ; 8
Control Structures - Conditional Branching Using conditional branching, you may make the execution of an instruction sequences independent of the statistical analysis of a condition. if conditio n then instruction sequence 1 else instruction sequence 2 end 假設狀狀成立時(TRUE) ,之後執行instruction sequence 1的指令,假設狀狀不成立(else)時,就執行 instruction sequence 2. 9
Conditional Branching is do if is do condition If 狀況成立 Then 執行指令一 ; then instruction 1 end; else end; instruction 2 no/not measure 1 else (不成立時) end; end ; flow chart query/ condition Programming Methods 執行指令二 ; structogram query/ condition yes/met no/not measure 2 measure 1 yes/met measure 2 10
Conditions之判斷 Conditions are expressions that return a boolean value. They are, for example, used in conditional branching: If condition, then. . . else. . . end; Example: if @. get name = "box" then @. move(SP 1); condition Boolean values are returned as results for comparisons. • boolean relop boolean; relop: =, /= • integer relop integer; relop: =, /=, <, >, >=, <= • real relop real; relop: =, /=, <, >, >=, <= • string relop string: relop: =, /= relop: relational operator • object relop object: relop: =, /= Boolean values are returned as results when linking conditions with the operators AND, OR, NOT. 11
Variable之使用 12
The Basic Object : Variable Features: • icon: • capacity: 0 • information flow basic object 變數名稱 資料型態選項 數值 13
The Basic Object : Variable Features: • icon: • capacity: 0 • information flow basic object 設定是否讓全區變數可以DDE(動 態資料連結Data Dynamic Exchange)方式連結到其他應用 程式(如:Excel,Word) 14
新增Frame並修改為Frame_4 新增Frame,並按F 2修 改名稱為Frame_4 18
程式說明 Counter : =counter +1; 指定程式執行 一次,counter變數要自動加一 Print Counter; 列印出counter的值到console視窗。 if counter = 10 then @. quality : = " bad"; counter : = 0; 假如counter 剛好等於 10,就將 @(MUs)的屬性quality指定為 “bad”,並另counter的值歸零。 Else若counter 的值不等於 10 @. quality : = “GOOD”; @(MUs)的 屬性quality指定為“GOOD”。 End; 結束 Print @. quality; 列印Mus的屬 性quality的直到console; @. move; 啟動Mus的屬性 move,將MUs物件往下一站移 動。 22
Linking Material and Information Flow The Basic Object Buffer Features: • icon: • capacity: user-defined • active material flow basic object 累積模式 31
設定Color. Table(1) • 開啟Color. Table,選擇功能表中 之Format,將Format 中的Inherit Format 及Inherit content中的繼 承取消。 • 選擇到功能表中的Edit,點選Edit 中的select all功能,再選擇功能 表中之Format,出現List Format 對話框(參考下一頁)。 取消繼承 1 Format select all 3 2 39
設定Color. Table(2) List Format • 選擇List Format中的Dimension 的功能頁 – Number of Row: 5 – Number of Column: 1 • 設定欄位之Data type資料型態 為String。 • 填寫表格內容,依序為blue、 red 、 brown 、green、yellow。 Number of Row: 5 Number of Column: 1 Data type:String 40
- Slides: 42