Added a method for linearizing the model.