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
|
|||
|
|||
Recording items in a batch producing system
Hi guys,
pretty easy question but it seems that I got lost somewhere: I have a demand driven production system that operates different batch sizes on different echelons. I want to record staytimes, wip, etc. in a global table. Therefore I want to set the rows in the global table "EventTime" to be the single items (I only consider one itemtype). The columns indicate the arrivals and departures to and from the different objects. The source releases me batches and no single items. I want to have a continuous numbering of the rows in this table according to the items that are released to the production system (1,2,3......). How can I do that? I tried inc(label(item,"Stueck"), 1); in the OnExit Trigger of the Source where "Stueck" is the item label that represents the items. Unfortunately it didn't work out. I think the probelm is that the Source does not release single items but rather batches. This is a precondition of the model and cannot be changed. I also managed to track the time of arrival to WS1 (see in the OnEntry Trigger of object "WS1") but the number always gets actualized in the first cell of the table. How can I do that? thank you very much for some hints!!! best regards, simon Sorry for the model that is programmed in Flexsim 4...I hope you can deal with it. |
#2
|
||||
|
||||
Simon,
what you do increments the label of every single item from its current value by one. Since the current value is zero, unless you changed it somewhere else, it sets it to one for every item, explaining why always row one of the table is used. You have to increment a label on the Source to use as a counter and then copy that value to the label of the item. Although you release batches, every single item causes the OnExit trigger to fire separately. Hope that helps? Ralf FlexSim |
The Following 3 Users Say Thank You to RalfGruber For This Useful Post: | ||
Tom David (04-04-2014) |
#3
|
||||
|
||||
Here is the related thread
http://www.flexsim.com/community/for...read.php?t=892 |
The Following 2 Users Say Thank You to sagar bolisetti For This Useful Post: | ||
Tom David (04-04-2014) |
#4
|
|||
|
|||
Thank you very much for your help Ralf! Your idea made me think again on this issue and I managed to integrate what I wanted!
Thanks sagar for the link - nice thread that also helped a lot. How did I solve it: OnEntry Trigger for each Object in my model: //Document Arrival setlabelnum(item, "ArrivalWS1", time()); OnExitTrigger for each Object in my model: //Document Departure setlabelnum(item, "DepartureWS1", time()); //Calculate flow time for this object double FlowtimeWS1 = getlabelnum(item, "DepartureWS1") - getlabelnum(item, "ArrivalWS1"); //Write Flow Time into global table settablenum("EventTime", getlabelnum(item, "Stueck"), 1, FlowtimeWS1); settablesize("EventTime",gettablerows("EventTime")+1, gettablecols("EventTime")); The problem with the counter: OnExit Trigger of the Source: int UnitNumber; inc(label(current, "UnitNumber"), 1); setlabelnum(item,"Stueck", getlabelnum(current, "UnitNumber")); |
The Following 2 Users Say Thank You to Simon Jutz For This Useful Post: | ||
Tom David (04-07-2014) |
Thread | Thread Starter | Forum | Replies | Last Post |
Recording the dashboard with the AVIMaker | Vadim Fooks | Tips and Tricks | 0 | 05-27-2013 09:34 PM |
Recording a [hi-res] video | Vadim Fooks | Tips and Tricks | 0 | 09-03-2012 08:15 PM |
Recording Utilisation | michaelsmith | Q&A | 1 | 05-04-2011 09:22 AM |
Change the downstream Combiner's batch quantity to this object's batch | Nico Zahn | Q&A | 4 | 01-07-2011 04:18 PM |
Batch production (Batch size for processor) | Patrick Cap | Q&A | 12 | 03-27-2009 12:14 AM |