From: <bro...@us...> - 2008-03-13 05:07:38
|
Revision: 150 http://gridsim.svn.sourceforge.net/gridsim/?rev=150&view=rev Author: brobergj Date: 2008-03-12 22:07:42 -0700 (Wed, 12 Mar 2008) Log Message: ----------- Minor updates Modified Paths: -------------- branches/gridsim4.0-branch2/examples/FlowNetEx01/FlowNetEx01.java Modified: branches/gridsim4.0-branch2/examples/FlowNetEx01/FlowNetEx01.java =================================================================== --- branches/gridsim4.0-branch2/examples/FlowNetEx01/FlowNetEx01.java 2008-03-12 06:53:08 UTC (rev 149) +++ branches/gridsim4.0-branch2/examples/FlowNetEx01/FlowNetEx01.java 2008-03-13 05:07:42 UTC (rev 150) @@ -38,15 +38,17 @@ // before creating any entities. We can't run this example without // initializing GridSim first. We will get run-time exception // error. - int num_user = 1; // number of grid users + int num_user = 4; // number of grid users Calendar calendar = Calendar.getInstance(); boolean trace_flag = false; // mean trace GridSim events // Initialize the GridSim package without any statistical // functionalities. Hence, no GridSim_stat.txt file is created. System.out.println("Initializing GridSim package"); + + // It is essential to set the network type before calling GridSim.init() + GridSim.initNetworkType(GridSimTags.NET_FLOW_LEVEL); GridSim.init(num_user, calendar, trace_flag); - GridSim.initNetworkType(GridSimTags.NET_FLOW_LEVEL); // In this example, the topology is: // user(s) --10Mb/s-- r1 --1.5Mb/s-- r2 --10Mb/s-- GridResource(s) @@ -65,8 +67,8 @@ String receipient2 = "test2"; // these entities are the senders - FlowNetUser user1 = new FlowNetUser(sender1, receipient2, 0.0); - FlowNetUser user2 = new FlowNetUser(sender2, receipient1, 10.0); + FlowNetUser user1 = new FlowNetUser(sender1, receipient2, 5.0); + FlowNetUser user2 = new FlowNetUser(sender2, receipient1, 20.0); // these entities are the receipients FlowTest test1 = new FlowTest(receipient1, sender2); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |