Is there a bug in BestChromosomesSelector?

View: New views
2 Messages — Rating Filter:   Alert me  

Is there a bug in BestChromosomesSelector?

by Andrea Filoso :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi to everybody
I'm using JGAP 3.4.3
I'm developing a project using GA for the building energy analisys.
The optimization is multi objectives so I'm using setMultiObjectives
function in MyFitnessFunction object and getMultiObjectives function in
MyFitnessEvaluator (implements FitnessEvaluator).
Now I have a problem with BestChromosomesSelector. In isFitter()
function (MyFitnessEvaluator's function), chromosomes have
getMultiObjectives() = null. isFitter() function was called after
FitnessFunction.getFitnessValue() so the value of getMultiObjectives()
should be the same that I pass to setMultiObjectives().

I fixed this problem with a new BestChromosomesSelector. In add()
function, I added this code for each chromosome that was created:
if ( ((Chromosome)a_chromosomeToAdd).getMultiObjectives() != null)
((Chromosome)clone).setMultiObjectives(
((Chromosome)a_chromosomeToAdd).getMultiObjectives());

I don't know the JGAP architecture, so I'm not sure of this solution.

Why are multi objective vector values ignored in the add() function?

Is it a bug or is it rigth that ifFitter computes the objective vector
values?

Thank you for your attention.

Andrea Filoso
--

COOPROGETTI S.c.r.l.
Via Ospedale Vecchio n.3
33170 Pordenone
tel. 0434.21085
fax. 0434.520336
mail to: andrea.filoso@... <mailto:andrea.filoso@...>
sito: www.coprogetti.it <http://www.coprogetti.it>

Informativa sulla privacy D.Lgs 196/2003
Le informazioni contenute nella comunicazione che precede possono essere
riservate e sono, comunque, destinate esclusivamente alla persona o
all'ente sopraindicati.
La diffusione, distribuzione e/o copiatura del documento trasmesso da
parte di qualsiasi soggetto diverso dal destinatario è proibita.
La sicurezza e la correttezza dei messaggi di posta elettronica non
possono essere garantite.
Se avete ricevuto questo messaggio per errore, Vi preghiamo di
contattarci e distruggerlo.
Grazie.
P Rispetta l’ambiente. Hai davvero bisogno di stampare questa mail?




------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables
unlimited royalty-free distribution of the report engine
for externally facing server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
jgap-users mailing list
jgap-users@...
https://lists.sourceforge.net/lists/listinfo/jgap-users

Parent Message unknown Re: Is there a bug in BestChromosomesSelector?

by Klaus Meffert-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Andrea,

without digging deeper I supose you are right with your assumption and correction. This is because the multi-objective part is a quite young feature and there is no tight coupling between the selectors and the core by intention. I will further investigate and add some unit tests.

Thanx for your detailled report.

Best

Klaus
----- original Nachricht --------

Betreff: [jgap-users] Is there a bug in  BestChromosomesSelector?
Gesendet: Di, 19. Mai 2009
Von: Andrea Filoso<andrea.filoso@...>

> Hi to everybody
> I'm using JGAP 3.4.3
> I'm developing a project using GA for the building energy analisys.
> The optimization is multi objectives so I'm using setMultiObjectives
> function in MyFitnessFunction object and getMultiObjectives function in
> MyFitnessEvaluator (implements FitnessEvaluator).
> Now I have a problem with BestChromosomesSelector. In isFitter()
> function (MyFitnessEvaluator's function), chromosomes have
> getMultiObjectives() = null. isFitter() function was called after
> FitnessFunction.getFitnessValue() so the value of getMultiObjectives()
> should be the same that I pass to setMultiObjectives().
>
> I fixed this problem with a new BestChromosomesSelector. In add()
> function, I added this code for each chromosome that was created:
> if ( ((Chromosome)a_chromosomeToAdd).getMultiObjectives() != null)
> ((Chromosome)clone).setMultiObjectives(
> ((Chromosome)a_chromosomeToAdd).getMultiObjectives());
>
> I don't know the JGAP architecture, so I'm not sure of this solution.
>
> Why are multi objective vector values ignored in the add() function?
>
> Is it a bug or is it rigth that ifFitter computes the objective vector
> values?
>
> Thank you for your attention.
>
> Andrea Filoso
> --
>
> COOPROGETTI S.c.r.l.
> Via Ospedale Vecchio n.3
> 33170 Pordenone
> tel. 0434.21085
> fax. 0434.520336
> mail to: andrea.filoso@... <mailto:andrea.filoso@...>
> sito: www.coprogetti.it <http://www.coprogetti.it>
>
> Informativa sulla privacy D.Lgs 196/2003
> Le informazioni contenute nella comunicazione che precede possono essere
> riservate e sono, comunque, destinate esclusivamente alla persona o
> all'ente sopraindicati.
> La diffusione, distribuzione e/o copiatura del documento trasmesso da
> parte di qualsiasi soggetto diverso dal destinatario è proibita.
> La sicurezza e la correttezza dei messaggi di posta elettronica non
> possono essere garantite.
> Se avete ricevuto questo messaggio per errore, Vi preghiamo di
> contattarci e distruggerlo.
> Grazie.
> P Rispetta l’ambiente. Hai davvero bisogno di stampare questa mail?
>
>
>
>
> ----------------------------------------------------------------------------
> --
> Crystal Reports - New Free Runtime and 30 Day Trial
> Check out the new simplified licensing option that enables
> unlimited royalty-free distribution of the report engine
> for externally facing server and web deployment.
> http://p.sf.net/sfu/businessobjects
> _______________________________________________
> jgap-users mailing list
> jgap-users@...
> https://lists.sourceforge.net/lists/listinfo/jgap-users
>

--- original Nachricht Ende ----


------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com 
_______________________________________________
jgap-users mailing list
jgap-users@...
https://lists.sourceforge.net/lists/listinfo/jgap-users