Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
GPSS
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Basic Transaction commands == Transactions can : * Automatically enter the simulation (GENERATE) * Use a facility or storage (SEIZE/ENTER respectively) * Stop using a facility or storage (RELEASE/LEAVE respectively) * Wait (ADVANCE) * Transfer to another section of code (TRANSFER) * Exit the simulation (TERMINATE) Along with these main tasks, they can also hold parameters with the ASSIGN command. Transactions are implicitly sectioned off in the code. There can be multiple transactions in the code that happen at once. A transaction starts with GENERATE and ends with TERMINATE. The code inbetween could potentially be shared between multiple transactions by means of the TRANSFER command, but besides that your transaction lifecycles will be separated. It helps to add whitespace between lines of action of one transaction versus another. === GENERATE === GENERATE 0.1 Transaction generated every 0.1 time unit. GENERATE 15,4 Transaction is generation every 15 time units, plus or minus 4 time units. [https://athena.ecs.csus.edu/~mitchell/csc148/gpssW/Reference%20Manual/r7.htm#GENERATE GENERATE] === ADVANCE === To have a transaction wait, use the ADVANCE command. It has similar arguments to GENERATE. ADVANCE 10,6 Transaction waits 10±6 seconds. [https://athena.ecs.csus.edu/~mitchell/csc148/gpssW/Reference%20Manual/r7.htm#ADVANCE ADVANCE] === SEIZE, RELEASE (Facilities) === To use a '''Facility''', which only allows one use at a time, use the SEIZE command. To stop using it, use the RELEASE command. GENERATE 30,5 ; Generate a customer every 30±5 time units SEIZE Barber ; Use a facility ADVANCE 15,4 ; Wait 15±4 time units RELEASE Barber ; Stop using the facility TERMINATE 1 ; Leave the barber shop If you want more than one use at a time, use '''Storage'''. [https://athena.ecs.csus.edu/~mitchell/csc148/gpssW/Reference%20Manual/r7.htm#SEIZE SEIZE] [https://athena.ecs.csus.edu/~mitchell/csc148/gpssW/Reference%20Manual/r7.htm#RELEASE RELEASE] === ENTER, LEAVE (Storages) === Seating STORAGE 100 ; 100 people allowed in lounge seating GENERATE 10,5 ; Generate a person every 10±5 time units ENTER Seating,1 ; Person sits down ADVANCE 15,4 ; Wait 15±4 time units LEAVE Barber,1 ; Person stops sitting TERMINATE 1 ; Exit the seating area This way, multiple people can sit in the Seating at once. If this was a ''Facility'' (using SEIZE/RELEASE), it would block others who tried to use the resource. The ENTER command takes the storage reference as Argument A and the amount to reserve with Argument B. The LEAVE command's arguments are the same. [https://athena.ecs.csus.edu/~mitchell/csc148/gpssW/Reference%20Manual/r7.htm#ENTER ENTER] [https://athena.ecs.csus.edu/~mitchell/csc148/gpssW/Reference%20Manual/r7.htm#LEAVE LEAVE] === TERMINATE === To remove the transaction, use TERMINATE. The optional argument decrements the '''completion counter''', which is a variable that is chosen by the user when running the simulation. Say you wanted to test 100 customers: you would start the execution of your simulation with <code>START 100</code>. <code>TERMINATE 1</code> at the end of each transaction would decrement initial value 100 by 1 (99, 98, 97 ...) until it reached zero. At this point, the simulation stops and results are returned. If you omit the argument in TERMINATE, it will be assumed to be 0. This means your simulation will run forever (unless, of course, you have another TERMINATE that does decrement this counter. [https://athena.ecs.csus.edu/~mitchell/csc148/gpssW/Reference%20Manual/r7.htm#TERMINATE TERMINATE] ==== Timer ==== To have your program run for a predetermined time, make sure none of your TERMINATES decrement the counter and include a section like this: GENERATE ; Generate one transaction ADVANCE 100 ; Run for 100 time units TERMINATE 1 ; End Then run your program with START 1. It will run for 100 time units. === ASSIGN (Parameter "Metadata") === Use the ASSIGN control block to assign a value to a transaction parameter. Called with Pj (j=parameter number) ASSIGN 2,V$Orderqty ;Parameter 2=Order quantity Custwait ADVANCE 5 ;Lead time is 5 days ENTER Stock,P2 ;Stock increases by P2 [https://athena.ecs.csus.edu/~mitchell/csc148/gpssW/Reference%20Manual/r7.htm#ASSIGN ASSIGN] : ASSIGN Blocks are used to place or modify a value in a Transaction Parameter.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)