GenericModel function

R6 class representing a generic model.