complete some logic function that to be used to obtain the optimal policy when a request arriving.

And improve some functions, like initial the set of request, to make them more scalable.