Swarm-NG  1.1
swarmng.System Class Reference

A planetary system within an ensemble. More...

Classes

class  Attribute
 Attributes of the system, it is just a list of floating point values. More...
 

Public Member Functions

def __len__
 Number of bodies in the system Usage. More...
 
def is_active
 Equivalent to state == 0.
 
def is_inactive
 Equivalent to state == 1.
 
def is_enabled
 Equivalent to state != -1.
 
def set_active
 Set state = 0.
 
def set_inactive
 Set state = 1.
 
def set_disabled
 Set state = -1.
 
def __getitem__
 Get the ith body of the system Usage. More...
 

Properties

 time = property
 Time of the system (floating point value)
 
 id = property
 Unique integer identifier for the system.
 
 total_energy = property
 Total kinetic and potential energy of the planetary system (floating point value)
 
 state = property
 Integer value representing the state of the system. More...
 
 attributes = property
 Collection of attributes of the system of type System.Attributes.
 

Detailed Description

A planetary system within an ensemble.

To obtain an instance of System class you should index into an ensemble.

This class can be treated as a collection of bodies. The bodies can be accessed using brackets or a for loop.

Definition at line 95 of file __init__.doc.py.

Member Function Documentation

def swarmng.System.__getitem__ (   self,
  i 
)

Get the ith body of the system Usage.

1 >>> self[i]

Definition at line 136 of file __init__.doc.py.

def swarmng.System.__len__ (   self)

Number of bodies in the system Usage.

1 >>> len(self)

Definition at line 117 of file __init__.doc.py.

Property Documentation

swarmng.System.state = property
static

Integer value representing the state of the system.

  • 0 means active
  • 1 means inactive
  • -1 means disabled
  • other numbers may have special meanings

Definition at line 108 of file __init__.doc.py.

Referenced by swarmng.logrecord.LogRecord.from_binary().


The documentation for this class was generated from the following file: