E-Cell Simulation Environment Version 3.1.100 User's Manual (Draft: Dec. 18, 2003) | ||
---|---|---|
Prev | Chapter 5. Scripting A Simulation Session | Next |
This section provides a list of some commonly used classes in E-Cell Python library and their APIs.
Methods of Session class has the following five groups.
Session methods
Simulation methods
Stepper methods
Entity methods
Logger methods
Table 5-1. Methods and properties of Session
class
Session class methods | |
---|---|
Synopsis | Return |
Description | |
Session methods | |
| None |
Load an EML file, and create a cell model as described in the file.
| |
| None |
Load a ESS file. Usually this is not used in ESS. FIXME: what happens then? need to check if this can be called recursively. FIXME: need to describe about the locals() | |
| None |
Output The way the message is handled can be changed by using
| |
| None |
This method changes what happens when
See also: | |
Simulation methods | |
| The current time as a float |
This method returns the current time of the simulator. | |
| A Python 2-tuple ( float, string ) |
This method returns the next scheduled event as a Python
2-tuple consisting of a scheduled time and a StepperID.
The event will be processed in the next time
whe The time is usually different from one that
| |
| None |
Run the simulation for When this method is called, the simulator internally
calls If event checker
event handler object are set,
See also:
| |
| None |
If the event checker and an event
handler are correctly set, and the
This mechanism is used to implement, mainly but not limited to,
GUI frontend components to the
| |
| None |
See This method is NOT IMPLEMENTED YET. | |
| None |
See | |
| None |
Perform a step of the simulation. If the optional integer
| |
| None |
Stop the simulation. Usually this is called from the event handler, or other methods called by the event handler. See also: | |
| None |
Do preparation of the simulation. Usually there is no need to call
this method because this is automatically called before executing
| |
Stepper methods | |
| A Python tuple of ID strings. |
This method returns a Python tuple which contains
ID strings of | |
| A new StepperStub object |
This method returns a | |
Entity methods | |
| A Python tuple of FullID strings. |
This method returns a Python tuple which contains
| |
| A new EntityStub object |
This method returns an | |
Logger methods | |
| A Python tuple of
FullPN strings. |
This method returns a Python tuple which contains
| |
| A new LoggerStub object |
This method returns a
|
Session class properties | ||
---|---|---|
Name | Type | |
Description | ||
theSimulator
| Simulator | |
Usually ESS users should rarely have need to get into details of
the | ||
theMainWindow
| MainWindow | |
|
There are three subclasses of ObjectStub
EntityStub
StepperStub
LoggerStub
Some methods are common to these subclasses.
Table 5-2. ObjectStub
classes method list
Methods of ObjectStub classes. | |
---|---|
Synopsis | Return |
Description | |
Common methods of EntityStub , StepperStub , and LoggerStub | |
| None |
Create the object. For example, if this is a
| |
| boolean |
This method returns true if the object this
| |
| The name as a string |
This method returns the name of the object this
| |
Methods common to EntityStub and StepperStub | |
| The classname as a string |
This method can be used to get the classname of the
| |
| A property value as one of int, float, string, or a Python tuple of these types mixed. |
This method returns a value of the The value can be either an int, a float, a string, or a tuple of these types mixed. The tuple can be nested. This method is also available via value = stub.getProperty( propertyname )and value = stub[ propertyname ]have the same consequence. | |
| Attributes as a Python tuple. |
This method returns property attributes of the property named
Attempts to set a value to a read-only propertiy and to get a value from a write-only property raise exceptions. | |
| Names of properties of the
Entity or the
Stepper as a Python tuple. |
This method is used to get the list of all the properties of the
Entity or the Stepper object.
| |
| None |
Set the property The This method can be used via stub.setProperty( propertyname, value )and stub[ propertyname ] = valueare equivalent. | |
Methods available only in LoggerStub | |
| A Numeric array |
This method is used get the data of the
If this method is called without an argument,
(i.e. getData() ), it returns whole data stored in the
If this method is called only with
If this method is called with If this method is called with all the optional parameters
| |
| A float |
This method returns the time when the
| |
| A float |
This method returns the last time when data is appended to the
| |
| A float |
This method is used to get the number of data points this
| |
| A float |
Get the current minimum logging interval of the
See | |
| None |
The If zero is set, the If a positive number is set, the |
ECDDataFile
Class APIECDDataFile
class has the following set of methods.
Table 5-3. ECDDataFile
class method list
ECDDataFile methods. | |
---|---|
Synopsis | Return |
Description | |
| None |
Constructor. | |
| An array |
This method returns the data as a rank-2 array of Numeric Python. | |
| A string |
This method returns a name of the data. The default value of the name is
an empty string ( | |
| A string |
If either loading or saving of the data from a file is succeeded, this method returns
the name of the file. Otherwise this
method returns an empty string ( | |
| A tuple |
This method returns the list of axis names as a tuple containing
string objects. The default value is | |
| A string |
This method returns a note field of this
| |
| None |
This method loads data from a file | |
| None |
This method saves the data to a file | |
| None |
This method replaces the data of this | |
| None |
This method sets the name of this data. | |
| None |
This method names axes of the data. | |
| None |
This method sets the note field of this
|