通过在源文件中加入System.out.print("Consumption-NER:-"+_logicalTime+" "+System.currentTimeMillis())类似的方式在标准输出设备上输出所有NER,TAR和time grant事件及其发生的系统时间点。然后在具体运行各个联邦成员时,把标准输出重定向到文本文件中,再把各个联邦成员产生的文本文件合并。导入到Excel中(分隔符为空格)。然后在Excel中按第二列(系统时间)排序,就得到了下面的事件时间序列。下面列出了从系统开始运行,逻辑时间为0到逻辑时间50秒内发生的事件序列。
首先看一下与时间推进有关的各个联邦的参数列表
联邦成员 时间推进方式 步长 lookahead
Manager TAR 1.0 0.01
Productioon NER 0.01
Transport TAR 1.0 0.01
Consumption NER 0.01
Viewer TAR 1.0 0.1
其中,Viewer不是时间调节的,其时间推进被忽略。则Manager和Transport都为TAR方式,而Production和Consumption都为NER方式。Manager以墙钟时间推进,因此在发出TAR请求之前,考虑了slppeTime,以确保其在整数秒发出TAR请求。
注意,对于TAR方式的时间推进,RTI会如下处理:
Production-NER:-time<1.5> 1290135754501
manager-TAR:-time<0.0> 1290135754511
Transport-TAR:-time<1.0> 1290135754531
Production-feflectAttributeValues:-time<0.01> 1290135754541
Production-feflectAttributeValues:-time<0.01> 1290135754541
Production-feflectAttributeValues:-time<0.01> 1290135754541
Production-feflectAttributeValues:-time<0.01> 1290135754541
Production-feflectAttributeValues:-time<0.01> 1290135754541
Production-feflectAttributeValues:-time<0.01> 1290135754541
Production-feflectAttributeValues:-time<0.01> 1290135754541
Production-feflectAttributeValues:-time<0.01> 1290135754541
Consumption-NER:-time<INF> 1290135754601
Consumption-feflectAttributeValues:-time<0.01> 1290135754601
Consumption-feflectAttributeValues:-time<0.01> 1290135754601
Consumption-feflectAttributeValues:-time<0.01> 1290135754601
Consumption-feflectAttributeValues:-time<0.01> 1290135754601
Consumpt