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
FAQ Downloads Calendar Search Mark Forums Read

Q&A Using Flexsim and building models

Reply
 
Thread Tools Display Modes
  #1  
Old 06-22-2015
Mischa Spelt Mischa Spelt is offline
Flexsim User
 
Join Date: Apr 2014
Posts: 3
Downloads: 0
Uploads: 0
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Power: 0
Mischa Spelt is on a distinguished road
Default Conveyor decision - allow entry by predicate

Hi,

I have a simple model with two conveyors merging into a third one. I have a predicate function that returns a boolean value to indicate whether an incoming item is allowed to merge onto the outgoing conveyor. In the attached example, this is implemented as a user function which simply checks the item type of the incoming item and allows them through in a round-robin fashion (first item type 1, then item type 2, then item type 1 again, etc). I would like to allow one item in, then re-evaluate the predicate function for any waiting items at the incoming decision points as soon as the outgoing decision point is crossed. I tried using Restricted Areas as described in the manual, but I cannot get it to work properly.

Thanks in advance for any suggestions!
Attached Files
File Type: fsm round_robin_DPs.fsm (23.4 KB, 310 views)
Reply With Quote
  #2  
Old 06-22-2015
Joao Marques
Guest
 
Posts: n/a
Downloads: 0
Uploads: 0
Default

Hi,
1)First of all, you are not declaring the item in your user command. You wrote this:

/**/return getitemtype(item) == Type;/**/

And should be this:

treenode item = parnode(1);//Getting the node of item passed as argument
/**/return getitemtype(item) == Type;/**/

2)Set the area owner in the decision point that releases (DP3) as "conveyor" instead of "current".
By just doing this, you will notice that the conveyor that receives a itemtype==Type will be closed and the items will begin to accumulate in the queue.

I tried some thing and noticed that, depending on what exactly you want to do in your model, the logic you want to use can be quite problematic to implement.
Flexsim has a basic tradeoff summed as: You can use a lot of Flexsim objects to create a model with little code, or a lot of code to create a model with little Flexsim objetcs.
This means that your logic can be easily implemented if you can use a queue between your conveyors.

Hope it helped for now, JG
Reply With Quote
The Following User Says Thank You to Joao Marques For This Useful Post:
Mischa Spelt (06-22-2015)
  #3  
Old 06-26-2015
Joao Marques
Guest
 
Posts: n/a
Downloads: 0
Uploads: 0
Default Something I tried

I don't know what exactly you want, but this model attached work as asked: when Type=1, only item type 1 will move, DP3 has an OnArrival trigger that releases on this condition: >>getitemtype(item)==Type
and changes Type:
>>if(getitemtype(item)==1) Type=2;
>>else Type=1;

Best Regards,JG
Attached Files
File Type: fsm round_robin_DPs_JG.fsm (25.0 KB, 321 views)
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
problem to fix errors in decision point mefhsmflexsimbr Q&A 0 05-22-2014 08:33 PM
Decision point in Basic conveyor Manoj Kumar Q&A 3 02-29-2012 10:31 AM
Using Queue in a decision tool George Serhan Q&A 8 01-06-2012 10:31 AM
Entry trigger mallik Q&A 4 01-25-2008 07:18 AM
manual entry danieldiep Q&A 5 11-26-2007 06:11 AM


All times are GMT -6. The time now is 12:30 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.