Skip to content

Commit

Permalink
Merge pull request #112 from BerkeleyAutomation/stallcheck
Browse files Browse the repository at this point in the history
Bump version number, add deadlock check
  • Loading branch information
jerryz123 committed Sep 21, 2018
2 parents be410dd + 9bb29b2 commit f27ad2d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions fluids/sim.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,3 +352,13 @@ def multiagent_plan(self):
def run_time(self):
fluids_assert(self.state, "run_time called without setting the state")
return self.state.time


def in_deadlock(self):
"""
Returns true if multiagent planner has deadlocked
"""
for car in self.state.type_map[Car]:
if car.stopped_time < 10:
return False
return True
2 changes: 1 addition & 1 deletion fluids/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '2.0.4'
__version__ = '2.0.5'

0 comments on commit f27ad2d

Please sign in to comment.