From: Marde G. <mg...@cs...> - 2009-07-07 14:39:16
|
Hi Wiehann, Thanx for the explanation. So I guess for now I will create duplicate classes for the changes that I want to make to ensure that I don't break other people's code. I will then fix it when we start to use the google-guice library. So when I send through a patch that does this, everyone should remember that this is the reason for the duplication. Marde >>> Wiehann Matthysen <wie...@ro...> 07/07/09 4:32 PM >>> Hallo Marde, Yes, it is the same issue as trying to set the size of the Archive. The problem can be described as follows: you want to have an archive that you can access throughout the simulation. Thus, I made the archive a ThreadLocal variable which means that you can have static (within a thread) access to this archive. You want to have this type of access because you might want to select a guide from the archive as well (from within one of the guide-selection strategy classes). The problem comes in when you perform the setup of the archive from xml: you can successfully set the archive within the ArchivingIterationStep tag. But when you create another simulation and clone ArchivingIterationStep it doesn't clone the archive because the archive is a threadlocal variable stored within the Archive class. This will be solved when we use the google-guice library as you will be able to inject this dependency in a simulation-scope. Regards, Wiehann Marde Greeff wrote: > Hi everyone, > > An example xml file is attached. > > The part to focus on is the following: > > <iterationStrategy class="moo.iterationstrategies.ArchivingIterationStrategy"> > <archive class="moo.archive.constrained.SetBasedConstrainedArchive" capacity="200"> > <pruningSelection class="util.selection.recipes.ElitistSelection"/> > </archive> > > You can set the comparator as follows: > <iterationStrategy class="moo.iterationstrategies.ArchivingIterationStrategy"> > <archive class="moo.archive.constrained.SetBasedConstrainedArchive" capacity="200"> > <pruningSelection class="util.selection.recipes.ElitistSelection"> > <comparator class="util.selection.ordering.DefaultComparator/> > </pruningSelection> > </archive> > > However, if I change the DefaultComparator to any other new comparator (for example when I want to sort solutions based on their distance from other solutions in the archive and not based on fitness) it doesn't make the change. It keeps the DefaultComparator. I guess this is the same as with the archive size issue. > > Marde > > >>>> Gary Pampara <gpa...@gm...> 07/07/09 8:00 AM >>> >>>> > This is based on the usage. > > Awaiting XML file to inspect how this is being used. The issue is more than > likely related to the use of the entity.operator.selection classes - which > need to be updated to use the relavant recipe classes. > > On Tuesday 07 July 2009 07:55:08 Gary Pampara wrote: > >> Forwarding message to devel list: >> >> >> Hi, >> >> I am running into more and more problems since I cannot set/change values. >> For example, if I want to use a different comparator with the sorting >> stuff, I cannot just set it. I keeps the default setting. This will mean >> that I would have to create duplicate classes to handle this. There will >> probably be quite a few of these cases in future, when others also start to >> run into this problem. >> >> Should I just go ahead with duplication. This will not be good in the end. >> >> What is the best way of handling this? >> >> Marde >> > > ------------------------------------------------------------------------------ > Enter the BlackBerry Developer Challenge > This is your chance to win up to $100,000 in prizes! For a limited time, > vendors submitting new applications to BlackBerry App World(TM) will have > the opportunity to enter the BlackBerry Developer Challenge. See full prize > details at: http://p.sf.net/sfu/blackberry > _______________________________________________ > cilib-devel mailing list > cil...@li... > https://lists.sourceforge.net/lists/listinfo/cilib-devel > > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > Enter the BlackBerry Developer Challenge > This is your chance to win up to $100,000 in prizes! For a limited time, > vendors submitting new applications to BlackBerry App World(TM) will have > the opportunity to enter the BlackBerry Developer Challenge. See full prize > details at: http://p.sf.net/sfu/blackberry > ------------------------------------------------------------------------ > > _______________________________________________ > cilib-devel mailing list > cil...@li... > https://lists.sourceforge.net/lists/listinfo/cilib-devel > -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. |