max_changes_cost

pyoptex.doe.cost_optimal.cost.max_changes_cost(factor, factors, max_changes)[source]

Cost function to deal with a fixed maximum number of changes in a specific factor. The maximum cost is supposed to be the number of changes, and this cost function simply returns 1 for each change.

Note

It does not account for the initial setup and final result

Parameters

factorstr or int

The name or index of the factor

factorslist(Factor)

The factors for the design.

max_changesint

The maximum number of changes in the specified factor.

Returns

cost_fnfunc(Y, params)

The cost function.