def check_consistency(self):
error = False<EOL>regex = re.compile('<STR_LIT>')<EOL>if '<STR_LIT>' not in self.modelstr:<EOL><INDENT>raise ModelError(<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'<EOL>)<EOL><DEDENT>for name, eq in iteritems(self.modelstr):<EOL><INDENT>var = regex.findall(eq)<EOL>for v in var:<EOL><INDENT>v = re.sub(r"<STR_LIT>", '<STR_LIT>', v)<EOL>if v not in self.varmap:<EOL><INDENT>log.error(<EOL>"<STR_LIT>" %<EOL>(v, name, eq, self.varmap)<EOL>)<EOL>error = True<EOL><DEDENT><DEDENT><DEDENT>if error:<EOL><INDENT>raise ModelError('<STR_LIT>')<EOL><DEDENT>
Make sure that the required comps are included in the list of
components supplied by the user. Also check that the parameters are
consistent across the many components.