init_feasible_
- pyoptex.doe.cost_optimal.init.init_feasible_(params, max_tries=3, minimal=True, 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
- params
Parameters 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.
- minimalbool
Whether to remove runs for a minimal initial design, or only until the cost is satisfied.
- max_sizeint
The maximum number of runs before iteratively removing them. This parameter can be set when the computational time is too long for the initialization in large problems with many factors and factor levels.
- force_cost_feasiblebool
Permit a design whose cost function is too high if no feasible design is found.
Returns
- Ynp.array(2d)
The initial design.
- params