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 09-06-2012
George Serhan George Serhan is offline
Flexsim User
 
Join Date: Oct 2011
Posts: 49
Downloads: 10
Uploads: 0
Thanks: 59
Thanked 0 Times in 0 Posts
Rep Power: 107
George Serhan is on a distinguished road
Default 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  
Old 09-06-2012
Jörg Vogel's Avatar
Jörg Vogel Jörg Vogel is offline
Flexsim User
 
Join Date: Sep 2007
Location: Hannover, Germany
Posts: 643
Downloads: 35
Uploads: 0
Thanks: 802
Thanked 665 Times in 410 Posts
Rep Power: 642
Jörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond repute
Default

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  
Old 09-06-2012
George Serhan George Serhan is offline
Flexsim User
 
Join Date: Oct 2011
Posts: 49
Downloads: 10
Uploads: 0
Thanks: 59
Thanked 0 Times in 0 Posts
Rep Power: 107
George Serhan is on a distinguished road
Default

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
Attached Files
File Type: fsm Increment ItemType.fsm (85.2 KB, 91 views)
  #4  
Old 09-06-2012
Kris Geisberger Kris Geisberger is offline
Flexsim Canada, Forum Moderator
 
Join Date: Aug 2007
Location: Canada
Posts: 209
Downloads: 54
Uploads: 1
Thanks: 99
Thanked 389 Times in 133 Posts
Rep Power: 451
Kris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud of
Default

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.
Attached Files
File Type: fsm Increment ItemType_KG.fsm (65.8 KB, 94 views)
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


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.