16 package emlab.gen.domain.market.electricity;
18 import org.neo4j.graphdb.Direction;
19 import org.springframework.data.neo4j.annotation.Indexed;
20 import org.springframework.data.neo4j.annotation.NodeEntity;
21 import org.springframework.data.neo4j.annotation.RelatedTo;
22 import org.springframework.transaction.annotation.Transactional;
42 @RelatedTo(type =
"SEGMENT_DISPATCHPLAN", elementClass =
Segment.class, direction = Direction.OUTGOING)
45 @RelatedTo(type =
"POWERPLANT_DISPATCHPLAN", elementClass =
PowerPlant.class, direction = Direction.OUTGOING)
48 public static int CONTRACTED = -11;
49 public static int PARTLY_CONTRACTED = -10;
50 public static int NOT_CONTRACTED = -9;
52 private boolean forecast;
57 private final boolean supplyBid =
true;
59 private double capacityLongTermContract;
68 private double bidWithoutCO2;
73 private double oldPrice;
75 public int getSRstatus() {
79 public void setSRstatus(
int sRstatus) {
83 public double getOldPrice() {
87 public void setOldPrice(
double oldPrice) {
88 this.oldPrice = oldPrice;
91 @Indexed(indexName =
"ppdpTime")
94 public int getPpdpTime() {
98 public void setPpdpTime(
int ppdpTime) {
99 this.ppdpTime = ppdpTime;
106 public void setSegment(
Segment segment) {
107 this.segment = segment;
114 public void setPowerPlant(
PowerPlant powerPlant) {
115 this.powerPlant = powerPlant;
118 public double getCapacityLongTermContract() {
119 return capacityLongTermContract;
122 public void setCapacityLongTermContract(
double capacityLongTermContract) {
123 this.capacityLongTermContract = capacityLongTermContract;
136 public String toString() {
137 return "for " + getBidder() +
" power plant: " + getPowerPlant() +
" in segment " + segment +
" plans to sell long term: "
138 + getCapacityLongTermContract() +
" plans to sell capacity spot: "
139 +
getAmount() +
"for price: " + getPrice();
142 public double getBidWithoutCO2() {
143 return bidWithoutCO2;
146 public void setBidWithoutCO2(
double bidWithoutCO2) {
147 this.bidWithoutCO2 = bidWithoutCO2;
151 public boolean isSupplyBid() {
156 double price,
double bidWithoutCO2,
double spotMarketCapacity,
157 double longTermContractCapacity,
int status,
boolean forecast) {
158 this.setPowerPlant(plant);
159 this.setSegment(segment);
161 this.setBidder(producer);
162 this.setBiddingMarket(market);
163 this.setPrice(price);
164 this.setBidWithoutCO2(bidWithoutCO2);
165 this.setAmount(spotMarketCapacity);
166 this.setCapacityLongTermContract(longTermContractCapacity);
167 this.setStatus(status);
168 this.setForecast(forecast);
174 double price,
double bidWithoutCO2,
double spotMarketCapacity,
double longTermContractCapacity,
int status,
boolean forecast) {
176 this.specifyNotPersist(plant, producer, market, segment, time, price, bidWithoutCO2, spotMarketCapacity, longTermContractCapacity,
182 public void updateCapacityLongTermContract(
double capacity) {
183 this.setCapacityLongTermContract(capacity);
187 public void updateCapacitySpotMarket(
double capacity) {
188 this.setAmount(capacity);
191 public boolean isForecast() {
195 public void setForecast(
boolean forecast) {
196 this.forecast = forecast;