@Test
    public void RunHeursticsSimulator() throws Exception { 
        populateArray();
        
        System.out.format("\nPerfect Cache is %b, Perfect branch predictor is %b, width is %d\n\n",perfectCache,perfect_bpred,machWidth);
        
        for(int i=2; i<10; i++){
            traceName = traceNames[i];
            testTrace = traceName + ".trace.gz";
            
            String tracePath = "/project/cec/class/cse560/traces/" + testTrace;
            //String tracePath = "traces/" + testTrace;
            
            System.out.format("\n************Starting on trace %s.************\n",traceName);
            
            if (heuristic.type == HeuristicType.heuristic_ALL) {
                for (HeuristicType Looptype : HeuristicType.values())
                {
                    if(perfectCache){//if we have a perfect cache it makes no sense to run these heuristics
                        if(Looptype == HeuristicType.heuristic_LOAD_MISSED || Looptype == HeuristicType.heuristic_LOADS_FIRST_MISSED)
                            continue;
                    }
                    if (Looptype == HeuristicType.heuristic_ALL)
                        continue;
                    else
                    {
                        PerfSim sim = new PerfSim(tracePath, nPregs);
                        sim.uopLimit = 1000000000;
                        sim.machineWidth = machWidth;
                        sim.bpredPenalty = branchPen;
                        sim.latencyMultiplier = latencyMultiplier;
                        sim.heurType = heurType;
                        sim.perfect_bpred_f = perfect_bpred; 
                        sim.perfectCache_f = perfectCache;
                        sim.ROB.setMaxEntries(ROBsize);
                        heuristic.type = Looptype;
                        sim.heuristic = heuristic;
                        sim.simulate();
                    }
                    // setting back to all for next loop
                    heuristic.type = HeuristicType.heuristic_ALL;
                }
            }
            else
            {
                PerfSim sim = new PerfSim(tracePath, nPregs);
                sim.uopLimit = 1000000000;
                sim.machineWidth = machWidth;
                sim.cacheSz = cacheSz;
                sim.bpredPenalty = branchPen;
                sim.latencyMultiplier = latencyMultiplier;
                sim.heurType = heurType;
                sim.perfect_bpred_f = perfect_bpred; 
                sim.perfectCache_f = perfectCache;
                sim.ROB.setMaxEntries(ROBsize);
                sim.heuristic = heuristic;
                sim.simulate();
            }
            System.out.format("Done with trace %s.\n",traceName);
        }
    }