-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #90 from asmithie13/add_authority/speed_blocks_#87
Add authority/speed blocks #87
- Loading branch information
Showing
7 changed files
with
75 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
LIGHT B6 | ||
OCCUPIED C | ||
SWITCH A5 B6 | ||
LIGHT !C11 | ||
CROSSING !A3 | ||
SWITCH A5 C11 | ||
|
||
OCCUPIED !C | ||
SWITCH A5 C11 | ||
LIGHT C11 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
LIGHT ID #Block is Green | ||
LIGHT !ID #Block is Red | ||
|
||
CROSSING ID #Block is Up | ||
CROSSING !ID #Block is Down | ||
|
||
SWITCH ID1 ID2 #Block SWITCH points to ID2 now | ||
OCCUPIED A #Perform actions if any block of A is OCCUPIED | ||
SWITCH A5 B6 #SWITCH position of A5 to B6 | ||
LIGHT !C11 #Light of C11 is red | ||
#CROSSING goes here, if blank, we just skip | ||
OCCUPIED !A #Perform if every block of A is not OCCUPIED | ||
SWITCH A5 C11 | ||
LIGHT C11 #Light of C11 is green |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
# Define the Block class | ||
class Block: | ||
def __init__(self, light, crossing, switch, state,occupied,id): | ||
def __init__(self, light, crossing, switch, state,occupied,id,speedLimit,authority): | ||
self.LIGHT = light | ||
self.CROSSING = crossing | ||
self.SWITCH = switch | ||
self.state = state | ||
self.occupied = occupied | ||
self.ID = id | ||
self.speedLimit = speedLimit | ||
self.authority = authority | ||
|
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters