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 01-17-2014
Timo van der Gaag Timo van der Gaag is offline
Flexsim User
 
Join Date: Jan 2014
Posts: 4
Downloads: 0
Uploads: 0
Thanks: 4
Thanked 0 Times in 0 Posts
Rep Power: 0
Timo van der Gaag is on a distinguished road
Default Can the combiner be used to pack different size boxes?

I would like to use the combiner to pack items into boxes with capacities of 20 items and 5 items. The boxes enter in port 1 and the items enter in port 2.

What I would like to do is this:
IF (Incoming item in port 1 is of type 1)
THEN pack 20 items
ELSE pack 5 items

Can someone think of a way to do this?
  #2  
Old 01-17-2014
Timo van der Gaag Timo van der Gaag is offline
Flexsim User
 
Join Date: Jan 2014
Posts: 4
Downloads: 0
Uploads: 0
Thanks: 4
Thanked 0 Times in 0 Posts
Rep Power: 0
Timo van der Gaag is on a distinguished road
Default Second question

There is another problem as well that I haven't been able to solve yet. I want the combiner to wait untilll a box arrives, before it can collect the items.

Now it already collects the required items and when a box arrives, the items are packed. Is there a way to change this?

-edit: I posted this second question too quickly, it is already solved
  #3  
Old 01-17-2014
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: 642
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 Timo,

Start with the picklist option "update combiner component list". Because you change only the packing amount of only one port, you do not need the for loop. but the variable index has to be still 1. You change the first row in the component table. You will find two command lines with each containing a gettablenum function. These functions return the value which the combiner should update to. Here you put an own variable which you change in your if-condition to the value you want. If you want, you can change the inc line similar to the setnodenum line.

The following code contains the changes.
Code:
if(port == 1)
{  //The trigger on entry code fires each time a flow item enters the combiner.
   //For this reason we check to make sure that the port entered is equal to 1
   //because only the container will enter through port 1.
  //The component list in a combiner is set up as a table.  This allows us to use the cell commands to obtain the node that contains
  //the number of items to retrieve from each port.  Once you know what node contains the information you can use the setnodenum
  //command to set the component list number based on the global table.
  treenode thelist = getvarnode(current,"componentlist");
  treenode thesum = getvarnode(current,"targetcomponentsum");
  setnodenum(thesum,0);
  int packquantity;
  if (getitemtype(item)!=1) packquantity = 5;
  else packquantity=20;
    setnodenum(cellrowcolumn(thelist,1,1),packquantity);
    setnodenum(thesum,packquantity);
}
Jörg
The Following 3 Users Say Thank You to Jörg Vogel For This Useful Post:
Tom David (01-20-2014)
  #4  
Old 01-19-2014
Timo van der Gaag Timo van der Gaag is offline
Flexsim User
 
Join Date: Jan 2014
Posts: 4
Downloads: 0
Uploads: 0
Thanks: 4
Thanked 0 Times in 0 Posts
Rep Power: 0
Timo van der Gaag is on a distinguished road
Default Problem solved

Thanks Jörg! This is exactly wat I was looking for. It is working now!

Tags
combiner, conditions


Thread Thread Starter Forum Replies Last Post
How to control the size of component item in Combiner syseo Q&A 3 07-04-2012 12:14 PM
Set Combiner Pack quantity by Globalvariabel? Peppino Q&A 6 05-21-2012 06:34 AM
array size juan alberto Q&A 0 12-21-2010 03:03 AM
Check GUI edit boxes for 100% Michael Pohl Q&A 1 04-28-2009 09:36 AM
total time boxes are in the model bsantens Q&A 1 04-05-2009 03:11 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.