public class PointBid extends Bid implements java.lang.Iterable<PricePoint>
Bid with a PricePoint array to represent the bid curve. This
is used by Agents that have to create a Bid, because it is easier to create.| Modifier and Type | Class and Description |
|---|---|
static class |
PointBid.Builder
A builder class to create an
PointBid instance. |
marketBasis, SMALLEST_DEMAND| Constructor and Description |
|---|
PointBid(MarketBasis marketBasis,
PricePoint... pricePoints)
A constructor to create an instance of PointBid.
|
| Modifier and Type | Method and Description |
|---|---|
ArrayBid |
aggregate(Bid other)
Aggregates this
Bid instance with another Bid. |
Price |
calculateIntersection(double targetDemand)
Calculates the
Price at the intersection with the bid curve at the given demand. |
boolean |
equals(java.lang.Object obj) |
double |
getDemandAt(Price price)
Calculates the demand at the intersection in the bid curve with the priceStep in a demand array.
|
double |
getMaximumDemand() |
double |
getMinimumDemand() |
PricePoint[] |
getPricePoints() |
int |
hashCode() |
java.util.Iterator<PricePoint> |
iterator() |
ArrayBid |
toArrayBid() |
PointBid |
toPointBid() |
java.lang.String |
toString() |
demandIsEqual, flatDemand, getDemandAt, getMarketBasispublic PointBid(MarketBasis marketBasis, PricePoint... pricePoints)
marketBasis - the MarketBasis of the clusterpricePoints - the PointBid Array that belongs to this bid.public ArrayBid aggregate(Bid other)
Bid instance with another Bid. Bid are aggregated by adding their bid curves.public Price calculateIntersection(double targetDemand)
Price at the intersection with the bid curve at the given demand.calculateIntersection in class BidtargetDemand - the part of the bid curve you want to get the Price of.Pricepublic double getMaximumDemand()
getMaximumDemand in class Bidpublic double getMinimumDemand()
getMinimumDemand in class Bidpublic ArrayBid toArrayBid()
toArrayBid in class BidArrayBid implementation of this Bid.public PointBid toPointBid()
toPointBid in class BidPointBid implementation of this Bid.public double getDemandAt(Price price)
Bid.getDemandAt(PriceStep) method.
The default implementation is to call the other.getDemandAt in class Bidprice - the Price you want to know the demand of.public java.util.Iterator<PricePoint> iterator()
iterator in interface java.lang.Iterable<PricePoint>public PricePoint[] getPricePoints()
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object