# Demand-Response Control in Smart Grids
## 6 Theoretical and Experimental Comparison between Vickrey and Dutch Auctions
### Simulation Architecture  
GridSim is a Java-based open-source software platform that includes capabilities for application composition, resource discovery information services, and interfaces for assigning applications to resources. GridSim can also simulate heterogeneous computational resources in a variety of scenarios [34]. New enhancements to GridSim are added to support advance reservation (AR), differential levels of network Quality of Service (QoS), and data grids by using these existing functions. GridSim is now a full tool for simulating computational and/or data grids due to these extensions. The following are some of the GridSim capabilities made possible by the new extensions:  
* Simulation of various resource features as well as their failure properties. * Simulation of workload traces from genuine supercomputers. * Resource allocation method based on reservations. * Auction framework with a variety of auction varieties, including English, Dutch, double, and sealed-bid first-price auctions. * Division of incoming jobs into two categories: space-shared and time-shared. * Scheduling of jobs that are computed and/or data-intensive. * Easy-to-understand APIs for building various resource allocation methods. The main classes that compose the auction framework are as follows (Figure 5):  
* The class Auctioneer: This class extends the GridSim entity and provides the auctioneer's basic behavior. An auctioneer may participate in several auctions. The auctioneer issues a request for proposals, accepts bids, keeps track of the auctions, and eliminates them once they have been cleared. The class Auction refers to a set of characteristics that are common to all auctions. * The class OneSideAuction: Unlike double auctions, this class extends Auction and contains methods for auctions that take only bids. Extending this class and implementing the onStart(), onClose(), onStop(), onReceiveBid(), and onReceiveRejectCallForBid() methods allow users to create different auctions (). These methods must be implemented to specify the auction's behavior when it starts a round, closes a round, finishes the auction, receives a bid, and so on. The class OneSideAuction is considered as a generic class for which we can define more specific classes, such as VickreyAuction, englishAuction, dutchAuction, FirstPriceAuction (these classes have to define the begining and the end of each auction). \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Consumer/** & **Electricity Required** & \begin{tabular}{c} **Electricity Received** \\ **(E\({}_{\text{req(i)}}\)) in KWh** \\ \end{tabular} & \
\begin{tabular}{c} **Remaining** \\ **(E\({}_{\text{b(i)}}\)) during Phase I** \\ **in KWh** \\ \end{tabular} &
\begin{tabular}{c} **Requirement** \\ **(E\({}_{\text{rem-req(i)}}\)) in KWh** \\ \end{tabular} \\ \hline
1 & 40 & 40 & 0 \\ \hline
4 & 235 & 235 & 0 \\ \hline
5 & 410 & 250 & 160 \\ \hline
7 & 232 & 232 & 0 \\ \hline
8 & 500 & 250 & 250 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Energy scheduling in phase I.  
English auction: The auctioneer begins at a reserve price. Every bidder is free to increase their offer. The auction concludes when no one wants to increase their bid, and the item goes to the highest bidder for the price of that bid. First-price sealed-bid: Each bidder makes a single, private bid without knowing what the other bidders propose. The item is awarded to the highest bidder at that bid. Only one round of bidding is conducted. Dutch: The auctioneer continuously reduces the price until a bidder purchases the item at the present price. A Dutch auction is a type of auction in which the price starts high and is gradually lowered until a bidder accepts the current price. Vickrey (second-price sealed bid): Each bidder makes one offer while remaining anonymous to the other bidders. A Vickrey auction is a type of sealed-bid auction in which the highest bidder wins the item but pays the price of the second-highest bid. DoubleSideAuction: This class defines the fundamentals of a double auction.