Efficient sequential sampling for global optimization in static and dynamic environments