[Paradiseo-help] [Paradiseo-users] Correct use of moeoObjectiveVectorTraits

Johann Dréo johann at dreo.fr
Mer 24 Avr 11:07:10 CEST 2013


On Sun, Apr 21, 2013 at 9:41 PM, Christoph Redecker <
redecker at avrbeginners.net> wrote:
> this is the first time I'm implementing an EO algorithm. I have an
> optimization problem with several objectives. I want to load a
> configuration file before the EO algorithm runs, then initialize my
> population and optimize away.
>
> For an object to be created, the number of objectives and the number of
> genes must be known. Both are known after the configuration has been
> loaded. My questions are:
>
> 1) moeoObjectiveVectorTraits has a private static unsigned int nObj
> property. Where and when is that set, and what information is that
> setting based on?

Generally, you inherit your own class from that one and overload
nObjectives to return a const.


> 2) Can I just create my own public nObj property in a class derived from
> moeoObjectiveVectorTraits and return that in nObjectives()? Would that
> have any drawbacks or cause bugs with other parts of the framework?

I think it's OK, but maybe you should use the "setup" method, that seems to
be here to handle a dynamic number of objectives.


> 3) Is it customary to store all available configuration data related to
> the problem in a class derived from moeoObjectiveVectorTraits?

If you mean data related to the number of objectives, I would say yes.
Else, it depends on the semantic of your data.
I would personally try to maintain a separation of concern, by implementing
my own:
* moeoObjectiveVectorTraits for data related to the number of objectives
and their "direction" (min or max);
* MOEO, for data related to the fitness computation (note that an MOEO
embeds an moeoObjectiveVectorTraits).

If you have data related to the gene encoding, your own EOT is a better
place.

But keep in mind that if those data are only useful for generating your
individuals, surely the initialization operators are a far more better
place (instanciated once).

-- 
nojhan
-------------- section suivante --------------
Une pièce jointe HTML a été nettoyée...
URL: <http://lists.gforge.inria.fr/pipermail/paradiseo-help/attachments/20130424/938c00c0/attachment.html>
-------------- section suivante --------------
_______________________________________________
Paradiseo-users mailing list
Paradiseo-users at lists.gforge.inria.fr
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/paradiseo-users


Plus d'informations sur la liste de diffusion Paradiseo-help