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
|
|||
|
|||
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 |
#2
|
||||
|
||||
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.
__________________
Jeff Flexsim Support |
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 |