On the optimal design of railway passenger vehicles