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 10-27-2011
oliver xie oliver xie is offline
Flexsim User
 
Join Date: Dec 2010
Posts: 53
Downloads: 37
Uploads: 0
Thanks: 21
Thanked 11 Times in 7 Posts
Rep Power: 123
oliver xie is on a distinguished road
Default how to get the last item in separator?

i made a model to split a box into several objects by using separator object. i want to get back the last one to output, but i donot know how to get the index. because the output rank of the items in separator is disorder.can anyone help me?
  #2  
Old 10-27-2011
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

Hi,

have you noticed that the name of the splitted item changes. Maybe that gives you a hint how you can get the last item. the last item should be the one, that hasn't got a new name.

Jörg
  #3  
Old 10-27-2011
oliver xie oliver xie is offline
Flexsim User
 
Join Date: Dec 2010
Posts: 53
Downloads: 37
Uploads: 0
Thanks: 21
Thanked 11 Times in 7 Posts
Rep Power: 123
oliver xie is on a distinguished road
Default

hi Jörg Vogel
thanks for your reply. i have tried to check the model with your hint and i found the first item in separator didnot get a new name. it is not the item the last one left separator. i want to find how to get the index of the last item to output from separtor.
i want to upload my model to show what i want to do.
i just want to spilit one item that just enter the separator into 76 copies. In flow trigger i want to make the forward 75 copies to go into the second outputobject, and the last one to go into the first outputobject.
lastone.fsm
  #4  
Old 10-28-2011
Steven Hamoen's Avatar
Steven Hamoen Steven Hamoen is offline
Talumis, Flexsim Distributor, The Netherlands
 
Join Date: Aug 2007
Location: Soest, NL
Posts: 854
Downloads: 43
Uploads: 0
Thanks: 391
Thanked 661 Times in 379 Posts
Rep Power: 684
Steven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond repute
Default

On the onexit trigger you can query the content of the separator. When it hits one you know that it is the last item leaving. So in that case you can put a label on it and then you know what product is the last one that left the separator or store a pointer to this item and do with it what you want.
  #5  
Old 10-28-2011
oliver xie oliver xie is offline
Flexsim User
 
Join Date: Dec 2010
Posts: 53
Downloads: 37
Uploads: 0
Thanks: 21
Thanked 11 Times in 7 Posts
Rep Power: 123
oliver xie is on a distinguished road
Default

i want to decide which outobject the item should go into when it fire the flow trigger. i know how to get the last item index when it fire the exit trigger. but i cannot change the flow direction of the last item, which had been decided in the flow trigger before.
  #6  
Old 10-28-2011
Steven Hamoen's Avatar
Steven Hamoen Steven Hamoen is offline
Talumis, Flexsim Distributor, The Netherlands
 
Join Date: Aug 2007
Location: Soest, NL
Posts: 854
Downloads: 43
Uploads: 0
Thanks: 391
Thanked 661 Times in 379 Posts
Rep Power: 684
Steven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond repute
Default

The problem with your model is that for all the items the sendtoport is evaluated and if the downstream object has capacity it will go there. So in this case whatever object you determin to be send on to the queue it will always overtake all the other objects that you send to the conveyor because it can go directly to the queue while the other object have to wait on their turn on the conveyor.

A simple solution would be to put an object with capacity 1 in between the separator and the conveyor and use its sendtoport trigger to achieve what you want.
The Following User Says Thank You to Steven Hamoen For This Useful Post:
oliver xie (10-28-2011)
  #7  
Old 10-28-2011
Lars-Olof Leven Lars-Olof Leven is offline
Flexsim Distributor
 
Join Date: Aug 2007
Location: Sweden, Borlnge
Posts: 312
Downloads: 278
Uploads: 2
Thanks: 300
Thanked 256 Times in 139 Posts
Rep Power: 330
Lars-Olof Leven is a splendid one to beholdLars-Olof Leven is a splendid one to beholdLars-Olof Leven is a splendid one to beholdLars-Olof Leven is a splendid one to beholdLars-Olof Leven is a splendid one to beholdLars-Olof Leven is a splendid one to beholdLars-Olof Leven is a splendid one to behold
Default

Hi,

In the attached model I have 3 different solutions for your problem.
The first, I use a queue after the separator to control the flow.

The second example I have moved the decision to the OnMessage trigger and told the separator to not release the items.

Last example use sendmessage and send to port.

Hope the model will give you some help.
Lars-Olof
Attached Files
File Type: fsm lastone_LOL.fsm (41.7 KB, 111 views)

Last edited by Lars-Olof Leven; 10-28-2011 at 08:29 AM. Reason: Added one more example
The Following 2 Users Say Thank You to Lars-Olof Leven For This Useful Post:
oliver xie (10-28-2011)


Thread Thread Starter Forum Replies Last Post
each item has it's given location,and item's code correspond to storage location Robert Liu Q&A 3 03-28-2011 08:46 PM
Simple Separator Question Anthony Timmiss Q&A 1 01-25-2010 08:22 AM
o(Separator, current).v_unpack Dane Lee Q&A 2 08-05-2009 02:29 PM
Problem about Separator wutian Q&A 8 06-18-2008 11:58 PM
[Suggestion] multi tasking combiner/ separator KelvinHo Gripes and Goodies 0 05-20-2008 06:48 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.