DAMPLAB / damplab-aquarium

The Aquarium Lab Operating System
http://www.aquarium.bio/
Other
2 stars 0 forks source link

Update Cost of Individual Protocols #22

Open rychen58 opened 4 years ago

rychen58 commented 4 years ago

Summary & Context

The Aquarium protocol cost is currently calculated based on two variables, labor and materials. However, when launching a new protocol plan, only the cost of the materials is considered but the labor cost.

Expected Behavior

When created and launched a protocol operation plan, the cost of the plan showed in the DESIGNER workspace should be the sum of both cost variables, labor and materials, of each individual protocol. The code is structured to automatically sum both cost variables, labor and materials, in this format: {labor: #, material: #}.

Current Behavior

Currently, only the materials part of the cost is considered when calculating the total protocol cost.

Possible Solution

To by-pass this problem, I have to manually sum both labor and material cost, by doing the following code for all protocols: {labor: 0, material: #+labor}.

Steps to Reproduce

  1. Go DEVELOPER page of the Aquarium, open the COST workspace for the individual protocol, which includes all cost-related scripts.
  2. Parameter, 'labor rate (min)', is found on the Parameter page of the Aquarium, and is referred this way: Parameter.get_float('labor rate (min)')
  3. All cost-related numbers can be found on this Google Sheet, 'Damp Lab Services_Dec2019', https://docs.google.com/spreadsheets/u/1/d/17-NjCbZYhXPgb5IK9aUWFzD14bFlA2q8fM0Lm3I3a7o/edit?pli=1#gid=913149402

Environment

Chrome

bjkeller commented 4 years ago

Unfortunately, this is not documented and the interface could handle it better.

Unless you've changed it, aquarium looking for parameters named labor rate and markup rate

rychen58 commented 4 years ago

What is the markup rate?

bjkeller commented 4 years ago

It is a rate for charging overhead costs.

rychen58 commented 4 years ago

Attached here is a very simple code I wrote to calculate the cost of Extract Gel Fragment protocol:

def cost(op) l = 5.88 * Parameter.get_float('labor rate (min)') {labor:0, materials: 0.38+l}
end

The only parameter I have used is the 'labor rate (min)', which I have created in the Aquarium Parameter page.

When I launch the Extract Gel Fragment protocol, the cost showed for the protocol would only include the materials cost, but ignore the labor cost. So, for right now, in order to calculate the correct cost, I have manually combined the labor cost with the material cost.

bjkeller commented 4 years ago

Can you set the parameter with the name labor rate instead of labor rate (min) and see if you still get this behavior?