In my custom fitness function, I need to read data line by line in the For i=0 to nSamples-1 loop, from a text file made of nSamples lines.How to manage this file? For example, can it be opened only once and then just checked for its availability ?

For Javascript custom functions it is not possible to maintain state between generations. If you use an external custom fitness function then you can read the file once and keep it on a global or static variable (an array of doubles, for example).

Thank you.The first time the custom function is run, the encoding of positive class has the value 0. It is only in the next runs that you can find it with the right value 1.Is it a bug? Currently I have to skip the first run otherwise my code may be wrong.

I cannot duplicate the issue. For example, if you return the encoding of the positive class as the fitness and run for one generation you will see that the value is correct. To do this change the custom fitness to:

return aParameters[9];

Then in the Settings Panel change the Number of Chromosomes to one and finally, in the Run Panel run for a single generation. Assuming that your encoding is one then the fitness value will show as one.

I have started to use GeneXproTools again (release 5) and I met two problems while using the custom fitness fonction running with Excel VBA.- With the current release, the gepmodel function is now passed its parameters through a range, instead of an array, as previously done.I had to modify that and also the starting index value (1 for the range but 0 for the array), in order to match my former code.

- In the TransformCategoricalInputs function (in the gepmodel function) I had to add in a some places a Select statementlike this, to avoid an incompatibilty type when an empty value is met in a CDbl conversion.