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-13-2011
Stefan Trabut Stefan Trabut is offline
Flexsim User
 
Join Date: Mar 2011
Posts: 29
Downloads: 12
Uploads: 0
Thanks: 34
Thanked 5 Times in 5 Posts
Rep Power: 115
Stefan Trabut is on a distinguished road
Default Measure value added time

Hi,

I would like to measure the value added time of a FlowItem (usually process times of processors or multiprocessors). In order to do so, I would like to put the time in a label when the process starts and when it ends.

As far as I know, there is no trigger when the process starts. Let's assume an unfavorable case: There is a setup, and an operator is required to do the process, so there can be a delay between SetupFinish and when the process starts. Is there a simple way to mark the time when the process starts?

A (as far as I know) "non recommended" solution to know the value added time is to put the process time in a label at the moment it is generated (Process Time code of a processor).

Thanks!
  #2  
Old 04-13-2011
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

Hi Stefan,

when a flowitem enters a fixed resource the process or setup starts. With >>getentrytime(item)<< you get this time.

probably to simple

Jörg
The Following User Says Thank You to Jörg Vogel For This Useful Post:
Stefan Trabut (04-13-2011)
  #3  
Old 04-13-2011
Stefan Trabut Stefan Trabut is offline
Flexsim User
 
Join Date: Mar 2011
Posts: 29
Downloads: 12
Uploads: 0
Thanks: 34
Thanked 5 Times in 5 Posts
Rep Power: 115
Stefan Trabut is on a distinguished road
Default

Hi Jörg,

Thanks for your answer. The problem is that setup takes time, too, and as soon as the setup is done (OnSetup trigger), the operator has to come to the processor to start the process - this takes also time.
  #4  
Old 04-13-2011
Kris Geisberger Kris Geisberger is offline
Flexsim Canada, Forum Moderator
 
Join Date: Aug 2007
Location: Canada
Posts: 209
Downloads: 54
Uploads: 1
Thanks: 99
Thanked 389 Times in 133 Posts
Rep Power: 451
Kris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud of
Default

If I understand correctly, you wish to store the cumulative value added time in a label on each flowitem. I'm assuming you have used some statistical distributions for process times otherwise the answer would be static for each part type... unless I guess they are routed to multiple machines that perform the same oepration and yet have different cycle times.

I suggest to create 2 labels on the flowitem:
1. TotalValueAddedTime
2. CurrentProcessTime

The CurrentProcessTime label is for temporary storing of the current setup time or process time that the item is about to undergo. This approach is easier than recording time stamps... because as you said, the operator could be late, then maybe the processor breaks in the middle of the process, .etc.

In the Setup Time and Process Time evaluations you can easily obtain the future duration of the activity before it is returned to Flexsim. This is where I would set the CurrentProcessTime label. Then, in the OnSetupFinish and OnProcessFinish I would get the value and increment the TotalValueAddedTime by its amount.

Note: if your process time is a distribution, make sure you store it in a double variable, then use the double to set the CurrentProcessTime label and as the return value. (don't roll the dice twice)
The Following User Says Thank You to Kris Geisberger For This Useful Post:
Stefan Trabut (04-13-2011)
  #5  
Old 04-13-2011
Steven Hamoen's Avatar
Steven Hamoen Steven Hamoen is offline
Talumis, Flexsim Distributor, The Netherlands
 
Join Date: Aug 2007
Location: Soest, NL
Posts: 854
Downloads: 43
Uploads: 0
Thanks: 391
Thanked 661 Times in 379 Posts
Rep Power: 684
Steven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond repute
Default

maybe an answer for those who are wondering if it possible to get the timestamp of the actual start. Yes it is possible by creating your tasksequence for the operator and let him send a message just before it starts the processor again.
  #6  
Old 04-13-2011
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

You can run this script in the script window to set it up for the entire model including conveyors and task executers. Change the first line's labelname to be the one you want (it gets created for you if it doesn't exist), and if you're managing the state yourself, then set any objects that are holding flowitems to STATE_PROCESSING when you want them to add value (using setstate() ). This doesn't look at nested flowitems as it is, or consider other states as value-added. It assumes you're not already using the OnStateChange nodes as it overwrites them if they already exist. It also relies on the state changing in order to register the time, so if your item leaves while the object is still in STATE_PROCESSING it will not register. Many of the default Flexsim objects should work as they are. For example the Processor enters state blocked at the process finished stage, so even if another item is ready to enter and all the Processor's time is allocated to processing, it will still register the value on the item.

Code:
string labelname="valueadded";
forobjecttreeunder(model()){
	if (not(objectexists(OnStateChange(a))) && objectexists(eventfunctions(a))){
			nodeinsertinto(eventfunctions(a));
			treenode newnode=last(eventfunctions(a));
			setname(newnode,"OnStateChange");
			nodeadddata(newnode,DATATYPE_STRING);
			switch_flexscript(newnode,1);
	}
	if (objectexists(OnStateChange(a))){
		sets(OnStateChange(a),concat("string labelname=\"",labelname,"\";if (getstatenum(c)==STATE_PROCESSING){\ntreenode item=first(c);\ntreenode itemlabel=NULL;\nwhile (objectexists(item)){\n	itemlabel=label(item,labelname);\n	if (not(objectexists(itemlabel))){\n	addlabel(item,labelname,0);\n		itemlabel=last(labels(item));\n		}	inc(label(item,labelname),time()-get(state_since(c)));\n	item=next(item);\n	}\n}"));
	}
}
buildall();

Last edited by Jason Lightfoot; 04-22-2011 at 11:04 AM.
The Following User Says Thank You to Jason Lightfoot For This Useful Post:
Stefan Trabut (04-14-2011)
  #7  
Old 04-13-2011
Sebastian Hemmann's Avatar
Sebastian Hemmann Sebastian Hemmann is offline
Flexsim User
 
Join Date: Sep 2009
Location: Braunschweig (Germany)
Posts: 439
Downloads: 52
Uploads: 0
Thanks: 472
Thanked 217 Times in 154 Posts
Rep Power: 319
Sebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to behold
Default

Hi Stefan,

I´m not sure if it is the same hint as Kris gave, but I think the easiest way would be to get the Exittime and subtract the processtime. ;-)
__________________
Hemmi


Thread Thread Starter Forum Replies Last Post
Displaying the simulation time with the various date/time formats. Regan Blackett Tips and Tricks 12 11-12-2012 08:01 AM
What is the exact start time of dewell time? zhang xin Container Terminal (CT) Library 1 11-23-2009 10:56 AM
All time related values 0,0000001 time units delayed Patrick Cap Q&A 2 05-01-2009 01:50 AM
Inter Arrival Time by Time of Day Mod Brandon Peterson Tips and Tricks 0 04-23-2008 11:13 AM
Can transparent effect be added in the object? KelvinHo Q&A 3 03-18-2008 10:12 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.