public void setResourceParameter(int resourceID, double cost)
    {
        Resource res = new Resource();
        res.resourceId = resourceID;
        res.costPerSec = cost;
        res.resourceName = GridSim.getEntityName(resourceID);

        // add into a list if moving to a new grid resource
        resList_.add(res);

        if (index_ == -1 && record_)
        {
            write("Allocates this Gridlet to " + res.resourceName +
                  " (ID #" + resourceID + ") with cost = $" + cost + "/sec");
        }
        else if (record_)
        {
            int id = resList_.get(index_).resourceId;
            String name = resList_.get(index_).resourceName;
            write("Moves Gridlet from " + name + " (ID #" + id + ") to " +
                  res.resourceName + " (ID #" + resourceID +
                  ") with cost = $" + cost + "/sec");
        }

        index_++;  // initially, index_ = -1
    }