How to create multiple Hosts with different MIPS values

  • int hostCount = 4;
    double[] mips = new double[hostCount]; //create an array of MIPS values
    mips[0] = 1000;
    mips[1] = 2000;
    mips[2] = 4000;
    mips[3] = 8000;
    List[] peList = new List[hostCount]; //create an array for storing the pelist of each MIPS value
    List <Pe> pelist1 = new ArrayList<> ();
    List <Pe> pelist2 = new ArrayList<> ();
    List <Pe> pelist3 = new ArrayList<> ();
    List <Pe> pelist4 = new ArrayList<> ();
    PeProvisionerSimple pep;
    pelist1.add(new Pe(0, new PeProvisionerSimple(mips[0])));
    peList[0] = pelist1;
    pelist2.add(new Pe(0, new PeProvisionerSimple(mips[1])));
    peList[1] = pelist2;
    pelist3.add(new Pe(0, new PeProvisionerSimple(mips[2])));
    peList[2] = pelist3;
    pelist4.add(new Pe(0, new PeProvisionerSimple(mips[3])));
    peList[3] = pelist4;
    int pecount = 1;
    int ram = 2048;
    long storage = 1000000;
    long bw = 10000;
    RamProvisionerSimple rram = new RamProvisionerSimple(ram);
    BwProvisionerSimple bband = new BwProvisionerSimple(bw);
    for(int i=0; i < hostCount; i++){
    Host nph = new Host(i, rram, bband, storage, peList[i], new VmSchedulerTimeShared(peList[i]));
    hostList.add(nph);
    }