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
|
|||
|
|||
Process Maximum Content (depends on itemtype)
Hi,
I would like to have a processor to change its maximum content based on the itemtype. if it is itemtype 1, maximum content is 1 and if itemtype is 2, the maximum content is 2 (in this case, the two item flows in the processor should be the same.). In other words, the processor can work on one itemtype1 or two itemtype2. I have used this piece of code in OnEntry of my processor, it doesn't always work! if (getitemtype(item)==1) setvarnum(current, "maxcontent", 1); else { setvarnum(current, "maxcontent", 2); return getitemtype(item) == 2; %%this is for pulling another itemtype2 from queue } Thanks for your help. |
#2
|
||||
|
||||
Shafizad,
the easiest way to achieve what you want is to use a combiner instead of a processor since first has a standard trigger to change the component table OnEntry based on Itemtype. Global Table ComponentList: define another item through port 2, if first item´s itemtype is two OnEntry: Update internal component list according to global table Flow/Pull: If there is an item inside (and waiting, so it must be itemtype 2!) pull another with itemtype 2. Look at the code! If you want to use a processor for what reason ever, you need to change to processor´s capacity OnExit of the upstream object to become active...OnEntry of the processor will be too late. Beside this: Returning an itemtype OnEntryTrigger of the processor doesn´t cause it to pull the next itme with that itemtype. You will need to specify that in Flow/Pull. Good luck. Ralf Flexsim Germany |
The Following 4 Users Say Thank You to RalfGruber For This Useful Post: | ||
Tom David (07-15-2010) |
#4
|
|||
|
|||
I set up my combiner to update from global table, but it is still processing 1 unit at a time. I suspect my problem is the global table.
1. Are rows supposed to be renamed to itemtype and columns represent the capacity? 2. How do I set up my combiner from input port 2? It is too bad this model is no longer available... Thanks. |
#5
|
||||
|
||||
Hello Wilfredo,
you mix to different objects parameter pages here. The Shafizad's question was about the processor object. You query the combiner object. The combiner hasn't got the ability to process more than one pack or batch at a time. It is correct that you can pack or join more items at once, but you have only one item entering from the first input port. Jörg |
Tags |
getitemtype, itemtype, maxcontent, processor, setvarnum |
Thread | Thread Starter | Forum | Replies | Last Post |
Maximum Value inside an array | Congshi Wang | Q&A | 4 | 03-02-2011 10:53 AM |
What is the maximum output of the model in 10 hours? | john mic | Q&A | 1 | 05-14-2010 11:57 AM |
Content table | juan alberto | Q&A | 1 | 10-19-2009 03:29 AM |
Starting content in the Queue | Bartosz Misiurek | Q&A | 4 | 10-04-2009 02:25 PM |
Batch/Max Content | Gavin Douglas | Q&A | 4 | 07-09-2008 12:28 AM |