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 |
#2
|
|||
|
|||
Put this code in the OnMessage trigger
Code:
setnodenum(node(">variables/componentlist/From Input Port 2/Target Quantity", current), GlobalVariable); Code:
senddelayedmessage(current,0,current); // Edit: Or if you have multiple input ports to your combiner and you don't care how many FlowItems per ItemType are collected you could just use: Code:
setvarnum(current,"targetcomponentsum",GlobalVariable); |
The Following User Says Thank You to Jens Mühlheimer For This Useful Post: | ||
Peppino (05-16-2012) |
#3
|
|||
|
|||
I have a batch productionsystem and i wont only pre-set my 9 combiners by GV. I wont that i dont need to change it in every combiner when i change the batch size in my system.
Why i should send a message to the combiner itselfe on reset, i thing it should by sufficiently to take the change on reset? |
#4
|
|||
|
|||
Hi Peppino,
well, then the solution to use a GlobalVariable might be sufficient. It's just a personal experience that I always create a GlobalTable called paramters for my simulation model where I control all variables that I might have to change quickly. About the reset trigger: Especially with creating FlowItems it's better to create them with the OnMessage trigger combined with a message instead of creating directly in the OnReset trigger. Quote:
|
#5
|
||||
|
||||
Better test it first. What if the reset of the object is executed after your code and on reset the Target Quantity nodes are reset to 0?
So I would always use a delaymessage to prevent you interfering with the standard code of the object! |
#6
|
|||
|
|||
Hi Jens,
Quote:
About the reset trigger: That sounds logic, i´ve done it by a delaymessage. But now i have an other problem. I have all ready a rack in my model that creat on reset his opening balance, but it´s working fine i can´t find any errors. I´ve done it in that way because i realse items on message. I think i can change i by an "if" where i check a massage with value maybe 99. When true creat items, else releas item. Or somebody, know some better? |
#7
|
|||
|
|||
Quote:
I tried it, it works! |
Thread | Thread Starter | Forum | Replies | Last Post |
How can I find the quantity of the ships after finishing run? | syseo | Container Terminal (CT) Library | 0 | 02-11-2011 08:22 PM |
Change the downstream Combiner's batch quantity to this object's batch | Nico Zahn | Q&A | 4 | 01-07-2011 04:18 PM |
Combiner problem | Angie Williamson | Q&A | 6 | 04-21-2010 09:04 AM |
Combiner Target Quantity, Release of packed pallets | BenjaminBuecklein | Q&A | 1 | 09-04-2008 03:31 AM |
a combiner question | Vic Li | Q&A | 2 | 08-19-2008 03:42 AM |