OHyMoS.NET Class Library

OhElement.work メソッド 

_currentime から OhTotal_terminalTime 間の計算アルゴリズムを定義します。

calculate(), calculateTimeStep() などを用いて、_terminalTime までの計算を実行します。

まず、 OhElement.canYouCalculate() の戻り値が false ならば、計算開始不可と判断し、false を返します。

戻り値が true の場合は、 true である限り、 OhElement.calculate(), _currentTime.add(_timeStep) を繰り返し実行します。

最後に、 OhElement.setDataPackArray(), を実行し、true を返します。
 [戻り値] ・true --> 計算を実行した場合。 ・false -> 計算不可能の場合、または計算済みの場合。 

Calculate between "_currentTime" and "_terminalTime". In classes derived from class Element, its definition should be given.

Calculation by "_terminalTime" is performed using "calculate()", "calculateTimeStep()", etc.

First, if return value of "canYouCalculate()" becomes "false", it will be judged that a calculation start is impossible, "false" is returned.

When the return value is "true", "calculate()" and "_currentTime += _timeStep" are repeated and performed, as long as the return value of "canYouCalculate" is "true".

Finally, "setDataPackArray()" and "reportToSender()" are performed and "true" is returned.
 [RETURN] ・true --> When calculation was performed. ・false -> When calculation is impossible. When calculation has finished. 
public abstract bool work();

戻り値

a bool value

例外

例外の種類条件
OhCannotGetDataErrorif an error occurs
OhErrorif an error occurs

参照

OhElement クラス | OhymosNet 名前空間