java - Repast restart issue -


i'm developing artificial intelligent program explore given space resources.

i'd run multiple scenarios in order collect data , output file.

i used "multiple runs" option in gui , stop() when 1 module run finished (all resources have been explored). problem when runs model second turn, doesn't work properly.

what mean after running once need kill application exiting because restart option doesn't work properly.

is there "restart" forgets do? because if exit application , run again works perfectly

edited it's more clear:

i use repast platform in order simulate exploration mars. have 3 kinds of agents, scouting, digging , transporting. communicate among them schedule tasks , other things.

the first time run simulation runs smoothly. , when mineral resources of planet have been explored restart model , try again can collect data.

the problem is, when use "restart" option simulation doesn't run well. if exit (not restart) , run again works fine.

what i'd know if restart option of repast gui misses steps..

thanks in advance

ps: if guys think it's absolutely necessary can post code...but project quite big

  1. don't use thread.stop() method. deprecated. thread.stop being deprecated because inherently unsafe. stopping thread causes unlock monitors has locked. (the monitors unlocked threaddeath exception propagates stack.) if of objects protected these monitors in inconsistent state, other threads might view these objects in inconsistent state. such objects said damaged. threads operating on damaged objects can behave arbitrarily, either or not. unlike other unchecked exceptions, threaddeath kills threads silently; thus, user has no warning program may corrupted. corruption can manifest @ unpredictable time after damage occurs. substitute use of thread.stop code provides gentler termination.

http://docs.sun.com/app/docs/doc/805-4031/6j3qv1of1?a=view

  1. consider thread stopping either via thread.interrupt() or via setting cancel flag. @ java concurrency in practice, section 7.1. task cancellation.

Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -