aspose file tools
The moose likes Threads and Synchronization and the fly likes Help with threads synchronization? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Threads and Synchronization
Reply Bookmark "Help with threads synchronization?" Watch "Help with threads synchronization?" New topic
Author

Help with threads synchronization?

kahina lallali
Greenhorn

Joined: Oct 11, 2006
Posts: 1
Hey all,

Ive been trying to implement a double GA model (GA within a GA) using threads and I still can't figure out how to do the synchronization properly! At the moment, my code is:
The top GA runs and after initiliazation of the population and at the point of setting fitnesses, the second GA is called .I tried pausing the top GA so that it waits for the low level ones since it uses the same fitnesses, but that doesn't seem to happen...
There are conditional variables as well moving between the GAs for e.g. the xmosomes from the 1st GA need to be fed to the low level ones to calculate the fitnesses, which after completion of the low level GAs, they need to be returned to the top level GA.

Should I have a separate class altogether to manage the GAs? I'm not really sure how to go about it? New to Threads!

Any help & clarification would be very much appreciated!
Thanks
kahina.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Help with threads synchronization?
 
Similar Threads
Optimum number of servlets in an application
Got 93% in SCJP2
how to highlight Highlight One Specific line/Row in a JTextArea
About Strategy Pattern
NX: (HOTEL) locking level