Processing with Conductor
Conductor manages the function element tree, and performs integration
calculations.
Processing Order
- conductor implements Runnable.
-
First Visitor is used by Runnable.run(), and NodeList, ReactorList, and AnalyzerList are created.
In the case of an instance tree like below,
external cell NaChannel 4sGate 2sGate /NaChannel K1Channel /cell /external
The order of every node is registered in the NodeList
external cell NaChannel 4sGate 2sGate K1Channel
, the Reactor order is registered in the ReactorList
4sGate 2sGate NaChannel K1Channel cell external
Analyzer order is registered in the AnalyzerList, the same manner as the ReactorList.
- Next, NodeList.setLinks() is called.
- When start() is called, a flag for calculating is set and integrate() is called.
- In integrate, first of all NodeList.prepare is called.
- For each time step, analyzers.analyze(double t), Reactors.calculate(double t), Variables.update(double t) are called. (Note: by specifing Variable class in the xml, the calculation sequence can be changed.)
- In Variables, the time step which fulfils the dy/y settings is used, and every Variable is updated. The time step is returned to Conductor.
- Calculations are only carried out for the time which has been set in duration.
- Finally, NodeList.end() is called.
- In conductor, when the Thread ends NodeList.quit() is called.