ATTENTIONThis FlexSim Community Forum is read-only. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at https://answers.flexsim.com/. Our new Question & Answer site brings a modern, mobile-friendly interface and more focus on getting answers quickly. There are a few differences between how our new Q&A community works vs. a classic, threaded-conversation-style forum like the one below, so be sure to read our Answers Best Practices. |
flexsim.com |
#1
|
|||
|
|||
question about User Event
I have a question when using user event.
Attached is my model, which is a dynamic flowshop scheduling model. I used user event to do the scheduling work every 10 seconds and the first event should happen at time 0 as settings. At time 0, I created 10 flowitems and send them to the Queue. So the 10 items should be scheduled at time 0 as well. After that, flowitems arrive at the system by a distribution and rescheduled each 10 sec by User Event. My problem is at time 0, the 10 items can arrive at the system but they are NOT scheduled by User Event. After that, everything seems works fine. It seems the sequence of works happening at time 0 is User Event first and generating items then in my opinion, which is opposite as what I want. How to solve this problem? What I want to see is at time 0, 10 items are generated and scheduled according to the codes in User Evnet. Thanks. |
#2
|
||||
|
||||
Hi Ning Wang,
The problem is that although the user event is at time 0, the 10 flowitems are not yet in the queue. You have to make sure that the flowitems are in the queue first. I've changed your model and transferred your user event to the OnMessage of the source where you create your 10 items. To initiate I send a delayedmessage (of zero time) on the OnExit of the same source after the 10th flowitem. Good luck. Martijn |
The Following 2 Users Say Thank You to Martijn van Oostenbrugge For This Useful Post: | ||
Ning Wang (04-22-2008) |
#3
|
||||
|
||||
Ning,
Discrete event simulation can get very tricky to understand in situations like this. It is important to remember that eventhough two things may happen at the exact same simulation time, if they are different events then they will happen seperately. In Flexsim when you hit reset the "On Reset" triggers for each object happen as seperate events and happen in the same order that the objects are ordered in the tree. So, on reset in your model the User Event (located in the Tools node which is ranked first in the model) will create an event at time zero before the source will create its event to occur at the same simulation time. This means that you have two seperate events that will occur in the order they were created because they are scheduled for the exact same simulation time. Martijn has given you a good way to solve this problem by insuring that the events happen in the right order even though they will technically happen at the exact same simulation time.
__________________
thats not normal. |
The Following 2 Users Say Thank You to Brandon Peterson For This Useful Post: | ||
Ning Wang (04-22-2008) |
#4
|
||||
|
||||
Just a note of warning - it is not a good idea to create any objects or nodes in your model on reset. You're always better off doing it at time 0 by sending a delayed message in 0 seconds. I believe there are several warnings in the help about doing this - one of the reasons is that it may cause conflicts with the model update process with future releases...
|
Thread | Thread Starter | Forum | Replies | Last Post |
a question on queue | KelvinHo | Q&A | 15 | 11-09-2011 07:16 AM |
Please use first and last name for your User Name | Cliff King | Q&A | 1 | 04-10-2009 03:45 PM |
question on sub-model | KelvinHo | Q&A | 2 | 01-28-2008 04:31 AM |
A question about request transport in a rack object | AlanZhang | Q&A | 9 | 08-15-2007 02:45 PM |