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
|
|||
|
|||
Increment of an itemtype
Hi,
Is there a way to set the itemtype if an item to be incremented by a certain number based on the previous set itemtype. Example: an item is generated from a source with an itemtype of 1, the second item coming out should have its itemtype set to the value of the previous itemtype (1) + a set number. A for loop wouldn't work. Is there a way to do that? Thanks |
#2
|
||||
|
||||
Hello George,
write the itemtype of previous item in a numberlabel, set the itemtype of next item in the OnExit-Trigger to the incremented value and update the numberlabel. Jrg |
The Following User Says Thank You to Jörg Vogel For This Useful Post: | ||
George Serhan (09-06-2012) |
#3
|
|||
|
|||
Hi Jrg,
Thanks for the reply. I was thinking the same way that you mentioned in the reply, but where I'm getting stuck is updating the itemtype after updating the label, see attached model. I can't think of a way to do it except a loop which it won't work here. Thanks for the help. George |
#4
|
|||
|
|||
I believe Jorg was implying that you use a label on the Source to remember the last value. I have attached an update to your model.
Depending on what you are doing you might be able to base the itemtype on the output of the Source in the OnExit trigger. See attached. |
The Following User Says Thank You to Kris Geisberger For This Useful Post: | ||
George Serhan (09-06-2012) |
Thread | Thread Starter | Forum | Replies | Last Post |
Problem on Itemtype id | Jack Lai | Container Terminal (CT) Library | 3 | 11-07-2011 10:31 AM |
Dynamic Scripting itemtype | shashanktrivedi | Q&A | 3 | 05-25-2011 10:44 PM |
Can i divide a itemtype? | wilmermoncada | Q&A | 2 | 11-27-2009 08:41 AM |
Get itemtype for a flowitem in a task | KelvinHo | Q&A | 4 | 10-21-2009 09:47 PM |
how to get number of itemtype | Vic Li | Q&A | 11 | 08-19-2009 11:20 PM |