Friday, 15 January 2010

parsing - Reading .sol file to skim out relevant information -



parsing - Reading .sol file to skim out relevant information -

i have .sol file @ hand , read relevant info out of it. next lines part of .sol file. file represents variables z,x,f. number follows z request id. now, numbers follow x explained below. first number next _ request id, sec number virtual node number , final number physical node on embedded. incase of f, first number requestid, sec edgeid, numbers in first () represent virtual border , numbers in sec () represent physical edge. want write function take these values , create .xml file enable improve reading of required info , can re-used efficiently. problem i'm having i'm unable read them , sort them out accordingly. hence, thought of asking guys help.

thank

z_0 1.000000 x_0_0_1 1.000000 x_0_1_5 1.000000 x_0_2_20 1.000000 x_0_3_21 1.000000 x_0_4_8 1.000000 f_0_0(0,1)_(1,5) 1.000000 f_0_1(1,2)_(5,9) 1.000000 f_0_1(1,2)_(9,20) 1.000000 f_0_2(2,3)_(2,21) 1.000000 f_0_2(3,2)_(2,22) 1.000000 f_0_2(2,3)_(20,22) 1.000000 f_0_3(4,3)_(8,10) 1.000000 f_0_3(3,4)_(0,10) 1.000000 f_0_3(4,3)_(0,14) 1.000000 f_0_3(4,3)_(14,21) 1.000000 z_1 1.000000 x_1_0_16 1.000000 x_1_1_6 1.000000 x_1_2_13 1.000000 x_1_3_0 1.000000 x_1_4_25 1.000000 x_1_5_15 1.000000 x_1_6_19 1.000000 f_1_0(1,0)_(6,16) 1.000000 f_1_1(0,2)_(6,11) 1.000000 f_1_1(0,2)_(11,13) 1.000000 f_1_1(2,0)_(6,16) 1.000000 f_1_2(3,1)_(0,6) 1.000000 f_1_3(2,4)_(13,25) 1.000000 f_1_4(5,4)_(15,25) 1.000000 f_1_5(3,6)_(0,1) 1.000000 f_1_5(3,6)_(1,18) 1.000000 f_1_5(3,6)_(18,19) 1.000000

parsing python-2.7 readline

No comments:

Post a Comment