import java.util.*; public class Proc{ // static final int MAXPROCS = 10; int id; double cpu; /* performance in GHz */ double bw; double[] links; /* bandwidth of the network card in Gbps */ ArrayList downloads; // ArrayList downloads; ArrayList holds; MyArrayList assignedOperators; MyArrayList children; MyArrayList fathers; int cost; double actSumCPU; /* stores sum (w_i/s_u)*rhomax of the nodes i already assigned on proc u */ double bwUsage; /* stores the actual known used bw of the network card , the un-known values are replaced by mean-values*/ /* the mean values can be replaced afterwards, using the variables meanCommleft and meanCommRight in the operator object */ public Proc(int id) { this.id = id; } public Proc(int id, double cpu, double bw, int cost) { this.id = id; this.cpu = cpu; this.bw = bw; assignedOperators = new MyArrayList(); // downloads = new ArrayList(); holds = new ArrayList(); children = new MyArrayList(); fathers = new MyArrayList(); downloads = new ArrayList(); this.actSumCPU = 0; this.bwUsage = 0; this.cost = cost; } public Proc(int id, double cpu, double bw, double[] bwLinks, int cost) { this.id = id; this.cpu = cpu; this.bw = bw; this.links = new double[bwLinks.length]; for (int i = 0; i(); // downloads = new ArrayList(); holds = new ArrayList(); children = new MyArrayList(); fathers = new MyArrayList(); downloads = new ArrayList(); this.actSumCPU = 0; this.bwUsage = 0; this.cost = cost; } public void setLinks(double[] bwLinks) { this.links = new double[bwLinks.length]; for (int i = 0; i