ATTENTION

This 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

Go Back   FlexSim Community Forum > FlexSim Software > Q&A
Downloads

Q&A Using Flexsim and building models

  #1  
Old 04-21-2008
Ning Wang Ning Wang is offline
Flexsim User
 
Join Date: Apr 2008
Posts: 13
Downloads: 1
Uploads: 0
Thanks: 16
Thanked 1 Time in 1 Post
Rep Power: 147
Ning Wang is on a distinguished road
Default 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.
Attached Files
File Type: zip 0414zip.zip (46.5 KB, 307 views)
  #2  
Old 04-22-2008
Martijn van Oostenbrugge's Avatar
Martijn van Oostenbrugge Martijn van Oostenbrugge is offline
Talumis, Flexsim Distributor, The Netherlands
 
Join Date: Aug 2007
Posts: 71
Downloads: 12
Uploads: 0
Thanks: 44
Thanked 44 Times in 24 Posts
Rep Power: 268
Martijn van Oostenbrugge is a name known to allMartijn van Oostenbrugge is a name known to allMartijn van Oostenbrugge is a name known to allMartijn van Oostenbrugge is a name known to allMartijn van Oostenbrugge is a name known to allMartijn van Oostenbrugge is a name known to all
Default

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
Attached Files
File Type: zip 0414_2.zip (53.6 KB, 291 views)
The Following 2 Users Say Thank You to Martijn van Oostenbrugge For This Useful Post:
Ning Wang (04-22-2008)
  #3  
Old 04-22-2008
Brandon Peterson's Avatar
Brandon Peterson Brandon Peterson is offline
The Flexsim Consultant
 
Join Date: Jul 2007
Location: Salt Lake City, Utah
Posts: 382
Downloads: 29
Uploads: 6
Thanks: 192
Thanked 516 Times in 235 Posts
Rep Power: 490
Brandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant future
Default

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  
Old 04-22-2008
Cliff King's Avatar
Cliff King Cliff King is offline
Vice President Technical Services
 
Join Date: Jul 2007
Location: Utah
Posts: 272
Downloads: 158
Uploads: 14
Thanks: 102
Thanked 304 Times in 110 Posts
Rep Power: 412
Cliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud of
Default

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


All times are GMT -6.
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.