Print

Print


Hello,

In a GA implementation using ECJ, I created a class as the domain model responsible to load its own data.

Before running the ECJ framework I set this model into a singleton that ECJ just accessed from the problem class (defined from the property definition file). .

Using this singleton as a "portal" to pass any data does not seem to be the right way... but it worked. In my case, I used ECJ as a jar into my application to enforce abstraction and encapsulation in my code.

So, if I choose not to touch the ECJ code and use it as a dependency artifact, how should I pass a configurated class to run?

Maybe the parameter database is the right way but using a jar?

        try
        {
            org.usach.diinf.or.facade.ecj.Evolve.main(parameters.array());
        }
        catch(Throwable t)
        {
            logger.error(t, t);
            throw new ORException("Error in ECJ!", t);
        }

Now I am working on a GP project so it would be interesting to know your experience in this topic.


Best regards,
Alejandro.

PD: Please excuse my written english.


On Tue, Jan 17, 2012 at 5:53 PM, George Papaioannou <[log in to unmask]> wrote:
Hello Everybody,

I'm a new user of ECJ. I'm trying to make a genetic algorithm which will
find the best examination timetable according to some rules, which will be
used for implement the fitness function.

The algorithm's final data will be an array which will include rows with the
lesson's name, the date and the time of the examination or even better a
list of objects with properties the name, and the date and time of the
examination.

I decided to use the IntegerVectorIndividual with the using the table
indices as the Integer Numbers of the vector.

My questions are:

1. I will define some classes in order to load the algorithms data i.e.
Students , Lessons. How can I load the data from a file, in order to use
them in ECJ?
2. Is it possible to create a global array in order to load the data in it
and using it in ECJ?

Thanks in advance,
George Papaioannou



--


--------------------------------------------------
J. Alejandro Zepeda Cortés
Ing. Civil Informático
Celular: +56-9-98184077
Skype: zepeda.torreblanca
[log in to unmask]
--------------------------------------------------