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 |
|
Downloads |
Tips and Tricks Share helpful modeling ideas |
#1
|
||||
|
||||
Using a Variable number of Operators for Processing
All,
Here is another model to demonstrate a solution to a specific problem. The problem here is that a process requires at least one operator but can use up to three operators to reduce the process time. We only want to require more operators if they are available at the time. In this model there are four processors and four operators. The processors have their Use Operator (s) for Process check box checked so that they have to use an operator for the process time. The operators are also required to transport the items from the queue to the processors and from the processors to the sink. The code that makes this model function is located on the Process Time trigger. In the trigger the code checks to see how many operators are currently available by looking at how many output ports are ready on the dispatcher. The processor then makes sure that the number of operators is at least one but no greater than three. It then sets the "nrofprocessoperators" variable on the processor to the calculated numbe of operators and returns the associated process time. Because this trigger is fired as a seperate event from the unloading of the item by the operator you don't have to worry about the unloading operator appearing as if they are busy. Also, because this trigger is part of the same event that creates the task sequences for the operators you don't have to worry about another event stealing one of the operators you were counting on away from you. This is a very easy solution to a seamingly hard problem. I have commented all of the code so that you can read the solution in english instead of trying to interpret code. Let me know if you have any questions or comments, Brandon
__________________
thats not normal. |
The Following 5 Users Say Thank You to Brandon Peterson For This Useful Post: | ||
qin tian (06-21-2008) |
#2
|
|||
|
|||
Brandon have posted many examples with excellent description.
I think these examples with their description should be collected in one place so that we can make better use of them. |
#3
|
||||
|
||||
Qin Tian,
I'll compile them together and post them in the downloads section on Monday. Brandon
__________________
thats not normal. |
#4
|
||||
|
||||
All,
Rather than putting these models in the downloads section I am putting them here. If someone has a good argument for posting these as individual models in the downloads section please let me know. Thanks, Brandon
__________________
thats not normal. |
#5
|
||||
|
||||
All,
Here is a message I recieved from James Hayes: Quote:
For a place to start I would suggest looking at Tom David's model at the following location: http://www.flexsim.com/community/for...?do=file&id=84 The model in my thread here does not allow for that and would be hard to modify to do what you are looking for. In Tom's model he does a good job of allowing the process time to be redetermined during the actual process. This will make it easier to modify to do what you are asking. Let us know how it turns out or if you run into more questions, Brandon
__________________
thats not normal. Last edited by Cliff King; 07-16-2008 at 10:54 AM. |
The Following User Says Thank You to Brandon Peterson For This Useful Post: | ||
James Hayes (07-17-2008) |
Thread | Thread Starter | Forum | Replies | Last Post |
Statistics: Random Number Streams | Tom David | Q&A | 19 | 08-12-2014 02:02 AM |
Assign an array to a variable | AlanZhang | Q&A | 6 | 04-24-2008 01:59 PM |
Global Table Number Precision | Sung Kim | Tips and Tricks | 8 | 03-27-2008 04:25 PM |
Display Global Variable | Sung Kim | Q&A | 4 | 02-24-2008 11:24 PM |
Setting the number of operators | Sung Kim | Q&A | 4 | 02-05-2008 12:31 PM |