|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecteos.market.Market
eos.market.ConsumerGoodMarket
public class ConsumerGoodMarket
A market trading consumer goods.
Field Summary |
---|
Fields inherited from class eos.market.Market |
---|
good |
Constructor Summary | |
---|---|
ConsumerGoodMarket(java.lang.String good)
Create a new consumer good market trading a good named good the price is not initialized at construction, but should be calculated the first time through |
Method Summary | |
---|---|
void |
addBuyOffer(Agent buyer,
double qty)
Add a buy offer, now simplified as demand in dollars replaces zhihongx's implementation of demand as a function |
void |
addSellOffer(Agent seller,
double qty)
Add a sell offer |
void |
clear()
Clear the market. |
static double |
getLastMktDemand()
Return last total demand, in dollars |
double |
getLastMktGoodVol()
Return volume of good traded |
double |
getLastMktMoneyVol()
Return volume of money exchanged |
static double |
getLastMktPrice()
Return market price |
static double |
getLastMktSupply()
Return last total supply, in units of CG |
static double |
getSmoothedLastMktDemand()
Return smoothed total demand, in dollars |
static double |
getSmoothedLastMktSupply()
Return smoothed total supply, in units of CG |
Methods inherited from class eos.market.Market |
---|
getGood |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConsumerGoodMarket(java.lang.String good)
good
- name of the good traded in the marketMethod Detail |
---|
public void addBuyOffer(Agent buyer, double qty)
buyer
- qty
- public void addSellOffer(Agent seller, double qty)
seller
- qty
- quantity of good available for salepublic void clear()
clear
in class Market
public static double getLastMktPrice()
public double getLastMktGoodVol()
public double getLastMktMoneyVol()
public static double getLastMktSupply()
public static double getLastMktDemand()
public static double getSmoothedLastMktDemand()
public static double getSmoothedLastMktSupply()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |