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 07-14-2009
juan alberto juan alberto is offline
Flexsim User
 
Join Date: May 2009
Location: Valencia, Spain
Posts: 74
Downloads: 14
Uploads: 0
Thanks: 19
Thanked 3 Times in 2 Posts
Rep Power: 138
juan alberto is on a distinguished road
Default Close port

Hi,

In my model , I generate 3 box types of diferent colors. Each box type is connected with the conveyor by different ports. For instance:
red box - port 1
green box - port 2
blue box - port 3
When a green box arrive to the conveyor, I want to block the port 2 (in order to not entry more green boxes to the conveyor, until the green box leave the conveyor). The same for the other types.

Thank's.

I uploaded de model.
Attached Files
File Type: zip close port.zip (35.3 KB, 239 views)
  #2  
Old 07-14-2009
Anthony Timmiss Anthony Timmiss is offline
Flexsim User
 
Join Date: Aug 2007
Location: Sunderland - UK
Posts: 78
Downloads: 41
Uploads: 0
Thanks: 65
Thanked 45 Times in 28 Posts
Rep Power: 187
Anthony Timmiss will become famous soon enoughAnthony Timmiss will become famous soon enough
Default

Set the max content of the conveyor to 1.
  #3  
Old 07-14-2009
juan alberto juan alberto is offline
Flexsim User
 
Join Date: May 2009
Location: Valencia, Spain
Posts: 74
Downloads: 14
Uploads: 0
Thanks: 19
Thanked 3 Times in 2 Posts
Rep Power: 138
juan alberto is on a distinguished road
Default

Quote:
Originally Posted by Anthony Timmiss View Post
Set the max content of the conveyor to 1.
Hi,

That is not a good solution .

I would need to know how to block a port.

In addition, the conveyor can be boxes of different colors.
  #4  
Old 07-14-2009
Anthony Timmiss Anthony Timmiss is offline
Flexsim User
 
Join Date: Aug 2007
Location: Sunderland - UK
Posts: 78
Downloads: 41
Uploads: 0
Thanks: 65
Thanked 45 Times in 28 Posts
Rep Power: 187
Anthony Timmiss will become famous soon enoughAnthony Timmiss will become famous soon enough
Default

Try using the entry and exit triggers of the conveyor to close and open the input port if the box is coloured green.
The Following User Says Thank You to Anthony Timmiss For This Useful Post:
juan alberto (07-14-2009)
  #5  
Old 07-14-2009
juan alberto juan alberto is offline
Flexsim User
 
Join Date: May 2009
Location: Valencia, Spain
Posts: 74
Downloads: 14
Uploads: 0
Thanks: 19
Thanked 3 Times in 2 Posts
Rep Power: 138
juan alberto is on a distinguished road
Default

Quote:
Originally Posted by Anthony Timmiss View Post
Try using the entry and exit triggers of the conveyor to close and open the input port if the box is coloured green.
Have you seen the model I uploaded?

In the model that I uploaded, I used the triggers of the conveyor but I don't get what I want.
  #6  
Old 07-14-2009
Tom David's Avatar
Tom David Tom David is offline
Flexsim User
 
Join Date: Aug 2007
Location: Schwaebisch Gmuend, Germany
Posts: 430
Downloads: 157
Uploads: 47
Thanks: 486
Thanked 450 Times in 233 Posts
Rep Power: 520
Tom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant future
Default


The problem I see is that you trying to control the input ports with the command closeip(). I always teach in my training classes, that you not should use this commands on the standard library objects, because the objects normally have their own logic to control the ports. That’s why there are commands for close and open the objects (closeinput(), openinput(), etc.).
So in this sense it is a tricky problem to solve.
My solution would be to use three queue (each for every item type) and control the output of the queues.
If there are reasons only to have one queue, I guess it is tricky to solve with the standard queue. You could make your own queue starting from a BasicFR. That’s another way to solve it, I guess.

Another solution could be to use an Input Pull strategy on the Flow tab where you need to make your own pull requirement. I did not try it yet, but you could do something like store the information which item type is already on the conveyor (e.g. labels) and use the labels to define which items can still be pulled. I guess the downside here might be that you need to reevaluate the pull requirement (speed reasons).

These are my first ideas, but maybe someone has better ones.
__________________
tom the (A)tom: "We have solved our problems ... now we have to fight the solutions."
  #7  
Old 07-14-2009
Tom David's Avatar
Tom David Tom David is offline
Flexsim User
 
Join Date: Aug 2007
Location: Schwaebisch Gmuend, Germany
Posts: 430
Downloads: 157
Uploads: 47
Thanks: 486
Thanked 450 Times in 233 Posts
Rep Power: 520
Tom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant future
Default Control Conveyor Ports - Pull requirement - Reevaluate

I change your little model because I wanted to figure out if I was right with my last post and the Pull Requirement. I got it working, but I was wrong with the Reeavaluate and the Pull requirement. It was still not working (which is clear, if I think about it), so it a bit tricky (here I was right).
Anyway, I solved it by forcing and event with delayed message and use a “trick” in the OnMessage trigger (stopobject() and resumeobject()).
And I learned something new, that I can use stopobject() and resumeobject() to reevaluate stuff on objects. But I guess still have the speed issue in focus if you using such stuff.
I am not sure if this is a good solution, but at least it seems to work. :-)
See the attached model where code is in OnReset, OnMessage, OnEntry, OnExit and Pull Requirement.

I still like the idea with three queues much more, but like said, I wanted to try the Pull Requirement.
Attached Files
File Type: zip Test_ControlConveyorPortsWithReevaluateMessage_TD.zip (36.7 KB, 237 views)
__________________
tom the (A)tom: "We have solved our problems ... now we have to fight the solutions."
The Following 2 Users Say Thank You to Tom David For This Useful Post:
juan alberto (07-14-2009)
  #8  
Old 07-14-2009
Anthony Timmiss Anthony Timmiss is offline
Flexsim User
 
Join Date: Aug 2007
Location: Sunderland - UK
Posts: 78
Downloads: 41
Uploads: 0
Thanks: 65
Thanked 45 Times in 28 Posts
Rep Power: 187
Anthony Timmiss will become famous soon enoughAnthony Timmiss will become famous soon enough
Default

Apologies, I hadn't looked at the model (I have now). It sounded more simple than it actually is. I would use 3 queues as suggested by Tom if I was trying to solve this problem and create a global table to count each type in and out of the conveyor. You would then be able to use this data in the future if you wanted to control the flow of the other item types.
  #9  
Old 07-14-2009
Phil BoBo's Avatar
Phil BoBo Phil BoBo is offline
Flexsim Development
 
Join Date: Jan 2008
Posts: 756
Downloads: 109
Uploads: 18
Thanks: 385
Thanked 1,483 Times in 525 Posts
Rep Power: 1174
Phil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond repute
Default

It sure seems like you guys are making this question a lot more complicated than it is.

Attached is a model where all the logic is in the pull requirement. It is a custom code pull requirement to "Pull only itemtypes that are not in the conveyor".

The only bit of complication is that OnExit it sends a delayed message in 0 time to call openinput() to refire the pull logic after each item has left the conveyor.
Attached Files
File Type: zip close port2.zip (35.3 KB, 258 views)
The Following 4 Users Say Thank You to Phil BoBo For This Useful Post:
Tom David (07-14-2009)
  #10  
Old 07-14-2009
juan alberto juan alberto is offline
Flexsim User
 
Join Date: May 2009
Location: Valencia, Spain
Posts: 74
Downloads: 14
Uploads: 0
Thanks: 19
Thanked 3 Times in 2 Posts
Rep Power: 138
juan alberto is on a distinguished road
Default

Quote:
Originally Posted by Phil BoBo View Post
It sure seems like you guys are making this question a lot more complicated than it is.

Attached is a model where all the logic is in the pull requirement. It is a custom code pull requirement to "Pull only itemtypes that are not in the conveyor".

The only bit of complication is that OnExit it sends a delayed message in 0 time to call openinput() to refire the pull logic after each item has left the conveyor.
thanks Anthony, Tom and Phil for your help and interest in my model.

I served much of your examples. Now continue building my model.
The Following 2 Users Say Thank You to juan alberto For This Useful Post:
zhouzheng (07-14-2009)
  #11  
Old 07-14-2009
Tom David's Avatar
Tom David Tom David is offline
Flexsim User
 
Join Date: Aug 2007
Location: Schwaebisch Gmuend, Germany
Posts: 430
Downloads: 157
Uploads: 47
Thanks: 486
Thanked 450 Times in 233 Posts
Rep Power: 520
Tom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant future
Default

Phil,

I guess this is what the forum is all about. Share ideas and discuss solutions.
Yes, your solution is very nice and clean. I am happy to see that I was right that there is a tricky bit to refire the pull logic after each items has left the conveyor. I like your solution by using openinput(). In a way, I did the same, but indirect, by using stopobject() and resumeobject(). I checked it in my model to use openinput() and it works too. Thanks for this idea and information.
And thanks to Juan Alberto who brought up this little interesting assignment.
__________________
tom the (A)tom: "We have solved our problems ... now we have to fight the solutions."
  #12  
Old 07-15-2009
Anthony Timmiss Anthony Timmiss is offline
Flexsim User
 
Join Date: Aug 2007
Location: Sunderland - UK
Posts: 78
Downloads: 41
Uploads: 0
Thanks: 65
Thanked 45 Times in 28 Posts
Rep Power: 187
Anthony Timmiss will become famous soon enoughAnthony Timmiss will become famous soon enough
Default

Phil's solution is very simple and shows how powerful the Pull Requirment can be. During my training I believe that not enough time was spent looking at this option, its certainly something I have not used much with Flexsim. In other packages, pulling parts from queues is the only way as the queues don't usually have the ability to push items out as they do in Flexsim.

I have altered Phil's example slightly so that only the green boxes are restricted.
Attached Files
File Type: zip Only Greens Restricted.zip (35.1 KB, 208 views)
The Following User Says Thank You to Anthony Timmiss For This Useful Post:
Tom David (07-15-2009)
  #13  
Old 07-16-2009
juan alberto juan alberto is offline
Flexsim User
 
Join Date: May 2009
Location: Valencia, Spain
Posts: 74
Downloads: 14
Uploads: 0
Thanks: 19
Thanked 3 Times in 2 Posts
Rep Power: 138
juan alberto is on a distinguished road
Default

Quote:
Originally Posted by Tom David View Post
The problem I see is that you trying to control the input ports with the command closeip(). I always teach in my training classes, that you not should use this commands on the standard library objects, because the objects normally have their own logic to control the ports. That’s why there are commands for close and open the objects (closeinput(), openinput(), etc.).
So in this sense it is a tricky problem to solve.
My solution would be to use three queue (each for every item type) and control the output of the queues.
If there are reasons only to have one queue, I guess it is tricky to solve with the standard queue. You could make your own queue starting from a BasicFR. That’s another way to solve it, I guess.

Another solution could be to use an Input Pull strategy on the Flow tab where you need to make your own pull requirement. I did not try it yet, but you could do something like store the information which item type is already on the conveyor (e.g. labels) and use the labels to define which items can still be pulled. I guess the downside here might be that you need to reevaluate the pull requirement (speed reasons).

These are my first ideas, but maybe someone has better ones.
Hi,

How could you do the same to block the entry of items, but now using networknodes?

in the model there are 3 types of flowitems:

measure <6 -> go to node 2 (NN2).
measure> = 6 & & measure <11 -> go to node 3 (NN3).
measure> 11 -> go to node 4 (NN4).

For instance:

If one item its meassure <6 ( will go to node 2), arrive to processor, and there is another item in the node 2, the processor block to that item and let the other items.

This for three case.

Thank's.
Attached Files
File Type: zip closeportnetworknode.zip (43.3 KB, 192 views)
  #14  
Old 07-16-2009
Tom David's Avatar
Tom David Tom David is offline
Flexsim User
 
Join Date: Aug 2007
Location: Schwaebisch Gmuend, Germany
Posts: 430
Downloads: 157
Uploads: 47
Thanks: 486
Thanked 450 Times in 233 Posts
Rep Power: 520
Tom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant future
Default

In a way, I am a little bit surprised about your questions, because you already got the hints in this thread.
Anyway, have a look into my attached model. But I am pretty sure, that you do not want the Processor to block, but maybe the Queue. But this is only a thought.
Attached Files
File Type: zip closeportnetworknode_TD.zip (43.2 KB, 211 views)
__________________
tom the (A)tom: "We have solved our problems ... now we have to fight the solutions."
  #15  
Old 07-16-2009
juan alberto juan alberto is offline
Flexsim User
 
Join Date: May 2009
Location: Valencia, Spain
Posts: 74
Downloads: 14
Uploads: 0
Thanks: 19
Thanked 3 Times in 2 Posts
Rep Power: 138
juan alberto is on a distinguished road
Default

Quote:
Originally Posted by Tom David View Post
In a way, I am a little bit surprised about your questions, because you already got the hints in this thread.
Anyway, have a look into my attached model. But I am pretty sure, that you do not want the Processor to block, but maybe the Queue. But this is only a thought.
Sorry Tom, you're right, I want to block the queue.

I will do some tests.

Thank's.


Thread Thread Starter Forum Replies Last Post
Port Connection Problem Joe Allen Q&A 2 05-11-2009 10:56 AM
How to open/close processor when there is a long queue Lilian_wulp Q&A 5 12-03-2008 08:51 AM
about port selecct qin tian Q&A 3 11-24-2008 08:31 AM
when the port is closed? qin tian Q&A 1 11-18-2008 06:35 AM
Close A Specific Port Joe Allen Q&A 2 09-11-2008 06:30 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.