public static void main(String[] args)
    {
        long startTime = System.currentTimeMillis();
        if(args.length == 0){
        	System.out.println("Please provide the location of the trace files (Workload_trace_filename FTA_Path)!");
        	System.exit(1);
        }
        
        try {
        	
            String Work_fileName = args[0];
            String FTA_Path = args[1];
            String FTA_event_fileName = FTA_Path + "/event_trace.tab";
            String FTA_platform_fileName = FTA_Path + "/platform.tab";
            String FTA_node_fileName = FTA_Path + "/node.tab";
            double TraceStartTime = 0;

            // number of grid user entities + any Workload entities.
            int num_user = 1;
            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");
            GridSim.init(num_user, calendar, trace_flag);
            
            ResourceFileReader res = new ResourceFileReader(FTA_platform_fileName, FTA_node_fileName);
            //////////////////////////////////////////
            // As in the Gridsim, the failure is defined in the level of Machine, we
            // consider a resource of X machines with one PE
            //
            // Creates one GridResource entity
            int rating = 377;       				// rating of each PE in MIPS
            int totalPE = 1;        				// total number of PEs for each Machine
            int totalMachine = res.getNodeNum();   	// total number of Machines

            String resName = res.getPlatformName();
            
            GridResource resource = createGridResource(resName, rating, totalMachine, totalPE);
            
            //////////////////////////////////////////
            // Creates an event list.
            FailureFileReader failure = new FailureFileReader(FTA_event_fileName, TraceStartTime);     
            FailureGenerator failure_list = new FailureGenerator("Failure_1", resource.get_name(), failure);

            //////////////////////////////////////////
            // Creates a Workload trace entity.
            WorkloadFileReader model = new WorkloadFileReader(Work_fileName, rating);
            Workload workload = new Workload("Load_1", resource.get_name(), model);

            //////////////////////////////////////////
            // Starts the simulation in debug mode
            boolean debug = false;
            GridSim.startGridSimulation(debug);

            if(!debug) {
	            long finishTime = System.currentTimeMillis();
	            System.out.println("The simulation took " + (finishTime - startTime) + " milliseconds");
            }
            
            // prints the Gridlets inside a Workload entity
            ArrayList<Gridlet> newList = workload.getGridletList();
            printGridletList(newList);


        }       
        catch (Exception e) {
        e.printStackTrace();
        }
    }