|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mars_sim.msp.simulation.structure.building.function.Function
org.mars_sim.msp.simulation.structure.building.function.Farming
public class Farming
The Farming class is a building function for greenhouse farming.
Field Summary | |
---|---|
static java.lang.String |
CROP_EVENT
|
static double |
HARVEST_MULTIPLIER
|
static java.lang.String |
NAME
|
Constructor Summary | |
---|---|
Farming(Building building)
Constructor |
Method Summary | |
---|---|
void |
addHarvest(double harvest)
Adds harvested food to the farm. |
double |
addWork(double workTime)
Adds work time to the crops current phase. |
java.util.List<Crop> |
getCrops()
Gets the farm's current crops. |
double |
getEstimatedHarvestPerOrbit()
Gets the estimated maximum harvest for one orbit. |
int |
getFarmerNum()
Gets the number of farmers currently working at the farm. |
double |
getFullPowerRequired()
Gets the amount of power required when function is at full power. |
double |
getGrowingArea()
Gets the total growing area for all crops. |
double |
getPowerDownPowerRequired()
Gets the amount of power required when function is at power down level. |
boolean |
requiresWork()
Checks if farm currently requires work. |
void |
timePassing(double time)
Time passing for the building. |
Methods inherited from class org.mars_sim.msp.simulation.structure.building.function.Function |
---|
getBuilding, getName |
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 CROP_EVENT
public static final java.lang.String NAME
public static final double HARVEST_MULTIPLIER
Constructor Detail |
---|
public Farming(Building building) throws BuildingException
building
- the building the function is for.
BuildingException
- if error in constructing function.Method Detail |
---|
public java.util.List<Crop> getCrops()
public boolean requiresWork()
public double addWork(double workTime) throws java.lang.Exception
workTime
- - Work time to be added (millisols)
java.lang.Exception
- if error adding work.public void addHarvest(double harvest)
harvest
- harvested food to add (kg.)public int getFarmerNum()
public void timePassing(double time) throws BuildingException
timePassing
in class Function
time
- amount of time passing (in millisols)
BuildingException
- if error occurs.public double getFullPowerRequired()
getFullPowerRequired
in class Function
public double getPowerDownPowerRequired()
getPowerDownPowerRequired
in class Function
public double getGrowingArea()
public double getEstimatedHarvestPerOrbit() throws java.lang.Exception
java.lang.Exception
- if error determining harvest.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |