A framework for effective optimization via simulation