|
||||||||||
| 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.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(String name,
double powerRequired,
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. |
void |
destroy()
Prepare object for garbage collection. |
double |
getCurrentProductionLevel()
Gets the current production level of the process. |
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. |
Set<AmountResource> |
getOutputResources()
Gets the set of output resources. |
double |
getPowerRequired()
Gets the amount of power required to run the process. |
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. |
void |
setProcessRunning(boolean runningProcess)
Sets if the process is running or not. |
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(String name,
double powerRequired,
boolean defaultOn)
name - the name of the process.powerRequired - the amount of power required to run the process (kW).defaultOn - true of process is on by default, false if off by default.| Method Detail |
|---|
public String getProcessName()
public void addMaxInputResourceRate(AmountResource resource,
double rate,
boolean ambient)
resource - the amount resource.rate - max input resource rate (kg/millisol)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/millisol)waste - is resource waste material not to be stored?public double getCurrentProductionLevel()
public boolean isProcessRunning()
public void setProcessRunning(boolean runningProcess)
runningProcess - true if process is running.public void addToggleWorkTime(double time)
time - the amount (millisols) of time to add.public Set<AmountResource> getInputResources()
public double getMaxInputResourceRate(AmountResource resource)
public boolean isAmbientInputResource(AmountResource resource)
resource - the resource to check.
public 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)
time - (millisols)productionLevel - proportion of max process rate (0.0D - 1.0D)inventory - the inventory pool to use for processes.
Exception - if error processing resources.public String toString()
toString in class Objectpublic double getPowerRequired()
public void destroy()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||