GridSim
v4.0

gridsim.auction
Class EnglishAuction

Object
  extended byThread
      extended byeduni.simjava.Sim_entity
          extended bygridsim.GridSimCore
              extended bygridsim.GridSim
                  extended bygridsim.auction.Auction
                      extended bygridsim.auction.OneSidedAuction
                          extended bygridsim.auction.EnglishAuction
All Implemented Interfaces:
Cloneable, Runnable

public class EnglishAuction
extends OneSidedAuction

This class represents an English Auction.

Since:
GridSim Toolkit 4.0
Author:
Marcos Dias de Assuncao
See Also:
Auction, OneSidedAuction, AuctionTags

Field Summary
 
Fields inherited from class gridsim.auction.Auction
outputPort
 
Fields inherited from class gridsim.GridSim
PAUSE, rand, SimulationStartDate
 
Fields inherited from class gridsim.GridSimCore
input, output
 
Fields inherited from class eduni.simjava.Sim_entity
 
Fields inherited from class Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
EnglishAuction(String auctionName, double durationOfRounds, int totalRound)
          Constructor
EnglishAuction(String auctionName, int auctioneerID, double durationOfRounds, int totalRound, Sim_port output)
          Constructor
 
Method Summary
 void onClose(int round)
          This method is invoked when a round finishes
 void onReceiveBid(MessageBid bid)
          This method is called when a bid is received.
 void onReceiveRejectCallForBid(MessageRejectCallForBid mrej)
          Called when a reject bid is received.
 void onStart(int round)
          This method is called when a round is started
 void onStop()
          This method is called when the auction finishes
 
Methods inherited from class gridsim.auction.OneSidedAuction
closeAuction, currentRound, getCurrentPrice, getDurationOfRounds, getFinalPrice, getMaxPrice, getMinPrice, getNumberOfRounds, getReservePrice, getWinner, processEvent, processOtherEvent, setCurrentPrice, setFinalPrice, setMaxPrice, setMinPrice, setReservePrice, setWinner, startAuction
 
Methods inherited from class gridsim.auction.Auction
body, broadcastMessage, getAttribute, getAttributes, getAuctioneerID, getAuctionID, getAuctionProtocol, getBidders, getOutputPort, getStartingTime, setAttribute, setAuctioneerID, setAuctionProtocol, setBidders, setOutputPort, setStartingTime
 
Methods inherited from class gridsim.GridSim
clock, Clock, getAdvancedReservationList, getEntityId, GetEntityId, getEntityName, GetEntityName, getEntityName, GetEntityName, getEntityName, getGISId, getGridInfoServiceEntityId, getGridResourceList, GetGridResourceList, getGridSimShutdownEntityId, getGridStatisticsEntityId, getNumFreePE, getNumFreePE, getNumPE, getNumPE, getResourceCharacteristics, GetResourceCharacteristics, getResourceDynamicInfo, GetResourceDynamicInformation, getSimulationCalendar, getSimulationStartDate, GetSimulationStartDate, GridInformationServiceEntityId, gridletCancel, gridletCancel, gridletMove, gridletMove, gridletPause, gridletPause, gridletReceive, GridletReceive, gridletReceive, gridletReceive, gridletResume, gridletResume, gridletStatus, gridletStatus, gridletSubmit, GridletSubmit, gridletSubmit, gridletSubmit, gridSimHold, GridSimHold, GridSimShutdownEntityId, GridStatisticsEntityId, init, init, init, Init, isResourceExist, isResourceExist, receiveEventObject, ReceiveEventObject, receiveEventObject, ReceiveEventObject, recordStatistics, RecordStatistics, recordStatistics, RecordStatistics, recordStatistics, RecordStatistics, recordStatistics, RecordStatistics, resourceSupportAR, resourceSupportAR, setGIS, shutdownGridStatisticsEntity, ShutdownGridStatisticsEntity, shutdownUserEntity, ShutdownUserEntity, Start, startGridSimulation, Stop, stopGridSimulation
 
Methods inherited from class gridsim.GridSimCore
finalize, finalizeGridSimulation, getLink, getPingResult, isNetworked, IsNetworked, ping, ping, ping, ping, pingBlockingCall, pingBlockingCall, pingBlockingCall, pingBlockingCall, send, Send, send, Send, send, Send, send, Send, send, Send, send, Send, setBackgroundTraffic, setBackgroundTraffic, TerminateInputOutputEntities, terminateIOEntities
 
Methods inherited from class eduni.simjava.Sim_entity
add_generator, add_param, add_port, clone, get_id, get_name, get_port, get_port, get_stat, run, send_on, set_invisible, set_stat, sim_cancel, sim_completed, sim_current, sim_get_next, sim_get_next, sim_hold_for, sim_hold, sim_pause_for, sim_pause_for, sim_pause_until, sim_pause_until, sim_pause, sim_process_for, sim_process_for, sim_process_until, sim_process_until, sim_process, sim_putback, sim_schedule, sim_schedule, sim_schedule, sim_schedule, sim_schedule, sim_schedule, sim_select, sim_trace, sim_wait_for, sim_wait_for, sim_wait_for, sim_wait, sim_waiting, sim_waiting
 
Methods inherited from class Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EnglishAuction

public EnglishAuction(String auctionName,
                      int auctioneerID,
                      double durationOfRounds,
                      int totalRound,
                      Sim_port output)
               throws Exception
Constructor

Parameters:
auctionName - a name for the auction
auctioneerID - the GridSim id of the auctioneer
durationOfRounds - simulation time of the duration of each round
totalRound - the number of rounds
output - the auctioneer's output port
Throws:
Exception
See Also:
GridSim

EnglishAuction

public EnglishAuction(String auctionName,
                      double durationOfRounds,
                      int totalRound)
               throws Exception
Constructor

Parameters:
auctionName - a name for the auction
durationOfRounds - simulation time of the duration of each round
totalRound - the number of rounds
Throws:
Exception
See Also:
GridSim
Method Detail

onStart

public void onStart(int round)
This method is called when a round is started

Specified by:
onStart in class OneSidedAuction
Parameters:
round - the number of the round that has started
See Also:
OneSidedAuction.onStart(int)

onClose

public void onClose(int round)
This method is invoked when a round finishes

Specified by:
onClose in class OneSidedAuction
Parameters:
round - the round that has finished
See Also:
OneSidedAuction.onClose(int)

onStop

public void onStop()
This method is called when the auction finishes

Specified by:
onStop in class OneSidedAuction
See Also:
OneSidedAuction.onStop()

onReceiveBid

public void onReceiveBid(MessageBid bid)
This method is called when a bid is received.

Specified by:
onReceiveBid in class OneSidedAuction
Parameters:
bid - the bid received by the auctioneer
See Also:
OneSidedAuction.onReceiveBid(gridsim.auction.MessageBid)

onReceiveRejectCallForBid

public void onReceiveRejectCallForBid(MessageRejectCallForBid mrej)
Called when a reject bid is received.

Specified by:
onReceiveRejectCallForBid in class OneSidedAuction
Parameters:
mrej - the reject received by the auctioneer
See Also:
OneSidedAuction.onReceiveRejectCallForBid(gridsim.auction.MessageRejectCallForBid)

GridSim
v4.0

The University of Melbourne, Australia, 2006