evalgo.algorithms
Class IterativeSmarterPolynomialAlgorithm

java.lang.Object
  extended byevalgo.algorithms.AbstractAlgorithm
      extended byevalgo.algorithms.IterativeSmarterPolynomialAlgorithm

public class IterativeSmarterPolynomialAlgorithm
extends AbstractAlgorithm


Field Summary
(package private)  double avgMemPerComp
           
(package private)  double avgMemPerHost
           
 double compFreqFactor
           
 double compMemFactor
           
(package private)  double[] historyAvail
           
 double hostMemFactor
           
 double hostRelFactor
           
(package private)  int numIterations
           
(package private)  int numOfMappedComps
           
(package private)  int numOfMappedHosts
           
 
Fields inherited from class evalgo.algorithms.AbstractAlgorithm
avail, id, idealAvail, optimalMapping
 
Constructor Summary
IterativeSmarterPolynomialAlgorithm(int en, int ka, int numIt)
           
 
Method Summary
 AlgorithmResult execute()
           
 int findMax(double[] a, int length)
           
 double findMaxFreqOfComps()
           
 double findMaxFreqOfUnmappedComps(int[] currentlyMapped)
           
 double findMaxMemOfUnmappedComps(int[] currentlyMapped)
           
 double findMaxMemOfUnmappedHosts(int[] currentlyMappedHosts)
           
 double findMaxRelOfHosts()
           
 double findMaxRelOfUnmappedHosts(int[] currentlyMappedHosts)
           
 int findMin(double[] a, int length)
           
private  int findNextBestComp(int[] currentlyMapped, double maxMem, int currentHost, int[] previousMapping)
           
private  int findNextBestHost(int[] currentlyMappedHosts)
           
 
Methods inherited from class evalgo.algorithms.AbstractAlgorithm
calculateAvailability, calculateAvgCompMem, calculateAvgHostMem, calculateAvgRelBetweenHosts, estimateOptimal, estimateRedeploymentTime, ideal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

hostRelFactor

public double hostRelFactor

hostMemFactor

public double hostMemFactor

compFreqFactor

public double compFreqFactor

compMemFactor

public double compMemFactor

numOfMappedHosts

int numOfMappedHosts

numOfMappedComps

int numOfMappedComps

avgMemPerComp

double avgMemPerComp

avgMemPerHost

double avgMemPerHost

numIterations

int numIterations

historyAvail

double[] historyAvail
Constructor Detail

IterativeSmarterPolynomialAlgorithm

public IterativeSmarterPolynomialAlgorithm(int en,
                                           int ka,
                                           int numIt)
Method Detail

execute

public AlgorithmResult execute()
Specified by:
execute in class AbstractAlgorithm

findNextBestComp

private int findNextBestComp(int[] currentlyMapped,
                             double maxMem,
                             int currentHost,
                             int[] previousMapping)

findNextBestHost

private int findNextBestHost(int[] currentlyMappedHosts)

findMaxFreqOfComps

public double findMaxFreqOfComps()

findMaxRelOfHosts

public double findMaxRelOfHosts()

findMaxFreqOfUnmappedComps

public double findMaxFreqOfUnmappedComps(int[] currentlyMapped)

findMaxMemOfUnmappedComps

public double findMaxMemOfUnmappedComps(int[] currentlyMapped)

findMaxRelOfUnmappedHosts

public double findMaxRelOfUnmappedHosts(int[] currentlyMappedHosts)

findMaxMemOfUnmappedHosts

public double findMaxMemOfUnmappedHosts(int[] currentlyMappedHosts)

findMax

public int findMax(double[] a,
                   int length)

findMin

public int findMin(double[] a,
                   int length)