From: Vlad C. <vla...@ya...> - 2011-10-22 21:19:30
|
Hi Richard, You were right. I didn't implement this function. It was kind of funny. I received this message from another student: "You have to add the name of the parameter to the String array returnedby getInitParams (or something like that)." And I did what he said - added the 6th parameter to the array but the array was defined in the constructor. After the parameter appeared in the panel the initial problem was solved (the parameter didn't appear in the Repast panel) and I didn't look for getInitParams anymore. I received some other answers advising me to pass to Repast Symphony. As I understand, this version is a more recent one than the one I use. I will try to get to this version as time permits. By the way, I think that the gui interface for parameters could be very useful when dealing with many parameters (and my research project is going towards that path...) Thanks Richard and the others that gave me an answer. Vlad ________________________________ From: Richard O. Legendi <rle...@ai...> To: Vlad Chiriacescu <vla...@ya...> Cc: "rep...@li..." <rep...@li...> Sent: Saturday, October 22, 2011 1:14 PM Subject: Re: [Repast-interest] Exception in thread "Thread-7" NullPointerException when running in batch mode Hi Vlad, Just a random idea: did you implement the getInitParams() function? That is an additional requirement besides the getter and setter methods. BTW we have a nice tool called MEME, and one of its features is that it allows you to run Repast J models without editing parameter files through a graphical interface: http://mass.aitia.ai/screenshots/73-meme-screenshots?start=1 You can download it here: http://meme.aitia.ai Best, Richard -- Richard O. Legendi Software developer Intelligent Applications and Web Services AITIA International, Inc. http://people.inf.elte.hu/legendi/ On 2011.10.22. 0:30, Vlad Chiriacescu wrote: > Hello, > > I am relatively new to Repast. This is the first time when I put a question to this list. I am using Netbeans 7.0, java 6 on 64 bit Intel > i3 processor. > > I have been using single runs up to now but now I need to collect much more data (using different random seeds) and I need to use the batch > mode. > > My program runs perfectly in single run mode. But when I try to load a parameter file it crashes with the following exception: > > Run: 1 > Exception in thread "Thread-7" java.lang.NullPointerException > at uchicago.src.sim.engine.BatchController.setupRecorder(Unknown > Source) > at uchicago.src.sim.engine.BatchController.start(Unknown Source) > at uchicago.src.sim.engine.BatchController$1.run(Unknown Source) > at java.lang.Thread.run(Thread.java:662) > > I used 3 versions for the parameter file. All parameters specified in the file are private fields in a simulation model class that extends the > SimpleModel class. I have written getters and setters for all of them and they all appear in the Repast panel so they can be changed > manually. > > First parameter file version: > > runs: 1 > NumberOfAgents > { > set: 10 > } > NumberOfConcepts > { > set: 5 > } > NumberOfTasks > { > set: 20 > } > MaxTicks > { > set: 500 > } > WmCapacity > { > set_list: 2 3 4 5 6 > } > RngSeed > { > set: 24896284 > } > > > > Second parameter file version: > > runs: 1 > NumberOfAgents > { > set_list: 10 > { > runs: 1 > NumberOfConcepts > { > set_list: 5 > { > runs: 1 > NumberOfTasks > { > set_list: 20 > { > runs: 1 > MaxTicks > { > set_list: 500 > { > runs: 1 > WmCapacity > { > set_list: 2 3 4 5 6 > { > runs: 1 > RngSeed > { > set_list: 24896284 > } > } > } > } > } > } > } > } > } > } > } > > > Third parameter file version: > > runs: 1 > NumberOfAgents { > set_list: 30 > { > runs: 1 > NumberOfConcepts { > set_list: 5 > { > runs: 1 > NumberOfTasks { > set_list: 20 > } > > } > } > } > } > > Do you have any idea why I get this exception? > > If you know that this question has been answered before please give me the link to the answer. I am not familiar with the mailing archive. > > Thank you for your valuable help, > > Vlad > > > > ------------------------------------------------------------------------------ > The demand for IT networking professionals continues to grow, and the > demand for specialized networking skills is growing even more rapidly. > Take a complimentary Learning@Cisco Self-Assessment and learn > about Cisco certifications, training, and career opportunities. > http://p.sf.net/sfu/cisco-dev2dev > > > > _______________________________________________ > Repast-interest mailing list > Rep...@li... > https://lists.sourceforge.net/lists/listinfo/repast-interest |