GridSim 5.0 beta

gridsim.auction
Class ReverseEnglishAuction

Object
  extended by Thread
      extended by Sim_entity
          extended by GridSimCore
              extended by GridSim
                  extended by Auction
                      extended by OneSidedAuction
                          extended by ReverseEnglishAuction
All Implemented Interfaces:
Cloneable, Runnable

public class ReverseEnglishAuction
extends OneSidedAuction

This class represents a Reverse English Auction. In a reverse auction, buyers start the auction and the lowest bid is considered the best. Therefore, the English auction becomes descending and starts with the max price going until the min price.

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

Nested Class Summary
 
Nested classes/interfaces inherited from class Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class Auction
outputPort
 
Fields inherited from class GridSim
GRIDSIM_VERSION_STRING, PAUSE
 
Fields inherited from class GridSimCore
input, NETWORK_TYPE, output
 
Fields inherited from class Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ReverseEnglishAuction(String auctionName, double durationOfRounds, int totalRound)
          Constructor
ReverseEnglishAuction(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 OneSidedAuction
closeAuction, currentRound, getCurrentPrice, getDurationOfRounds, getFinalPrice, getMaxPrice, getMinPrice, getNumberOfRounds, getReservePrice, getWinner, processEvent, processOtherEvent, setCurrentPrice, setFinalPrice, setMaxPrice, setMinPrice, setReservePrice, setWinner, startAuction
 
Methods inherited from class Auction
body, broadcastMessage, getAttribute, getAttributes, getAuctioneerID, getAuctionID, getAuctionProtocol, getBidders, getOutputPort, getStartingTime, setAttribute, setAuctioneerID, setAuctionID, setAuctionProtocol, setBidders, setOutputPort, setStartingTime
 
Methods inherited from class GridSim
clock, disableDebugMode, enableDebugMode, getAdvancedReservationList, getEntityId, getEntityName, getEntityName, getEntityName, getGISId, getGridInfoServiceEntityId, getGridResourceList, getGridSimShutdownEntityId, getGridStatisticsEntityId, getNetworkType, getNumFreePE, getNumFreePE, getNumPE, getNumPE, getResourceCharacteristics, getResourceDynamicInfo, getSimulationCalendar, getSimulationStartDate, getVisualizer, gridletCancel, gridletCancel, gridletMove, gridletMove, gridletPause, gridletPause, gridletReceive, gridletReceive, gridletReceive, gridletResume, gridletResume, gridletStatus, gridletStatus, gridletSubmit, gridletSubmit, gridletSubmit, gridSimHold, init, init, init, initNetworkType, isDebugModeEnabled, isResourceExist, isResourceExist, isTraceEnabled, pauseSimulation, pauseSimulation, receiveEventObject, receiveEventObject, recordStatistics, recordStatistics, recordStatistics, recordStatistics, resourceSupportAR, resourceSupportAR, resumeSimulation, setGIS, shutdownGridStatisticsEntity, shutdownUserEntity, startGridSimulation, startGridSimulation, stopGridSimulation
 
Methods inherited from class GridSimCore
finalizeGridSimulation, getLink, getPingResult, isNetworked, ping, ping, ping, ping, pingBlockingCall, pingBlockingCall, pingBlockingCall, pingBlockingCall, send, send, send, send, send, send, setBackgroundTraffic, setBackgroundTraffic, terminateIOEntities
 
Methods inherited from class 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, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ReverseEnglishAuction

public ReverseEnglishAuction(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

ReverseEnglishAuction

public ReverseEnglishAuction(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 5.0 beta

The University of Melbourne, Australia, 2009