Class Classical

java.lang.Object
  extended byClassical

public class Classical
extends java.lang.Object

Classical class provides methods to create entities, link them and finally to run the simulations. Resource Allocation Protocols supported are Round Robin, and Continous Double Auction


Field Summary
static int Allocation_Type
           
static CResource[] allResource
          Array of resources of size 10000, For simulations involving more than 10000 resources redefine array with bigger size
static Scheduler[] allScheduler
          To be used in future version
static CUser[] allUser
          Array of users of size 10000, For simulations involving more than 10000 users redefine array with bigger size
static int count_resources
          reflects number of available resources
static int count_users
          reflects number of active users
static double delay
          Used to assign Network Latency to entities
static int Num_Of_Resources
           
static int Num_Of_Users
           
static int TotalTasks
           
static double TotalWork
          Total Work of all users
 
Constructor Summary
Classical()
          Creates a new instance of Classical
 
Method Summary
static void addUser(java.lang.String Name, double totwork, double time, double money, int tasks)
          Creates a user with attributes as passed in parameters
static void addUser(java.lang.String Name, double totwork, double money, int tasks)
          Creates a user with attributes as passed in parameters
static void CreateGroup(int members, int ProcessingPower, double rate)
          Creates resources equal to members parameter and assigns attributes as specified by last 2 parameters
static void initialise(int AllocationType, int Resources, int Users, double del)
           
static void main(java.lang.String[] args)
          Not being used
static void RandomizeAllTasks()
          Randomly creates tasks out of total work of each user
static void start_simulation()
          Links all the entities through "in" and "out" ports of each entity.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

Num_Of_Users

public static int Num_Of_Users

Allocation_Type

public static int Allocation_Type

Num_Of_Resources

public static int Num_Of_Resources

allUser

public static CUser[] allUser
Array of users of size 10000, For simulations involving more than 10000 users redefine array with bigger size


allResource

public static CResource[] allResource
Array of resources of size 10000, For simulations involving more than 10000 resources redefine array with bigger size


allScheduler

public static Scheduler[] allScheduler
To be used in future version


count_resources

public static int count_resources
reflects number of available resources


count_users

public static int count_users
reflects number of active users


delay

public static double delay
Used to assign Network Latency to entities


TotalWork

public static double TotalWork
Total Work of all users


TotalTasks

public static int TotalTasks
Constructor Detail

Classical

public Classical()
Creates a new instance of Classical

Method Detail

start_simulation

public static void start_simulation()
Links all the entities through "in" and "out" ports of each entity. and finally runs the simulation


initialise

public static void initialise(int AllocationType,
                              int Resources,
                              int Users,
                              double del)

CreateGroup

public static void CreateGroup(int members,
                               int ProcessingPower,
                               double rate)
Creates resources equal to members parameter and assigns attributes as specified by last 2 parameters


addUser

public static void addUser(java.lang.String Name,
                           double totwork,
                           double time,
                           double money,
                           int tasks)
Creates a user with attributes as passed in parameters


addUser

public static void addUser(java.lang.String Name,
                           double totwork,
                           double money,
                           int tasks)
Creates a user with attributes as passed in parameters


RandomizeAllTasks

public static void RandomizeAllTasks()
Randomly creates tasks out of total work of each user


main

public static void main(java.lang.String[] args)
Not being used