discount_cost

pyoptex.doe.cost_optimal.cost.discount_cost(costs, factors, max_cost, base_cost=1)[source]

Create a transition cost function according to the formula C = max(c1, c2, …, base). This means the total transition cost is determined by the most-hard-to-change factor.

Parameters

costsdict(str, float)

A dictionary mapping the factor name to the transition cost.

factorslist(Factor)

The factors for the design.

max_costfloat

The budget available for this cost function.

base_costfloat

The base cost when no factors are changed, i.e., when a run is repeated.

Returns

cost_fnfunc(Y, params)

The cost function.