Optimization models for flexible manipulators.