def __setVehicleMatrixAndLocation(self, model, vehicleID, positions):
     matrix, location = matrix_factory.getVehicleMPAndLocation(
         vehicleID, positions)
     model.setLocation(location)
     if matrix is not None:
         model.setMatrix(matrix)
         self._setMatrix(model.getID(), matrix)
     return
Exemplo n.º 2
0
 def __addEntryToPool(self, vehicleID, location = VEHICLE_LOCATION.UNDEFINED, positions = None):
     if location != VEHICLE_LOCATION.UNDEFINED:
         matrix = matrix_factory.makeVehicleMPByLocation(vehicleID, location, positions or {})
         if matrix is None:
             location = VEHICLE_LOCATION.UNDEFINED
     else:
         matrix, location = matrix_factory.getVehicleMPAndLocation(vehicleID, positions or {})
     active = location != VEHICLE_LOCATION.UNDEFINED
     model = self._addEntryEx(vehicleID, _S_NAME.VEHICLE, _C_NAME.ALIVE_VEHICLES, matrix=matrix, active=active)
     if model is not None:
         model.setLocation(location)
     return model
Exemplo n.º 3
0
 def __addEntryToPool(self, vehicleID, location = VEHICLE_LOCATION.UNDEFINED, positions = None):
     if location != VEHICLE_LOCATION.UNDEFINED:
         matrix = matrix_factory.makeVehicleMPByLocation(vehicleID, location, positions or {})
         if matrix is None:
             location = VEHICLE_LOCATION.UNDEFINED
     else:
         matrix, location = matrix_factory.getVehicleMPAndLocation(vehicleID, positions or {})
     active = location != VEHICLE_LOCATION.UNDEFINED
     model = self._addEntryEx(vehicleID, _S_NAME.VEHICLE, _C_NAME.ALIVE_VEHICLES, matrix=matrix, active=active)
     if model is not None:
         model.setLocation(location)
     return model