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 07-15-2010
shafizad shafizad is offline
ProcSim Consulting
 
Join Date: Jul 2010
Location: Switzerland
Posts: 75
Downloads: 18
Uploads: 0
Thanks: 90
Thanked 2 Times in 2 Posts
Rep Power: 123
shafizad is on a distinguished road
Default 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.
Reply With Quote
  #2  
Old 07-15-2010
RalfGruber's Avatar
RalfGruber RalfGruber is offline
FlexSim Software Products
 
Join Date: Jul 2007
Location: Orem, UT, USA
Posts: 195
Downloads: 37
Uploads: 0
Thanks: 518
Thanked 294 Times in 124 Posts
Rep Power: 342
RalfGruber is a splendid one to beholdRalfGruber is a splendid one to beholdRalfGruber is a splendid one to beholdRalfGruber is a splendid one to beholdRalfGruber is a splendid one to beholdRalfGruber is a splendid one to beholdRalfGruber is a splendid one to behold
Default

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
Attached Files
File Type: zip CapacityChangeOnItemtype.zip (31.2 KB, 203 views)
Reply With Quote
The Following 4 Users Say Thank You to RalfGruber For This Useful Post:
Jörg Vogel (07-16-2010), Lars-Olof Leven (07-16-2010), shafizad (07-16-2010), Tom David (07-15-2010)
  #3  
Old 07-16-2010
shafizad shafizad is offline
ProcSim Consulting
 
Join Date: Jul 2010
Location: Switzerland
Posts: 75
Downloads: 18
Uploads: 0
Thanks: 90
Thanked 2 Times in 2 Posts
Rep Power: 123
shafizad is on a distinguished road
Default Thanks Ralph

It works fine your solution. thanks

gut wochenende.
Reply With Quote
  #4  
Old 03-04-2015
Wilfredo Salinas
Guest
 
Posts: n/a
Downloads: 18
Uploads: 0
Default

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.
Reply With Quote
  #5  
Old 03-04-2015
Jörg Vogel's Avatar
Jörg Vogel Jörg Vogel is offline
Flexsim User
 
Join Date: Sep 2007
Location: Hannover, Germany
Posts: 643
Downloads: 35
Uploads: 0
Thanks: 802
Thanked 665 Times in 410 Posts
Rep Power: 640
Jörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond repute
Default

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
Reply With Quote
Reply

Tags
getitemtype, itemtype, maxcontent, processor, setvarnum

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
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


All times are GMT -6. The time now is 11:31 PM.


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