def __init__(self, netlist, tspice, sync_obj): """Constructor.""" # Create sync object, and set debug and simulation path self.sync_obj = sync_obj self.DEBUG = self.sync_obj.getDebug( "Tanner") or self.sync_obj.getDebug("all") self.sync_obj.appendToSimulationPath("Tanner") if self.DEBUG: print('Running Tanner...') Simulator.__init__(self, netlist=netlist, sync_obj=sync_obj) # Netlist path of circuit to be simulated. self.netlist = netlist # tspice path self.tspice = tspice # Output simulation waves. Each key corresponds to a different wave. self.waves = None pass
def __init__(self, budget, unitPrice): Simulator.__init__(self, budget, unitPrice) self.Kp = - 100 / (budget * 0.25) self.Ki = -7 self.OUTPUT_NAME = 'output2.csv' self.INTEGRAL_OFFSET_RATIO = 0.01 self.errorIntegral = 0 # INTEGRAL 에러 누적으로 windup 방지를 위해 만듦 self.INTEGRAL_ERROR_LIMIT = 1
def __init__(self, budget, unitPrice): Simulator.__init__(self, budget, unitPrice) self.Kp = - 100 / (budget * 0.25) self.Ki = -5 self.Kd = 10 / (unitPrice * 50) if self.budget < unitPrice * 10000: self.Kp = -100 / (budget * 0.999) self.Kd = 30 / (unitPrice * 20) self.OUTPUT_NAME = 'output3.csv' self.INTEGRAL_OFFSET_RATIO = 0.01 self.errorIntegral = 0 # INTEGRAL 에러 누적으로 windup 방지를 위해 만듦 self.INTEGRAL_ERROR_LIMIT = 1
def __init__(self, netlist, wave_names, DEBUG=False): """Constructor.""" if DEBUG: print('Running Tanner...') Simulator.__init__(self, netlist=netlist) # Netlist of circuit to be simulated. self.netlist = netlist # Output simulation waves. Each key corresponds to a different wave. self.waves = None pass