From: <sul...@us...> - 2007-08-22 08:08:46
|
Revision: 29 http://gridsim.svn.sourceforge.net/gridsim/?rev=29&view=rev Author: sulistio Date: 2007-08-22 01:08:48 -0700 (Wed, 22 Aug 2007) Log Message: ----------- fix some minor mistakes in the examples/ directory Modified Paths: -------------- trunk/examples/DataGrid/example1/DataExample1.java trunk/examples/DataGrid/example2/DataExample2.java trunk/examples/DataGrid/example3/DataGridletExample.java trunk/examples/DataGrid/tutorial/creatingResources.html trunk/examples/Example10/ARTest.java trunk/examples/Example10/README.txt Modified: trunk/examples/DataGrid/example1/DataExample1.java =================================================================== --- trunk/examples/DataGrid/example1/DataExample1.java 2007-08-22 02:42:56 UTC (rev 28) +++ trunk/examples/DataGrid/example1/DataExample1.java 2007-08-22 08:08:48 UTC (rev 29) @@ -38,7 +38,7 @@ int num_user = 1; // number of grid users Calendar calendar = Calendar.getInstance(); boolean trace_flag = false; // means trace GridSim events - boolean gisFlag = true; // means using DataGIS instead + boolean gisFlag = false; // means using DataGIS instead GridSim.init(num_user, calendar, trace_flag, gisFlag); // set the GIS into DataGIS that handles specifically for data grid Modified: trunk/examples/DataGrid/example2/DataExample2.java =================================================================== --- trunk/examples/DataGrid/example2/DataExample2.java 2007-08-22 02:42:56 UTC (rev 28) +++ trunk/examples/DataGrid/example2/DataExample2.java 2007-08-22 08:08:48 UTC (rev 29) @@ -37,7 +37,7 @@ int num_user = 1; // number of grid users Calendar calendar = Calendar.getInstance(); boolean trace_flag = false; // means trace GridSim events - boolean gisFlag = true; // means using DataGIS instead + boolean gisFlag = false; // means using DataGIS instead GridSim.init(num_user, calendar, trace_flag, gisFlag); // set the GIS into DataGIS that handles specifically for data grid Modified: trunk/examples/DataGrid/example3/DataGridletExample.java =================================================================== --- trunk/examples/DataGrid/example3/DataGridletExample.java 2007-08-22 02:42:56 UTC (rev 28) +++ trunk/examples/DataGrid/example3/DataGridletExample.java 2007-08-22 08:08:48 UTC (rev 29) @@ -27,7 +27,7 @@ * initializes all the entities, which are the same as in the other datagrid * examples. The DataGridlet management is implemented in the class GridletUser. * - * @author Uros Cibej and Anthony Sulistion + * @author Uros Cibej and Anthony Sulistio */ public class DataGridletExample { public static void main(String[] args) { @@ -41,7 +41,7 @@ int num_user = 1; // number of grid users Calendar calendar = Calendar.getInstance(); boolean trace_flag = false; // means trace GridSim events - boolean gisFlag = true; // means using DataGIS instead + boolean gisFlag = false; // means using DataGIS instead GridSim.init(num_user, calendar, trace_flag, gisFlag); // set the GIS into DataGIS that handles specifically for data grid Modified: trunk/examples/DataGrid/tutorial/creatingResources.html =================================================================== --- trunk/examples/DataGrid/tutorial/creatingResources.html 2007-08-22 02:42:56 UTC (rev 28) +++ trunk/examples/DataGrid/tutorial/creatingResources.html 2007-08-22 08:08:48 UTC (rev 29) @@ -166,7 +166,7 @@ - <font color="#000000">gridRes.setLocalRC</font><font color="#000000">()</font><font color="#000000">;<br> + <font color="#000000">gridRes.createLocalRC</font><font color="#000000">()</font><font color="#000000">;<br> </font></code><code><font color="#3f7f5f">//set the higher level</font></code><br> @@ -691,7 +691,8 @@ - <font color="#ffffff"> </font><font color="#000000">gridRes.setLocalRC</font><font color="#000000">()</font><font color="#000000">;</font><br> + <font + color="#ffffff"> </font><font color="#000000">gridRes.createLocalRC</font><font color="#000000">()</font><font color="#000000">;</font><br> Modified: trunk/examples/Example10/ARTest.java =================================================================== --- trunk/examples/Example10/ARTest.java 2007-08-22 02:42:56 UTC (rev 28) +++ trunk/examples/Example10/ARTest.java 2007-08-22 08:08:48 UTC (rev 29) @@ -7,7 +7,7 @@ * * NOTE: The values used from this example are taken from the GridSim paper. * http://www.gridbus.org/gridsim/ - * $Id: ARTest.java,v 1.2 2004/05/31 04:53:33 anthony Exp $ + * $Id: ARTest.java,v 1.3 2007/08/10 02:35:40 anthony Exp $ */ import java.util.*; @@ -27,7 +27,6 @@ { private GridletList list_; // a list containing new Gridlets private GridletList receiveList_; // a list containing completed Gridlets - private double timeZone_; // time zone of this user entity private int failReservation_; // number of reservations failed // time constant values @@ -51,9 +50,8 @@ public ARTest(String name, double baud_rate, double timeZone, int totalJob) throws Exception { - super(name, baud_rate); + super(name, baud_rate, timeZone); this.receiveList_ = new GridletList(); - this.timeZone_ = timeZone; this.failReservation_ = 0; // create Gridlets @@ -196,7 +194,8 @@ time = 0; // immediate reservation } else { - time = cal.getTimeInMillis() + (1*DAY*MILLI_SEC) + duration; + time = cal.getTimeInMillis() + (1*DAY*MILLI_SEC) + + (duration*MILLI_SEC); } // creates a new or immediate reservation @@ -268,6 +267,7 @@ // add the Gridlet into a list list.add(gridlet); + gridlet.setUserID(userID); } return list; Modified: trunk/examples/Example10/README.txt =================================================================== --- trunk/examples/Example10/README.txt 2007-08-22 02:42:56 UTC (rev 28) +++ trunk/examples/Example10/README.txt 2007-08-22 08:08:48 UTC (rev 29) @@ -2,7 +2,7 @@ /** * Author: Anthony Sulistio * Date: May 2004 - * $Id: README.txt,v 1.3 2004/11/01 02:10:39 anthony Exp $ + * $Id: README.txt,v 1.4 2007/08/10 02:35:23 anthony Exp $ */ Welcome to the 10th Example of how to use GridSim package. @@ -15,32 +15,23 @@ To run the class file: In Unix/Linux: - java -classpath $GRIDSIM/jars/gridsim.jar:. Example10 + java -classpath $GRIDSIM/jars/gridsim.jar:. Example10 In Windows: java -classpath %GRIDSIM%\jars\gridsim.jar;. Example10 - -NOTE: This example uses Java Random class to select a resource entity to + +NOTE: This example uses Java Random class to select a resource entity to process a Gridlet. Hence, when running this example many times, the values are different. When running the example file, it will produce the following files: - stat.txt -> created by GridSim 2.1, now being replaced by GridSim_stat.txt - - GridSim_stat.txt -> created by the GridSim verson 2.2 onwards - during GridSim.init() to create - GridStatistics object for statistical purposes. In this example, we - recorded the event of receiving ResourceCharacteristics object, as well - as sending/receiving Gridlets. - For more detailed explanations, please read this file. - tracefile -> created by SimJava 1.2, now being replaced by sim_trace NOTE: GridSim 2.1 uses SimJava 1.2 package GridSim 2.2 onwards use SimJava2 package - + sim_trace -> created by the SimJava2 package (lower-level) to trace every events (performed by SimJava and GridSim) during the simulation. We don't need to worry about this file. Not to important for our @@ -51,7 +42,6 @@ running this experiment. We don't need to worry about this file. Not to important for our example. -NOTE: When you run the program multiple times, new data generated from - simulation will be appended at the end of "GridSim_stat.txt". - However, "sim_trace" and "sim_report" file will be overwritten. +NOTE: When you run the program multiple times, + "sim_trace" and "sim_report" file will be overwritten. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |