Converting pieces per minute into minute per pieces

Converting pieces per minute into minute per pieces

victor_alejandro_ht
Not applicable
63 Views
2 Replies
Message 1 of 3

Converting pieces per minute into minute per pieces

victor_alejandro_ht
Not applicable

[ FlexSim 18.2.0 ]

Hi all,

I want to convert the figure that appers in this Dash template into minute per pieces, so it is a simple division 1/(Pieces per Minute).

15199-dashboard.png

I used a statistic colector in order to modify the output value formula but I can not find the proper one, because I can not get the pieces per minute number in order to to the division. Perhaps there is another way.

15200-statistic-collector.png

pieces-per-minute-into-minute-per-piece.fsm

Thanks in advance for your support.

Alejandro

0 Likes
Accepted solutions (1)
64 Views
2 Replies
Replies (2)
Message 2 of 3

JordanLJohnson
Autodesk
Autodesk
Accepted solution

Here is a modified version of the model, that I believe does what you want:

minute-per-piece.fsm

The part that is hard to get is the code for the second column:

// *** code header above ***
double throughput = data.rowValue.as(Object).stats.output.value;
double minutes = (Model.dateTime - Model.startDateTime).totalMinutes;

if (throughput == 0)
	return 0;	
return minutes / throughput;

This code does a few things: it gets the throughput of the row value (the combiner), and it gets the number of minutes the model has run. Finally, it guards against a division by zero, and then returns the number you were after.

.


Jordan Johnson
Principal Software Engineer
>

Message 3 of 3

victor_alejandro_ht
Not applicable

Hi Jordan,

It works perfectly, in my model I need to set a warmup time so I just changed the formula with Model.warmupDateTime. Thank you very much.

// *** code header above ***
double throughput = data.rowValue.as(Object).stats.output.value;
double minutes = (Model.dateTime - Model.warmupDateTime).totalMinutes;

if (throughput == 0)
	return 0;	
return minutes / throughput;
0 Likes