Can i have a variable length chromosome in JGAP?

回眸只為那壹抹淺笑 提交于 2020-01-15 07:51:47

问题


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:


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.



来源:https://stackoverflow.com/questions/10706586/can-i-have-a-variable-length-chromosome-in-jgap

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!