From: Mark R. D. <mdi...@la...> - 2003-10-16 01:52:22
|
Xiaodong, There are two approaches that I know of: 1.) I think there is a means to write each batch run out to a row of a results file. I believe you can setup uchicago.src.sim.analysis.DataRecorder to work in batch mode, in which case it appends each datasource for a simulation as part of a record (ie without newlines). Nick, Tom or Gulya could probibly provide better details on this subject. 2.) Use repast-jellytag project which I wrote, it will allow you to run a batch process, writting out the parameters you want from each simulation. It can do stochastic sampling fairly easily, I havn't yet configured it to do iterations over a set of values the way you can in repast, but I don't think it would take much work to set something like that up. http://repast-jellytag.sourceforge.net to see an example: http://cvs.sourceforge.net/viewcvs.py/repast-jellytag/repast-jelly-taglibrary/models/cagn/batch.xml?rev=1.12&view=markup the important parts are the <model> tags at the beginning and the <forEach> tag at the end. -Mark Xiaodong Li wrote: > > Hi RePast gurus, > > When I try to do the collection of data, I am not sure how to do the > following: > > 1) record data (eg., best-fitness) at each generation for 1000 > generation, which is a run; > 2) run the model 30 runs and take the average of the best-fitness value > over the 30 runs. > > I can do 1) without any problem, following the "how-to-document" on how > to collect data. However, for 2), since every time I run the model it > produces data into a single file, so I will end up having 30 files, one > for each single run. For this, I have to do the cut-and-paste into the > Excel spreadsheet, in order to calculate the average and standard > deviation. > > My question is: can I do this from within the Sim.java or whatever, > without having to resort to spreadsheet?? > > Thanks for your help in advance. > > Cheers, > > - Xiaodong > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: SF.net Giveback Program. > SourceForge.net hosts over 70,000 Open Source Projects. > See the people who have HELPED US provide better services: > Click here: http://sourceforge.net/supporters.php > _______________________________________________ > Repast-interest mailing list > Rep...@li... > https://lists.sourceforge.net/lists/listinfo/repast-interest -- Mark Diggory Software Developer Harvard MIT Data Center http://www.hmdc.harvard.edu |