What is the meaning of Model(s, a) in the prioritized sweeping algorithm?

I'm reading the book "Reinforcement Learning: An Introduction" (by Andrew Barto and Richard S. Sutton).

The authors provide the pseudocode of the prioritized sweeping algorithm, but I do not know what is the meaning of Model(s, a). Does it mean that Model(s, a) is the history of rewards gained when we are in state s and the action a is taken?

Does R, S_new = Model(s,a) mean that we should take a random sample from rewards gained in state s and action a is taken?

I think pseudocode was made for tabular case with an assumption of deterministic environment. $$Model(s, a)$$ would then be a table with information of the next state and reward after taking action $$a$$ from state $$s$$. The size of that table would be same as the size of Q table. Because the environment is deterministic you wouldn't take a random sample because there is only one possible transition so you would take the transition remembered in model table.
• Thanks for your response. Do you mean that if we are in state s and take action a, we will be always in the state S_new in the next state? It seems somehow weird! – Katatonia Jan 10 '19 at 11:16