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 04-03-2014
Simon Jutz Simon Jutz is offline
Flexsim User
 
Join Date: Nov 2013
Location: Innsbruck/Austria
Posts: 33
Downloads: 29
Uploads: 0
Thanks: 25
Thanked 5 Times in 4 Posts
Rep Power: 83
Simon Jutz is on a distinguished road
Default 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.
Attached Files
File Type: fsm DDP_2S_11_V4_Recording.fsm (344.1 KB, 47 views)
  #2  
Old 04-03-2014
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: 345
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

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  
Old 04-03-2014
sagar bolisetti's Avatar
sagar bolisetti sagar bolisetti is offline
Flexsim User
 
Join Date: Aug 2013
Location: Hyderabad,India
Posts: 160
Downloads: 145
Uploads: 0
Thanks: 124
Thanked 99 Times in 63 Posts
Rep Power: 150
sagar bolisetti is a jewel in the roughsagar bolisetti is a jewel in the roughsagar bolisetti is a jewel in the roughsagar bolisetti is a jewel in the rough
Default

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  
Old 04-04-2014
Simon Jutz Simon Jutz is offline
Flexsim User
 
Join Date: Nov 2013
Location: Innsbruck/Austria
Posts: 33
Downloads: 29
Uploads: 0
Thanks: 25
Thanked 5 Times in 4 Posts
Rep Power: 83
Simon Jutz is on a distinguished road
Default

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


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.