Can i have a variable length chromosome in JGAP?

1k views Asked by At

Im using JGAP to generate testvectors for a schematic. I got maximum coverage of a single testvector by setting the genes of a chromosome to be bits . Now i need to get a 100% coverage with minimum number of testvectors.

If i design each gene to be a testvector, id need to calculate a fitness function based on the number of genes and total coverage and id also need to evolve both chromosome length and each testvectors(genes) bits ..

is it even possible to have a variable length chromosome?

Are there any standard designs for this type of tasks?

1

There are 1 answers

0
Andreas On BEST ANSWER

Sounds a bit similar to the vehicle routing problem (VRP). There the solution is often encoded as a list of lists. Each list represents the tour for a vehicle and all together they represent a solution to the problem.

I assume you could encode it in a similar way. Consider each point that you want to cover as a customer that you want to visit and consider each vehicle to be a "testvector". You want to cover all points (as typically in a VRP solution you want to visit all customers), but you want to cover them with a minimum number of vehicles (=testvectors).

What are the specific constraints of your problem? I assume you have some kind of limit on which points you can cover in a certain testvector.