Esempio n. 1
0
 def __init__(self, parent=None):
     super(Main, self).__init__(parent)
     QMainWindow.__init__(self)
     self.setupUi(self)
     self.btnSetting.clicked.connect(self.open_server_settings_dialog)
     self.btnServerStart.clicked.connect(self.btn_server_start_pressed)
     self.btnServerStop.clicked.connect(self.btn_server_stop_pressed)
     self.btnServerStop.setEnabled(False)
     enviroments.init()
     configs.init()
# Import arima.py here
import numpy as np
import torch
import random
import math
from arima import Arima

import configs
configs.init()
'''
INFO:
    a) creates time series for AR orders from armin to armax and MA orders from mamin to mamax.
    b) roots of AR / MA polynomials are checked using eigenvalue methods, i.e. finding the eigenvalues of companion matrix. See Numerical Recipies in C - The Art of Scientific Computing, 2nd Edition, Chapter 9.5 Roots of Polynomials, page 375 Eigenvalue methods. See function 'checkCompanionMtrx'.
    c) Time series generated are stationary and invertible. The length of smallest root should be outside of unit circle. The boundary is set as an arbitrary small number 1.001, for numerical stability.
    d) Coefficients are selected based on algorithm by Beadle, E.R. and Djuric, P.M. in "Uniform random parameter generation of stable minimum-phase real ARMA(p,q) process". If the stationary/invertible condition is not statisfied, the process is repeated until stationary/invertible condition is satisfied.
    e) use multithreading to generate time series to speed up the process.
'''


class Dataset:
    def __init__(self):
        self.id = 0
        self.isregenerating = False
        self.armin = 0
        self.armax = 9
        self.mamin = 0
        self.mamax = 9
        self.lenmin = 1000
        self.lenmax = 1000
        self.batchsize = 100  # Initially 50. Set to 600 to reduce fluctuations
        self.nthreads = 7
Esempio n. 3
0
dash_log = logging.getLogger('Dash_Log')
dash_log.propagate = False
serverHandler = LoggingServerHandler('', PORT)
dash_log.addHandler(serverHandler)
dash_log.critical("Loaded Dash Log.")
log.debug("Using logging config file %s" % loggingConfigFile.name)

# Start Configurations
try:
	configFile = open('Configurations/robot.cfg')
except IOError:
	try:
		configFile = open('Configurations/robot.cfg.default')
	except:
		log.error("No config file could be opened.")
configs.init(configFile)
config = configs.get_config()
log.debug("Using config file %s" % configFile.name)

# Initialize modules #

# Sabertooth2x10
import sabertooth2x10 as saber
saber.init()
mc = saber.get_object()
# Laser Range Finder
import laser
laser.init()
lrf = laser.get_object()
lrf.clear()
# MCN