Optimal Design and Control of Multibody Systems