getformula function

Extract the formula from a model