org.mars_sim.msp.simulation.structure.building.function
Class Manufacture

java.lang.Object
  extended by org.mars_sim.msp.simulation.structure.building.function.Function
      extended by org.mars_sim.msp.simulation.structure.building.function.Manufacture
All Implemented Interfaces:
java.io.Serializable

public class Manufacture
extends Function
implements java.io.Serializable

A building function for manufacturing.

See Also:
Serialized Form

Field Summary
static java.lang.String NAME
           
 
Constructor Summary
Manufacture(Building building)
          Constructor
 
Method Summary
 void addProcess(ManufactureProcess process)
          Adds a new manufacturing process to the building.
 void endManufacturingProcess(ManufactureProcess process)
          Ends a manufacturing process.
 int getConcurrentProcesses()
          Gets the maximum concurrent manufacturing processes supported by the building.
 double getFullPowerRequired()
          Gets the amount of power required when function is at full power.
 double getPowerDownPowerRequired()
          Gets the amount of power required when function is at power down level.
 java.util.List<ManufactureProcess> getProcesses()
          Gets a list of the current manufacturing processes.
 int getTechLevel()
          Gets the manufacturing tech level of the building.
 boolean requiresWork()
          Checks if manufacturing function 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

NAME

public static final java.lang.String NAME
See Also:
Constant Field Values
Constructor Detail

Manufacture

public Manufacture(Building building)
            throws BuildingException
Constructor

Parameters:
building - the building the function is for.
Throws:
BuildingException - if error constructing function.
Method Detail

getTechLevel

public int getTechLevel()
Gets the manufacturing tech level of the building.

Returns:
tech level.

getConcurrentProcesses

public int getConcurrentProcesses()
Gets the maximum concurrent manufacturing processes supported by the building.

Returns:
maximum concurrent processes.

getProcesses

public java.util.List<ManufactureProcess> getProcesses()
Gets a list of the current manufacturing processes.

Returns:
unmodifiable list of processes.

addProcess

public void addProcess(ManufactureProcess process)
                throws BuildingException
Adds a new manufacturing process to the building.

Parameters:
process - the new manufacturing process.
Throws:
BuildingException - if error adding process.

getFullPowerRequired

public double getFullPowerRequired()
Description copied from class: Function
Gets the amount of power required when function is at full power.

Specified by:
getFullPowerRequired in class Function
Returns:
power (kW)

getPowerDownPowerRequired

public double getPowerDownPowerRequired()
Description copied from class: Function
Gets the amount of power required when function is at power down level.

Specified by:
getPowerDownPowerRequired in class Function
Returns:
power (kW)

timePassing

public void timePassing(double time)
                 throws BuildingException
Description copied from class: Function
Time passing for the building.

Specified by:
timePassing in class Function
Parameters:
time - amount of time passing (in millisols)
Throws:
BuildingException - if error occurs.

requiresWork

public boolean requiresWork()
Checks if manufacturing function currently requires work.

Returns:
true if manufacturing work.

endManufacturingProcess

public void endManufacturingProcess(ManufactureProcess process)
                             throws BuildingException
Ends a manufacturing process.

Parameters:
process - the process to end.
Throws:
BuildingException - if error ending process.