return stateupdater
// determine the best suitable state updater
priorities = [(name, updater.get_priority(equations,
namespace,
specifiers))
for name, updater in
StateUpdateMethod.stateupdaters.iteritems()]
priorities.sort(key=lambda elem: elem[1], reverse=True)
// If the list is empty or the first (=best) priority is 0, we did not
// find anything suitable
if len(priorities) == 0 or priorities[0][1] == 0:
raise ValueError(("No stateupdater that is suitable for the given "
"equations has been found"))
// The first entry in the list is the stateupdater of our choice
logger.info("Using stateupdater "%s"" % priorities[0][0])
return StateUpdateMethod.stateupdaters[priorities[0][0]]