Changeset 1105:2d0d642d122d
- Timestamp:
- 09/19/23 11:04:18 (14 months ago)
- Branch:
- python3
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/gates.py
r619 r1105 11 11 """Information about a gate.""" 12 12 def __init__(self, number, terminal, type, 13 availableFn = None ):13 availableFn = None, taxiThrough = False): 14 14 """Construct the gate with the given information. 15 15 … … 25 25 self._type = type 26 26 self._availableFn = availableFn 27 self._taxiThrough = taxiThrough 27 28 28 29 @property … … 30 31 """Get the number of the gate.""" 31 32 return self._number 33 34 @property 35 def taxiThrough(self): 36 """Get if the gate is a taxi through one.""" 37 return self._taxiThrough 32 38 33 39 def isAvailable(self, gates, occupiedGateNumbers): … … 89 95 self._displayInfos.append((Gates.DISPLAY_GATE, gate)) 90 96 self._addRow() 97 98 def find(self, gateNumber): 99 """Find a gate by its number.""" 100 for gate in self._gates: 101 if gate.number == gateNumber: 102 return gate 91 103 92 104 def addSpace(self): … … 182 194 183 195 lhbpGates.add(Gate("R210", "2A", "S", 184 availableFn = getAvilableIf(othersAvailable = ["R212A"]))) 196 availableFn = getAvilableIf(othersAvailable = ["R212A"]), 197 taxiThrough = True)) 185 198 lhbpGates.add(Gate("R211", "2A", "S", 186 availableFn = getAvilableIf(othersAvailable = ["R212A"]))) 199 availableFn = getAvilableIf(othersAvailable = ["R212A"]), 200 taxiThrough = True)) 187 201 lhbpGates.add(Gate("R212", "2A", "S", 188 availableFn = getAvilableIf(othersAvailable = ["R212A"]))) 202 availableFn = getAvilableIf(othersAvailable = ["R212A"]), 203 taxiThrough = True)) 189 204 lhbpGates.add(Gate("R212A", "2A", "S", 190 availableFn = getAvilableIf(othersAvailable = ["R210", "R211", "R212"]))) 205 availableFn = getAvilableIf(othersAvailable = ["R210", "R211", "R212"]), 206 taxiThrough = True)) 191 207 lhbpGates.addSpace() 192 208 … … 211 227 lhbpGates.add(Gate("R277", "2A", "S")) 212 228 lhbpGates.add(Gate("R278", "2A", "S", 213 availableFn = getAvilableIf(othersAvailable = ["R278A"]))) 229 availableFn = getAvilableIf(othersAvailable = ["R278A"]), 230 taxiThrough = True)) 214 231 lhbpGates.add(Gate("R278A", "2A", "S", 215 availableFn = getAvilableIf(othersAvailable = ["R278", "R279"]))) 232 availableFn = getAvilableIf(othersAvailable = ["R278", "R279"]), 233 taxiThrough = True)) 216 234 lhbpGates.add(Gate("R279", "2A", "S", 217 availableFn = getAvilableIf(othersAvailable = ["R278A"]))) 235 availableFn = getAvilableIf(othersAvailable = ["R278A"]), 236 taxiThrough = True))
Note:
See TracChangeset
for help on using the changeset viewer.