~peter-bulychev/dbmpyuppaal/dbmpyuppaal_discrete_states

« back to all changes in this revision

Viewing changes to state_predicate.py

  • Committer: Peter Bulychev
  • Date: 2012-03-22 17:45:25 UTC
  • Revision ID: peter.bulychev@gmail.com-20120322174525-r4tsd9of8cbz5s66
modified hash function for state predicate - it works when the location.name is both label and string

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
    def check(self, ntastate):
17
17
        return ntastate.discrete_state.position[self.location.template] == self.location
18
18
    def __hash__(self):
19
 
        return hash(self.location.name)
 
19
        return hash(str(self.location.name))
20
20
    def __str__(self):
21
21
        return str(self.location)
22
22