-
Notifications
You must be signed in to change notification settings - Fork 36
Description
As of commit 98bd53a (master branch), several of the examples are based on a task of repeatedly visiting "home" cell and, when requested, eventually reaching a (parking) "lot" in a 2\times 3 grid. In some of these, the descriptions in the comments and the actual implementation are not consistent with respect to the locations of "home" and "lot". This comment applies to hybrid.py, discrete.py, controlled_switching.py, only_mode_controlled.py, environment_switching.py. Compare these with examples/gr1.py
There are at least two solutions:
-
Swap the labels of 'home' and 'lot'. The exact implementation of this depends on the file. In hybrid.py, use
state_labels = [{'lot'}, set(), set(), set(), set(), {'home'}]. In discrete.py, usesys.states.add('X0', ap={'lot'})andsys.states.add('X5', ap={'home'}). -
In the docstring and comments, change the diagram of the partition to have label
0in the top-right cell, label5in the lower-left, and change the verbal descriptors accordingly, e.g., "...moving to the lower left corner of the grid" becomes "...moving to the upper right corner of the grid."
One advantage of the first solution is that it makes all manifestations of this "home" and "lot" scenario consistent, including in the User's Guide.