org.simBio.core
クラス Conductor

java.lang.Object
  上位を拡張 org.simBio.core.Component
      上位を拡張 org.simBio.core.Parameter
          上位を拡張 org.simBio.core.Composite
              上位を拡張 org.simBio.core.Reactor
                  上位を拡張 org.simBio.core.Conductor
すべての実装されたインタフェース:
java.lang.Runnable, Node, Visitor

public class Conductor
extends Reactor
implements java.lang.Runnable, Visitor

root instance to conduct integration. At this moment, ODE is calculated by Euler method.
モデルツリーのルートになり、積分計算を行います。 Runnableをimplementsしており、Threadを1つ使います。

バージョン:
$Id: Conductor.java,v 1.7 2007/09/18 07:27:34 nsarai Exp $
作成者:
Nobuaki Sarai

フィールドの概要
 double adjustDyOverY
          for variable time step, empirical method
 double dtMax
          maximum time step of integration
 double dtMin
          minimum time step of integration
 Node duration
          duration of integration
 Node elapsedTime
          elapsed time
 Node timeStep
          time step of integration
 
クラス org.simBio.core.Parameter から継承されたフィールド
value
 
コンストラクタの概要
Conductor()
           
 
メソッドの概要
 void addCalculationObserver(CalculationObserver obs)
          計算を開始・終了した時に、通知が行われる監視オブジェクトを追加します。
 void calculate(double t)
          call calculate(double t) of the every Reactor.
 void checkException()
          Check if this thread has thrown an exception.
protected  void end()
          end of integration
 void exit()
          exit run() of this Thread. set active flag = false
protected  void integrate()
          integrate ODEs.
 void prepare()
          initialization for calculation.
protected  void quit()
          call before exit thread.
 void removeCalculationObserver(CalculationObserver obs)
          計算を開始・終了した時に、通知が行われる監視オブジェクトを削除します。
 void run()
          main entry of this thread.
protected  void setLinks()
          call after instance tree has constructed.
 void start()
          start calculation. set calculate flag = true
 void stop()
          stop calculation. set calculate flag = false
 void visit(Component component)
          Add Variables to the list.
 void visit(Composite composite)
          add Reactors to ReactorList, and Analyzers to AnalyzerList.
 
クラス org.simBio.core.Composite から継承されたメソッド
accept, getLink, getNode, getNodesIterator, getNodesSize
 
クラス org.simBio.core.Parameter から継承されたメソッド
addValue, getValue, getValueString, setInitializer, setValue, setValueString, setValueToField
 
クラス org.simBio.core.Component から継承されたメソッド
addDydt, getIndent, getIndentedShortName, getName, getName, getParent, getRoot, getShortName, getUnits, isNamed, isPrefixed, logIndented
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
インタフェース org.simBio.core.Node から継承されたメソッド
addDydt, addValue, getValue, setValue
 

フィールドの詳細

elapsedTime

public Node elapsedTime
elapsed time


duration

public Node duration
duration of integration


timeStep

public Node timeStep
time step of integration


dtMin

public double dtMin
minimum time step of integration


dtMax

public double dtMax
maximum time step of integration


adjustDyOverY

public double adjustDyOverY
for variable time step, empirical method

コンストラクタの詳細

Conductor

public Conductor()
メソッドの詳細

visit

public void visit(Component component)
Add Variables to the list.
Variableをlistに登録します。

定義:
インタフェース Visitor 内の visit
関連項目:
Visitor.visit(org.simBio.core.Component)

visit

public void visit(Composite composite)
add Reactors to ReactorList, and Analyzers to AnalyzerList.
Reactor, Analyzerをlistに登録します。

定義:
インタフェース Visitor 内の visit
関連項目:
Visitor.visit(org.simBio.core.Composite)

run

public void run()
main entry of this thread.
setLinks()を呼び出した後、待機ループにはいります。 計算開始flagが立てられると、integrate()を呼び出し、積分計算をします。 終了flagが立てられると、NodeList.quit()を呼び出し、threadを終了します。

定義:
インタフェース java.lang.Runnable 内の run
関連項目:
Runnable.run()

setLinks

protected void setLinks()
call after instance tree has constructed.
次のようなinstance treeの場合、
        external
                cell
                        Vm
                        Na
                        K
                        NaChannel
                                4sGate
                                2sGate
                        /NaChannel
                        K1Channel
                /cell
        /external
        
次の順序で全てのNodeのsetLinks()を呼び出します。
                        Vm
                        Na
                        K
                                4sGate
                                2sGate
                        NaChannel
                        K1Channel
                cell
        external

オーバーライド:
クラス Component 内の setLinks
関連項目:
Component.setLinks()

quit

protected void quit()
call before exit thread.

オーバーライド:
クラス Component 内の quit
関連項目:
Component.quit()

prepare

public void prepare()
initialization for calculation.

オーバーライド:
クラス Parameter 内の prepare
関連項目:
Component.prepare()

end

protected void end()
end of integration

オーバーライド:
クラス Component 内の end
関連項目:
Component.end()

integrate

protected void integrate()
integrate ODEs.

First prepare() is called, then for every time step:

  1. calculate(double t)
  2. analyze(double t) of all Analyzer
  3. update(double t) of all Variable
  4. Elapsed time is renewed, and continue calculation during duration.
Last end() is called.

最初にprepare()を呼び出します。各time step毎に、

  1. calculate(double t)
  2. 全てのVariableのupdate(double t). (注: Variables.update()を、xmlで指定して作成するように変更すれば、計算方式を変更できます。)
  3. 全てのAnalyzerのanalyze(double t)をtreeの末端から順に呼び出します。
  4. elapsed timeを更新し、durationに設定された時間分だけ、計算をします。
最後に、end()を呼び出します。

関連項目:
calculate(double)

calculate

public void calculate(double t)
call calculate(double t) of the every Reactor.
Reactor.calculate(double)を呼び出す順序は、以下のようになります。
                                4sGate
                                2sGate
                        NaChannel
                        K1Channel
                cell
        external
        

定義:
クラス Reactor 内の calculate
パラメータ:
t - elapsed time (ms)
関連項目:
Reactor.calculate(double)

checkException

public void checkException()
                    throws java.lang.Exception
Check if this thread has thrown an exception.

例外:
java.lang.Exception

start

public void start()
start calculation. set calculate flag = true


stop

public void stop()
stop calculation. set calculate flag = false


exit

public void exit()
exit run() of this Thread. set active flag = false


addCalculationObserver

public void addCalculationObserver(CalculationObserver obs)
計算を開始・終了した時に、通知が行われる監視オブジェクトを追加します。

パラメータ:
obs - 監視オブジェクト

removeCalculationObserver

public void removeCalculationObserver(CalculationObserver obs)
計算を開始・終了した時に、通知が行われる監視オブジェクトを削除します。

パラメータ:
obs - 監視オブジェクト


???(C) 2002-2007 ?????????????????????