flexsim supplemental training: session 3
Post on 23-Feb-2016
65 Views
Preview:
DESCRIPTION
TRANSCRIPT
FlexSim Supplemental Training: Session 3
120121029
Modeling Concepts
22
• Closing and Opening Output/Input Ports • Sending Messages to alter object
behavior
Basic Object Control• closeinput( object ) openinput( object )• stopinput( object ) resumeinput( object )• closeoutput( object ) openoutput( object )• stopoutput( object ) resumeoutput( object )• stopobject( object ) resumeobject( object )
• sendmessage( toobject, fromobject, parameter1, parameter2, parameter3 )
• senddelayedmessage( toobject, delaytime, fromobject, parameter1, parameter2, parameter3 )
33
Close/Open Commands• Close
– closeinput( object ) – Blocks input ports of object. Indicated by small, red bars drawn across all input ports.
– closeoutput( object ) – Blocks output ports of object. Indicated by small, red bars drawn across all output ports.
• Open– openinput( object ) – Unblocks input ports of object.– openoutput( object ) – Unblocks output ports of object.– It is recommended to use the open commands in the OnMessage trigger only
[using senddelayedmessage()]. It will work in other cases, but there could be issues because these commands do some work behind the scenes.
44
Stop/Resume Commands• Stop
– stopinput( object ) – Same as closeinput(), except it keeps track of consecutive stopinput() commands. Will only open input ports after all stops have been resumed.
– stopoutput( object ) – Same as closeouput(), except it accumulates as well. Will only open ouput ports after all stops have been resumed.
– stopobject( object ) – Tells object to stop functioning. Will specify a state for the object to go into while waiting for resumeobject() [helpful for statistics]. Also accumulates. Good resource on stopobject() and resumeobject() in Command list of User Manual.
• Resume– resumeinput( object ) – Same as openinput(), except it accumulates. Input ports are
unblocked after all stops have been resumed.– resumeoutput( object ) – Same as openoutput(), except it accumulates as well. Ouput ports
are unblocked after all stops have been resumed.– resumeobject( object ) – Tells object to resume to what it was doing before stopobject() was
called. Also accumulates.
55
Messages• message – information sent from one
object to another.• When an object receives a message, its
OnMessage trigger is fired.• Messages can be sent immediately with
the sendmessage() command, or after a specified period of time using senddelayedmessage().
66
Order of Execution(Messages)
77
sendmessage()
delay
OnMessagetrigger ofreceiving object
senddelayedmessage()OnMessagetrigger ofreceiving object
Is there a difference between a message sent immediately and delayed in zero time?
The OnMessage Trigger
• Trigger logic fires as a reaction to the sent message. Parsing the received data dictates behavior
• Access Variables– current– msgsendingobject()– msgparam(1)– msgparam(2)– msgparam(3)
88
• Object receiving the message• Object that sent the message• First numeric data sent• Second numeric data sent• Third numeric data sent
Model Description• Purpose
– Learn how to control product flow and send delayed messages.• Description
– Assume an infinite supply of A and B components.– The two components must be glued together with epoxy which
takes lognormal2(0,2.6,0.8) seconds.– The assembled parts must wait in a staging area for at least 15
seconds for the epoxy to cure before they can enter the paint booth.
– It takes lognormal2(0,2.5,0.5) seconds to paint each part separately.
– After each part is painted and exits the paint booth, the booth must be purged for 3 seconds before another part can enter.
• Questions & Bonus– What is the average and maximum time a part waits in queue?– How does throughput change if 10 parts can be curing
simultaneously?99
Model A1 Layout
1010
top related