Skip to content

In examples, inconsistent naming of X0 and X5 as "lot" and "home" #173

@slivingston

Description

@slivingston

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:

  1. 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, use sys.states.add('X0', ap={'lot'}) and sys.states.add('X5', ap={'home'}).

  2. In the docstring and comments, change the diagram of the partition to have label 0 in the top-right cell, label 5 in 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.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions