Пример #1
0
    def __init__(self, grid: MultiCircuit, options: ShortCircuitOptions,
                 pf_results: PowerFlowResults):
        """
        PowerFlow class constructor
        @param grid: MultiCircuit Object
        """
        QRunnable.__init__(self)

        # Grid to run a power flow in
        self.grid = grid

        # power flow results
        self.pf_results = pf_results

        # Options to use
        self.options = options

        # compile the buses short circuit impedance array
        n = len(self.grid.buses)
        self.Zf = zeros(n, dtype=complex)
        for i in range(n):
            self.Zf[i] = self.grid.buses[i].Zf

        self.results = None

        self.__cancel__ = False
Пример #2
0
    def __init__(self, task, *args, **kwargs):
        QRunnable.__init__(self)

        self.task                           = task            # Store constructor arguments (re-used for processing)
        self.args                           = args
        self.kwargs                         = kwargs
        self.signals                        = DamgWorkerSignals()
Пример #3
0
    def __init__(self, fn, *args, **kwargs):
        QRunnable.__init__(self)

        self.fn = fn
        self.args = args
        self.kwargs = kwargs
        self.sig = WorkerSignals()
Пример #4
0
 def __init__(self, ui):
     self.__ui = ui
     self.__vnc = None
     self.__hook = hook.hooks()
     self.__connection = None
     self.__hookProcess = None
     self.__isConnected = False
     QRunnable.__init__(self)
Пример #5
0
 def __init__(self, parent, session, callback, url, params=None, package=None):
     QRunnable.__init__(self)
     self.url = 'https://library-app3.herokuapp.com/' + url
     self.parent = parent
     self.callback = callback
     self.session = session
     self.params = params
     self.package = package
Пример #6
0
 def __init__(self, progress, files, sourcePath, targetDirPath,
              instagramIdList):
     QRunnable.__init__(self)
     self.progress = progress
     self.files = files
     self.sourcePath = sourcePath
     self.targetDirPath = targetDirPath
     self.instagramIdList = instagramIdList
Пример #7
0
 def __init__(self, parent, cb, *args, **kwargs):
     QRunnable.__init__(self)
     self._mutex = Lock()
     self._parent = parent
     with self._mutex:
         self._cb = cb
         self._args = args
         self._kwargs = kwargs
         self._parent._threads.add(self)
Пример #8
0
 def __init__(self, parent, cb, *args, **kwargs):
     QRunnable.__init__(self)
     self._mutex = Lock()
     self._parent = parent
     with self._mutex:
         self._cb = cb
         self._args = args
         self._kwargs = kwargs
         self._parent._threads.add(self)
Пример #9
0
 def __init__(
     self,
     charImageList,
     mainGUI,
     i,
 ):
     QRunnable.__init__(self)
     self.charImageList = charImageList
     self.w = mainGUI
     self.i = i
Пример #10
0
 def __init__(self, caller, server_details, user_details, sync_up_data,
              sync_results):
     QRunnable.__init__(self)
     self.signals = WorkerSignals()
     self.caller = caller
     self.server_address, self.class_key, self.ssl_set = server_details
     self.first_name, self.surname, self.email = user_details
     self.sync_up_data = sync_up_data
     self.sync_results = sync_results
     self.sync_results['successful'] = True
Пример #11
0
    def __init__(self, circuit: MultiCircuit):
        """
        Constructor
        :param circuit: circuit object
        """

        QRunnable.__init__(self)

        self.grid = circuit

        self.se_results = None
Пример #12
0
    def __init__(self):
        QRunnable.__init__(self)
        self.browser = Browser()

        self.exiting = False
        self.data = {}
        self.signal = WorkerSignal()
        self.signal.stop.connect(self.setExit)
        self.token = ''
        self.session = requests.sessions.Session()
        self.delay = 60
        self.delaySet = 60
Пример #13
0
 def __init__(self,
              file_term,
              iterations,
              mode='train',
              no_labels=2,
              tuning_frequency='minimal'):
     QRunnable.__init__(self)
     super().__init__(file_term,
                      iterations,
                      mode=mode,
                      no_labels=no_labels,
                      tuning_frequency=tuning_frequency)
     self.signals = QWorkerCompatibleClassificationInterface.Signals()
Пример #14
0
 def __init__(self, *args, **kwargs):
     self.settings = kwargs.get('settings', UserSettings.getInstance())
     kwargs['settings'] = self.settings
     kwargs['cached'] = False
     self.session_storage = SessionStorage.getInstance()
     self.pkcs11client = PKCS11Client(*args, **kwargs)
     self.session_storage.pkcs11_client = self.pkcs11client
     QRunnable.__init__(self)
     self.setAutoDelete(True)
     self.cardmonitor = None
     self.cardobserver = None
     self.mutex = QMutex()
     self.run_mutex = QMutex()
Пример #15
0
    def __init__(self, grid: MultiCircuit, options: PowerFlowOptions):
        """
        PowerFlow class constructor
        @param grid: MultiCircuit Object
        """
        QRunnable.__init__(self)

        # Grid to run a power flow in
        self.grid = grid

        # Options to use
        self.options = options

        self.results = None

        self.pf = PowerFlowMP(grid, options)

        self.__cancel__ = False
Пример #16
0
    def __init__(self, grid: MultiCircuit, options: OptimalPowerFlowOptions):
        """
        PowerFlow class constructor
        @param grid: MultiCircuit Object
        @param options: OPF options
        """
        QRunnable.__init__(self)

        # Grid to run a power flow in
        self.grid = grid

        # Options to use
        self.options = options

        # OPF results
        self.results = None

        # set cancel state
        self.__cancel__ = False

        self.all_solved = True
Пример #17
0
 def __init__(self, function, *args, **kwargs):
     QRunnable.__init__(self)
     self._function = function
     self._args = args
     self._kwargs = kwargs
Пример #18
0
 def __init__(self, func, next_func, traceback=True):
     QRunnable.__init__(self)
     self.func = func
     self.next_func = next_func
     self.traceback = traceback
Пример #19
0
 def __init__(self, target, plotter):
     QRunnable.__init__(self)
     self.Sim = target
     self.Plot = plotter
Пример #20
0
 def __init__(self, target, args=None):
     QRunnable.__init__(self)
     self.t = target
     self.args = args
Пример #21
0
 def __init__(self, func, next_func):
     QRunnable.__init__(self)
     self.func = func
     self.next_func = next_func
Пример #22
0
 def __init__(self, url, json, mainGUI, apiKey):
     QRunnable.__init__(self)
     self.mUrl = url
     self.mJson = json
     self.w = mainGUI
     self.wApiKey = apiKey
 def __init__(self, courses, *args, **kwargs):
     QRunnable.__init__(self, *args, **kwargs)
     self.downloader = Downloader()
     self.courses = courses
     self.workCompleted = False
Пример #24
0
 def __init__(self, fvaspeaker):
     self.fva_speaker = fvaspeaker
     QRunnable.__init__(self)
Пример #25
0
 def __init__(self, iface, kill_signal, update_signal):
     QRunnable.__init__(self)
     self.iface = iface
     self.update_signal = update_signal
     self.kill_signal = kill_signal
Пример #26
0
 def __init__(self, url):
     QRunnable.__init__(self)
     self.url = url
Пример #27
0
 def __init__(self, func, *args, **kwargs):
     QRunnable.__init__(self)
     self.func = func
     self.args = args
     self.kwargs = kwargs
 def __init__(self, *args, **kwargs):
     QRunnable.__init__(self, *args, **kwargs)
     self.downloader = Downloader()
Пример #29
0
 def __init__(self, base, pid, multifiles):
     QRunnable.__init__(self)
     self.base = base
     self.pid = pid
     self.multifiles = multifiles
     self.signals = ScanWorkerSignals()
Пример #30
0
 def __init__(self, runnable, *args, **kwargs):
     QRunnable.__init__(self)
     self.signals = Signals()
     self.__runnable = runnable
     self.__args = args
     self.__kwargs = kwargs
Пример #31
0
 def __init__(self, func, next_func):
     QRunnable.__init__(self)
     self.func = func
     self.next_func = next_func
Пример #32
0
 def __init__(self, name):
     QRunnable.__init__(self)
     self.name = name