Skip to content

Commit

Permalink
Change actuator mutex to include initial conditions.
Browse files Browse the repository at this point in the history
  • Loading branch information
Constantine Lignos committed Aug 5, 2013
1 parent f6f3fa5 commit f6ea718
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions ltlbroom/ltl.py
Expand Up @@ -80,10 +80,10 @@ def next_(text):

def mutex_(items, include_all_off=False):
"""Create a system proposition mutex over the given items."""
return always(or_([and_([item1] +
[not_(item2) for item2 in items if item2 != item1])
for item1 in items] +
([and_([not_(item) for item in items])] if include_all_off else [])))
return or_([and_([item1] +
[not_(item2) for item2 in items if item2 != item1])
for item1 in items] +
([and_([not_(item) for item in items])] if include_all_off else []))


def iff(prop1, prop2):
Expand Down
3 changes: 2 additions & 1 deletion ltlbroom/specgeneration.py
Expand Up @@ -181,10 +181,11 @@ def generate(self, text, sensors, regions, props, tag_dict, realizable_reactions

# Add the actuator mutex
if len(self.props) > 1:
actuator_mutex = mutex_([sys_(prop) for prop in self.props], True)
generation_trees["Safety assumptions"] = \
{"Safety assumptions":
[SpecChunk("Robot can perform only one action at a time.",
[mutex_([sys_(prop) for prop in self.props], True)],
[actuator_mutex, always(actuator_mutex)],
SpecChunk.SYS, None)]}

for line in text.split('\n'):
Expand Down

0 comments on commit f6ea718

Please sign in to comment.