INITIALIZATION

First, we define a couple of variables needed for initialization.

DataGIS gis = null;
ExampleUser user = null;
TopRegionalRC rc = null; int num_user = 1;   // number of grid users
Calendar calendar = Calendar.getInstance();
boolean trace_flag = false;  // means do not trace GridSim events
boolean gisFlag = false;      // use DataGIS instead of ordinary GIS

Second, we initialize the GridSim engine.

GridSim.init(num_user, calendar, trace_flag, gisFlag);

By default, GridSim initializes a normal GridInformation system, but for Data Grid simulations we need to define a DataGIS, which can handle some specific requests of a Data Grid.

try {
     gis = new DataGIS();
     GridSim.setGIS(gis);
catch (Exception e) {
     e.printStackTrace();
}