An approach to the optimization of a thin-walled Z-beam