EMlab-generation Documentation  1.0
Documentation of the EMLab-Generation model.
Government.java
1 /*******************************************************************************
2  * Copyright 2012 the original author or authors.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  ******************************************************************************/
16 package emlab.gen.domain.agent;
17 
18 import org.neo4j.graphdb.Direction;
19 import org.springframework.data.neo4j.annotation.NodeEntity;
20 import org.springframework.data.neo4j.annotation.RelatedTo;
21 
22 import agentspring.agent.Agent;
24 
38 @NodeEntity
39 public class Government extends DecarbonizationAgent implements Agent {
40 
41  @RelatedTo(type = "CO2TAX_TREND", elementClass = TimeSeriesImpl.class, direction = Direction.OUTGOING)
42  private TimeSeriesImpl co2TaxTrend;
43 
44  @RelatedTo(type = "CO2CAP_TREND", elementClass = TimeSeriesImpl.class, direction = Direction.OUTGOING)
45  private TimeSeriesImpl co2CapTrend;
46 
47  @RelatedTo(type = "MINCO2PRICE_TREND", elementClass = TimeSeriesImpl.class, direction = Direction.OUTGOING)
48  private TimeSeriesImpl minCo2PriceTrend;
49 
50  @RelatedTo(type = "CO2_PRICECEILING_TREND", elementClass = TimeSeriesImpl.class, direction = Direction.OUTGOING)
51  private TimeSeriesImpl co2PriceCeilingTrend;
52 
53  @RelatedTo(type = "CO2CAPADJUSTMENT_TIMESERIES", elementClass = TimeSeriesImpl.class, direction = Direction.OUTGOING)
54  private TimeSeriesImpl co2CapAdjustmentTimeSeries;
55 
56  private boolean activelyAdjustingTheCO2Cap;
57 
58  private boolean deviationFromResTargetAdjustment;
59 
60  private double adaptiveCapCO2SavingsWeighingFactor;
61 
62  private boolean adaptiveCapAdjustmentBasedOnCapNotActualEmissions;
63 
64  private boolean adaptiveCapAdjustmentRelativeToNonSubsidisedProduction;
65 
66  private double co2Penalty;
67 
68  private double stabilityReserve;
69 
70  @RelatedTo(type = "STABILITY_RESERVE_UPPER_TRIGGER", elementClass = TimeSeriesImpl.class, direction = Direction.OUTGOING)
71  private TimeSeriesImpl stabilityReserveUpperTriggerTrend;
72 
73  @RelatedTo(type = "STABILITY_RESERVE_LOWER_TRIGGER", elementClass = TimeSeriesImpl.class, direction = Direction.OUTGOING)
74  private TimeSeriesImpl stabilityReserveLowerTriggerTrend;
75 
76  @RelatedTo(type = "STABILITY_RESERVE_ADDING_PERCENTAGE", elementClass = TimeSeriesImpl.class, direction = Direction.OUTGOING)
77  private TimeSeriesImpl stabilityReserveAddingPercentageTrend;
78 
79  @RelatedTo(type = "STABILITY_RESERVE_ADDING_MINIMUM", elementClass = TimeSeriesImpl.class, direction = Direction.OUTGOING)
80  private TimeSeriesImpl stabilityReserveAddingMinimumTrend;
81 
82  @RelatedTo(type = "STABILITY_RESERVE_RELEASE_QUANTITY", elementClass = TimeSeriesImpl.class, direction = Direction.OUTGOING)
83  private TimeSeriesImpl stabilityReserveReleaseQuantityTrend;
84 
85  public double getCO2Tax(long time) {
86  return co2TaxTrend.getValue(time);
87  }
88 
89  public double getMinCo2Price(long time) {
90  return minCo2PriceTrend.getValue(time);
91  }
92 
93  public double getCo2Cap(long time) {
94  return co2CapTrend.getValue(time);
95  }
96 
97  public TimeSeriesImpl getCo2TaxTrend() {
98  return co2TaxTrend;
99  }
100 
101  public void setCo2TaxTrend(TimeSeriesImpl co2TaxTrend) {
102  this.co2TaxTrend = co2TaxTrend;
103  }
104 
105  public TimeSeriesImpl getCo2CapTrend() {
106  return co2CapTrend;
107  }
108 
109  public void setCo2CapTrend(TimeSeriesImpl co2CapTrend) {
110  this.co2CapTrend = co2CapTrend;
111  }
112 
113  public TimeSeriesImpl getMinCo2PriceTrend() {
114  return minCo2PriceTrend;
115  }
116 
117  public void setMinCo2PriceTrend(TimeSeriesImpl minCo2PriceTrend) {
118  this.minCo2PriceTrend = minCo2PriceTrend;
119  }
120 
121  public double getCo2Penalty(long time) {
122  if (getCo2PriceCeilingTrend() != null)
123  return getCo2PriceCeilingTrend().getValue(time);
124  return co2Penalty;
125  }
126 
127  public void setCo2Penalty(double co2Penalty) {
128  this.co2Penalty = co2Penalty;
129  }
130 
131  public TimeSeriesImpl getCo2PriceCeilingTrend() {
132  return co2PriceCeilingTrend;
133  }
134 
135  public void setCo2PriceCeilingTrend(TimeSeriesImpl co2PriceCeilingTrend) {
136  this.co2PriceCeilingTrend = co2PriceCeilingTrend;
137  }
138 
139  public boolean isActivelyAdjustingTheCO2Cap() {
140  return activelyAdjustingTheCO2Cap;
141  }
142 
143  public void setActivelyAdjustingTheCO2Cap(boolean activelyAdjustingTheCO2Cap) {
144  this.activelyAdjustingTheCO2Cap = activelyAdjustingTheCO2Cap;
145  }
146 
147  public double getStabilityReserve() {
148  return stabilityReserve;
149  }
150 
151  public void setStabilityReserve(double stabilityReserve) {
152  this.stabilityReserve = stabilityReserve;
153  }
154 
155  public TimeSeriesImpl getStabilityReserveUpperTriggerTrend() {
156  return stabilityReserveUpperTriggerTrend;
157  }
158 
159  public void setStabilityReserveUpperTriggerTrend(TimeSeriesImpl stabilityReserveUpperTriggerTrend) {
160  this.stabilityReserveUpperTriggerTrend = stabilityReserveUpperTriggerTrend;
161  }
162 
163  public TimeSeriesImpl getStabilityReserveLowerTriggerTrend() {
164  return stabilityReserveLowerTriggerTrend;
165  }
166 
167  public void setStabilityReserveLowerTriggerTrend(TimeSeriesImpl stabilityReserveLowerTriggerTrend) {
168  this.stabilityReserveLowerTriggerTrend = stabilityReserveLowerTriggerTrend;
169  }
170 
171  public TimeSeriesImpl getStabilityReserveAddingPercentageTrend() {
172  return stabilityReserveAddingPercentageTrend;
173  }
174 
175  public void setStabilityReserveAddingPercentageTrend(TimeSeriesImpl stabilityReserveAddingPercentageTrend) {
176  this.stabilityReserveAddingPercentageTrend = stabilityReserveAddingPercentageTrend;
177  }
178 
179  public TimeSeriesImpl getStabilityReserveAddingMinimumTrend() {
180  return stabilityReserveAddingMinimumTrend;
181  }
182 
183  public void setStabilityReserveAddingMinimumTrend(TimeSeriesImpl stabilityReserveAddingMinimumTrend) {
184  this.stabilityReserveAddingMinimumTrend = stabilityReserveAddingMinimumTrend;
185  }
186 
187  public TimeSeriesImpl getStabilityReserveReleaseQuantityTrend() {
188  return stabilityReserveReleaseQuantityTrend;
189  }
190 
191  public void setStabilityReserveReleaseQuantityTrend(TimeSeriesImpl stabilityReserveReleaseQuantityTrend) {
192  this.stabilityReserveReleaseQuantityTrend = stabilityReserveReleaseQuantityTrend;
193  }
194 
195  public boolean isDeviationFromResTargetAdjustment() {
196  return deviationFromResTargetAdjustment;
197  }
198 
199  public void setDeviationFromResTargetAdjustment(boolean deviationFromResTargetAdjustment) {
200  this.deviationFromResTargetAdjustment = deviationFromResTargetAdjustment;
201  }
202 
203  public double getAdaptiveCapCO2SavingsWeighingFactor() {
204  return adaptiveCapCO2SavingsWeighingFactor;
205  }
206 
207  public void setAdaptiveCapCO2SavingsWeighingFactor(double adaptiveCapCO2SavingsWeighingFactor) {
208  this.adaptiveCapCO2SavingsWeighingFactor = adaptiveCapCO2SavingsWeighingFactor;
209  }
210 
211  public TimeSeriesImpl getCo2CapAdjustmentTimeSeries() {
212  return co2CapAdjustmentTimeSeries;
213  }
214 
215  public void setCo2CapAdjustmentTimeSeries(TimeSeriesImpl co2CapAdjustmentTimeSeries) {
216  this.co2CapAdjustmentTimeSeries = co2CapAdjustmentTimeSeries;
217  }
218 
219  public boolean isAdaptiveCapAdjustmentBasedOnCapNotActualEmissions() {
220  return adaptiveCapAdjustmentBasedOnCapNotActualEmissions;
221  }
222 
223  public void setAdaptiveCapAdjustmentBasedOnCapNotActualEmissions(
224  boolean adaptiveCapAdjustmentBasedOnCapNotActualEmissions) {
225  this.adaptiveCapAdjustmentBasedOnCapNotActualEmissions = adaptiveCapAdjustmentBasedOnCapNotActualEmissions;
226  }
227 
228 
229  public boolean isAdaptiveCapAdjustmentRelativeToNonSubsidisedProduction() {
230  return adaptiveCapAdjustmentRelativeToNonSubsidisedProduction;
231  }
232 
233  public void setAdaptiveCapAdjustmentRelativeToNonSubsidisedProduction(
234  boolean adaptiveCapAdjustmentRelativeToNonSubsidisedProduction) {
235  this.adaptiveCapAdjustmentRelativeToNonSubsidisedProduction = adaptiveCapAdjustmentRelativeToNonSubsidisedProduction;
236  }
237 
238 }