/* //simple case package multipath; public class LoadData { public static void loadData(){ //control parameters Multipath.maxNode=4; Multipath.maxPath=6; Multipath.maxServer=3; Multipath.nodes=new Node[Multipath.maxNode+1];//store all nodes Multipath.pathes=new Path[Multipath.maxPath+1];//store all pathes Multipath.servers=new Server[Multipath.maxServer+1];//store all servers Multipath.actSpeed=new double[Multipath.maxServer+1];//store actual speed from each server init(); } //init values public static void init(){ for(int i=1;i<=Multipath.maxNode;i++){ Multipath.nodes[i]=new Node(i); } Multipath.servers[1]=new Server(1,1.7); Multipath.servers[2]=new Server(2,9.4); Multipath.servers[3]=new Server(3,5.6); Multipath.pathes[1]=new Path(1,1.7,Multipath.servers[1],Multipath.nodes[1]); Multipath.pathes[2]=new Path(2,9.4,Multipath.servers[2],Multipath.nodes[1]); Multipath.pathes[3]=new Path(3,5.6,Multipath.servers[3],Multipath.nodes[1]); Multipath.pathes[4]=new Path(4,66,Multipath.nodes[1],Multipath.nodes[2]); Multipath.pathes[5]=new Path(5,86,Multipath.nodes[2],Multipath.nodes[3]); Multipath.pathes[6]=new Path(6,3.3,Multipath.nodes[3],Multipath.nodes[4]); Server.calcFatherNode(); Node.calcFatherNode(); } } */ //complicate case package multipath; public class LoadData { public static void loadData(){ //control parameters Multipath.maxNode=10; Multipath.maxPath=19; Multipath.maxServer=10; Multipath.nodes=new Node[Multipath.maxNode+1];//store all nodes Multipath.pathes=new Path[Multipath.maxPath+1];//store all pathes Multipath.servers=new Server[Multipath.maxServer+1];//store all servers Multipath.actSpeed=new double[Multipath.maxServer+1];//store actual speed from each server init(); } //init values public static void init(){ for(int i=1;i<=Multipath.maxNode;i++){ Multipath.nodes[i]=new Node(i); } Multipath.servers[1]=new Server(1,1.7); Multipath.servers[2]=new Server(2,9.4); Multipath.servers[3]=new Server(3,5.6); Multipath.servers[4]=new Server(4,0.446); Multipath.servers[5]=new Server(5,29); Multipath.servers[6]=new Server(6,0.286); Multipath.servers[7]=new Server(7,0.995); Multipath.servers[8]=new Server(8,7.1); Multipath.servers[9]=new Server(9,3.5); Multipath.servers[10]=new Server(10,7.8); Multipath.pathes[1]=new Path(1,1.7,Multipath.servers[1],Multipath.nodes[1]); Multipath.pathes[2]=new Path(2,9.4,Multipath.servers[2],Multipath.nodes[1]); Multipath.pathes[3]=new Path(3,5.6,Multipath.servers[3],Multipath.nodes[1]); Multipath.pathes[4]=new Path(4,0.446,Multipath.servers[4],Multipath.nodes[2]); Multipath.pathes[5]=new Path(5,29,Multipath.servers[5],Multipath.nodes[2]); Multipath.pathes[6]=new Path(6,0.286,Multipath.servers[6],Multipath.nodes[3]); Multipath.pathes[7]=new Path(7,0.995,Multipath.servers[7],Multipath.nodes[4]); Multipath.pathes[8]=new Path(8,7.1,Multipath.servers[8],Multipath.nodes[5]); Multipath.pathes[9]=new Path(9,3.5,Multipath.servers[9],Multipath.nodes[5]); Multipath.pathes[10]=new Path(10,7.8,Multipath.servers[10],Multipath.nodes[6]); Multipath.pathes[11]=new Path(11,66,Multipath.nodes[1],Multipath.nodes[8]); Multipath.pathes[12]=new Path(12,124,Multipath.nodes[2],Multipath.nodes[7]); Multipath.pathes[13]=new Path(13,130,Multipath.nodes[3],Multipath.nodes[7]); Multipath.pathes[14]=new Path(14,57,Multipath.nodes[4],Multipath.nodes[7]); Multipath.pathes[15]=new Path(15,41,Multipath.nodes[5],Multipath.nodes[7]); Multipath.pathes[16]=new Path(16,66,Multipath.nodes[6],Multipath.nodes[7]); Multipath.pathes[17]=new Path(17,44,Multipath.nodes[7],Multipath.nodes[8]); Multipath.pathes[18]=new Path(18,86,Multipath.nodes[8],Multipath.nodes[9]); Multipath.pathes[19]=new Path(19,10,Multipath.nodes[9],Multipath.nodes[10]); Server.calcFatherNode(); Node.calcFatherNode(); } }