CSTARS / farm-budgets-data

Data to populate the Postgres for the farm-budgets-app
2 stars 0 forks source link

Add two units to the production table #34

Closed qjhart closed 8 years ago

qjhart commented 9 years ago

If we go to method where a production has an operation then my original thought is that the operation has a unit on which you make the estimate, and this can change. So, for example, you might make an estimate for the '''Bale''' operation on an acre or tons basis (or maybe both). Then when you choose a material, you choose the unit for that, for example, your Labor charge might be on an hr or on a day. So, the production table would look like

operation material unit per amount
Bale Labor hr ton 25

Where the per is the operational unit. Does this sound correct?

jrmerz commented 9 years ago

So the cost is both per ton and per hr?

ncparker commented 9 years ago

Quinn's suggestion makes sense to me. It allows for an operation that has both hourly and per unit produced costs to be incorporated in the budget. For Quinn's example it looks like, the operation of baling takes 25 labor-hrs per ton. We would then need to multiply by the labor rate to get the cost per ton.

The functional form can get tricky though with something like baling. To a certain threshold yield, the baling costs are best described as per acre. Once you meet or exceed the equipment's capacity at top speed, then it becomes better described as per ton baled. This is a complex functional form we probably don't want hiding in the code though. The advantage of including both is that it would allow the user to define their costs in the units that make the most sense to them.

jrmerz commented 9 years ago

@ncparker thanks, your explanation helps a lot. It sounds like we should include both, though this could cause issues with the user interface.