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 10-25-2010
Nico Zahn's Avatar
Nico Zahn Nico Zahn is offline
Flexsim User
 
Join Date: Sep 2007
Location: Bingen am Rhein, Germany
Posts: 179
Downloads: 19
Uploads: 4
Thanks: 66
Thanked 60 Times in 32 Posts
Rep Power: 201
Nico Zahn has a spectacular aura aboutNico Zahn has a spectacular aura about
Default Change the downstream Combiner's batch quantity to this object's batch

Hi, I tried the picklist option in the Queue with a combiner as next object, but the function does not work. I tried it on the entry trigger (makes more sense to me here) and on the exit trigger.

As far as I know you need to chenge two values on the combiner to update the Pack,Batch or join quantity.

So the function would look like this on the entry trigger:

treenode t_Combiner=outobject(current,1);
int i_wagenkapa =
content(current);
setnodenum(node(">variables/componentlist/From Input Port 2/Target Quantity",t_Combiner),i_wagenkapa);
setnodenum(node">variables/targetcomponentsum",t_Combiner),i_wagenkapa);
__________________
kind regards Nico.
  #2  
Old 10-25-2010
Jason Lightfoot Jason Lightfoot is offline
Flexsim Consultant
 
Join Date: Aug 2007
Location: Somerset, UK
Posts: 719
Downloads: 20
Uploads: 0
Thanks: 123
Thanked 953 Times in 446 Posts
Rep Power: 773
Jason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond repute
Default

If you ever change the target to be less than the number of items the combiner has already collected the combiner will never reach the target and therefore will not start the setup and processing stages.

If you want to add an extra item to the component list you should increment the value relevant to the correct port and also increment the targetvalue.

Usually, the trigger for this is placed on entry of the combiner and checks that the port is 1 - ie. the arriving container, so that the component list only gets updated once per container.
  #3  
Old 10-25-2010
Nico Zahn's Avatar
Nico Zahn Nico Zahn is offline
Flexsim User
 
Join Date: Sep 2007
Location: Bingen am Rhein, Germany
Posts: 179
Downloads: 19
Uploads: 4
Thanks: 66
Thanked 60 Times in 32 Posts
Rep Power: 201
Nico Zahn has a spectacular aura aboutNico Zahn has a spectacular aura about
Default

Yes you are right Jason.
But if you do not know the number of parts to be collected when the container enters the combiner, you can use a batching queue upfront and change the number of parts to be collected in the queue and on the combiner dynamically.
I guess that is what was intended with the picklist option in the queue (which does not work at all???).
(FS 5.04)
__________________
kind regards Nico.
The Following User Says Thank You to Nico Zahn For This Useful Post:
Jason Wills (01-07-2011)
  #4  
Old 10-25-2010
Jason Lightfoot Jason Lightfoot is offline
Flexsim Consultant
 
Join Date: Aug 2007
Location: Somerset, UK
Posts: 719
Downloads: 20
Uploads: 0
Thanks: 123
Thanked 953 Times in 446 Posts
Rep Power: 773
Jason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond repute
Default

I think the standard trigger on the queue should have opipno(current,1)-1 and is missing the line to update targetcomponentsum.

Try using this code instead, but you'll find this also fails under some circumstances

Code:
treenode combiner=outobject(current,1);
treenode componentlist=getvarnode(combiner,"componentlist");
settablenum(componentlist, opipno(current ,1)-1,1,minof(content(current),getvarnum(current,"batchsize")));
int total=0;
for (int n=content(componentlist);n>0;n--)
	total+=gettablenum(componentlist,n,1);
setvarnum(combiner,"targetcomponentsum",total);;

(btw I assumed that's a typo. on the last line of the first post where you're missing a bracket)

Last edited by Jason Lightfoot; 06-22-2012 at 03:36 PM.
The Following 2 Users Say Thank You to Jason Lightfoot For This Useful Post:
Jason Wills (01-07-2011)
  #5  
Old 01-07-2011
Jason Wills's Avatar
Jason Wills Jason Wills is offline
Flexsim User
 
Join Date: Nov 2010
Location: Spokane, WA
Posts: 1
Downloads: 5
Uploads: 0
Thanks: 10
Thanked 1 Time in 1 Post
Rep Power: 0
Jason Wills is on a distinguished road
Smile Dynamically changed combiner input

Thank you for this thread.
I was about to give up on updating the combiner dynamically when I found this.
I had been updating the Target Quantity only and overlooked the targetcomponentsum until I saw Jason's post.

Instead of triggering the updates from the input queue, I used an On Message trigger on the combiner. This meant I did not need to wait for the input queue to gather the whole batch.
The msgparam(1) that I passed to the combiner was the sum of the incoming items--I calculated this sum on an upstream conveyor.
Once I passed this value to both Target Quantity and targetcomponentsum in the combiner the dynamic changes worked fine.
Since I didn't wait for the input queue to have all items batched, I had to keep the combiner input port closed until after the values were updated for each batch.

I put this code On Message for the combiner and sent the message when the input quantity was known.

treenode combpieces = node(">variables/componentlist/From Input Port 2/Target Quantity", current);
treenode targetcompsum = node(">variables/targetcomponentsum", current);

setnodenum(combpieces,msgparam(1));
setnodenum(targetcompsum,msgparam(1));

openinput(current);



I haven't tested all possibilities, but it works so far.
Jason
The Following User Says Thank You to Jason Wills For This Useful Post:
Efrain Marchena (06-19-2012)


Thread Thread Starter Forum Replies Last Post
Batch Behavior Q. shafizad Q&A 11 12-13-2010 09:14 AM
Batch connection changes KelvinHo Q&A 2 02-05-2010 03:01 PM
Batch Processor? Anthony Timmiss Q&A 7 08-19-2009 10:11 AM
Batch production (Batch size for processor) Patrick Cap Q&A 12 03-27-2009 12:14 AM
Batch/Max Content Gavin Douglas Q&A 4 07-09-2008 12:28 AM


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.