Changeset 1151:2ef1ab0b28cb for src
- Timestamp:
- 04/24/24 18:26:56 (7 months ago)
- Branch:
- python3
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/gates.py
r1105 r1151 133 133 #-------------------------------------------------------------------------------------- 134 134 135 def getAv ilableIf(othersAvailable = []):135 def getAvailableIf(othersAvailable = []): 136 136 """Get a function that determines if a gate is available based on the 137 137 statuses of other gates.""" … … 145 145 lhbpGates = Gates() 146 146 147 lhbpGates.add(Gate("1", "1", "S")) 148 lhbpGates.add(Gate("2", "1", "S")) 149 lhbpGates.add(Gate("3", "1", "S")) 150 lhbpGates.add(Gate("4", "1", "S")) 151 lhbpGates.add(Gate("5", "1", "S")) 152 lhbpGates.add(Gate("6", "1", "S")) 153 lhbpGates.add(Gate("25", "1", "S")) 154 lhbpGates.add(Gate("26", "1", "S")) 155 lhbpGates.add(Gate("27", "1", "S")) 156 lhbpGates.addSpace() 147 lhbpGates.add(Gate("R101", "1", "S")) 148 lhbpGates.add(Gate("R102", "1", "S")) 149 lhbpGates.add(Gate("R103", "1", "S")) 150 lhbpGates.add(Gate("R104", "1", "S", 151 availableFn = getAvailableIf(othersAvailable = ["R105"]))) 152 lhbpGates.add(Gate("R105", "1", "S", 153 availableFn = getAvailableIf(othersAvailable = ["R104", "R106"]))) 154 lhbpGates.add(Gate("R106", "1", "S", 155 availableFn = getAvailableIf(othersAvailable = ["R105", "R108"]))) 156 lhbpGates.add(Gate("R107", "1", "S", 157 availableFn = getAvailableIf(othersAvailable = ["R108"]))) 158 lhbpGates.add(Gate("R108", "1", "S", 159 availableFn = getAvailableIf(othersAvailable = ["R106", "R107"]))) 160 161 lhbpGates.addSpace() 162 lhbpGates.add(Gate("R110", "1", "S", 163 availableFn = getAvailableIf(othersAvailable = ["R111"]))) 164 lhbpGates.add(Gate("R111", "1", "S", 165 availableFn = getAvailableIf(othersAvailable = ["R110", "R112"]))) 166 lhbpGates.add(Gate("R112", "1", "S", 167 availableFn = getAvailableIf(othersAvailable = ["R111"]))) 168 lhbpGates.add(Gate("R113", "1", "S", 169 availableFn = getAvailableIf(othersAvailable = ["R112", "R114"]))) 170 lhbpGates.add(Gate("R114", "1", "S", 171 availableFn = getAvailableIf(othersAvailable = ["R113"]))) 172 lhbpGates.add(Gate("R115", "1", "S")) 173 lhbpGates.add(Gate("R116", "1", "S", 174 availableFn = getAvailableIf(othersAvailable = ["R117"]))) 175 lhbpGates.add(Gate("R117", "1", "S", 176 availableFn = getAvailableIf(othersAvailable = ["R116", "R117A"]))) 177 lhbpGates.add(Gate("R117A", "1", "S", 178 availableFn = getAvailableIf(othersAvailable = ["R116", "R117"]))) 179 lhbpGates.addNewColumn() 180 181 lhbpGates.add(Gate("G150", "1", "S")) 182 lhbpGates.add(Gate("G151", "1", "S")) 183 lhbpGates.add(Gate("G152", "1", "S")) 184 lhbpGates.add(Gate("G153", "1", "S")) 185 lhbpGates.add(Gate("G154", "1", "S")) 186 lhbpGates.add(Gate("G155", "1", "S")) 187 188 lhbpGates.addSpace() 189 lhbpGates.add(Gate("G170", "1", "S")) 190 lhbpGates.add(Gate("G171", "1", "S")) 191 lhbpGates.add(Gate("G172", "1", "S")) 192 lhbpGates.addNewColumn() 157 193 158 194 lhbpGates.add(Gate("31", "2B", "G")) 159 195 lhbpGates.add(Gate("32", "2B", "G")) 160 196 lhbpGates.add(Gate("33", "2B", "G")) 161 lhbpGates.addNewColumn() 162 163 lhbpGates.add(Gate("34", "2B", "G")) 164 lhbpGates.add(Gate("35", "2B", "G")) 165 lhbpGates.add(Gate("36", "2B", "G")) 197 lhbpGates.add(Gate("34", "2B", "G", 198 availableFn = getAvailableIf(othersAvailable = ["34L", "34R"]))) 199 lhbpGates.add(Gate("34L", "2B", "G", 200 availableFn = getAvailableIf(othersAvailable = ["34", "34R"]))) 201 lhbpGates.add(Gate("34R", "2B", "G", 202 availableFn = getAvailableIf(othersAvailable = ["34L", "34"]))) 203 lhbpGates.add(Gate("35", "2B", "G", 204 availableFn = getAvailableIf(othersAvailable = ["35L", "35R"]))) 205 lhbpGates.add(Gate("35L", "2B", "G", 206 availableFn = getAvailableIf(othersAvailable = ["35", "35R"]))) 207 lhbpGates.add(Gate("35R", "2B", "G", 208 availableFn = getAvailableIf(othersAvailable = ["35L", "35"]))) 209 lhbpGates.add(Gate("36", "2B", "G", 210 availableFn = getAvailableIf(othersAvailable = ["36L", "36R"]))) 211 lhbpGates.add(Gate("36L", "2B", "G", 212 availableFn = getAvailableIf(othersAvailable = ["36", "36R"]))) 213 lhbpGates.add(Gate("36R", "2B", "G", 214 availableFn = getAvailableIf(othersAvailable = ["36L", "36"]))) 215 lhbpGates.addSpace() 216 166 217 lhbpGates.add(Gate("37", "2B", "G")) 167 218 lhbpGates.add(Gate("38", "2B", "G")) 168 lhbpGates.add(Gate("39", "2B", "G")) 169 lhbpGates.addSpace() 219 lhbpGates.add(Gate("39", "2B", "G", 220 availableFn = getAvailableIf(othersAvailable = ["37L", "37R"]))) 221 lhbpGates.add(Gate("39L", "2B", "G", 222 availableFn = getAvailableIf(othersAvailable = ["37", "37R"]))) 223 lhbpGates.add(Gate("39R", "2B", "G", 224 availableFn = getAvailableIf(othersAvailable = ["37L", "37"]))) 225 lhbpGates.addNewColumn() 170 226 171 227 lhbpGates.add(Gate("42", "2A", "G")) … … 173 229 lhbpGates.add(Gate("44", "2A", "G")) 174 230 lhbpGates.add(Gate("45", "2A", "G")) 175 lhbpGates.addNewColumn() 176 177 lhbpGates.add(Gate("107", "1", "S")) 178 lhbpGates.add(Gate("108", "1", "S")) 179 lhbpGates.add(Gate("109", "1", "S")) 180 lhbpGates.add(Gate("R110", "1", "S", 181 availableFn = getAvilableIf(othersAvailable = ["R111"]))) 182 lhbpGates.add(Gate("R111", "1", "S", 183 availableFn = getAvilableIf(othersAvailable = ["R110", "R112"]))) 184 lhbpGates.add(Gate("R112", "1", "S", 185 availableFn = getAvilableIf(othersAvailable = ["R111"]))) 186 lhbpGates.add(Gate("R113", "1", "S", 187 availableFn = getAvilableIf(othersAvailable = ["R114"]))) 188 lhbpGates.add(Gate("R114", "1", "S", 189 availableFn = getAvilableIf(othersAvailable = ["R113"]))) 190 lhbpGates.add(Gate("R115", "1", "S")) 191 lhbpGates.add(Gate("R116", "1", "S")) 192 lhbpGates.add(Gate("R117", "1", "S")) 193 lhbpGates.addNewColumn() 231 lhbpGates.addSpace() 194 232 195 233 lhbpGates.add(Gate("R210", "2A", "S", 196 availableFn = getAv ilableIf(othersAvailable = ["R212A"]),234 availableFn = getAvailableIf(othersAvailable = ["R212A"]), 197 235 taxiThrough = True)) 198 236 lhbpGates.add(Gate("R211", "2A", "S", 199 availableFn = getAv ilableIf(othersAvailable = ["R212A"]),237 availableFn = getAvailableIf(othersAvailable = ["R212A"]), 200 238 taxiThrough = True)) 201 239 lhbpGates.add(Gate("R212", "2A", "S", 202 availableFn = getAv ilableIf(othersAvailable = ["R212A"]),240 availableFn = getAvailableIf(othersAvailable = ["R212A"]), 203 241 taxiThrough = True)) 204 242 lhbpGates.add(Gate("R212A", "2A", "S", 205 availableFn = getAv ilableIf(othersAvailable = ["R210", "R211", "R212"]),243 availableFn = getAvailableIf(othersAvailable = ["R210", "R211", "R212"]), 206 244 taxiThrough = True)) 207 245 lhbpGates.addSpace() … … 213 251 lhbpGates.addSpace() 214 252 215 lhbpGates.add(Gate("R224", "2A", " R"))253 lhbpGates.add(Gate("R224", "2A", "S")) 216 254 lhbpGates.add(Gate("R225", "2A", "S")) 217 255 lhbpGates.add(Gate("R226", "2A", "S")) … … 222 260 lhbpGates.add(Gate("R271", "2A", "S")) 223 261 lhbpGates.add(Gate("R272", "2A", "S")) 262 lhbpGates.add(Gate("R273", "2A", "S")) 224 263 lhbpGates.add(Gate("R274", "2A", "S")) 225 264 lhbpGates.add(Gate("R275", "2A", "S")) … … 227 266 lhbpGates.add(Gate("R277", "2A", "S")) 228 267 lhbpGates.add(Gate("R278", "2A", "S", 229 availableFn = getAv ilableIf(othersAvailable = ["R278A"]),268 availableFn = getAvailableIf(othersAvailable = ["R278A"]), 230 269 taxiThrough = True)) 231 270 lhbpGates.add(Gate("R278A", "2A", "S", 232 availableFn = getAv ilableIf(othersAvailable = ["R278", "R279"]),271 availableFn = getAvailableIf(othersAvailable = ["R278", "R279"]), 233 272 taxiThrough = True)) 234 273 lhbpGates.add(Gate("R279", "2A", "S", 235 availableFn = getAv ilableIf(othersAvailable = ["R278A"]),236 taxiThrough = True)) 274 availableFn = getAvailableIf(othersAvailable = ["R278A"]), 275 taxiThrough = True))
Note:
See TracChangeset
for help on using the changeset viewer.