model solver and figure generator