Example #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
Example #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()
Example #3
0
    def __init__(self, fn, *args, **kwargs):
        QRunnable.__init__(self)

        self.fn = fn
        self.args = args
        self.kwargs = kwargs
        self.sig = WorkerSignals()
 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)
Example #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
Example #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
Example #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)
Example #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)
Example #9
0
 def __init__(
     self,
     charImageList,
     mainGUI,
     i,
 ):
     QRunnable.__init__(self)
     self.charImageList = charImageList
     self.w = mainGUI
     self.i = i
Example #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
Example #11
0
    def __init__(self, circuit: MultiCircuit):
        """
        Constructor
        :param circuit: circuit object
        """

        QRunnable.__init__(self)

        self.grid = circuit

        self.se_results = None
Example #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
Example #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()
Example #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()
Example #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
Example #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
Example #17
0
 def __init__(self, function, *args, **kwargs):
     QRunnable.__init__(self)
     self._function = function
     self._args = args
     self._kwargs = kwargs
Example #18
0
 def __init__(self, func, next_func, traceback=True):
     QRunnable.__init__(self)
     self.func = func
     self.next_func = next_func
     self.traceback = traceback
Example #19
0
 def __init__(self, target, plotter):
     QRunnable.__init__(self)
     self.Sim = target
     self.Plot = plotter
Example #20
0
 def __init__(self, target, args=None):
     QRunnable.__init__(self)
     self.t = target
     self.args = args
Example #21
0
 def __init__(self, func, next_func):
     QRunnable.__init__(self)
     self.func = func
     self.next_func = next_func
Example #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
Example #24
0
 def __init__(self, fvaspeaker):
     self.fva_speaker = fvaspeaker
     QRunnable.__init__(self)
Example #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
Example #26
0
 def __init__(self, url):
     QRunnable.__init__(self)
     self.url = url
Example #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()
Example #29
0
 def __init__(self, base, pid, multifiles):
     QRunnable.__init__(self)
     self.base = base
     self.pid = pid
     self.multifiles = multifiles
     self.signals = ScanWorkerSignals()
 def __init__(self, runnable, *args, **kwargs):
     QRunnable.__init__(self)
     self.signals = Signals()
     self.__runnable = runnable
     self.__args = args
     self.__kwargs = kwargs
Example #31
0
 def __init__(self, func, next_func):
     QRunnable.__init__(self)
     self.func = func
     self.next_func = next_func
Example #32
0
 def __init__(self, name):
     QRunnable.__init__(self)
     self.name = name