question

Marc H avatar image
0 Likes"
Marc H asked Ben Wilson commented

How can I calculate a 'cost per part' after an operation?

I want to see in a dashboard the 'cost per part' at any time during the simulation. I'm thinking that the Financial Analysis gives me the total cost at any given time and Throughput gives me how many I made. I just want to divide the Financial Analysis by the Throughput to give me Total Cost per Part.

FlexSim 21.0.3
flexsim 21.0.3financial analysis
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Ben Wilson avatar image Ben Wilson ♦♦ commented ·

Hi @Marc H, was jason.lightfoot's answer helpful? If so, please click the red "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.

0 Likes 0 ·

1 Answer

·
Jason Lightfoot avatar image
1 Like"
Jason Lightfoot answered Marc H commented

Here's an example using a user command that requires the dashboard to be open. Model documentation widget seems broken so didn't add it to the dashboard and put it in model text instead.

CostPerPart.fsm


1616603221948.png (30.4 KiB)
1616603275488.png (11.9 KiB)
costperpart.fsm (29.7 KiB)
· 9
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Marc H avatar image Marc H commented ·

I still don't understand where the 'widget' came from. Is the 'Cost per part' a standard in the library? Any additional explanation is welcome.

When I tried to add the Output of Processor1 to the Dashboard the 'Cost per part' quit working.

costperpart_2.fsm

0 Likes 0 ·
costperpart-2.fsm (33.4 KiB)
Jason Lightfoot avatar image Jason Lightfoot ♦ Marc H commented ·

This is a bug in the financial analysis dashboard widget - just click in the model 3D view and the financial part will work again.

Not it's not a standard - as I said, I added it as a user command which you can find in the toolbox:

Unfortunately it doesn't look like the financials are readily available to other parts of the model and seem only to be calculated when the dashboard is open and drawing. I've sent a node to the dev team to look into this.


0 Likes 0 ·
1616610542666.png (3.2 KiB)
Marc H avatar image Marc H commented ·

I compared my original model to yours. Do I need to create a 'User Command' and a 'Statistics Collector" for each processor that I want to generate a 'cost per part'?

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦ Marc H commented ·

For the user command we can try and make it more generic so that you pass in the processor as a parameter. Then it get's a little more tricky to find the processor's cost total as opposed to the total cost for the whole model which I'm reading from a table in the financial anaysis now. Let me take a look at that.

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦ Marc H commented ·

Here's another version now with two user commands - one to get the machine cost and another to use that to get the part cost. Uses function_s to perform the update without the dashboard widget open - which should be acoided, but I don't see another way to do it in this case without duplicating much of what the FinancialAnalysis tool is striving to do.

Usage: getCostPerPart(<object>), getMachineCost(<machine>)

CostPerPart2.fsm

0 Likes 0 ·
costperpart2.fsm (32.5 KiB)
Marc H avatar image Marc H commented ·

I appreciate your help with this but I feel it's getting too complicated for what I'm trying to achieve. My overall goal is to be able to simply with show the 'piece cost' after a series of operations. My assumptions are that I can add multiple parts at multiple operations (combiners) that is basically an assembly line. At any given operation a sub-assembly can be removed from the line and I would like to know the cost of all of the parts plus the value add of operators and equipment. In my mind it seemed pretty simple that I should be able to use the Financial Analysis widget 'total cost' for that operation and just divide it by the Output of that operation and show it as a custom widget in the dashboard. Apparently this is more complex than I thought. Thank again for your help.

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦ Marc H commented ·

Your assumption is correct. Yes you can do that with combiners. It's easy now that I've done the hard part. Just put those user commands in your model and define your costs in the Financial Analysis tool.

The widget display in a dashboard is another question - there are many widgets that will work - just the one I chose was broken.

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦ Marc H commented ·

Here's another version where I added the cost per part for a group of machines to the dashboard:

CostPerPart3.fsm

I've also attached a library you can load which will auto-install those commands to your model.

FinanceUserCommands.fsl

0 Likes 0 ·
Marc H avatar image Marc H commented ·

Excellent! Thank you very much!

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.