'purgload': { 'primaries': [ WriteParam(name='frmbus', read_param='NUMBER', base_param=read_param_dict['NUMBER']), WriteParam(name='id', read_param='ID', base_param=read_param_dict['ID']) ], 'writables': [] } } fns = [ PSSE_Fn( 'load_data_3', make_param_dict(fn_param_dict['load_data_3']['primaries']), make_param_dict(fn_param_dict['load_data_3']['writables']), ) ] del_fn = [ PSSE_Fn( 'purgload', make_param_dict(del_params['purgload']['primaries']), make_param_dict(del_params['purgload']['writables']), ) ] load_elem = Element("load", ('NUMBER', 'ID'), read_param_dict, slurp_flags, fns, del_fn[0])
'purgshunt': { 'primaries': [ WriteParam(name='frmbus', read_param='NUMBER', base_param=read_param_dict['NUMBER']), WriteParam(name='id', read_param='ID', base_param=read_param_dict['ID']) ], 'writables': [] } } fns = [ PSSE_Fn( 'shunt_data', make_param_dict(fn_param_dict['shunt_data']['primaries']), make_param_dict(fn_param_dict['shunt_data']['writables']), ) ] del_fn = [ PSSE_Fn( 'purgshunt', make_param_dict(del_params['purgshunt']['primaries']), make_param_dict(del_params['purgshunt']['writables']), ) ] fxshunt_elem = Element("fxshunt", ('NUMBER', 'ID'), read_param_dict, slurp_flags, fns, del_fn[0])
base_param=read_param_dict['OWNER'] ), WriteParam(name='realar1', read_param='BASE', base_param=read_param_dict['BASE'] ), # WriteParam(name='realar2', # read_param='PU', # base_param=read_param_dict['PU'] # ), # WriteParam(name='realar3', # read_param='ANGLED', # base_param=read_param_dict['ANGLED'] # ), ] write_primary_dict = make_param_dict(write_primary_list) write_param_dict = make_param_dict(write_param_list) fns = [PSSE_Fn(name='bus_data_3', prim_ordered_dict=write_primary_dict, write_ordered_dict=write_param_dict, ) ] bus_elem = Element('bus', ('NUMBER',), read_param_dict, slurp_flags, fns) if __name__ == "__main__": print bus_elem
data_type='real', trns_fn=get_real, base_param=read_param_dict['COMPRX'] ), WriteParam(name='realari12', read_param='COMPRX', data_type='real', trns_fn=get_imag, base_param=read_param_dict['COMPRX'] ), # WriteParam(name='realari13', # read_param='None', # base_param=read_param_dict['None'] # ) ] } } del_params = None fns = [ PSSE_Fn('three_wnd_winding_data_3', make_param_dict(fn_param_dict['three_wnd_winding_data_3']['primaries']), make_param_dict(fn_param_dict['three_wnd_winding_data_3']['writables']), ) ] del_fn = None wnd_elem = Element("wnd", ('WIND1NUMBER', 'WIND2NUMBER', 'WIND3NUMBER', 'ID', 'WNDNUM'), read_param_dict, slurp_flags, fns, )
del_params = { 'purgsws':{ 'primaries':[ WriteParam(name='frmbus', read_param='NUMBER', base_param=read_param_dict['NUMBER'] ) ], 'writables':[ ] } } fns = [ PSSE_Fn('switched_shunt_data_3', make_param_dict(fn_param_dict['switched_shunt_data_3']['primaries']), make_param_dict(fn_param_dict['switched_shunt_data_3']['writables']), ) ] del_fn = [ PSSE_Fn('purgsws', make_param_dict(del_params['purgsws']['primaries']), make_param_dict(del_params['purgsws']['writables']), ) ] swsh_elem = Element("swsh", ('NUMBER',), read_param_dict, slurp_flags, fns, del_fn[0])
read_param='FROMNUMBER', base_param=read_param_dict['FROMNUMBER']), WriteParam(name='tobus', read_param='TONUMBER', base_param=read_param_dict['TONUMBER']), WriteParam(name='ckt', read_param='ID', base_param=read_param_dict['ID']) ], 'writables': [] } } fns = [ PSSE_Fn( 'branch_data', make_param_dict(fn_param_dict['branch_data']['primaries']), make_param_dict(fn_param_dict['branch_data']['writables']), ) ] del_fn = [ PSSE_Fn( 'purgbrn', make_param_dict(del_params['purgbrn']['primaries']), make_param_dict(del_params['purgbrn']['writables']), ) ] brn_elem = Element("brn", ('FROMNUMBER', 'TONUMBER', 'ID'), read_param_dict, slurp_flags, fns, del_fn[0])
} del_params = { 'purgplnt': { 'primaries': [ WriteParam(name='frmbus', read_param='NUMBER', base_param=read_param_dict['NUMBER']) ], 'writables': [] } } fns = [ PSSE_Fn( 'plant_data', make_param_dict(fn_param_dict['plant_data']['primaries']), make_param_dict(fn_param_dict['plant_data']['writables']), ) ] del_fn = [ PSSE_Fn( 'purgplnt', make_param_dict(del_params['purgplnt']['primaries']), make_param_dict(del_params['purgplnt']['writables']), ) ] genbus_elem = Element("genbus", ('NUMBER', ), read_param_dict, slurp_flags, fns, del_fn[0])