|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mars_sim.msp.core.structure.building.function.Function
org.mars_sim.msp.core.structure.building.function.PowerStorage
public class PowerStorage
The PowerStorage class is a building function for storing power.
| Field Summary | |
|---|---|
static String |
NAME
|
| Constructor Summary | |
|---|---|
PowerStorage(Building building)
Constructor |
|
| Method Summary | |
|---|---|
double |
getFullPowerRequired()
Gets the amount of power required when function is at full power. |
static double |
getFunctionValue(String buildingName,
boolean newBuilding,
Settlement settlement)
Gets the value of the function for a named building. |
double |
getPowerDownPowerRequired()
Gets the amount of power required when function is at power down level. |
double |
getPowerStorageCapacity()
Gets the building's power storage capacity. |
double |
getPowerStored()
Gets the building's stored power. |
void |
setPowerStored(double powerStored)
Sets the power stored in the building. |
void |
timePassing(double time)
Time passing for the building. |
| Methods inherited from class org.mars_sim.msp.core.structure.building.function.Function |
|---|
destroy, getBuilding, getMalfunctionScopeStrings, getName, removeFromSettlement |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String NAME
| Constructor Detail |
|---|
public PowerStorage(Building building)
building - the building with the function.
BuildingException - if error parsing configuration.| Method Detail |
|---|
public static double getFunctionValue(String buildingName,
boolean newBuilding,
Settlement settlement)
buildingName - the building name.newBuilding - true if adding a new building.settlement - the settlement.
Exception - if error getting function value.public double getPowerStorageCapacity()
public double getPowerStored()
public void setPowerStored(double powerStored)
powerStored - the stored power (kW hr).public double getFullPowerRequired()
Function
getFullPowerRequired in class Functionpublic double getPowerDownPowerRequired()
Function
getPowerDownPowerRequired in class Functionpublic void timePassing(double time)
Function
timePassing in class Functiontime - amount of time passing (in millisols)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||