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-03-2008
Vic Li Vic Li is offline
Flexsim User
 
Join Date: Mar 2008
Posts: 39
Downloads: 0
Uploads: 0
Thanks: 6
Thanked 1 Time in 1 Post
Rep Power: 150
Vic Li is on a distinguished road
Default problem about "send to port "

When I build a model,I have a unusual problem.So I post my model, I want somebody to give me a hand.

Problem Description:

When item leaves from Queue2,it send a message to Queue3 to create a same item(type and color).

And then items in Queue3 will be send to the processor by itemtype,
just like following example:

itemtype1 will be processed in processor1
itemtype2 will be processed in processor2

I already check the items in queue3,they have their own itemtype and color.And I already choose the command "case by value" at the flow menu in the Queue3.But they can not be send to the processor by itemtype.


thanks for your help in advance
Attached Files
File Type: zip oao.zip (50.0 KB, 310 views)
  #2  
Old 10-03-2008
Jeff Nordgren's Avatar
Jeff Nordgren Jeff Nordgren is offline
Technical Support Manager
 
Join Date: Jul 2007
Location: Orem, UT
Posts: 65
Downloads: 79
Uploads: 0
Thanks: 40
Thanked 21 Times in 17 Posts
Rep Power: 233
Jeff Nordgren is just really niceJeff Nordgren is just really niceJeff Nordgren is just really niceJeff Nordgren is just really nice
Default

When you use the insertcopy command in a queue, at the moment it is created, it is ready to exit and the Send To Port code is fired as well. This happens before you get a chance to set the items itemtype. To "fix" that, I closed the output port of the queue (in the OnMessage trigger), then do the code you have and then at the end, I added a openoutput command. I also checked the box "Reevaluate Sendto on Downstream Availability". So when the openoutput command executes, it will "recalculate" where the flowitem should go. By that time, it does know what itemtype it is and will go to the proper place. I've attached your model with these changes.
Attached Files
File Type: zip oao_FS1.zip (53.2 KB, 263 views)
__________________
Jeff
Flexsim Support
  #3  
Old 10-04-2008
Vic Li Vic Li is offline
Flexsim User
 
Join Date: Mar 2008
Posts: 39
Downloads: 0
Uploads: 0
Thanks: 6
Thanked 1 Time in 1 Post
Rep Power: 150
Vic Li is on a distinguished road
Default

I see the corrected model,thanks for your help very much


Thread Thread Starter Forum Replies Last Post
Is it possible one object comprised of the function of "combiner" and "separetor"? Vic Li Q&A 1 08-19-2008 04:41 AM
about "no select" and "show parameter window from side bar" qin tian Gripes and Goodies 3 03-21-2008 08:10 AM
I have a problem about " priority" Vic Li Q&A 0 03-20-2008 06:31 AM
Which variable stores "Properties -> General ->Flags -> Protected" information? KelvinHo Q&A 1 03-06-2008 06:18 AM
"Getting Started" and "Tutorial" models for v4.01 Cliff King Product Announcements 0 12-10-2007 07:34 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.