### GET statement examples Source: https://www.processmodel.com/help/resources-in-logic Examples demonstrating simple GET, conditional GET with IF, and GET with quantity. ```plaintext GET Operator ``` ```plaintext IF Size > 10 THEN GET Helper AND Operator ``` ```plaintext GET 3 Operator ``` -------------------------------- ### Look up setup time by product with r_SetupTime Source: https://www.processmodel.com/help/arrays Reads a setup time from a one-dimensional array indexed by product number, then schedules the setup duration. Requires a previously filled r_SetupTime array. ```Simulation Logic SET a_Setup TO r_SetupTime[a_Product] TIME a_Setup min ``` -------------------------------- ### GET and FREE statement examples from table Source: https://www.processmodel.com/help/resources-in-logic Examples from the statement table showing GET, FREE, and USE usage. ```plaintext GET 1, Nurse ``` ```plaintext FREE Nurse ``` ```plaintext FREE ALL ``` ```plaintext USE Machine FOR 10 min ``` -------------------------------- ### Comment Syntax Example Source: https://www.processmodel.com/help/action-logic Demonstrates single-line and multi-line comment usage. Note that certain statements like FREE or GET require multi-line comment syntax to be ignored. ```text SUYgVGVzdCA9IFJlamVjdCBUSEVOIElOQyBSZWplY3RRdHkKLypOdW1iZXIgb2YgcmVqZWN0cyBpbmNyZWFzZWQKZm9yIGVhY2ggdGVzdCByZWplY3QuKi8Kb3LigKYKLy8gVGhlIGxvZ2ljIGJlbG93IGRlc2NyaWJlcyBob3cgcmVqZWN0cyBhcmUgaGFuZGxlZC4= ``` -------------------------------- ### Resource queries: FreeUnits and Available Source: https://www.processmodel.com/help/resource-queries Two complete action logic lines from the section 'An example of each'. The first waits until a doctor has free units; the second checks if a specialist is available (1 or 0) and then gets one specialist. ```ProcessModel // Hold the entity here until a doctor comes free WAIT UNTIL Resource("Doctor").FreeUnits > 0 ``` ```ProcessModel // Take the shortcut only when a specialist is free; Available is 1 or 0 IF Resource("Specialist").Available = 1 THEN GET 1, Specialist ENDIF ``` -------------------------------- ### DISPLAY syntax examples Source: https://www.processmodel.com/help/display Syntax examples for DISPLAY: a simple text string, text with a variable, and text with multiple variables and a carriage return using CHAR(13). The '$' character appends additional information. ```ProcessModel DISPLAY "< text string >" [$< attribute / variable / function call >] DISPLAY "Now completing the 100th set" DISPLAY "The current number of entries is: " $ Var1 DISPLAY "Variable1 = ", $Var1 $ CHAR(13) $ "Attribute1 = " $ Attr1 or DISPLAY "Variable1 = " $ Var1 $ " Attribute1 = " $ Attr1 ```