public static void main(String[] args) {
        System.out.println("Starting " + ARExample01.class.getSimpleName());
        try {
            // First step: Initialises the GridSim package.
            int num_user = 1;    // number of user entities
            boolean trace_flag = false;  // true means trace GridSim events

            // Gets the current time as the init simulation time.
            Calendar calendar = Calendar.getInstance();
        
            // Initialise GridSim
            GridSim.init(num_user, calendar, trace_flag);

            //------------------------------------------------
            // Second step: Creates GridResource objects, given resource 
            // name, total PE, number of Machine, time zone and MIPS rating. 
            GridResource resource1 = 
            	createGridResource("Resource_1", 13, 1, 10.0, 684); 
                                            
            //------------------------------------------------
            // Third step: Creates grid users
            ARUser[] userList = new ARUser[num_user];
            ARUser user = null;        // a user entity
            double bandwidth = 1000;   // bandwidth of this user
            int totalJob = 0;          // total Gridlets owned
            int i = 0;
            
            // a loop that creates a user entity
            for (i = 0; i < num_user; i++) {
                // users with an even number have their time zone to GMT+8     
                if (i % 2 == 0) {
                    totalJob = 4;
                }
                
                // users with an odd number have their time zone to GMT-3     
                else {
                    totalJob = 5;
                }
                
                // creates a user entity
                user = new ARUser("User_" + i, bandwidth, totalJob); 

                // put the entity into an array
                userList[i] = user;
            }
            
            boolean debug = true;
            
            // Start Gridsim in debug mode
            GridSim.startGridSimulation(debug);

            if(!debug) {
	            //------------------------------------------------
	            // Final step: Prints the Gridlets when this simulation is over
	            GridletList newList = null;
	            for (i = 0; i < num_user; i++) {
	                user = userList[i];    
	                newList = user.getGridletList();
	                printGridletList( newList, user.get_name() );
	            }
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }