Function to initialise the problem.

Also defines the structure of 'params' .