decorators#

cost(basis, ID=None, *, CE, cost=None, n=None, S=1.0, lb=None, ub=None, kW=None, BM=1.0, units=None, N=None, lifetime=None, f=None, annual=None, condition=None, magnitude=None)[source]#

Add item (free-on-board) purchase cost based on exponential scale up.

Parameters:
  • basis (str) – Name of size parameter used for scaling.

  • ID (str) – Name of purchase item.

  • CE (float) – Chemical engineering plant cost index.

  • cost (float) – Purchase cost of item.

  • n (float) – Exponential factor.

  • S (float, optional) – Size. Defaults to 1.

  • ub (float, optional) – Size limit, if any.

  • kW (float, optional) – Electricity rate. Defaults to 0.

  • BM (float, optional) – Bare module factor (installation factor). Defaults to 1.

  • units (str, optional) – Units of measure.

  • N (str, optional) – Attribute name for number of parallel units.

  • lifetime (int, optional) – Number of operating years until equipment needs to be replaced.

  • f (function, optional) – Should return the cost given the size S at the given CE.

  • annual (bool, optional) – Whether to annualize design basis. For example, the yearly flow rate of treated water should be annualized to account for operating hours and plant downtime.

  • condition (function(dict), optional) – Cost item is only evaluated if condition returns True given the design_results dictionary.

Examples

../../tutorial/Inhereting_from_Unit

class CostItem(basis, units, S, lb, ub, CE, cost, n, kW, N, f, condition, magnitude)[source]#

Create a CostItem object which defines exponential scaling factors for an item’s purchase cost.

Parameters:
  • basis (str) – Name of size parameter used for scaling.

  • units (str) – Units of measure.

  • S (float) – Size.

  • lb (float, optional) – Lower size bound.

  • ub (float) – Upper Size bound.

  • CE (float) – Chemical engineering plant cost index.

  • cost (float) – Purchase cost of item.

  • n (float) – Exponential factor.

  • kW (float) – Electricity rate.

  • N (str) – Attribute name for number of parallel units.

  • f (function, optional) – Should return the cost given the size S at the given CE.

  • condition (function(dict), optional) – Cost item is only evaluated if condition returns True given the design_results dictionary.

  • magnitude (bool, optional) – Whether to take the absolute value of the size parameter.