EMlab-generation Documentation  1.0
Documentation of the EMLab-Generation model.
PowerGeneratingTechnology.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.technology;
17 
18 import java.util.HashSet;
19 import java.util.Set;
20 
21 import org.neo4j.graphdb.Direction;
22 import org.springframework.data.neo4j.annotation.NodeEntity;
23 import org.springframework.data.neo4j.annotation.RelatedTo;
24 
25 import agentspring.simulation.SimulationParameter;
27 
28 @NodeEntity
30 
31  private String name;
32 
33  @SimulationParameter(label = "Capacity (MW)", from = 0, to = 2000)
34  private double capacity;
35 
36  @RelatedTo(type = "PGT_INVESTMENTCOSTS", elementClass = TimeSeriesImpl.class, direction = Direction.OUTGOING)
37  private TimeSeriesImpl investmentCostTimeSeries;
38 
39  @RelatedTo(type = "PGT_OMCOSTS", elementClass = TimeSeriesImpl.class, direction = Direction.OUTGOING)
40  private TimeSeriesImpl fixedOperatingCostTimeSeries;
41 
42  @RelatedTo(type = "PGT_EFFICIENCYTS", elementClass = TimeSeriesImpl.class, direction = Direction.OUTGOING)
43  private TimeSeriesImpl efficiencyTimeSeries;
44 
45  @SimulationParameter(label = "CO2 capture efficiency", from = 0, to = 1)
46  private double co2CaptureEffciency;
47 
48 
49  @SimulationParameter(label = "Depreciation time (years)", from = 0, to = 40)
50  private int depreciationTime;
51 
52  @SimulationParameter(label = "Minimum running hours (hours/year)", from = 0, to = 8760)
53  private double minimumRunningHours;
54 
55  private double fixedOperatingCostModifierAfterLifetime;
56 
57  @SimulationParameter(label = "Expected lifetime", from = 0, to = 40)
58  private int expectedLifetime;
59 
60  @SimulationParameter(label = "Expected leadtime", from = 0, to = 10)
61  private int expectedLeadtime;
62 
63  private int expectedPermittime;
64  private double minimumFuelQuality;
65 
66  @SimulationParameter(label = "Maximum installed capacity fraction in country", from = 0, to = 1)
67  private double maximumInstalledCapacityFractionInCountry;
68 
69  @SimulationParameter(label = "Maximum installed capacity fraction per producer", from = 0, to = 1)
70  private double maximumInstalledCapacityFractionPerAgent;
71 
72  private double baseSegmentDependentAvailability;
73 
74  private double peakSegmentDependentAvailability;
75 
76  private boolean applicableForLongTermContract;
77 
78  private boolean intermittent;
79 
80  public double getBaseSegmentDependentAvailability() {
81  return baseSegmentDependentAvailability;
82  }
83 
84  public void setBaseSegmentDependentAvailability(double baseSegmentDependentAvailability) {
85  this.baseSegmentDependentAvailability = baseSegmentDependentAvailability;
86  }
87 
88  public double getPeakSegmentDependentAvailability() {
89  return peakSegmentDependentAvailability;
90  }
91 
92  public void setPeakSegmentDependentAvailability(double peakSegmentDependentAvailability) {
93  this.peakSegmentDependentAvailability = peakSegmentDependentAvailability;
94  }
95 
96  public double getMaximumInstalledCapacityFractionInCountry() {
97  return maximumInstalledCapacityFractionInCountry;
98  }
99 
100  public void setMaximumInstalledCapacityFractionInCountry(double maximumInstalledCapacityFractionInCountry) {
101  this.maximumInstalledCapacityFractionInCountry = maximumInstalledCapacityFractionInCountry;
102  }
103 
104  public double getMaximumInstalledCapacityFractionPerAgent() {
105  return maximumInstalledCapacityFractionPerAgent;
106  }
107 
108  public void setMaximumInstalledCapacityFractionPerAgent(double maximumInstalledCapacityFractionPerAgent) {
109  this.maximumInstalledCapacityFractionPerAgent = maximumInstalledCapacityFractionPerAgent;
110  }
111 
112  public int getDepreciationTime() {
113  return depreciationTime;
114  }
115 
116  public void setDepreciationTime(int depreciationTime) {
117  this.depreciationTime = depreciationTime;
118  }
119 
120  public double getMinimumRunningHours() {
121  return minimumRunningHours;
122  }
123 
124  public void setMinimumRunningHours(double minimumRunningHours) {
125  this.minimumRunningHours = minimumRunningHours;
126  }
127 
128  @RelatedTo(type = "FUEL", elementClass = Substance.class, direction = Direction.OUTGOING)
129  private Set<Substance> fuels;
130 
131  public String getName() {
132  return name;
133  }
134 
135  public void setName(String label) {
136  this.name = label;
137  }
138 
139  /*
140  * assumption: the first is the main fuel
141  */
142  public Substance getMainFuel() {
143  if (getFuels().size() > 0) {
144  return getFuels().iterator().next();
145  } else {
146  return null;
147  }
148  }
149 
150  public Set<Substance> getCoCombustionFuels() {
151  Set<Substance> coFuels = new HashSet<Substance>(getFuels());
152  coFuels.remove(getMainFuel());
153  return coFuels;
154  }
155 
156  public double getCapacity() {
157  return capacity;
158  }
159 
160  public void setCapacity(double capacity) {
161  this.capacity = capacity;
162  }
163 
164  public double getEfficiency(long time) {
165  return efficiencyTimeSeries.getValue(time);
166  }
167 
168  public TimeSeriesImpl getInvestmentCostTimeSeries() {
169  return investmentCostTimeSeries;
170  }
171 
172  public void setInvestmentCostTimeSeries(TimeSeriesImpl investmentCostTrend) {
173  this.investmentCostTimeSeries = investmentCostTrend;
174  }
175 
176  public TimeSeriesImpl getFixedOperatingCostTimeSeries() {
177  return fixedOperatingCostTimeSeries;
178  }
179 
180  public void setFixedOperatingCostTimeSeries(TimeSeriesImpl fixedOperatingCostTrend) {
181  this.fixedOperatingCostTimeSeries = fixedOperatingCostTrend;
182  }
183 
184  public TimeSeriesImpl getEfficiencyTimeSeries() {
185  return efficiencyTimeSeries;
186  }
187 
188  public void setEfficiencyTimeSeries(TimeSeriesImpl efficiencyTrend) {
189  this.efficiencyTimeSeries = efficiencyTrend;
190  }
191 
192  public double getCo2CaptureEffciency() {
193  return co2CaptureEffciency;
194  }
195 
196  public void setCo2CaptureEffciency(double co2CaptureEffciency) {
197  this.co2CaptureEffciency = co2CaptureEffciency;
198  }
199 
200  public double getFixedOperatingCostModifierAfterLifetime() {
201  return fixedOperatingCostModifierAfterLifetime;
202  }
203 
204  public void setFixedOperatingCostModifierAfterLifetime(double fixedOperatingCostModifierAfterLifetime) {
205  this.fixedOperatingCostModifierAfterLifetime = fixedOperatingCostModifierAfterLifetime;
206  }
207 
208  public int getExpectedLifetime() {
209  return expectedLifetime;
210  }
211 
212  public void setExpectedLifetime(int expectedLifetime) {
213  this.expectedLifetime = expectedLifetime;
214  }
215 
216  public int getExpectedLeadtime() {
217  return expectedLeadtime;
218  }
219 
220  public void setExpectedLeadtime(int expectedLeadtime) {
221  this.expectedLeadtime = expectedLeadtime;
222  }
223 
224  public int getExpectedPermittime() {
225  return expectedPermittime;
226  }
227 
228  public void setExpectedPermittime(int expectedPermittime) {
229  this.expectedPermittime = expectedPermittime;
230  }
231 
232  public double getMinimumFuelQuality() {
233  return minimumFuelQuality;
234  }
235 
236  public void setMinimumFuelQuality(double minimumFuelQuality) {
237  this.minimumFuelQuality = minimumFuelQuality;
238  }
239 
240  public Set<Substance> getFuels() {
241  return fuels;
242  }
243 
244  public void setFuels(Set<Substance> fuels) {
245  this.fuels = fuels;
246  }
247 
248  public String toString() {
249  return this.getName();
250  }
251 
252  public boolean isApplicableForLongTermContract() {
253  return applicableForLongTermContract;
254  }
255 
256  public void setApplicableForLongTermContract(boolean applicableForLongTermContract) {
257  this.applicableForLongTermContract = applicableForLongTermContract;
258  }
259 
260  public double getInvestmentCost(long time) {
261  return investmentCostTimeSeries.getValue(time);
262  }
263 
264  public double getFixedOperatingCost(long time) {
265  return fixedOperatingCostTimeSeries.getValue(time);
266  }
267 
268  public boolean isIntermittent() {
269  return intermittent;
270  }
271 
272  public void setIntermittent(boolean intermittent) {
273  this.intermittent = intermittent;
274  }
275 
276 }