Thanks very much for the link you show to me. And it's very helpful. The following is the c++ and python script i used to control writing data value to a file in seeral simulations.
1. ofstream myfile;
myfile.open ("example.txt",ios::out | ios::app | ios::binary);
myfile <<time_value<< ",\n";
myfile.close();
2.#!/usr/bin/python
import sys
import os
#define function
def start_simulation(data):
os.system('./waf --run "scratch/newadhoc --RngRun=%d" ' % (data))
for rng in range(1,6):
start_simulation(rng)
print '#%d' % (rng)
3.the value in the example.txt.the value of time_value in 1.
30.061,
30.0125,
30.0366,
30.0156,
30.0734,
在 2014年4月6日星期日UTC+8上午4时12分03秒,Tommaso Pecorella写道: