def openDSS(): global load1,load2,load3,ph1,ph2,ph3 a = (807.0 + float(load1)) - (float(ph1)) b = (973.0 + float(load3)) - (float(ph2)) c = (1082.0 + float(load2)) - (float(ph3)) logging.debug('%s : %s : %s : %s : %s :%s : %s : %s :%s ' % (a,b,c,ph1,ph2,ph3,load1,load2,load3)) update = 'update b p storage post_storage %s %s 3 %s %s %s\n' % (time.time(),es_ID,a,b,c) logging.debug('sending to pipe %s'%update) pipe.send_sync_event(update.encode('UTF-8'),pipin)
def openDSS(info): line=info.split() time_sent = float(line[3]) ph1 = line[0] ph2 = line[1] ph3 = line[2] if time.time() - time_sent > 1.0: pass else: update = 'update b p storage post_storage %s %s 3 %s %s %s\n' % (time.time(),es_ID,ph1,ph2,ph3) logging.debug('sending to pipe') pipe.send_sync_event(update.encode('UTF-8'),pipin)
def openDSS(): global load1, load2, load3, ph1, ph2, ph3 a = (807.0 + float(load1)) - (float(ph1)) b = (973.0 + float(load3)) - (float(ph2)) c = (1082.0 + float(load2)) - (float(ph3)) logging.debug('%s : %s : %s : %s : %s :%s : %s : %s :%s ' % (a, b, c, ph1, ph2, ph3, load1, load2, load3)) update = 'update b p storage post_storage %s %s 3 %s %s %s\n' % ( time.time(), es_ID, a, b, c) logging.debug('sending to pipe %s' % update) pipe.send_sync_event(update.encode('UTF-8'), pipin)
def openDSS(info): line = info.split() time_sent = float(line[3]) ph1 = line[0] ph2 = line[1] ph3 = line[2] if time.time() - time_sent > 1.0: pass else: update = 'update b p storage post_storage %s %s 3 %s %s %s\n' % ( time.time(), es_ID, ph1, ph2, ph3) logging.debug('sending to pipe') pipe.send_sync_event(update.encode('UTF-8'), pipin)
def request_data(): update = ('update b p pre_pmu post_pmu %s a1 0\n'% time.time()) pipe.send_sync_event(update.encode('UTF-8'), pipin)
def get_val(): update = 'update b p pre_gen_report post_gen_report %s %s 1 mon_wind_gen\n' %(time.time(),Gen_ID) pipe.send_sync_event(update.encode('UTF-8'), pipin)
def get_val(): update = 'update b p monitor_1 post_monitor_1 %s %s 1 mon_wind_gen\n' %(time.time(),Gen_ID) pipe.send_sync_event(update.encode('UTF-8'), pipin)
def send_netCoord(val1, val2, val3): update = 'update b p storage post_storage %s %s 3 %s %s %s\n' % ( time.time(), Es_ID, val1, val2, val3) pipe.send_sync_event(update.encode('UTF-8'), pipin)
def send_netCoord(): update = 'update n p fault post_fault %s %s 3 1 b24 a\n' %(time.time(),Fault_ID) pipe.send_sync_event(update.encode('UTF-8'), pipin)
def send_netCoord(val): update = 'update n p controllable_generator post_controllable_generator %s %s 1 %s\n' % ( time.time(), Gen_ID, val) pipe.send_sync_event(update.encode('UTF-8'), pipin)
def postprocess_event(event): pipe.send_sync_event('%s \n' % event, pipe_host)
def send_netCoord(val): update = 'update n p controllable_generator post_controllable_generator %s %s 1 %s\n' %(time.time(),Gen_ID, val) pipe.send_sync_event(update.encode('UTF-8'), pipin)
def send_netCoord(val): update = 'update n p controllable_load post_controllable_load %s %s 1 %s\n' %(time.time(),Load_ID, val) pipe.send_sync_event(update.encode('UTF-8'), pipin)
def send_netCoord(val1, val2, val3): update = 'update b p storage post_storage %s %s 3 %s %s %s\n' %(time.time(),Es_ID, val1, val2, val3) pipe.send_sync_event(update.encode('UTF-8'), pipin)
def get_val(): update = 'update b p pre_load_report post_load_report %s %s 0\n' % ( time.time(), Load_ID) pipe.send_sync_event(update.encode('UTF-8'), pipin)
def send_netCoord(): update = 'update b p monitor_1 post_monitor_1 %s %s 0 \n' %(time.time(),Mon_ID) pipe.send_sync_event(update.encode('UTF-8'), pipin)
def get_val(): update = 'update b p pre_gen_report post_gen_report %s %s 1 mon_wind_gen\n' % ( time.time(), Gen_ID) pipe.send_sync_event(update.encode('UTF-8'), pipin)
def send_netCoord(val): update = 'update n p controllable_load post_controllable_load %s %s 1 %s\n' % ( time.time(), Load_ID, val) pipe.send_sync_event(update.encode('UTF-8'), pipin)
def get_val(): update = 'update b p get_load_value post_get_load_value %s %s 0\n' %(time.time(),Load_ID) pipe.send_sync_event(update.encode('UTF-8'), pipin)