Optimal terminal layout configuration: a new approach