|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuk.ac.liv.auction.agent.AbstractTradingAgent
uk.ac.liv.auction.electricity.ElectricityTrader
An adaptive trader, trading in a simulated Elecitricty market. Agents of this type have a fixed generating capacity, and they trade units equal to their capacity in each round of the auction.
For further details, see:
"Market Power and Efficiency in a Computational Electricity Market with Discriminatory Double-Auction Pricing" Nicolaisen, J.; Petrov, V.; and Tesfatsion, L. in IEEE Trans. on Evol. Computation, Vol. 5, No. 5. 2001
This code was written by Steve Phelps in an attempt to replicate the results in the above paper. This work was carried out independently from the original authors. Any corrections to this code are welcome.
Parameters
| base.capacity int >= 0 |
(the generating capacity of the agent) |
| Field Summary | |
protected int |
capacity
The capacity of this trader in MWh |
protected double |
fixedCosts
The fixed costs for this trader. |
| Fields inherited from class uk.ac.liv.auction.agent.AbstractTradingAgent |
currentShout, funds, group, id, initialFunds, initialStock, isSeller, lastProfit, lastShoutAccepted, P_DEFAULT_STRATEGY, P_GROUP, P_INITIAL_FUNDS, P_INITIAL_STOCK, P_IS_SELLER, P_STRATEGY, P_VALUER, profits, stock, strategy, valuer |
| Constructor Summary | |
ElectricityTrader()
|
|
ElectricityTrader(int capacity,
double privateValue,
double fixedCosts,
boolean isSeller)
|
|
ElectricityTrader(int capacity,
double privateValue,
double fixedCosts,
boolean isSeller,
Strategy strategy)
|
|
| Method Summary | |
boolean |
acceptDeal(Auction auction,
double price,
int quantity)
|
boolean |
active()
Determine whether or not this trader is active. |
void |
endOfDay(AuctionEvent event)
|
double |
equilibriumProfits(Auction auction,
double equilibriumPrice,
int quantity)
Calculate the hypothetical surplus this agent will receive if the market had cleared uniformly at the specified equilibrium price and quantity. |
int |
getCapacity()
|
double |
getLastProfit()
Return the profit made in the most recent auction round. |
void |
informOfSeller(Auction auction,
Shout winningShout,
TradingAgent seller,
double price,
int quantity)
This method is used by an auction to notify a buyer that one of its bids has been successful. |
void |
initialise()
|
void |
requestShout(Auction auction)
Place a shout in the auction as determined by our currently configured strategy. |
void |
setup(ec.util.ParameterDatabase parameters,
ec.util.Parameter base)
Initialise this object from a parameter database. |
java.lang.String |
toString()
|
| Methods inherited from class uk.ac.liv.auction.agent.AbstractTradingAgent |
auctionClosed, auctionOpen, deliver, determineQuantity, eventOccurred, getCurrentShout, getFunds, getGroup, getId, getProfits, getStock, getStrategy, getValuation, getValuationPolicy, giveFunds, informOfBuyer, isBuyer, isSeller, lastShoutAccepted, pay, protoClone, purchaseFrom, reset, roundClosed, setGroup, setIsSeller, setPrivateValue, setStrategy, setValuationPolicy |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected int capacity
protected double fixedCosts
| Constructor Detail |
public ElectricityTrader(int capacity,
double privateValue,
double fixedCosts,
boolean isSeller,
Strategy strategy)
public ElectricityTrader(int capacity,
double privateValue,
double fixedCosts,
boolean isSeller)
public ElectricityTrader()
| Method Detail |
public void setup(ec.util.ParameterDatabase parameters,
ec.util.Parameter base)
Parameterizable
setup in interface Parameterizablesetup in class AbstractTradingAgentpublic void initialise()
initialise in class AbstractTradingAgentpublic void requestShout(Auction auction)
AbstractTradingAgent
requestShout in interface TradingAgentrequestShout in class AbstractTradingAgent
public void informOfSeller(Auction auction,
Shout winningShout,
TradingAgent seller,
double price,
int quantity)
TradingAgent
informOfSeller in interface TradingAgentinformOfSeller in class AbstractTradingAgent
public boolean acceptDeal(Auction auction,
double price,
int quantity)
public int getCapacity()
public double getLastProfit()
AbstractTradingAgent
getLastProfit in class AbstractTradingAgent
public double equilibriumProfits(Auction auction,
double equilibriumPrice,
int quantity)
AbstractTradingAgent
equilibriumProfits in class AbstractTradingAgentpublic boolean active()
AbstractTradingAgent
active in class AbstractTradingAgentpublic void endOfDay(AuctionEvent event)
endOfDay in class AbstractTradingAgentpublic java.lang.String toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||