From: Rick R. <rl...@fi...> - 2002-04-11 20:03:07
|
I'm trying to pass a parameter (or more than one...) via the command line to process as i wish, and so I naively tried this public static void main(String[] args) { uchicago.src.sim.engine.SimInit init = new uchicago.src.sim.engine.SimInit(); Model model = new Model(); init.loadModel( model, null, false ); model.setArg0( args[0] ); model.setArg1( args[1] ); } Again, this is in a class defined so: public class Model extends SimModelImpl { So I tried to run it thus: java ... uchicago.src.sim.engine.SimInit LS0.GUIModel test1 false and i got this complaint (since there is no file named test1): Error reading parameter file I guess it thinks I want a standard repast parameter file to be that first parameter. I was hoping this line on the simInit doc page: * -b indicates that this is a batch model and that full name of a parameter file will follow the fully qualified model name. would mean that if i didn't include the -b, it wouldn't expect a paramter file to follow the model name. (But i see a bit lower on that same page that even in gui mode it thinks that will be a parameter file...) So.... Is there a simple way for me to get around that, so i can pass one (or more) parameters into my main Model methods and have them do with them as they wish? If there currently is no way to do that, it would be a nice feature to have, i think. Maybe add another optional flag on the run command? thanks, - r -- Rick Riolo rl...@um... Center for Study of Complex Systems (CSCS) 4477 Randall Lab University of Michigan Ann Arbor MI 48109-1120 Phone: 734 763 3323 Fax: 734 763 9267 http://www.pscs.umich.edu/PEOPLE/rlr-home.html |