|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mars_sim.msp.core.structure.PowerGrid
public class PowerGrid
The PowerGrid class is a settlement's building power grid.
| Field Summary | |
|---|---|
static java.lang.String |
GENERATED_POWER_EVENT
|
static java.lang.String |
POWER_DOWN_MODE
|
static java.lang.String |
POWER_MODE_EVENT
|
static java.lang.String |
POWER_UP_MODE
|
static java.lang.String |
POWER_VALUE_EVENT
|
static java.lang.String |
REQUIRED_POWER_EVENT
|
static java.lang.String |
STORED_POWER_CAPACITY_EVENT
|
static java.lang.String |
STORED_POWER_EVENT
|
| Constructor Summary | |
|---|---|
PowerGrid(Settlement settlement)
Constructor |
|
| Method Summary | |
|---|---|
double |
getGeneratedPower()
Gets the generated power in the grid. |
java.lang.String |
getPowerMode()
Gets the power grid mode. |
double |
getPowerValue()
Gets the value of electrical power at the settlement. |
double |
getRequiredPower()
Gets the power required from the grid. |
double |
getStoredPower()
Gets the stored power in the grid. |
double |
getStoredPowerCapacity()
Gets the stored power capacity in the grid. |
boolean |
isSufficientPower()
Checks if there is enough power in the grid for all buildings to be set to full power. |
void |
setPowerMode(java.lang.String newPowerMode)
Sets the power grid mode. |
void |
setStoredPower(double newPowerStored)
Sets the stored power in the grid. |
void |
setStoredPowerCapacity(double newPowerStorageCapacity)
Sets the stored power capacity in the grid. |
void |
timePassing(double time)
Time passing for power grid. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String POWER_MODE_EVENT
public static final java.lang.String GENERATED_POWER_EVENT
public static final java.lang.String STORED_POWER_EVENT
public static final java.lang.String STORED_POWER_CAPACITY_EVENT
public static final java.lang.String REQUIRED_POWER_EVENT
public static final java.lang.String POWER_VALUE_EVENT
public static final java.lang.String POWER_UP_MODE
public static final java.lang.String POWER_DOWN_MODE
| Constructor Detail |
|---|
public PowerGrid(Settlement settlement)
| Method Detail |
|---|
public java.lang.String getPowerMode()
public void setPowerMode(java.lang.String newPowerMode)
newPowerMode - the new power grid mode.public double getGeneratedPower()
public double getStoredPower()
public void setStoredPower(double newPowerStored)
newPowerStored - the new stored power (kW hr).public double getStoredPowerCapacity()
public void setStoredPowerCapacity(double newPowerStorageCapacity)
newPowerStorageCapacity - the new stored power capacity (kW hr).public double getRequiredPower()
public boolean isSufficientPower()
public void timePassing(double time)
throws BuildingException
time - amount of time passing (in millisols)
BuildingExceptionpublic double getPowerValue()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||