org.mars_sim.msp.core.structure.building.function
Class AstronomicalObservation

java.lang.Object
  extended by org.mars_sim.msp.core.structure.building.function.Function
      extended by org.mars_sim.msp.core.structure.building.function.AstronomicalObservation
All Implemented Interfaces:
Serializable

public class AstronomicalObservation
extends Function

A building function for observing astronomical objects.

See Also:
Serialized Form

Field Summary
static String NAME
           
 
Constructor Summary
AstronomicalObservation(Building building)
          Constructor
 
Method Summary
 void addObserver()
          Adds a new observer to the observatory.
 double getFullPowerRequired()
          Gets the amount of power required when function is at full power.
static double getFunctionValue(String buildingName, boolean newBuilding, Settlement settlement)
          Gets the value of the function for a named building.
 int getObservatoryCapacity()
          Gets the capacity for observers in the observatory.
 int getObserverNum()
          Gets the current number of observers in the observatory.
 double getPowerDownPowerRequired()
          Gets the amount of power required when function is at power down level.
 int getTechnologyLevel()
          Gets the technology level of the observatory.
 void removeObserver()
          Removes an observer from the observatory.
 void timePassing(double time)
          Time passing for the building.
 
Methods inherited from class org.mars_sim.msp.core.structure.building.function.Function
destroy, getBuilding, getMalfunctionScopeStrings, getName, removeFromSettlement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

public static String NAME
Constructor Detail

AstronomicalObservation

public AstronomicalObservation(Building building)
Constructor

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

getFullPowerRequired

public double getFullPowerRequired()
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()
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)
Time passing for the building.

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

addObserver

public void addObserver()
Adds a new observer to the observatory.

Throws:
Exception - if observatory is already at capacity.

removeObserver

public void removeObserver()
Removes an observer from the observatory.

Throws:
Exception - if no observers currently in observatory.

getObserverNum

public int getObserverNum()
Gets the current number of observers in the observatory.

Returns:
number of observers.

getObservatoryCapacity

public int getObservatoryCapacity()
Gets the capacity for observers in the observatory.

Returns:
capacity.

getTechnologyLevel

public int getTechnologyLevel()
Gets the technology level of the observatory.

Returns:
technology level.

getFunctionValue

public static double getFunctionValue(String buildingName,
                                      boolean newBuilding,
                                      Settlement settlement)
Gets the value of the function for a named building.

Parameters:
buildingName - the building name.
newBuilding - true if adding a new building.
settlement - the settlement.
Returns:
value (VP) of building function.
Throws:
Exception - if error getting function value.


Copyright © 2009-2013. All Rights Reserved.