|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mars_sim.msp.simulation.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 |
REQUIRED_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 |
getRequiredPower()
Gets the power required from 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 |
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 REQUIRED_POWER_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 getRequiredPower()
public boolean isSufficientPower()
public void timePassing(double time)
throws BuildingException
time - amount of time passing (in millisols)
BuildingException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||