init_feasible

pyoptex.doe.cost_optimal.init.init_feasible(params, max_tries=3, max_size=None, force_cost_feasible=True)[source]

Generate a random initial and feasible design. From a random permutation of a full factorial design, the runs are dropped one-by-one as long as they still provide a feasible design. Finally, the design is greedily reordered for minimal cost.

Parameters

paramsParameters

The simulation parameters.

max_triesint

The maximum number of random tries. If all random tries fail, a final non-randomized design is created. If this also fails, a ValueError is thrown.

max_sizeint

The maximum number of runs before iteratively removing them.

force_cost_feasiblebool

Force a final cost feasibility check.

Returns

Ynp.array(2d)

The initial design.