|
||||||||||
| 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.ResourceProcess
public class ResourceProcess
The ResourceProcess class represents a process of converting one set of resources to another.
| Field Summary | |
|---|---|
static double |
TOGGLE_RUNNING_WORK_TIME_REQUIRED
|
| Constructor Summary | |
|---|---|
ResourceProcess(java.lang.String name,
boolean defaultOn)
Constructor |
|
| Method Summary | |
|---|---|
void |
addMaxInputResourceRate(AmountResource resource,
double rate,
boolean ambient)
Adds a maximum input resource rate if it doesn't already exist. |
void |
addMaxOutputResourceRate(AmountResource resource,
double rate,
boolean waste)
Adds a maximum output resource rate if it doesn't already exist. |
void |
addToggleWorkTime(double time)
Adds work time to toggling the process on or off. |
double |
getCurrentProductionLevel()
Gets the current production level of the process. |
java.util.Set<AmountResource> |
getInputResources()
Gets the set of input resources. |
double |
getMaxInputResourceRate(AmountResource resource)
Gets the max input resource rate for a given resource. |
double |
getMaxOutputResourceRate(AmountResource resource)
Gets the max output resource rate for a given resource. |
java.util.Set<AmountResource> |
getOutputResources()
Gets the set of output resources. |
java.lang.String |
getProcessName()
Gets the process name. |
boolean |
isAmbientInputResource(AmountResource resource)
Checks if resource is an ambient input. |
boolean |
isProcessRunning()
Checks if the process is running or not. |
boolean |
isWasteOutputResource(AmountResource resource)
Checks if resource is a waste output. |
void |
processResources(double time,
double productionLevel,
Inventory inventory)
Processes resources for a given amount of time. |
java.lang.String |
toString()
Gets the string value for this object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final double TOGGLE_RUNNING_WORK_TIME_REQUIRED
| Constructor Detail |
|---|
public ResourceProcess(java.lang.String name,
boolean defaultOn)
name - the name of the process.defaultOn - true of process is on by default, false if off by default.| Method Detail |
|---|
public java.lang.String getProcessName()
public void addMaxInputResourceRate(AmountResource resource,
double rate,
boolean ambient)
resource - the amount resource.rate - max input resource rate (kg/sec)ambient - is resource from available from surroundings? (air)
public void addMaxOutputResourceRate(AmountResource resource,
double rate,
boolean waste)
resource - the amount resource.rate - max output resource rate (kg/sec)waste - is resource waste material not to be stored?public double getCurrentProductionLevel()
public boolean isProcessRunning()
public void addToggleWorkTime(double time)
time - the amount (millisols) of time to add.public java.util.Set<AmountResource> getInputResources()
public double getMaxInputResourceRate(AmountResource resource)
public boolean isAmbientInputResource(AmountResource resource)
resource - the resource to check.
public java.util.Set<AmountResource> getOutputResources()
public double getMaxOutputResourceRate(AmountResource resource)
public boolean isWasteOutputResource(AmountResource resource)
resource - the resource to check.
public void processResources(double time,
double productionLevel,
Inventory inventory)
throws java.lang.Exception
time - (millisols)productionLevel - proportion of max process rate (0.0D - 1.0D)inventory - the inventory pool to use for processes.
java.lang.Exception - if error processing resources.public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||