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.0); Multipath.servers[2]=new Server(2,9.0); Multipath.servers[3]=new Server(3,5.0); 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,13.3,Multipath.nodes[3],Multipath.nodes[4]); Server.calcFatherNode(); Node.calcFatherNode(); } }