[ ohymos | Source | Keywords | Summary | Ancestors | All Members | Descendants ]
Back to the top of JointStp
The averaged value from t to t + Dt is sent at t + Dt, where Dt is the time interval.
[機能]
JointStp は、複数個数の receive port を持ち、そこから
Data<double> 型のデータ (データ接続型は、折れ線データ、ステップ
データ、またはパルスデータのいずれか) を受信し、それらの線形和をステッ
プデータ形式で send port から送出します。
時刻 t から時刻 t + Dt までの平均値を、時刻 t + Dt に送出します。
式で表すと
各受信端子のデータ接続型 (Data Connection Type, DCT) は、
の中から選択して指定します。
[受信端子の仕様]
受信端子の個数は,任意です。
受信端子の個数 n は、
のいずれかを使用して指定します。
受信端子の仕様を項目別に列挙します。
[送信端子の仕様]
[Init のための追加情報]
構造定義ファイルの Init のための追加情報には、
[パラメタの指定] パラメタは、
です。受信端子のデータ接続型DCT は、0 (折線), 1 (ステップ)、2
(パルス) です。パラメタは、パラメタファイルに、つぎの順で並べ
ます。
JointStp を構造定義ファイルに登録して使用する場合は、ここのパラメタ
値もInit のための追加情報として与えるようにし、パラメタファイルには
書かないでください。
[初期状態の指定] 状態量は,current_time (sec) だけです。
初期状態を読み取る関数は,つぎのようです。
[解説]
受信端子から受信するデータの単位、受信端子の乗数の単位、送信端子から
送出されるデータの単位は特に記述しませんでした。
一般には、受信端子から受信するデータと送信端子から送出するデータの単
位は同じで、例えば、m^3/sec であり、受信端子の乗数は、無次元でしょう。
特別には、受信端子の乗数を単位変換のために使用することも可能です。
a[0]r[0](t,t+Dt) + a[1]r[1](t,t+Dt) + ... + a[n-1]r[n-1](t,t+Dt))
を計算して出力します。ただし、n: receive port の個数、a[0], a[1],
..., a[n-1]: 係数、Dt: 時間間隔です, r[i](t,t+Dt): i番目の受信端
子データの時刻 t から時刻 t+Dt の間の平均値。
0 折線
1 ステップ (時刻 t-Dt から時刻 t までの値を t に記録)
2 パルス
n Dt dct[0] a[0] dct[1] a[1] ... dct[n-1] a[n-1]
の値を並べます。受信端子の個数 n は、Init の中で読みます。Dt 以降は、
Init の中で、Set_parameter(FILE*) を使って読みます。Dt 以降について
は、[パラメタの説明] を参照してください。データの間には、1個以上の空
白を置いてください。データを一行に書けないときは、複数行に渡っても構
いません。
Dt dct[0] a[0] dct[1] a[1] ... dct[n-1] a[n-1]
void Set_initial_state(FILE* fp) {
time_t tnow; fscanf(fp, "%ld", &tnow);
if (tnow > 0) current_time = tnow;
}
Back to the top of JointStp
JointStp* NewElement() ;
Returns a pointer to a new JointStp
JointStp* NewElement() ;
Function is currently defined inline.
Back to the top of JointStp
Boolean Init(char* o_name, int o_num, FILE* fp);
Init function for SCF.
Additional information for Init:
n Dt dct[0] a[0] dct[1] a[1] ... dct[n-1] a[n-1]where n: number of receive ports, Dt: time interval, dct[0]. .... dct[n-1]: data connection type, a[0], ... a[n-1]: multipliers
構造定義ファイルでは、この関数がパラメタを読み込むので、パラメタファ
イルには、パラメタを書かないでください。
n Dt dct[0] a[0] dct[1] a[1] ... dct[n-1] a[n-1]
の値を並べます。受信端子の個数 n は、Init の中で読みます。Dt 以降は、
Init の中で、Set_parameter(FILE*) を使って読みます。Dt 以降について
は、class JointStp の DESCRIPTION の中の [パラメタの説明] を参照し
てください。データの間には、1個以上の空白を置いてください。データを
一行に書けないときは、複数行に渡っても構いません。
Boolean Init(char* o_name, int o_num, FILE* fp);
Back to the top of JointStp
Boolean Init(char* o_name, int o_num, int numinput);
Boolean Init(char* o_name, int o_num, int numinput);
Back to the top of JointStp
JointStp(char* o_name, int o_num, int numinput) ;
Constructor
JointStp(char* o_name, int o_num, int numinput) ;
Function is currently defined inline.
Back to the top of JointStp
JointStp(void) ;
Default constructor
JointStp(void) ;
Function is currently defined inline.
Back to the top of JointStp
~JointStp(void) ;
Destructor
~JointStp(void) ;
Function is currently defined inline.
Back to the top of JointStp
void Set_parameter(FILE* fp);
Read in paramters
void Set_parameter(FILE* fp) { fscanf(fp, "%d", &mDt); int dct; for (int i = 0; i < mNumRps; i++) { fscanf(fp, "%d %lf ", &dct, &(mA[i])); mRps[i].Set_data_connection_type(dct); } }
void Set_parameter(FILE* fp);
Back to the top of JointStp
void Set_port(int n);
Set the number of receive ports
void Set_port(int n);
Back to the top of JointStp
void Set_initial_state(FILE* fp) ;
void Set_initial_state(FILE* fp) { time_t tnow; fscanf(fp, "%ld", &tnow); if (tnow > 0) current_time = tnow; }
void Set_initial_state(FILE* fp) ;
Function is currently defined inline.
Back to the top of JointStp
void Set_initial_state(time_t ct) ;
void Set_initial_state(time_t ct) ;
Function is currently defined inline.
Back to the top of JointStp
void Save_terminal_state(FILE* fp) ;
void Save_terminal_state(FILE* fp) ;
Function is currently defined inline.
Back to the top of JointStp
void Save_terminal_state(time_t& ct) ;
void Save_terminal_state(time_t& ct) ;
Function is currently defined inline.
Back to the top of JointStp
Boolean Initial_output(void);
Boolean Initial_output(void);
Back to the top of JointStp
time_t Calculate_time_step(void) ;
time_t Calculate_time_step(void) ;
Function is currently defined inline.
Back to the top of JointStp
Boolean Can_you_calculate(void) ;
Boolean Can_you_calculate(void) ;
Function is currently defined inline.
Back to the top of JointStp
Boolean Work(void) ;
Boolean Work(void) ;
Function is currently defined inline.
Back to the top of JointStp
Boolean Calculate(void);
Boolean Calculate(void);
Back to the top of JointStp
Back to the top of JointStp
Back to the top of JointStp
Back to the top of JointStp
Report problems to jkotula@stratasys.com