|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectAuction
Auction class provides methods to create entities, link them and finally to run the simulations. Auctions supported are First Price Sealed Bid, Second Price Sealed Bid, Double Auction PMD, and Double Auction TPD
| Field Summary | |
static GMA[] |
allGMA
To be used in future version |
static Resource[] |
allResource
Array of resources of size 10000, For simulations involving more than 10000 resources redefine array with bigger size |
static User[] |
allUser
Array of users of size 10000, For simulations involving more than 10000 users redefine array with bigger size |
static int |
Auction_rounds
Number of Auction rounds |
static int |
Auction_Type
To define Auction type Auction_Type = 0 First Price Sealed Bid Auction_Type = 1 Second Price Sealed Bid Auction_Type = 2 Double Auction PMD Auction_Type = 3 Continous Double Auction Auction_Type = 4 Double Auction TPD |
static int |
BiddingPolicy
To be used in future versions |
static int |
count_groups
reflects number of available groups |
static int |
count_resources
reflects number of available resources |
static int |
count_users
reflects number of active users |
static int |
counter_rounds
reflects present auction round |
static double |
delay
Used to assign Network Latency to entities |
static GMAMonitor |
gmamonitor
To be used in future version |
static int[][] |
Groups
Groups of resources with ID and Availability A group is available if atleast one resource belonging to it is free to serve tasks. |
static double[][] |
GroupsAttr
Attributes of groups such as number of resources belonging to it and Processing power of the group |
static int |
Num_Of_GMAs
To be used in future versions |
static int |
Num_Of_Resources
Defining Total number of Resources participating |
static int |
Num_Of_Users
Defining Total number of users participating in Auction |
static double |
TotalWork
Total Work of all users |
| Constructor Summary | |
Auction()
Creates a new instance of Auction |
|
| Method Summary | |
static void |
addUser(java.lang.String Name,
double totwork,
double time,
double money,
int tasks,
double percenthike)
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 |
CreateGroup(int members,
int ProcessingPower,
double rate,
double PercentDeclineInBid)
Creates resources equal to members parameter and assigns attributes as specified by last 3 parameters |
static int |
findGroup(int id)
returns the position of a group if it's id is passed as parameter |
static int |
groupcount()
returns number of groups |
static double |
GroupProcessingPower(int GroupNo)
returns the processing power of a Group of resources when passed the position of group as parameter |
static double |
groupsize(int groupNo)
returns number of members of a Group of resources when passed the position of group as parameter |
static void |
initialise(int AuctionType,
int Resources,
int Users,
int Rounds,
int BidPolicy,
double del)
|
static void |
main(java.lang.String[] args)
Not being used |
static void |
MarkResourceDirtyInGroup(int resourceid)
Marks a Group of resource as invalid if all the resources belonging to it are busy in serving tasks |
static void |
MarkResourceValidInGroup(int resourceid)
Marks a Group of resources as valid if atleast one resource belonging to it becomes free |
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. |
static void |
totalwork()
Calculates total work by adding work of individual users |
static int |
ValidGroups()
returns number of valid groups where each group have atleast resource free to serve tasks |
static boolean |
ValidityOfGroup(int GroupNo)
returns TRUE if atleast one resource is free in this group when ID of the group is passed as parameter, else FALSE |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static int Num_Of_Users
public static int Num_Of_GMAs
public static int Auction_Type
public static int count_resources
public static int count_users
public static int Auction_rounds
public static int counter_rounds
public static int BiddingPolicy
public static int Num_Of_Resources
public static User[] allUser
public static Resource[] allResource
public static GMA[] allGMA
public static GMAMonitor gmamonitor
public static double TotalWork
public static int[][] Groups
public static double[][] GroupsAttr
public static int count_groups
public static double delay
| Constructor Detail |
public Auction()
| Method Detail |
public static void start_simulation()
public static void totalwork()
public static void CreateGroup(int members,
int ProcessingPower,
double rate)
public static void CreateGroup(int members,
int ProcessingPower,
double rate,
double PercentDeclineInBid)
public static double GroupProcessingPower(int GroupNo)
public static double groupsize(int groupNo)
public static int groupcount()
public static int findGroup(int id)
public static int ValidGroups()
public static void MarkResourceDirtyInGroup(int resourceid)
public static void MarkResourceValidInGroup(int resourceid)
public static boolean ValidityOfGroup(int GroupNo)
public static void initialise(int AuctionType,
int Resources,
int Users,
int Rounds,
int BidPolicy,
double del)
public static void addUser(java.lang.String Name,
double totwork,
double time,
double money,
int tasks,
double percenthike)
public static void addUser(java.lang.String Name,
double totwork,
double money,
int tasks)
public static void RandomizeAllTasks()
public static void main(java.lang.String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||