Hi guys,
i'm breaking my head with a problem that i'm not able to solve!; I have a doubt it could be easier than it seems, but i can't find the way
i'm developing an user interface for a genetic algorithm.
In this GA there are some genes, that pilot an external code. Up today I've changed the genes on which I'd like to work by changing the souce ( a very inefficient way!).
let me try to sketch the problem:
There is an external code ( AA) with many variables that could be all good genes; for example:
E_field(1:4), B_field(1:4), coil_position(1:4) etc.
AA charge these variable by using namelist recorded on the file AA.ini :
&Fields
E_field= 120,125,130,121 /
ect.
I don't want decide before what will be the number of genes and what they will be. I could decide to use only three genes E_field(1:2) and B_field(1) for on optimization or other differents configurations.
solution:
I think the key of the problem could be to define the array genes(1:N) like an array of pointers and then change the variable (target). BUT ...
how can I change the targhet when the code is compiled'
if gene1 => E_field(1) ... how can i change the target without change the code?
please where have i lost my head?
ciao, Albi
i'm breaking my head with a problem that i'm not able to solve!; I have a doubt it could be easier than it seems, but i can't find the way
i'm developing an user interface for a genetic algorithm.
In this GA there are some genes, that pilot an external code. Up today I've changed the genes on which I'd like to work by changing the souce ( a very inefficient way!).
let me try to sketch the problem:
There is an external code ( AA) with many variables that could be all good genes; for example:
E_field(1:4), B_field(1:4), coil_position(1:4) etc.
AA charge these variable by using namelist recorded on the file AA.ini :
&Fields
E_field= 120,125,130,121 /
ect.
I don't want decide before what will be the number of genes and what they will be. I could decide to use only three genes E_field(1:2) and B_field(1) for on optimization or other differents configurations.
solution:
I think the key of the problem could be to define the array genes(1:N) like an array of pointers and then change the variable (target). BUT ...
how can I change the targhet when the code is compiled'
if gene1 => E_field(1) ... how can i change the target without change the code?
please where have i lost my head?
ciao, Albi